/*
 @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 p,aa=typeof Object.create=="function"?Object.create:function(a){function b(){}b.prototype=a;return new b},ba=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var da=ca(this);function ea(a,b){if(b)a:{var c=da;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&b!=null&&ba(c,a,{configurable:!0,writable:!0,value:b})}}var fa;
if(typeof Object.setPrototypeOf=="function")fa=Object.setPrototypeOf;else{var ha;a:{var ia={a:!0},ka={};try{ka.__proto__=ia;ha=ka.a;break a}catch(a){}ha=!1}fa=ha?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var la=fa;
function ma(a,b){a.prototype=aa(b.prototype);a.prototype.constructor=a;if(la)la(a,b);else for(var c in b)if(c!="prototype")if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Dj=b.prototype}function na(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}
function t(a){var b=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if(typeof a.length=="number")return{next:na(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function C(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}function oa(a){if(!(a instanceof Object))throw new TypeError("Iterator result "+a+" is not an object");}
function pa(){this.I=!1;this.C=null;this.i=void 0;this.h=1;this.B=this.D=0;this.M=this.u=null}function qa(a){if(a.I)throw new TypeError("Generator is already running");a.I=!0}pa.prototype.L=function(a){this.i=a};function ra(a,b){a.u={Yf:b,og:!0};a.h=a.D||a.B}pa.prototype.getNextAddressJsc=function(){return this.h};pa.prototype.getYieldResultJsc=function(){return this.i};pa.prototype.return=function(a){this.u={return:a};this.h=this.B};pa.prototype["return"]=pa.prototype.return;
pa.prototype.O=function(a){this.u={A:a};this.h=this.B};pa.prototype.jumpThroughFinallyBlocks=pa.prototype.O;pa.prototype.g=function(a,b){this.h=b;return{value:a}};pa.prototype.yield=pa.prototype.g;pa.prototype.S=function(a,b){a=t(a);var c=a.next();oa(c);if(c.done)this.i=c.value,this.h=b;else return this.C=a,this.g(c.value,b)};pa.prototype.yieldAll=pa.prototype.S;pa.prototype.A=function(a){this.h=a};pa.prototype.jumpTo=pa.prototype.A;pa.prototype.j=function(){this.h=0};pa.prototype.jumpToEnd=pa.prototype.j;
pa.prototype.m=function(a,b){this.D=a;b!=void 0&&(this.B=b)};pa.prototype.setCatchFinallyBlocks=pa.prototype.m;pa.prototype.K=function(a){this.D=0;this.B=a||0};pa.prototype.setFinallyBlock=pa.prototype.K;pa.prototype.o=function(a,b){this.h=a;this.D=b||0};pa.prototype.leaveTryBlock=pa.prototype.o;pa.prototype.l=function(a){this.D=a||0;a=this.u.Yf;this.u=null;return a};pa.prototype.enterCatchBlock=pa.prototype.l;
pa.prototype.F=function(a,b,c){c?this.M[c]=this.u:this.M=[this.u];this.D=a||0;this.B=b||0};pa.prototype.enterFinallyBlock=pa.prototype.F;pa.prototype.G=function(a,b){b=this.M.splice(b||0)[0];(b=this.u=this.u||b)?b.og?this.h=this.D||this.B:b.A!=void 0&&this.B<b.A?(this.h=b.A,this.u=null):this.h=this.B:this.h=a};pa.prototype.leaveFinallyBlock=pa.prototype.G;pa.prototype.N=function(a){return new sa(a)};pa.prototype.forIn=pa.prototype.N;
function sa(a){this.i=a;this.g=[];for(var b in a)this.g.push(b);this.g.reverse()}sa.prototype.h=function(){for(;this.g.length>0;){var a=this.g.pop();if(a in this.i)return a}return null};sa.prototype.getNext=sa.prototype.h;function ta(a){this.g=new pa;this.h=a}function va(a,b){qa(a.g);var c=a.g.C;if(c)return wa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return xa(a)}
function wa(a,b,c,d){try{var e=b.call(a.g.C,c);oa(e);if(!e.done)return a.g.I=!1,e;var f=e.value}catch(g){return a.g.C=null,ra(a.g,g),xa(a)}a.g.C=null;d.call(a.g,f);return xa(a)}function xa(a){for(;a.g.h;)try{var b=a.h(a.g);if(b)return a.g.I=!1,{value:b.value,done:!1}}catch(c){a.g.i=void 0,ra(a.g,c)}a.g.I=!1;if(a.g.u){b=a.g.u;a.g.u=null;if(b.og)throw b.Yf;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
function ya(a){this.next=function(b){qa(a.g);a.g.C?b=wa(a,a.g.C.next,b,a.g.L):(a.g.L(b),b=xa(a));return b};this.throw=function(b){qa(a.g);a.g.C?b=wa(a,a.g.C["throw"],b,a.g.L):(ra(a.g,b),b=xa(a));return b};this.return=function(b){return va(a,b)};this[Symbol.iterator]=function(){return this}}function za(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 D(a){return za(new ya(new ta(a)))}function Aa(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}ea("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(Math.random()*1E9>>>0)+"_",e=0;return b});
ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");ba(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return Ca(na(this))}});return a});function Ca(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(this.g==null){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.I(g);else{a:switch(typeof g){case "object":var h=g!=null;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.m(g)}};
b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}typeof h=="function"?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(this.h!=0)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;this.h===2&&this.G();this.B()};b.prototype.G=function(){var g=this;e(function(){if(g.C()){var h=da.console;typeof h!=="undefined"&&h.error(g.i)}},1)};b.prototype.C=
function(){if(this.o)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if(typeof k==="undefined")return!0;typeof g==="function"?g=new g("unhandledrejection",{cancelable:!0}):typeof h==="function"?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.B=function(){if(this.g!=null){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
b.prototype.I=function(g){var h=this.j();g.Kd(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(q,r){return typeof q=="function"?function(u){try{l(q(u))}catch(v){m(v)}}:r}var l,m,n=new b(function(q,r){l=q;m=r});this.Kd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Kd=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;this.g==null?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).Kd(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){q[u]=v;r--;r==0&&l(q)}}var q=[],r=0;do q.push(void 0),r++,d(k.value).Kd(n(q.length-1),m),k=h.next();
while(!k.done)})};return b});function Ea(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
ea("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 l==="object"&&k!==null||l==="function"}function e(k){if(!Ea(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
m=new a([[k,2],[l,3]]);if(m.get(k)!=2||m.get(l)!=3)return!1;m.delete(k);m.set(l,4);return!m.has(k)&&m.get(l)==4}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(!Ea(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ea(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ea(k,
g)&&Ea(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ea(k,g)&&Ea(k[g],this.g)?delete k[g][this.g]:!1};return b});
ea("Map",function(a){function b(){var h={};return h.Ob=h.next=h.head=h}function c(h,k){var l=h[1];return Ca(function(){if(l){for(;l.head!=h[1];)l=l.Ob;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;l=="object"||l=="function"?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h[0][l];if(m&&Ea(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||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if(k.get(h)!="s"||k.size!=1||k.get({x:4})||k.set({x:4},"t")!=k||k.size!=2)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||m.value[1]!="s")return!1;m=l.next();return m.done||m.value[0].x!=
4||m.value[1]!="t"||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=h===0?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],Ob:this[1].Ob,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].Ob.next=l.entry,this[1].Ob=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.Ob.next=
h.entry.next,h.entry.next.Ob=h.entry.Ob,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].Ob=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});
ea("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||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||d.size!=1||d.add(c)!=d||d.size!=1||d.add({x:4})!=d||d.size!=2)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||f.value[0].x!=
4||f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=c===0?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});function Fa(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{jg:e,v:f}}return{jg:-1,v:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Fa(this,b,c).jg}});
function Ga(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ea("Array.prototype.values",function(a){return a?a:function(){return Ga(this,function(b,c){return c})}});
ea("Array.from",function(a){return a?a:function(b,c,d){c=c!=null?c:function(h){return h};var e=[],f=typeof Symbol!="undefined"&&Symbol.iterator&&b[Symbol.iterator];if(typeof f=="function"){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});ea("Array.prototype.keys",function(a){return a?a:function(){return Ga(this,function(b){return b})}});
function Ha(a,b,c){if(a==null)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+""}ea("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Ha(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}});
ea("Object.is",function(a){return a?a:function(b,c){return b===c?b!==0||1/b===1/c:b!==b&&c!==c}});ea("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(c<0&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});ea("String.prototype.includes",function(a){return a?a:function(b,c){return Ha(this,b,"includes").indexOf(b,c||0)!==-1}});
ea("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(e<0||e>1114111||e!==Math.floor(e))throw new RangeError("invalid_code_point "+e);e<=65535?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}});
ea("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});
ea("Array.prototype.find",function(a){return a?a:function(b,c){return Fa(this,b,c).v}});ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ea(b,d)&&c.push([d,b[d]]);return c}});var Ia=typeof Object.assign=="function"?Object.assign:function(a,b){if(a==null)throw new TypeError("No nullish arg");a=Object(a);for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ea(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||Ia});
ea("Math.clz32",function(a){return a?a:function(b){b=Number(b)>>>0;if(b===0)return 32;var c=0;(b&4294901760)===0&&(b<<=16,c+=16);(b&4278190080)===0&&(b<<=8,c+=8);(b&4026531840)===0&&(b<<=4,c+=4);(b&3221225472)===0&&(b<<=2,c+=2);(b&2147483648)===0&&c++;return c}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ea(b,d)&&c.push(b[d]);return c}});
ea("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});ea("Number.EPSILON",function(){return 2.220446049250313E-16});ea("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});
ea("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Ha(this,b,"endsWith");c===void 0&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;e>0&&c>0;)if(d[--c]!=b[--e])return!1;return e<=0}});ea("Array.prototype.entries",function(a){return a?a:function(){return Ga(this,function(b,c){return[b,c]})}});ea("Number.isNaN",function(a){return a?a:function(b){return typeof b==="number"&&isNaN(b)}});
ea("String.prototype.repeat",function(a){return a?a:function(b){var c=Ha(this,null,"repeat");if(b<0||b>1342177279)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ea("Number.isFinite",function(a){return a?a:function(b){return typeof b!=="number"?!1:!isNaN(b)&&b!==Infinity&&b!==-Infinity}});var Ja=this||self;
function E(a,b){a=a.split(".");var c=Ja;a[0]in c||typeof c.execScript=="undefined"||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||b===void 0?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 Ka(a){this.i=Math.log(.5);this.g=Math.exp(this.i/a);this.j=this.h=0}Ka.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.j+=a)};function La(a){return a.h/(1-Math.pow(a.g,a.j))};function Ma(){this.h=new Ka(2);this.j=new Ka(5);this.g=0;this.i=128E3;this.l=16E3}Ma.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;var b=this.h;b.g=Math.exp(b.i/a.fastHalfLife);b=this.j;b.g=Math.exp(b.i/a.slowHalfLife)};Ma.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)}};Ma.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(La(this.h),La(this.j))};function Oa(){}function Pa(){}function Qa(){}function Sa(a){var b=Aa.apply(1,arguments);Ta.has(a)||(Ta.add(a),Qa.apply(Oa,C(b)))}function Ua(){}function Va(){}var Ta=new Set;
window.console&&((new Map).set(1,function(){return console.error.apply(console,C(Aa.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,C(Aa.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,C(Aa.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,C(Aa.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,C(Aa.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,C(Aa.apply(0,arguments)))}),
Qa=function(){return console.warn.apply(console,C(Aa.apply(0,arguments)))},Pa=function(){console.error.apply(console,C(Aa.apply(0,arguments)))});function Wa(a,b){return typeof a==="number"&&typeof b==="number"&&isNaN(a)&&isNaN(b)?!0:a===b}function Xa(a,b){b=a.indexOf(b);b>-1&&a.splice(b,1)}function Ya(a,b){var c;c||(c=Wa);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={sg:void 0},d=a.next()){e.sg=d.value;d=b.findIndex(function(f){return function(g){return c(f.sg,g)}}(e));if(d==-1)return!1;b[d]=b[b.length-1];b.pop()}return b.length==0}
function Za(a,b){var c=[],d=[];a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,b(e)?c.push(e):d.push(e);return[c,d]}function bb(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;b(a[e])?c=e+1:d=e}return c}function cb(a,b,c){if(a===b)return!0;if(!a||!b)return a==b;c||(c=Wa);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 db(){this.g=new Map}p=db.prototype;p.push=function(a,b){this.g.has(a)?this.g.get(a).push(b):this.g.set(a,[b])};p.get=function(a){return this.g.has(a)?this.g.get(a).slice():null};p.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)}};p.forEach=function(a){this.g.forEach(function(b,c){a(c,b)})};p.size=function(){return this.g.size};p.keys=function(){return Array.from(this.g.keys())};function eb(){this.g=new db}p=eb.prototype;p.release=function(){this.Ya();this.g=null};p.H=function(a,b,c,d){this.g&&(a=new fb(a,b,c,d),this.g.push(b,a))};p.La=function(a,b,c,d){function e(g){f.eb(a,b,e);c(g)}var f=this;this.H(a,b,e,d)};p.eb=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.eb(),this.g.remove(b,e))}};
p.Ya=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,C(c.value));a=t(a);for(b=a.next();!b.done;b=a.next())b.value.eb();this.g.g.clear()}};E("shaka.util.EventManager",eb);eb.prototype.removeAll=eb.prototype.Ya;eb.prototype.unlisten=eb.prototype.eb;eb.prototype.listenOnce=eb.prototype.La;eb.prototype.listen=eb.prototype.H;eb.prototype.release=eb.prototype.release;
function fb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=gb(a,d);this.target.addEventListener(b,c,this.g)}fb.prototype.eb=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function gb(a,b){if(b==void 0)return!1;if(typeof b=="boolean")return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return hb(a)?b:b.capture||!1}
function hb(a){var b=ib;if(b==void 0){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}ib=b}return b||!1}var ib=void 0;E("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function jb(a){this.h=a;this.g=void 0}jb.prototype.value=function(){this.g===void 0&&(this.g=this.h());return this.g};function P(){return kb.value()}var lb=null,nb=null,kb=new jb(function(){var a=void 0;lb&&(a=lb());!a&&nb&&(a=nb());return a});function ob(a,b){this.g=a;this.h=b}ob.prototype.toString=function(){return"v"+this.g+"."+this.h};function R(a,b){var c=new ob(5,0),d=pb,e=d.g,f=c.h-e.h;((c.g-e.g||f)>0?d.i:d.h)(d.g,c,a,b)}function qb(a,b,c,d){Qa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function rb(a,b,c,d){Pa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var pb=null;/*
 @license
 Copyright 2006 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/
var sb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function tb(a){var b;a instanceof tb?(ub(this,a.Ab),this.wc=a.wc,vb(this,a.hb),wb(this,a.Mc),this.yb=a.yb,xb(this,a.g.clone()),this.cc=a.cc):a&&(b=String(a).match(sb))?(ub(this,b[1]||"",!0),this.wc=yb(b[2]||""),vb(this,b[3]||"",!0),wb(this,b[4]),this.yb=yb(b[5]||"",!0),xb(this,b[6]||"",!0),this.cc=yb(b[7]||"")):this.g=new zb(null)}p=tb.prototype;p.Ab="";p.wc="";p.hb="";p.Mc=null;p.yb="";p.cc="";
p.toString=function(){var a=[],b=this.Ab;b&&a.push(Bb(b,Db,!0),":");if(b=this.hb){a.push("//");var c=this.wc;c&&a.push(Bb(c,Db,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Mc;b!=null&&a.push(":",String(b))}if(b=this.yb)this.hb&&b.charAt(0)!="/"&&a.push("/"),a.push(Bb(b,b.charAt(0)=="/"?Eb:Fb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.cc)&&a.push("#",Bb(b,Gb));return a.join("")};
p.resolve=function(a){var b=this.clone();b.Ab==="data"&&(b=new tb);var c=!!a.Ab;c?ub(b,a.Ab):c=!!a.wc;c?b.wc=a.wc:c=!!a.hb;c?vb(b,a.hb):c=a.Mc!=null;var d=a.yb;if(c)wb(b,a.Mc);else if(c=!!a.yb){if(d.charAt(0)!="/")if(this.hb&&!this.yb)d="/"+d;else{var e=b.yb.lastIndexOf("/");e!=-1&&(d=b.yb.substr(0,e+1)+d)}e=d;if(e==".."||e==".")d="";else if(e.indexOf("./")==-1&&e.indexOf("/.")==-1)d=e;else{d=e.lastIndexOf("/",0)==0;e=e.split("/");for(var f=[],g=0;g<e.length;){var h=e[g++];h=="."?d&&g==e.length&&
f.push(""):h==".."?((f.length>1||f.length==1&&f[0]!="")&&f.pop(),d&&g==e.length&&f.push("")):(f.push(h),d=!0)}d=f.join("/")}}c?b.yb=d:c=a.g.toString()!=="";c?xb(b,a.g.clone()):c=!!a.cc;c&&(b.cc=a.cc);return b};p.clone=function(){return new tb(this)};function ub(a,b,c){a.Ab=c?yb(b,!0):b;a.Ab&&(a.Ab=a.Ab.replace(/:$/,""))}function vb(a,b,c){a.hb=c?yb(b,!0):b}function wb(a,b){if(b){b=Number(b);if(isNaN(b)||b<0)throw Error("Bad port number "+b);a.Mc=b}else a.Mc=null}
function xb(a,b,c){b instanceof zb?a.g=b:(c||(b=Bb(b,Hb)),a.g=new zb(b))}function yb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Bb(a,b,c){return a!=null?(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 Db=/[#\/\?@]/g,Fb=/[#\?:]/g,Eb=/[#\?]/g,Hb=/[#\?@]/g,Gb=/#/g;function zb(a){this.g=a||null}
function Lb(a){if(!a.Pa&&(a.Pa=new Map,a.cd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(d>=0){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f);e=e||"";a.add(f,decodeURIComponent(e))}}p=zb.prototype;p.Pa=null;p.cd=null;p.add=function(a,b){Lb(this);this.g=null;var c=this.Pa.has(a)?this.Pa.get(a):null;c||this.Pa.set(a,c=[]);c.push(b);this.cd++;return this};
p.set=function(a,b){Lb(this);this.g=null;this.Pa.has(a)?this.Pa.set(a,[b]):this.add(a,b);return this};p.get=function(a){Lb(this);return this.Pa.get(a)||[]};p.toString=function(){if(this.g)return this.g;if(!this.Pa||!this.Pa.size)return"";for(var a=[],b=t(this.Pa.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=encodeURIComponent(d);d=this.Pa.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("&")};
p.clone=function(){var a=new zb;a.g=this.g;if(this.Pa){for(var b=new Map,c=t(this.Pa),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.Pa=b;a.cd=this.cd}return a};function Mb(){}function Nb(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=S(a);b=S(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)?a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}
function S(a,b,c){c=c===void 0?Infinity:c;return Qb(a,b===void 0?0:b,c,Uint8Array)}function Rb(a,b,c){c=c===void 0?Infinity:c;return Qb(a,b===void 0?0:b,c,Uint16Array)}function Sb(a,b,c){c=c===void 0?Infinity:c;return Qb(a,b===void 0?0:b,c,DataView)}
function Qb(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)}E("shaka.util.BufferUtils",Mb);Mb.toDataView=Sb;Mb.toUint16=Rb;Mb.toUint8=S;Mb.toArrayBuffer=Ob;Mb.equal=Nb;function Tb(a,b){if(a===b||!a.length||!b.length)return!0;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(Ub(c))return!0;for(var d=t(b),e=d.next();!e.done;e=d.next())if(e=e.value,c.keySystem===e.keySystem||Ub(e))return!0}return!1}
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(C(d.keyIds),C(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}else Ub(d)?c.push(d):Ub(f)&&c.push(f)}return c}
function Wb(a){return a==="org.w3.clearkey"}function Xb(a){return a?!!a.match(/^com\.widevine\.alpha/):!1}function Yb(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Zb(a){return a?!!a.match(/^com\.apple\.fps/):!1}function Ub(a){return(a=a.licenseServerUri)?a.startsWith("data:application/json;base64,"):!1}function $b(a,b,c,d){d=[].concat(C(new Set(d))).sort().join("#");return a+"#"+b+"#"+c+"#"+d}var ac=new jb(function(){return Ob(new Uint8Array([0]))}),bc=new Map;function V(a,b,c){var d=Aa.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(cc)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,"  ")};E("shaka.util.Error",V);var cc=!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,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,CANNOT_ADD_EXTERNAL_CHAPTERS_TO_LIVE_STREAM:4055,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,QUEUE_INDEX_OUT_OF_BOUNDS:7007,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 dc(){}
function ec(a){if(!a)return"";a=S(a);a[0]==239&&a[1]==187&&a[2]==191&&(a=a.subarray(3));if(window.TextDecoder&&!P().yf())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Pa('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;(a[c]&128)==0?d=a[c]:a.length>=c+2&&(a[c]&224)==192&&(a[c+1]&192)==128?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&(a[c]&240)==224&&(a[c+1]&192)==128&&(a[c+
2]&192)==128?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&(a[c]&241)==240&&(a[c+1]&192)==128&&(a[c+2]&192)==128&&(a[c+3]&192)==128&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(d<=65535)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 fc(a,b,c){if(!a)return"";if(!c&&a.byteLength%2!=0)throw new V(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Sb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(e*2,b);return hc.value()(d)}
function ic(a){function b(d){return c.byteLength<=d||c[d]>=9&&c[d]<=126}if(!a)return"";var c=S(a);if(c[0]==239&&c[1]==187&&c[2]==191)return ec(c);if(c[0]==254&&c[1]==255)return fc(c.subarray(2),!1);if(c[0]==255&&c[1]==254)return fc(c.subarray(2),!0);if(c[0]==0&&c[2]==0)return fc(a,!1);if(c[1]==0&&c[3]==0)return fc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return ec(a);throw new V(2,2,2003);}
function jc(a){if(window.TextEncoder&&!P().yf()){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 mc(a,b){for(var c=new ArrayBuffer(a.length*2),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(e*2,a.charCodeAt(e),b);return c}
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=e[2]=="x"||e[2]=="X"?parseInt(e.substring(3),16):parseInt(e.substring(2),10),e>=0&&e<=1114111?String.fromCodePoint(e):""):b[e]||"'"}):a||""}E("shaka.util.StringUtils",dc);dc.resetFromCharCode=function(){hc.g=void 0};
dc.toUTF16=mc;dc.toUTF8=jc;dc.fromBytesAutoDetect=ic;dc.fromUTF16=fc;dc.fromUTF8=ec;var hc=new jb(function(){function a(c){try{var d=new Uint8Array(c);return String.fromCharCode.apply(null,d).length>0}catch(e){return!1}}for(var b={ac:65536};b.ac>0;b={ac:b.ac},b.ac/=2)if(a(b.ac))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.ac)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.ac));return e}}(b);return null});function oc(){}function pc(a){a=S(a);return Uint8Array.prototype.toBase64?a.toBase64({alphabet:"base64",omitPadding:!1}):(a=hc.value()(a),btoa(a))}function qc(a,b){b=b==void 0?!0:b;return Uint8Array.prototype.toBase64?S(a).toBase64({alphabet:"base64url",omitPadding:!b}):(a=pc(a).replace(/\+/g,"-").replace(/\//g,"_"),b?a:a.replace(/[=]*$/,""))}
function rc(a){if(!("fromBase64"in Uint8Array)){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}a=a.replace(/\s+/g,"");return Uint8Array.fromBase64(a,{alphabet:/[-_]/.test(a)?"base64url":"base64"})}function sc(a){if(!("fromHex"in Uint8Array)){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(d*2,2),16);return c}return Uint8Array.fromHex(a)}
function tc(a){var b=S(a);if(!Uint8Array.prototype.toHex){a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),c.length==1&&(c="0"+c),a+=c;return a}return b.toHex()}function uc(){var a=Aa.apply(0,arguments);return vc(a,0,a.length)}
function vc(a,b,c){b=b===void 0?0:b;c=c===void 0?a.length:c;for(var d=0,e=b;e<c;++e)d+=a[e].byteLength;d=new Uint8Array(d);for(e=0;b<c;++b){var f=a[b];ArrayBuffer.isView(f)&&f.BYTES_PER_ELEMENT===1?d.set(f,e):d.set(S(f),e);e+=f.byteLength}return d}E("shaka.util.Uint8ArrayUtils",oc);oc.concat=uc;oc.toHex=tc;oc.fromHex=sc;oc.fromBase64=rc;oc.toBase64=qc;oc.toStandardBase64=pc;function wc(a,b,c){c=c===void 0?"":c;if(b.length==0)return a;if(a.length==1&&b.length==1){var d=new tb(a[0]);b=new tb(b[0]);b=d.resolve(b);c&&xb(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&&xb(g,c),d.push(g.toString())}return d}
function xc(a,b,c){b={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set,mediaTypes:void 0};!c&&Zb(a)&&b.initData.push({initDataType:"sinf",initData:new Uint8Array(0),keyId:null});return b}
function yc(a){var b=b===void 0?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;k.length!=22&&(k=qc(sc(h),!1));var l=g;l.length!=22&&(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:S(jc(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 zc(a,b){if(b.length==1)return b[0];a=Ac(a,b);if(a!=null)return a;throw new V(2,4,4025,b);}function Ac(a,b){var c=Bc.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==Cc?"":null}
function Dc(a,b){var c=[];a=Bc.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 Cc="text",Ec={na:"video",U:"audio",Ma:Cc,qh:"image",oj:"application"},Fc=1/15,Bc=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cehx]?$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^mp2v/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function Gc(a,b,c,d){this.g=null;this.l=a;this.i=b;this.m=c;this.o=d;this.j=!1;a:{typeof libDPIModule==="undefined"&&Qa("Could not find LCEVC Library dependencies on this page");if(typeof LCEVCdec!=="undefined")this.h=LCEVCdec;else if(typeof LcevcDil!=="undefined")this.h=LcevcDil,this.j=!0,R("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Qa("Could not find LCEVC Library on this page");a=!1;break a}typeof this.h.SupportObject==="undefined"?(Qa("Could not find LCEVC Library on this page"),
a=!1):(this.h.SupportObject.SupportStatus||Qa(this.h.SupportObject.SupportError),a=typeof this.h!=="undefined"&&typeof libDPIModule!=="undefined"&&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 Hc(a,b,c,d){d.type!=="video"||a.o&&!d.baseOriginalId||a.g&&a.g.appendBuffer(b,"video",d.id,-c,!a.o)}function Ic(a){a.g&&a.i.classList.add("shaka-hidden")}Gc.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Jc(a){return a&&typeof LCEVCdec!=="undefined"?a.codecs=="lvc1":!1}E("shaka.lcevc.Dec",Gc);Gc.prototype.release=Gc.prototype.release;function Kc(){}function Lc(a,b){Mc.set(a,b)}function Nc(){var a={};P();if(Oc())for(var b=t(Mc.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","audio/x-mpegurl","application/vnd.ms-sstr+xml"]);for(c=b.next();!c.done;c=b.next())c=c.value,a[c]=Oc()?Mc.has(c):Pc().canPlayType(c)!="";return a}function Qc(a,b){if(b){var c=Mc.get(b);if(c)return c}throw new V(2,4,4E3,a,b);}E("shaka.media.ManifestParser",Kc);
Kc.unregisterParserByMime=function(a){Mc.delete(a)};Kc.registerParserByMime=Lc;Kc.registerParserByExtension=function(){R("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Kc.AccessibilityPurpose={yj:"visually impaired",qj:"hard of hearing",wj:"spoken subtitles"};var Mc=new Map;function Rc(){}Rc.prototype.extract=function(){};Rc.prototype.decode=function(){return[]};Rc.prototype.clear=function(){};Rc.prototype.getStreams=function(){return[]};function Sc(){}Sc.prototype.init=function(){};Sc.prototype.parse=function(){return[]};function Tc(a){this.h=new Map;this.i=0;this.j=new Sc;if(a=Uc(a.toLowerCase()))this.j=a();this.g=new Rc;if(a=Vc)this.g=a(),this.h.set(this.i,this.g)}Tc.prototype.init=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?-1:c;if(c!=-1&&this.i!=c){b=c;var d=this.h.get(b);this.h.set(this.i,this.g);if(d)this.g=d;else{if(d=Vc)this.g=d();this.h.set(b,this.g)}}else b||this.g.clear();this.j.init(a);c!=-1&&(this.i=c)};
function Wc(a,b){b=a.j.parse(b);b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;var d=S(c.packet);d.length>0&&a.g.extract(d,c.pts)}return a.g.decode()}Tc.prototype.remove=function(a){a=a===void 0?[]:a;a=new Set(a);for(var b=t(this.h.keys()),c=b.next();!c.done;c=b.next())if(c=c.value,!a.has(c)){var d=this.h.get(c);d&&d.clear();this.h.delete(c)}};function Xc(a,b){Yc.set(a,b)}function Uc(a){return Yc.get(a)}E("shaka.media.ClosedCaptionParser",Tc);Tc.findDecoder=function(){return Vc};
Tc.unregisterDecoder=function(){Vc=null};Tc.registerDecoder=function(a){Vc=a};Tc.findParser=Uc;Tc.unregisterParser=function(a){Yc.delete(a)};Tc.registerParser=Xc;var Yc=new Map,Vc=null;function Zc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=$c;this.scroll=ad}E("shaka.text.CueRegion",Zc);var $c=1;Zc.units={PX:0,PERCENTAGE:$c,LINES:2};var ad="";Zc.scrollMode={NONE:ad,UP:"up"};function bd(a){this.h=a||"";this.g=0}function cd(a){dd(a,/[ \t]+/gm)}function dd(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=b==null?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||b==null||b.position!=a.g)return null;a.g+=b.length;return b.results}function ed(a){return a.g==a.h.length?null:(a=dd(a,/[^ \t\n]*/gm))?a[0]:null}
function fd(a){a=dd(a,gd);if(a==null)return null;var b=Number(a[2]),c=Number(a[3]);return b>59||c>59?null:(Number(a[6])||0)/1E3+c+b*60+(Number(a[1])||0)*3600}var gd=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function hd(){}function id(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=Array.isArray(d);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 jd(a){var b={},c;for(c in a)b[c]=a[c];return b}
function kd(a){if(Array.isArray(a)){for(var b=[],c=0;c<a.length;c++){var d=c.toString(),e=a[c];e!==void 0&&(e=kd(e))&&b.push(d+":"+e)}a="["+b.join(",")+"]"}else if(typeof a=="function")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],e!==void 0&&(e=kd(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a}E("shaka.util.ObjectUtils",hd);hd.alphabeticalKeyOrderStringify=kd;
hd.shallowCloneObject=jd;hd.cloneObject=id;/*
 @license
 tXml
 Copyright 2015 Tobias Nickel
 SPDX-License-Identifier: MIT
*/
function ld(a,b){var c=c===void 0?!1:c;a=ic(a);return md(a,b,c)}function md(a,b,c){a=nd(a,c===void 0?!1:c);if(!b&&a.length)return a[0];var d=b.split(",");return(b=a.find(function(e){return d.includes(e.tagName)}))?b:null}function od(a){return pd.has(a)?pd.get(a):""}
function nd(a,b){function c(g,h){h=h===void 0?!1:h;for(var k=[];a[e];)if(a.charCodeAt(e)==60){if(a.charCodeAt(e+1)===47){h=e+2;e=a.indexOf(">",e);h=a.substring(h,e);var l=h.indexOf(g);if(l==-1){var m=g.indexOf(".");m>0&&(l=h.indexOf(g.substring(0,m)))}if(l==-1)throw g=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(g.length-1)+"\nColumn: "+(g[g.length-1].length+1)+"\nChar: "+a[e]);e+1&&(e+=1);break}else if(a.charCodeAt(e+1)===33){if(a.charCodeAt(e+2)==45){for(;e!==-1&&(a.charCodeAt(e)!==
62||a.charCodeAt(e-1)!=45||a.charCodeAt(e-2)!=45||e==-1);)e=a.indexOf(">",e+1);e===-1&&(e=a.length)}else if(a.charCodeAt(e+2)===91&&a.charCodeAt(e+8)===91&&a.substr(e+3,5).toLowerCase()==="cdata"){l=a.indexOf("]]\x3e",e);l==-1?(k.push(a.substr(e+9)),e=a.length):(k.push(a.substring(e+9,l)),e=l+3);continue}e++;continue}if(f>512)throw Error("XML is too deeply nested");f++;a:{m=h;e++;var n=d(),q={};for(l=[];a.charCodeAt(e)!==62&&a[e];){var r=a.charCodeAt(e);if(r>64&&r<91||r>96&&r<123){r=d();for(var u=
a.charCodeAt(e);u&&u!==39&&u!==34&&!(u>64&&u<91||u>96&&u<123)&&u!==62;)e++,u=a.charCodeAt(e);var v=e+1;e=a.indexOf(a[e],v);v=(" "+a.slice(v,e)).slice(1);if(u===39||u===34){if(e===-1){m={tagName:n,attributes:q,children:l,parent:null};if(b)for(n=0;n<l.length;n++)typeof l[n]!=="string"&&(l[n].parent=m);l=m;break a}}else v=null,e--;if(r.startsWith("xmlns:")){u=v;var w=r.split(":")[1];pd.set(u,w);qd.set(w,u)}n==="tt"&&r==="xml:space"&&v==="preserve"&&(m=!0);q[r]=v}e++}a.charCodeAt(e-1)!==47?(e++,l=c(n,
m)):e++;m={tagName:n,attributes:q,children:l,parent:null};n=l.length;for(q=0;q<n;q++)r=l[q],typeof r!=="string"?b&&(r.parent=m):q==n-1&&r=="\n"&&l.pop();l=m}f--;k.push(l);if(typeof l==="string")break;l.tagName[0]==="?"&&l.children&&(k.push.apply(k,C(l.children)),l.children=[])}else l=e,e=a.indexOf("<",e)-1,e===-2&&(e=a.length),l=(" "+a.slice(l,e+1)).slice(1),h?l.length>0&&k.push(l):k.length&&l.length==1&&l[0]=="\n"?k.push(l):l.trim().length>0&&k.push(l),e++;return k}function d(){for(var g=e;"\r\n\t>/= ".indexOf(a[e])===
-1&&a[e];)e++;return(" "+a.slice(g,e)).slice(1)}var e=0,f=0;return c("")}function rd(a){return typeof a==="string"}function sd(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c!=="string"&&b.push(c);return b}function td(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 ud(a){if(typeof a==="string")return nc(a);var b=[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c==="string"&&b.push(c);b=b.join("");return b===""?null:nc(b)}function vd(a){for(var b=t(a.children),c=b.next();!c.done;c=b.next())if(typeof c.value!=="string")return null;(a=ud(a))&&(a=a.trim());return a}function wd(a,b,c){c=c===void 0?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())wd(d.value,b,c)}return c}
function xd(a,b){a=td(a,b);return a.length!=1?null:a[0]}function yd(a,b,c){a=zd(a,b,c);return a.length!=1?null:a[0]}function Ad(a,b,c,d){d=d===void 0?null:d;var e=null;a=a.attributes[b];a==null||a===""&&d!==null||(e=c(a));return e==null?d:e}function Bd(a,b,c){b=od(b);return a.attributes[b+":"+c]||null}function zd(a,b,c){var d=od(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 Cd(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=Bd(a,d.value,c))return d;return null}function Dd(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 Fd(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 Gd(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 Hd(a){a=Number(a);return a%1===0?a:null}function Id(a){a=Number(a);return a%1===0&&a>0?a:null}function Jd(a){a=Number(a);return a%1===0&&a>=0?a:null}function Kd(a){a=Number(a);return isNaN(a)?null:a}function Ld(a){return a?a.toLowerCase()==="true":!1}
function Md(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
function Nd(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,Sb:c.split("/@")[1]||
null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Sb=c.slice(1))}return b}
function Od(a,b){var c=Nd(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;c==null&&(d.t!==null&&(c=Pd(a,"t",d.t)),d.n!==null&&(c=Pd(a,"n",d.n)));c===null?c=e==="prepend"?0:a.length:e==="prepend"?--c:e==="after"&&++c;e=b.tagName;(d=d.Sb)&&a[c]?Qd(a[c],e,d,vd(b)||""):(e!=="remove"&&e!=="replace"||a.splice(c,1),e!=="add"&&e!=="replace"||a.splice.apply(a,[c,0].concat(C(b.children))))}}
function Pd(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 Qd(a,b,c,d){if(b==="remove")delete a.attributes[c];else if(b==="add"||b==="replace")a.attributes[c]=d}
function Rd(a){var b="",c=a.tagName.split(":");c.length>0&&(b=c[0],b=qd.has(b)?qd.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,typeof d=="string"?c=new Text(d):c=Rd(d),b.appendChild(c);return b}
function Sd(a){if(!a)return null;var b={tagName:a.tagName,attributes:jd(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c==="string"?b.children.push(c):(c=Sd(c),c.parent=b,b.children.push(c));return b}var pd=new Map,qd=new Map;function Td(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Zc;this.position=null;this.positionAlign=Ud;this.size=0;this.textAlign=Vd;this.direction=Wd;this.writingMode=Xd;this.lineInterpretation=Yd;this.line=null;this.lineHeight="";this.lineAlign=Zd;this.displayAlign=$d;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=ae;this.fontStyle=be;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={columns:32,rows:15}}function ce(a,b){a=new Td(a,b,"");a.lineBreak=!0;return a}Td.prototype.clone=function(){var a=new Td(0,0,""),b;for(b in this)a[b]=this[b],Array.isArray(a[b])&&(a[b]=a[b].slice());return a};
function de(a,b){if(a.payload!=b.payload||!(Math.abs(a.startTime-b.startTime)<.001&&Math.abs(a.endTime-b.endTime)<.001))return!1;for(var c in a)if(c!="startTime"&&c!="endTime"&&c!="payload")if(c=="nestedCues"){if(!cb(a.nestedCues,b.nestedCues,de))return!1}else if(c=="region"||c=="cellResolution")for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!cb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
function ee(a,b){b=b===void 0?new Map:b;var c=a.payload;if(c.includes("<")){b.size===0&&fe(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)d[f]==="<"?e=f+1:d[f]===">"&&e>0&&(e=d.substr(e,f-e),e.match(ge)&&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(k===-1){c=f;break a}if((k=f.substring(h+1,k))&&k=="v"){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,f[g]!="v"&&(g=-1)):f[h]===">"&&g>0&&(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=he(c);a.payload="";d="<span>"+c.replace(/\n/g,"<br />")+"</span>";try{var m=md(d,"span")}catch(n){}if(m)if(m=
m.children,m.length!=1||m[0].tagName)for(m=t(m),c=m.next();!c.done;c=m.next())ie(c.value,a,b);else a.payload=nc(c);else a.payload=nc(c)}else a.payload=nc(c)}function fe(a){for(var b=t(Object.entries(je)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Td(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(ke));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Td(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
function he(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 ie(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Zc;d.position=null;d.size=0;d.textAlign=Vd;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=le(g.backgroundColor,h.backgroundColor),h.color=le(g.color,h.color),h.fontFamily=le(g.fontFamily,h.fontFamily),
h.fontSize=le(g.fontSize,h.fontSize),h.textShadow=le(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=ce(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=me;break;case "i":d.fontStyle=ne;break;case "u":d.textDecoration.push(oe);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
if(f=f?fd(new bd(f)):null)d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(rd(a)||e.length==1&&rd(e[0]))for(c=ud(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=ce(d.startTime,d.endTime),b.nestedCues.push(a)),e.length>0&&(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())ie(a.value,d,c)}function le(a,b){return a&&a.length>0?a:b}E("shaka.text.Cue",Td);
Td.parseCuePayload=ee;Td.equal=de;Td.prototype.clone=Td.prototype.clone;var Ud="auto";Td.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ud};var Vd="center",pe={LEFT:"left",RIGHT:"right",CENTER:Vd,START:"start",END:"end"};Td.textAlign=pe;var $d="after",qe={BEFORE:"before",CENTER:"center",AFTER:$d};Td.displayAlign=qe;var Wd="ltr";Td.direction={HORIZONTAL_LEFT_TO_RIGHT:Wd,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Xd="horizontal-tb";
Td.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Xd,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Yd=0;Td.lineInterpretation={LINE_NUMBER:Yd,PERCENTAGE:1};var Zd="start",re={CENTER:"center",START:Zd,END:"end"};Td.lineAlign=re;var je={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Td.defaultTextColor=je;
var ke={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Td.defaultTextBackgroundColor=ke;var ae=400,me=700;Td.fontWeight={NORMAL:ae,BOLD:me};var be="normal",ne="italic",se={NORMAL:be,ITALIC:ne,OBLIQUE:"oblique"};Td.fontStyle=se;var oe="underline";Td.textDecoration={UNDERLINE:oe,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var ge=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function te(){}te.prototype.destroy=function(){};function ue(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([ve,we,xe,ye]),e=d.next();!e.done;e=d.next())if(e=ze.get(c+"-"+e.value)){var f=e.ge(),g=f.isSupported(a,b);f.destroy();if(g)return e.ge}return null}E("shaka.transmuxer.TransmuxerEngine",te);te.findTransmuxer=ue;te.unregisterTransmuxer=function(a,b){ze.delete(a.toLowerCase().split(";")[0]+"-"+b)};te.registerTransmuxer=function(a,b,c){ze.set(a.toLowerCase().split(";")[0]+"-"+c,{priority:c,ge:b})};
te.prototype.destroy=te.prototype.destroy;var ze=new Map,ye=1,xe=2,we=3,ve=4;te.PluginPriority={FALLBACK:ye,PREFERRED_SECONDARY:xe,PREFERRED:we,APPLICATION:ve};function Ae(){}function Be(a,b){var c=a;b&&!Ce.includes(a)&&(c+='; codecs="'+b+'"');return c}function De(a,b){b&&(a+='; codecs="'+b+'"');return a}function Ee(a,b,c){var d=Be(a,b);b=De(a,b);ue(b)?(a=ue(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c=a!="video/mp2t"&&c=="audio"?d.replace("video","audio"):d;return c}function Fe(a){return a.split(";")[0].split("/")[1]}
function Ge(a){var b=He(a);a=b[0].toLowerCase();b=b[1].toLowerCase();switch(!0){case a==="mp4a"&&b==="69":case a==="mp4a"&&b==="6b":case a==="mp4a"&&b==="40.34":return"mp3";case a==="mp4a"&&b==="66":case a==="mp4a"&&b==="67":case a==="mp4a"&&b==="68":case a==="mp4a"&&b==="40.2":case a==="mp4a"&&b==="40.02":case a==="mp4a"&&b==="40.5":case a==="mp4a"&&b==="40.05":case a==="mp4a"&&b==="40.29":case a==="mp4a"&&b==="40.42":return"aac";case a==="mp4a"&&b==="a5":case a==="ac3":case a==="ac-3":return"ac-3";
case a==="mp4a"&&b==="a6":case a==="eac3":case a==="ec-3":return"ec-3";case a==="ac-4":return"ac-4";case a==="mp4a"&&b==="b2":return"dtsx";case a==="mp4a"&&b==="a9":return"dtsc";case a==="vp09":case a==="vp9":return"vp9";case a==="avc1":case a==="avc3":return"avc";case a==="hvc1":case a==="hev1":return"hevc";case a==="vvc1":case a==="vvi1":return"vvc";case a==="dvh1":case a==="dvhe":return b&&b.startsWith("05")?"dovi-p5":"dovi-hevc";case a==="dvav":case a==="dva1":return"dovi-avc";case a==="dav1":return"dovi-av1";
case a==="dvc1":case a==="dvi1":return"dovi-vvc";case a==="lvc1":return"lcevc"}return a}function Ie(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=He(c.value),b.push(c[0]);return b.sort().join(",")}function Je(a){return a.split(";")[0]}function Ke(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}
function Le(a){return a==="application/x-mpegurl"||a==="application/vnd.apple.mpegurl"||a==="audio/x-mpegurl"}function He(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}E("shaka.util.MimeUtils",Ae);Ae.getFullTypeWithAllCodecs=De;Ae.getFullType=Be;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var Ce=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Me(a){this.i=null;this.l=a;this.B=this.F=!1;this.m=this.u=0;this.o=Infinity;this.h=this.g=null;this.D="";this.C=function(){};this.j=new Map}function Ne(a,b){Oe.set(a,b)}function Pe(a){return Oe.get(a)}function Qe(a){return Oe.has(a)?!0:a=="application/cea-608"||a=="application/cea-708"?!!Vc:!1}Me.prototype.destroy=function(){this.l=this.i=null;this.j.clear();return Promise.resolve()};
function Re(a,b,c,d,e){var f,g,h,k,l,m,n,q;return D(function(r){if(r.h==1)return r.g(Promise.resolve(),2);if(!a.i||!a.l)return r.return();if(c==null||d==null)return a.i.parseInit(S(b)),r.return();f=a.B?0:a.u;g=a.F||a.B?c:a.u;h={periodStart:f,segmentStart:c,segmentEnd:d,vttOffset:g};k=a.i.parseMedia(S(b),h,e,[]);l=t(k);for(m=l.next();!m.done;m=l.next())n=m.value,a.C(n,e||null,h);q=k.filter(function(u){return u.startTime>=a.m&&u.startTime<a.o});a.l.append(q);a.g==null&&(a.g=Math.max(c,a.m));a.h=Math.min(d,
a.o);r.j()})}Me.prototype.remove=function(a,b,c){c=c===void 0?!1:c;var d=this;return D(function(e){if(e.h==1)return e.g(Promise.resolve(),2);if(a>=b||c&&(Se(d,a,b),d.D===""))return e.return();d.l&&d.l.remove(a,b)&&d.g!=null&&(b<=d.g||a>=d.h||(a<=d.g&&b>=d.h?d.g=d.h=null:a<=d.g&&b<d.h?d.g=b:a>d.g&&b>=d.h&&(d.h=a)),Te(d));e.j()})};function Ue(a,b,c){a.m=b;a.o=c}function Ve(a,b,c){a.D=b;if(b=a.j.get(b))b=b.filter(function(d){return d.endTime<=c}),b.length&&a.l.append(b)}
function We(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())We(a,d.value,c)}
function Xe(a,b,c){var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value;e=f.stream;f=f.cue;d.has(e)||d.set(e,[]);We(a,f,c);f.startTime>=a.m&&f.startTime<a.o&&(d.get(e).push(f),e==a.D&&a.l.append([f]))}c=t(d.keys());for(b=c.next();!b.done;b=c.next())for(b=b.value,a.j.has(b)||a.j.set(b,[]),e=t(d.get(b)),f=e.next();!f.done;f=e.next())f=f.value,a.j.get(b).push(f);Te(a)}
function Se(a,b,c){for(var d=t(a.j.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f=a.j.get(e);f=f.filter(function(g){return g.startTime<b||g.endTime>=c});a.j.set(e,f)}}
function Te(a){for(var b=Infinity,c=-Infinity,d=t(a.j.values()),e=d.next();!e.done;e=d.next()){e=t(e.value);for(var f=e.next();!f.done;f=e.next())f=f.value,b=Math.min(b,f.startTime),c=Math.max(c,f.endTime)}b!==Infinity&&c!==-Infinity&&(a.g=a.g==null?Math.max(b,a.m):Math.min(a.g,Math.max(b,a.m)),a.h=Math.max(a.h,Math.min(c,a.o)))}E("shaka.text.TextEngine",Me);Me.prototype.destroy=Me.prototype.destroy;Me.findParser=Pe;Me.unregisterParser=function(a){Oe.delete(a)};Me.registerParser=Ne;var Oe=new Map;function W(a){this.g=a;this.h=null}W.prototype.Rb=function(){this.stop();this.g();return this};W.prototype.ra=function(a){var b=this;this.stop();Ye(this,function(){b.g()},a);return this};W.prototype.Aa=function(a){this.stop();Ze(this,a);return this};W.prototype.stop=function(){var a;(a=this.h)==null||a.call(this);this.h=null};function Ye(a,b,c){var d=!0,e=null;a.h=function(){clearTimeout(e);d=!1};e=setTimeout(function(){d&&b()},c*1E3)}function Ze(a,b){Ye(a,function(){Ze(a,b);a.g()},b)}
E("shaka.util.Timer",W);W.prototype.stop=W.prototype.stop;W.prototype.tickEvery=W.prototype.Aa;W.prototype.tickAfter=W.prototype.ra;W.prototype.tickNow=W.prototype.Rb;function $e(a,b){return a.concat(b)}function af(){}function bf(a){return a!=null}function cf(a,b){return Promise.race([b,new Promise(function(c,d){(new W(d)).ra(a)})])};function df(){}function ef(a,b){a=ff(a);b=ff(b);return a.split("-")[0]==b.split("-")[0]}function gf(a,b){a=ff(a);b=ff(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&a.length==1&&b.length==2}function hf(a,b){a=ff(a);b=ff(b);a=a.split("-");b=b.split("-");return a.length==2&&b.length==2&&a[0]==b[0]}
function ff(a){a=t(a.split("-x-"));var b=a.next().value;b=b===void 0?"":b;a=a.next().value;a=a===void 0?"":a;var c=t(b.split("-"));b=c.next().value;b=b===void 0?"":b;c=c.next().value;c=c===void 0?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=jf.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function kf(a,b){a=ff(a);b=ff(b);return b==a?4:gf(b,a)?3:hf(b,a)?2:gf(a,b)?1:0}function lf(a){var b=a.indexOf("-");a=b>=0?a.substring(0,b):a;a=a.toLowerCase();return a=jf.get(a)||a}
function mf(a){return a.language?ff(a.language):a.audio&&a.audio.language?ff(a.audio.language):a.video&&a.video.language?ff(a.video.language):"und"}
function nf(a,b){a=ff(a);var c=new Set;b=t(b);for(var d=b.next();!d.done;d=b.next())c.add(ff(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,gf(d,a))return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,hf(d,a))return d;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,gf(a,b))return b;return null}E("shaka.util.LanguageUtils",df);df.findClosestLocale=nf;df.getLocaleForVariant=mf;
df.getLocaleForText=function(a){return ff(a.language||"und")};df.getBase=lf;df.relatedness=kf;df.areSiblings=function(a,b){var c=lf(a),d=lf(b);return a!=c&&b!=d&&c==d};df.normalize=ff;df.isSiblingOf=hf;df.isParentOf=gf;df.areLanguageCompatible=ef;df.areLocaleCompatible=function(a,b){a=ff(a);b=ff(b);return a==b};
var jf=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 of(){}
function pf(a,b,c,d,e){if(e.length){var f=a.textStreams;e=t(e);for(var g=e.next(),h={};!g.done;h={Cf:void 0},g=e.next())if(h.Cf=g.value,g=f.filter(function(u){return function(v){return v.codecs.startsWith(u.Cf)||v.mimeType.startsWith(u.Cf)?!0:!1}}(h)),g.length){f=g;break}a.textStreams=f}f=a.variants;if(b.length||c.length)f=qf(f,b,c);if(d.length){b=new db;f=t(f);for(c=f.next();!c.done;c=f.next())c=c.value,b.push(String(c.video.width||0),c);var k=[];b.forEach(function(u,v){u=0;var w=[];v=t(v);for(var x=
v.next(),y={};!x.done;y={ye:void 0},x=v.next())y.ye=x.value,x=d.filter(function(z){return function(A){return z.ye.decodingInfos[0][A]}}(y)).length,x>u?(u=x,w=[y.ye]):x==u&&w.push(y.ye);k.push.apply(k,C(w))});f=k}b=new Set;c=t(f);for(e=c.next();!e.done;e=c.next())e=e.value,e.video&&b.add(e.video);if(b.size){var l={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};e=Array.from(b).sort(function(u,v){return u.bandwidth&&v.bandwidth&&u.bandwidth!=
v.bandwidth?u.bandwidth-v.bandwidth:u.width!=v.width?u.width-v.width:u.codecs&&v.codecs?(u=Ge(u.codecs),v=Ge(v.codecs),(l[u]||1)-(l[v]||1)):0});var m=[];b=new Map;c=function(u){var v=[String(u.width||""),String(u.height||""),String(Math.round(u.frameRate||0)),u.hdr||"",u.fastSwitching];u.dependencyStream&&v.push(u.dependencyStream.baseOriginalId||"");u.roles&&v.push(u.roles.sort().join("_"));return v.join(";")};e=t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;h=c(g);var n=b.get(h)||[];if(n.length){var q=
Ge(n[n.length-1].codecs),r=Ge(g.codecs);q==r&&(n.push(g),m.push(g.id))}else n.push(g),m.push(g.id);b.set(h,n)}a.variants=f.filter(function(u){return(u=u.video)&&!m.includes(u.id)?!1:!0})}else a.variants=f}
function qf(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={mh:void 0},d=b.next())if(e.mh=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.mh)}}(e)),d.length){a=d;break}c=t(c);b=c.next();for(d={};!b.done;d={Lf:void 0},b=c.next())if(d.Lf=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Lf)}}(d)),b.length){a=b;break}return a}
function rf(a,b,c){function d(g,h,k){return g>=h&&g<=k}if(a&&a.video&&a.video.width&&a.video.height){var e=a.video.width,f=a.video.height;f>e&&(f=t([f,e]),e=f.next().value,f=f.next().value);if(!d(e,b.minWidth,Math.min(b.maxWidth,c.width))||!d(f,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e*f,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 sf(a,b,c,d){c=c===void 0?[]:c;d=d===void 0?{}:d;return D(function(e){if(e.h==1)return e.g(tf(a,b,b.offlineSessionIds.length>0,c,d),2);uf(b);return e.g(vf(b),0)})}
function tf(a,b,c,d,e){var f,g;return D(function(h){if(h.h==1)return P().bh()&&wf(b.variants),h.g(xf(b.variants,c,!1,d),2);f=null;a&&(g=a.g)&&(f=g.keySystem);b.variants=b.variants.filter(function(k){var l=yf(k,f,e);if(!l){var m=[];k.audio&&m.push(zf(k.audio));k.video&&m.push(zf(k.video))}return l});h.j()})}
function wf(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 yf(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=P(),e=d.ib()==="Xbox";d=d.Ja()==="MOBILE"&&d.va()==="GECKO";var f=a.video,g=f&&f.width||0,h=f&&f.height||0;if(e&&f&&(g>1920||h>1080)&&(f.codecs.includes("avc1.")||f.codecs.includes("avc3."))||(e=f&&f.dependencyStream)&&!Jc(e))return!1;a=a.audio;return d&&a&&a.encrypted&&a.codecs.toLowerCase().includes("opus")||a&&a.dependencyStream?!1:!0}
function Af(a,b){var c,d,e,f,g,h,k;return D(function(l){if(l.h==1){c=function(m,n){if(m){var q=jd(m);q.supported=m.supported&&n.supported;q.powerEfficient=m.powerEfficient&&n.powerEfficient;q.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!q.keySystemAccess&&(q.keySystemAccess=n.keySystemAccess);return q}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,Jd:void 0},g=f.next())k=g.value,h.Jd=kd(k),h.cache=Bf,h.cache.has(h.Jd)?d=c(d,h.cache.get(h.Jd)):e.push(Cf(k).then(function(m){return function(n){var q=
null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())q=c(q,r.value);q&&(m.cache.set(m.Jd,q),d=c(d,q))}}(h)));return l.g(Promise.all(e),2)}d&&a.decodingInfos.push(d);l.j()})}
function Cf(a){var b=[""];a.video&&(b=Ke(a.video.contentType).split(","));var c=[""];a.audio&&(c=Ke(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={bc:void 0},g=f.next())g=g.value,h.bc=id(a),a.video&&(h.bc.video.contentType=Be(Je(h.bc.video.contentType),e)),a.audio&&(h.bc.audio.contentType=Be(Je(h.bc.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){(P().Ja()=="MOBILE"?cf(5,navigator.mediaCapabilities.decodingInfo(k.bc)):
navigator.mediaCapabilities.decodingInfo(k.bc)).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);return null})}
function xf(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,x,y,z,A,F,G;return D(function(B){switch(B.h){case 1:if(e=a.some(function(H){return H.decodingInfos.length}))return B.return();f=t(d);g=f.next();h={};case 2:if(g.done){B.A(4);break}h.Gg=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){B.A(7);break}n=m.value;q=Df(n,b,c).filter(function(H){return function(J){J=J[0];J=J.keySystemConfiguration&&J.keySystemConfiguration.keySystem;return!J||J===H.Gg}}(h));r=t(q);u=r.next();case 8:if(u.done){B.A(10);break}v=
u.value;return B.g(Af(n,v),9);case 9:u=r.next();B.A(8);break;case 10:n.decodingInfos.some(function(H){return H.supported})&&(k=!0);m=l.next();B.A(5);break;case 7:if(k)return B.return();h={Gg:void 0};g=f.next();B.A(2);break;case 4:w=t(a),x=w.next();case 12:if(x.done){B.A(0);break}y=x.value;z=Df(y,b,c).filter(function(H){H=H[0];H=H.keySystemConfiguration&&H.keySystemConfiguration.keySystem;return!H||!d.includes(H)});A=t(z);F=A.next();case 15:if(F.done){x=w.next();B.A(12);break}G=F.value;return B.g(Af(y,
G),16);case 16:F=A.next(),B.A(15)}})}
function Df(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=Ke(k);if(l.includes(",")&&!d){var m=l.split(","),n=Je(k);l=zc("video",m);m=zc("audio",m);m=Ef(m,n);n=Ee(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=Ff(l);k={contentType:Ee(Je(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||30};if(e.hdr)switch(e.hdr){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=Je(l),l=Ef(Ke(l),k),k=Ee(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=[];f.length==0&&f.push(null);g.length==0&&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 q=m.videoRobustness+","+m.audioRobustness;l.get(q)||l.set(q,[]);l.get(q).push(m)}l=t(l.values());for(n=l.next();!n.done;n=l.next()){n=n.value;m=[];q=t(h);for(var r=q.next();!r.done;r=q.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,y=t(w.initData),z=y.next();!z.done;z=y.next())x.add(z.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 Ef(a,b){var c=P();return a.toLowerCase()=="flac"?c.va()!="WEBKIT"?"flac":"fLaC":a.toLowerCase()==="opus"?c.va()!="WEBKIT"?"opus":Fe(b)=="mp4"?"Opus":"opus":a.toLowerCase()=="ac-3"&&c.qf()?"ec-3":a}function Ff(a){if(a.includes("avc1")){var b=a.split(".");if(b.length==3)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if(a=="vp9")return"vp09.00.41.08";return a}
function uf(a){a.textStreams=a.textStreams.filter(function(b){b=Be(b.mimeType,b.codecs);return Qe(b)})}
function vf(a){var b,c,d,e,f,g,h,k;return D(function(l){switch(l.h){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;f=="application/mp4"&&e.codecs=="mjpg"&&(f="image/jpg");if(Gf.has(f)){l.A(5);break}g=Hf.get(f);if(!g){Gf.set(f,!1);l.A(5);break}return l.g(If(g),7);case 7:h=l.i,Gf.set(f,h);case 5:(k=Gf.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,l.j()}})}
function If(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(c.height===2)}})}
function Jf(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),q=n.next();!q.done;q=n.next())m.add(q.value);if(c)for(n=t(c.roles),q=n.next();!q.done;q=n.next())m.add(q.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,videoLabel: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,videoRoles: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;a.videoRoles=c.roles;a.videoLabel=c.label;if(d=c.dependencyStream)a.width=d.width||a.width,a.height=d.height||a.height,a.videoCodec=d.codecs||a.videoCodec,a.pixelAspectRatio=
d.pixelAspectRatio||a.pixelAspectRatio,a.videoBandwidth&&d.bandwidth&&(a.videoBandwidth+=d.bandwidth);if(g.includes(",")){a.channelsCount=c.channelsCount;a.audioSamplingRate=c.audioSamplingRate;a.spatialAudio=c.spatialAudio;a.originalLanguage=c.originalLanguage;a.audioMimeType=e;e=g.split(",");try{a.videoCodec=zc("video",e),a.audioCodec=zc("audio",e)}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,e=b.dependencyStream)&&(a.audioCodec=e.codecs||a.audioCodec,a.audioBandwidth&&e.bandwidth&&(a.audioBandwidth+=e.bandwidth));c&&!a.videoBandwidth&&(b?a.audioBandwidth&&(a.videoBandwidth=a.bandwidth-a.audioBandwidth):a.videoBandwidth=a.bandwidth);b&&!a.audioBandwidth&&(c?a.videoBandwidth&&(a.audioBandwidth=a.bandwidth-a.videoBandwidth):
a.audioBandwidth=a.bandwidth);b=[];a.videoCodec&&b.push(a.videoCodec);a.audioCodec&&b.push(a.audioCodec);a.codecs=b.join(", ");return a}function Kf(a){return{id:a.id,active:!1,type:Cc,bandwidth:a.bandwidth||0,language:a.language,label:a.label,kind:a.kind||null,mimeType:a.mimeType,codecs:a.codecs||null,primary:a.primary,roles:a.roles,accessibilityPurpose:a.accessibilityPurpose,forced:a.forced,originalTextId:a.originalId,originalLanguage:a.originalLanguage}}
function Lf(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.Ne());var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&b!=null&&(b/=Number(e.split("x")[0]));e&&c!=null&&(c/=Number(e.split("x")[1]));return{id:a.id,type:"image",bandwidth:a.bandwidth||0,width:b,height:c,mimeType:a.mimeType,codecs:a.codecs||null,tilesLayout:e||null,originalImageId:a.originalId}}function Mf(a){a.__shaka_id||(a.__shaka_id=Nf++);return a.__shaka_id}
function Of(a){var b={id:Mf(a),active:a.mode!="disabled",type:Cc,bandwidth:0,language:ff(a.language||"und"),label:a.label,kind:a.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:a.kind=="forced",originalTextId:a.id,originalLanguage:a.language};a.kind=="captions"&&(b.mimeType="unknown");a.kind=="subtitles"&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);return b}
function Pf(a,b){var c=a?a.language:null;c={id:Mf(a||b),active:a?a.enabled:b.selected,type:"variant",bandwidth:0,language:ff(c||"und"),label:a?a.label:null,videoLabel:null,kind:a?a.kind:null,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:a?a.kind=="main":!1,roles:[],forced:!1,audioRoles:null,videoRoles:null,videoId:null,audioId:null,audioGroupId:null,
channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:b?b.id:null,originalAudioId:a?a.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:c};a&&a.kind&&(c.roles=[a.kind],c.audioRoles=[a.kind]);a&&a.configuration&&(a.configuration.codec&&(c.audioCodec=a.configuration.codec,c.codecs=c.audioCodec),a.configuration.bitrate&&(c.audioBandwidth=a.configuration.bitrate,c.bandwidth+=c.audioBandwidth),
a.configuration.sampleRate&&(c.audioSamplingRate=a.configuration.sampleRate),a.configuration.numberOfChannels&&(c.channelsCount=a.configuration.numberOfChannels));if(b&&b.configuration&&(b.configuration.codec&&(c.videoCodec=b.configuration.codec,c.codecs=c.codecs?c.codecs+(","+c.videoCodec):c.videoCodec),b.configuration.bitrate&&(c.videoBandwidth=b.configuration.bitrate,c.bandwidth+=c.videoBandwidth),b.configuration.framerate&&(c.frameRate=b.configuration.framerate),b.configuration.width&&(c.width=
b.configuration.width),b.configuration.height&&(c.height=b.configuration.height),b.configuration.colorSpace&&b.configuration.colorSpace.transfer))switch(b.configuration.colorSpace.transfer){case "pq":c.hdr="PQ";break;case "hlg":c.hdr="HLG";break;case "bt709":c.hdr="SDR"}return c}function Qf(a){return a.allowedByApplication&&a.allowedByKeySystem&&a.disabledUntilTime==0}function Rf(a){return a.filter(function(b){return Qf(b)})}
function Sf(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=nf(ff(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return ff(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=Tf(e,c),a.length)return a}else if(a=e.filter(function(k){return k.roles.length==0}),a.length)return a;a=e.map(function(k){return k.roles}).reduce($e,[]);return a.length?
Tf(e,a[0]):e}function Tf(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Uf(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);return b}
function Vf(a,b){b.length&&(b=b.filter(function(c){return Ge(a.codecs)==Ge(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],b.length>1&&(b=b.find(function(c){return a.width==c.width&&a.height==c.height})))&&(a.trickModeVideo=b)}
function zf(a){return a.type=="audio"?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:a.type=="video"?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
function Wf(a,b,c){if(c.autoShowText==0)return!1;if(c.autoShowText==1)return!0;var d=ff(c.preferredTextLanguage);b=ff(b.language);if(c.autoShowText==2)return ef(b,d);if(c.autoShowText==3){if(!a)return!1;a=ff(a.language);return ef(b,d)&&!ef(a,b)}Qa("Invalid autoShowText setting!");return!1}
function Xf(a){var b={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c?Je(c):"",codecs:c?Ke(c):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"video",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};d.fullMimeTypes.add(Be(d.mimeType,d.codecs));c.startsWith("audio/")?(d.type="audio",b.audio=d):b.video=d}return b}E("shaka.util.StreamUtils",of);of.meetsRestrictions=rf;
var Bf=new Map,Nf=0,Gf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Hf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Yf(){var a=this;this.F=null;this.G=!1;this.u=new Ma;this.j=new eb;navigator.connection&&navigator.connection.addEventListener&&this.j.H(navigator.connection,"change",function(){a.g.useNetworkInformation&&navigator.onLine&&(a.u=new Ma,a.g&&a.u.configure(a.g.advanced),a.trySuggestStreams())});this.l=[];this.I=1;this.K=!1;this.h=this.o=this.g=this.B=null;this.m=new W(function(){if(a.G&&(a.g.restrictToElementSize||a.g.restrictToScreenSize)){var b=a.chooseVariant();b&&a.F&&a.F(b,a.g.clearBufferSwitch,
a.g.safeMarginSwitch)}});this.C=window;"documentPictureInPicture"in window&&this.j.H(window.documentPictureInPicture,"enter",function(){a.C=window.documentPictureInPicture.window;a.m&&a.m.Rb();a.j.La(a.C,"pagehide",function(){a.C=window;a.m&&a.m.Rb()})});this.D=this.i=null}p=Yf.prototype;p.stop=function(){this.F=null;this.G=!1;this.l=[];this.I=1;this.o=this.B=null;this.h&&(this.h.disconnect(),this.h=null);this.m&&this.m.stop();this.D=this.i=null};
p.release=function(){this.stop();this.j.release();this.m=null};p.init=function(a){this.F=a};
p.chooseVariant=function(a){a=a===void 0?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio,b=this.C.screen.height*c,c*=this.C.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio,e=this.o.clientHeight,f=this.o.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.o&&(e=this.i.height,f=this.i.width);b=Math.min(b,e*d);c=Math.min(c,
f*d)}e=this.l.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=this.l);d=e;a&&e.length!=this.l.length&&(d=this.l.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));a=Zf(this,this.g.restrictions,d,Infinity,Infinity);if(b!=Infinity||c!=Infinity){a=$f(a);a=t(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=Zf(this,this.g.restrictions,
d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=Zf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=a[d];var g=isNaN(this.I)?1:Math.abs(this.I);f=g*e.bandwidth/this.g.bandwidthDowngradeTarget;for(var h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}g=g*h.bandwidth/this.g.bandwidthUpgradeTarget;c&&e&&b>=f&&b<=g&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<
e.video.height))&&(c=e)}this.B=Date.now();return c};p.enable=function(){this.G=!0;this.l.length&&this.trySuggestStreams()};p.disable=function(){this.G=!1};p.segmentDownloaded=function(a,b,c,d){var e=a;this.g.removeLatencyFromFirstPacketTime&&d&&d.packetNumber===1&&d.timeToFirstByte&&(e=a-d.timeToFirstByte);e>=this.g.cacheLoadThreshold&&this.u.sample(e,b);c&&this.B!=null&&this.G&&ag(this)};p.trySuggestStreams=function(){this.G&&(this.B=Date.now(),ag(this,!0))};
p.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=navigator.connection.downlink*1E6);if(navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth)return a;a=this.u.getBandwidthEstimate(a);return this.D?this.D.getBandwidthEstimate(a):a};p.setVariants=function(a){if(Ya(a,this.l))return!1;this.l=a;return!0};
p.playbackRateChanged=function(a){this.I=a};p.setMediaElement=function(a){function b(){c.m.ra(bg)}var c=this;this.o=a;this.h&&(this.h.disconnect(),this.h=null);this.o&&"ResizeObserver"in window&&(this.h=new ResizeObserver(b),this.h.observe(this.o));this.j.H(a,"enterpictureinpicture",function(d){d.pictureInPictureWindow&&(c.i=d.pictureInPictureWindow,c.j.H(c.i,"resize",b))});this.j.H(a,"leavepictureinpicture",function(){c.i&&c.j.eb(c.i,"resize",b);c.i=null})};p.setCmsdManager=function(a){this.D=a};
p.configure=function(a){this.g=a;this.u&&this.g&&this.u.configure(this.g.advanced)};function ag(a,b){if(b===void 0||!b){if(!a.K){b=a.u;if(!(b.g>=b.i))return;a.K=!0;a.B-=(a.g.switchInterval-a.g.minTimeToSwitch)*1E3}if(Date.now()-a.B<a.g.switchInterval*1E3)return}b=a.chooseVariant();a.getBandwidthEstimate();b&&a.F&&a.F(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}
function Zf(a,b,c,d,e){if(a.D){var f=a.D.fg();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return rf(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function $f(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&(c=c.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}E("shaka.abr.SimpleAbrManager",Yf);
Yf.prototype.configure=Yf.prototype.configure;Yf.prototype.setCmsdManager=Yf.prototype.setCmsdManager;Yf.prototype.setMediaElement=Yf.prototype.setMediaElement;Yf.prototype.playbackRateChanged=Yf.prototype.playbackRateChanged;Yf.prototype.setVariants=Yf.prototype.setVariants;Yf.prototype.getBandwidthEstimate=Yf.prototype.getBandwidthEstimate;Yf.prototype.trySuggestStreams=Yf.prototype.trySuggestStreams;Yf.prototype.segmentDownloaded=Yf.prototype.segmentDownloaded;Yf.prototype.disable=Yf.prototype.disable;
Yf.prototype.enable=Yf.prototype.enable;Yf.prototype.chooseVariant=Yf.prototype.chooseVariant;Yf.prototype.init=Yf.prototype.init;Yf.prototype.release=Yf.prototype.release;Yf.prototype.stop=Yf.prototype.stop;var bg=1;function cg(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return A!=null&&A.g.trim()!=""})){f=h;break}for(h=c.length-1;h>=0;h--)if(c[h].some(function(A){return A!=null&&A.g.trim()!=""})){g=h;break}if(f===-1||g===-1)return null;for(var k=h=!1,l="white",m="black",n=dg(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],r=-1,u=-1,v=0;v<q.length;v++)if(q[v]!=null&&q[v].g.trim()!==""){r=v;break}for(v=q.length-1;v>=0;v--)if(q[v]!=null&&q[v].g.trim()!==""){u=v;break}if(r===
-1||u===-1)q=eg(d,e),a.nestedCues.push(q);else{for(;r<=u;r++)if(v=q[r]){var w=v.l,x=v.i,y=v.j,z=v.h;if(w!=h||x!=k||y!=l||z!=m)n.payload&&a.nestedCues.push(n),n=dg(d,e,w,x,y,z),h=w,k=x,l=y,m=z;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=eg(d,e),a.nestedCues.push(n));n=dg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}function dg(a,b,c,d,e,f){a=new Td(a,b,"");c&&a.textDecoration.push(oe);d&&(a.fontStyle=ne);a.color=e;a.backgroundColor=f;return a}
function eg(a,b){a=new Td(a,b,"");a.lineBreak=!0;return a}function fg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function gg(a,b){this.i=[];this.g=1;this.h=0;this.D=a;this.C=b;this.j=this.m=!1;this.l="white";this.o="black";this.u=this.B=null;hg(this)}function ig(a,b,c){var d="CC"+((a.D<<1|a.C)+1),e=new Td(b,c,"");e.lineInterpretation=1;var f=jg.get(a.g);f&&(e.line=f);a.u!=null&&a.B!=null&&(e.position=10+Math.min(70,a.u*10)+a.B*2.5);(b=cg(e,d,a.i,b,c))&&a.g+b.cue.nestedCues.length-3>15&&(f=jg.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function hg(a){kg(a,0,15);a.g=1}
function lg(a,b,c){if(!(c<32||c>127)){var d="";switch(b){case 0:d=mg.has(c)?mg.get(c):String.fromCharCode(c);break;case 1:d=ng.get(c);break;case 2:a.i[a.g].pop();d=og.get(c);break;case 3:a.i[a.g].pop(),d=pg.get(c)}d&&a.i[a.g].push(new fg(d,a.m,a.j,a.o,a.l))}}function qg(a,b,c,d){if(!(c<0||b<0))if(b>=c)for(--d;d>=0;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 kg(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
var mg=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"]]),ng=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"]]),og=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"]]),pg=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"]]),jg=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 rg(a,b){this.h=0;this.o=new gg(a,b);this.i=new gg(a,b);this.g=this.j=new gg(a,b);this.l=0;this.m=null}function sg(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==3&&a.h!==4&&(e=ig(d,a.l,c),c=a.i,c.g=c.h>0?c.h:0,kg(c,0,15),c=a.j,c.g=c.h>0?c.h:0,kg(c,0,15),d.g=15);a.h=3;d.h=b;return e}function tg(a){a.h=1;a.g=a.j;a.g.h=0}function ug(a){Sa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var wg="black green blue cyan red yellow magenta black".split(" "),xg="white green blue cyan red yellow magenta white_italics".split(" ");function yg(a,b){this.K=b;this.N=a;this.L=this.l=!1;this.m=this.o=this.G=this.M=this.I=0;this.F=2;this.i=[];this.g=this.h=this.j=0;this.D=this.B=!1;this.C="white";this.u="black";zg(this)}function zg(a){a.i=[];for(var b=0;b<16;b++)a.i.push(Ag())}function Ag(){for(var a=[],b=0;b<42;b++)a.push(null);return a}function Bg(a,b){Cg(a)&&(a.i[a.h][a.g]=new fg(b,a.D,a.B,a.u,a.C),a.g++)}function Cg(a){var b=a.g<a.m&&a.g>=0;return a.h<a.o&&a.h>=0&&b}yg.prototype.isVisible=function(){return this.l};
function Dg(a){for(var b=0,c=1;c<16;c++,b++)a.i[b]=a.i[c];for(c=0;c<1;c++,b++)a.i[b]=Ag()}
function Eg(a,b,c){var d=new Td(a.j,b,"");d.textAlign=a.F===0?"left":a.F===1?"right":Vd;var e=d.region;a.K&&(e.id+="svc"+a.K);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.I;e.viewportAnchorY=a.M;e.viewportAnchorUnits=a.L?$c:2;switch(a.G){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=cg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}yg.prototype.display=function(){this.l=!0};function Fg(){this.i=[];this.h=null;this.g=0}function Gg(a,b){b.type===3?(a.g=(b.value&63)*2-1,a.h=[]):a.h&&(a.g>0&&(a.h.push(b),a.g--),a.g===0&&(a.i.push(new Hg(a.h)),a.h=null,a.g=0))}function Hg(a){this.g=0;this.h=a}Hg.prototype.Oa=function(){return this.g<this.h.length};Hg.prototype.Da=function(){return this.g};function Ig(a){if(!a.Oa())throw new V(2,2,3E3);return a.h[a.g++]}Hg.prototype.skip=function(a){if(this.g+a>this.h.length)throw new V(2,2,3E3);this.g+=a};
Hg.prototype.Lg=function(a){if(this.g-a<0)throw new V(2,2,3E3);this.g-=a};function Jg(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
function Kg(a,b,c,d){if(!a.g)return[];if(c==24)return c=Ig(b).value,d=Ig(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),Bg(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!Cg(b)||b.g<=0&&b.h<=0||(b.g<=0?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=Eg(b,d,a.i));b.h+1>=b.o?Dg(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=Eg(b,d,a.i));b.i[b.h]=Ag();b.g=0;break;case 12:b.isVisible()&&
(e=Eg(b,d,a.i)),zg(b),b.h=0,b.g=0}return e?[e]:[]}
function Lg(a,b,c,d){if(c>=128&&c<=135)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(c===136){c=Ig(b).value;b=[];c=t(Mg(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=Eg(e,d,a.i);f&&b.push(f)}zg(e)}return b}if(c===137)for(b=Ig(b).value,b=t(Mg(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(c===138){c=Ig(b).value;b=null;c=t(Mg(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Eg(e,d,a.i)),e.l=!1;return b?
[b]:[]}if(c===139){c=Ig(b).value;b=null;c=t(Mg(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Eg(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(c===140)return b=Ig(b).value,Ng(a,b,d);if(c===143)return d=Ng(a,255,d),Og(a),d;if(c===144)b.skip(1),d=Ig(b).value,a.g&&(a.g.B=(d&128)>0,a.g.D=(d&64)>0);else if(c===145)d=Ig(b).value,c=Ig(b).value,b.skip(1),a.g&&(b=Pg((c&48)>>4,(c&12)>>2,c&3),a.g.C=Pg((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(c===146)d=Ig(b).value,b=Ig(b).value,a.g&&(a=
a.g,a.h=d&15,a.g=b&63);else if(c===151)b.skip(1),b.skip(1),d=Ig(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(c>=152&&c<=159){c=(c&15)-8;e=a.h[c]!==null;e||(f=new yg(c,a.i),f.j=d,a.h[c]=f);d=Ig(b).value;f=Ig(b).value;var g=Ig(b).value,h=Ig(b).value,k=Ig(b).value;b=Ig(b).value;e&&(b&7)===0||(b=a.h[c],b.h=0,b.g=0,b.D=!1,b.B=!1,b.C="white",b.u="black");b=a.h[c];b.l=(d&32)>0;b.M=f&127;b.I=g;b.G=(h&240)>>4;b.L=(f&128)>0;b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]}
function Mg(a,b){for(var c=[],d=0;d<8;d++)(b&1)===1&&a.h[d]&&c.push(d),b>>=1;return c}function Ng(a,b,c){var d=[];b=t(Mg(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=Eg(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function Og(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Pg(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Qg[a<<2|b<<1|c]}
var Rg=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"]]),Qg="black blue green cyan red magenta yellow white".split(" ");function Sg(a,b){this.h=Sb(a);this.i=b==Tg;this.g=0}p=Sg.prototype;p.Oa=function(){return this.g<this.h.byteLength};p.Da=function(){return this.g};p.getLength=function(){return this.h.byteLength};p.mb=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Ug();}};p.kb=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Ug();}};p.P=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Ug();}};
p.kf=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Ug();}};p.Qc=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 Ug();}if(b>2097151)throw new V(2,3,3001);this.g+=8;return b*4294967296+a};p.Yb=function(a,b){if(this.g+a>this.h.byteLength)throw Ug();var c=S(this.h,this.g,a);this.g+=a;return b?new Uint8Array(c):c};
p.skip=function(a){if(this.g+a>this.h.byteLength)throw Ug();this.g+=a};p.Lg=function(a){if(this.g<a)throw Ug();this.g-=a};p.seek=function(a){if(a<0||a>this.h.byteLength)throw Ug();this.g=a};p.Pc=function(){for(var a=this.g;this.Oa()&&this.h.getUint8(this.g)!=0;)this.g+=1;a=S(this.h,a,this.g-a);this.g+=1;return ec(a)};function Ug(){return new V(2,3,3E3)}E("shaka.util.DataViewReader",Sg);Sg.prototype.readTerminatedString=Sg.prototype.Pc;Sg.prototype.seek=Sg.prototype.seek;Sg.prototype.rewind=Sg.prototype.Lg;
Sg.prototype.skip=Sg.prototype.skip;Sg.prototype.readBytes=Sg.prototype.Yb;Sg.prototype.readUint64=Sg.prototype.Qc;Sg.prototype.readInt32=Sg.prototype.kf;Sg.prototype.readUint32=Sg.prototype.P;Sg.prototype.readUint16=Sg.prototype.kb;Sg.prototype.readUint8=Sg.prototype.mb;Sg.prototype.getLength=Sg.prototype.getLength;Sg.prototype.getPosition=Sg.prototype.Da;Sg.prototype.hasMoreData=Sg.prototype.Oa;var Tg=1;Sg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Tg};function Vg(){this.h=[];this.g=[];this.i=new Fg;this.l=0;this.m=new Map([["CC1",new rg(0,0)],["CC2",new rg(0,1)],["CC3",new rg(1,0)],["CC4",new rg(1,1)]]);this.u=this.o=0;this.j=new Map;this.C=!0;this.B=new Set;Wg(this)}Vg.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Wg(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())Og(b.value)};
function Wg(a){a.o=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,hg(c.i),hg(c.j),hg(c.o);a.C=!0}
Vg.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 Sg(a,0);if(!(a.getLength()<8)&&a.mb()===181&&a.kb()===49&&a.P()===1195456820&&a.mb()===3&&(c=a.mb(),(c&64)!==0))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.mb(),f=(e&4)>>2,g=a.mb(),h=a.mb();f&&(e&=3,e===0||e===1?this.h.push({pts:b,type:e,$a:g,Fb: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})))}};
Vg.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=Xg(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())Gg(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Yg(this,d.value),b.push.apply(b,C(d));this.i.i=[];this.h=[];this.g=[];return b};
function Xg(a,b){var c=b.type;if((b.$a&112)===16){var d=b.$a>>3&1;c===0?a.o=d:a.u=d}d="CC"+((c<<1|(c?a.u:a.o))+1);c=a.m.get(d);if(b.$a===255&&b.Fb===255||!b.$a&&!b.Fb||!Zg(b.$a)||!Zg(b.Fb))return++a.l>=45&&Wg(a),null;a.l=0;b.$a&=127;b.Fb&=127;var e=b.$a;if(e>=1&&e<=15||!b.$a&&!b.Fb)return null;e=null;if((b.$a&112)===16)a:{a.B.add(d),d=b.$a;a=b.Fb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,(d&240)===16&&(a&192)===64){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=a>95?a-96:a-64;g<=13?d=xg[Math.floor(g/2)]:g<=15?e=!0:f=Math.floor((g-16)/2);a=(a&1)===1;c.h!==4&&(g=c.g,c.h===3&&b!==g.g&&(c=1+b-g.h,qg(g,c,1+g.g-g.h,g.h),kg(g,0,c-1),kg(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.u=f,g.o="black")}else if((d&247)===17&&(a&240)===32)c.g.m=!1,c.g.j=!1,c.g.l="white",lg(c.g,0,32),d=!1,b=xg[(a&14)>>1],b==="white_italics"&&(b="white",d=!0),c.g.m=(a&1)===1,c.g.j=d,c.g.l=b;else if((d&247)===16&&(a&240)===32||(d&247)===23&&(a&255)===45)b="black",(d&7)===0&&(b=wg[(a&
14)>>1]),c.g.o=b;else if((d&247)===17&&(a&240)===48)lg(c.g,1,a);else if((d&246)===18&&(a&224)===32)lg(c.g,d&1?3:2,a);else{if((d&246)===20&&(a&240)===32){a=b.pts;d=null;switch(b.Fb){case 32:tg(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=sg(c,2,a);break;case 38:d=sg(c,3,a);break;case 39:d=sg(c,4,a);break;case 40:lg(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:hg(c.o);ug(c);break;case 43:ug(c);break;case 44:b=c.i;d=null;c.h!==4&&(d=ig(b,c.l,a));kg(b,0,15);break;case 45:b=
c.g;c.h!==3?d=null:(d=ig(b,c.l,a),e=b.g-b.h+1,qg(b,e-1,e,b.h),kg(b,0,e-1),kg(b,b.g,15-b.g),c.l=a);break;case 46:kg(c.j,0,15);break;case 47:b=null,c.h!==4&&(b=ig(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,tg(c),c.l=a,d=b}e=d;break a}(d==23||d==31)&&a>=33&&a<=35&&(c.g.B=a-32)}e=null}else a=b.Fb,lg(c.g,0,b.$a),lg(c.g,0,a);return e}
function Yg(a,b){var c=[];try{for(;b.Oa();){var d=Ig(b).value,e=(d&224)>>5,f=d&31;e===7&&f!=0&&(e=Ig(b).value&63);if(e!=0){a.B.add("svc"+e);a.j.has(e)||a.j.set(e,new Jg(e));for(var g=a.j.get(e),h=b.Da();b.Da()-h<f;){e=g;var k=b,l=Ig(k),m=l.value,n=l.pts;if(m===16){var q=Ig(k);m=m<<16|q.value}if(m>=0&&m<=31)var r=Kg(e,k,m,n);else if(m>=128&&m<=159)r=Lg(e,k,m,n);else{if(m>=4096&&m<=4127)e=k,k=m&255,k>=8&&k<=15?e.skip(1):k>=16&&k<=23?e.skip(2):k>=24&&k<=31&&e.skip(3);else if(m>=4224&&m<=4255)e=k,k=m&
255,k>=128&&k<=135?e.skip(4):k>=136&&k<=143&&e.skip(5);else if(m>=32&&m<=127)k=m,e.g&&(k===127?Bg(e.g,"\u266a"):Bg(e.g,String.fromCharCode(k)));else if(m>=160&&m<=255)e.g&&Bg(e.g,String.fromCharCode(m));else if(m>=4128&&m<=4223){if(k=m&255,e.g)if(Rg.has(k)){var u=Rg.get(k);Bg(e.g,u)}else Bg(e.g,"_")}else m>=4256&&m<=4351&&e.g&&((m&255)!=160?Bg(e.g,"_"):Bg(e.g,"[CC]"));r=[]}c.push.apply(c,C(r))}}}}catch(v){if(v instanceof V&&v.code===3E3)Sa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");
else throw v;}return c}function Zg(a){for(var b=0;a;)b^=a&1,a>>=1;return b===1}Vg.prototype.getStreams=function(){return Array.from(this.B)};E("shaka.cea.CeaDecoder",Vg);Vc=function(){return new Vg};function $g(a){for(var b=[],c=a,d=a=0;d<c.length;)a==2&&c[d]==3?(a=0,c=[].concat(C(c)),c.splice(d,1),c=new Uint8Array(c)):c[d]==0?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;a[d]==255;)c+=255,d++;c+=a[d++];for(var e=0;a[d]==255;)e+=255,d++;e+=a[d++];c==4&&b.push(a.subarray(d,d+e));d+=e}return b};function ah(){this.i=new Map;this.h=new Map;this.g=!1}p=ah.prototype;p.box=function(a,b){a=bh(a);this.i.set(a,ch);this.h.set(a,b);return this};p.boxes=function(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())this.box(c.value,b);return this};p.ba=function(a,b){a=bh(a);this.i.set(a,dh);this.h.set(a,b);return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new Sg(a,0);for(this.g=!1;a.Oa()&&!this.g;)this.Kc(0,a,b,c)};
p.Kc=function(a,b,c,d){var e=b.Da();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.P(),g=b.P(),h=eh(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Da()+8>b.getLength()){this.g=!0;return}f=b.Qc();k=!0}var l=this.h.get(g);if(l){var m=null,n=null;if(this.i.get(g)==dh){if(d&&b.Da()+4>b.getLength()){this.g=!0;return}n=b.P();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(g-=b.Da(),b=g>0?b.Yb(g,!1):new Uint8Array(0),b=new Sg(b,0),l({name:h,
parser:this,partialOkay:c||!1,stopOnPartial:d||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Da(),b.getLength()-b.Da()))}};function fh(a){for(var b=gh(a);a.reader.Oa()&&!a.parser.g;)a.parser.Kc(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function hh(a){for(var b=gh(a),c=a.reader.P(),d=0;d<c&&(a.parser.Kc(a.start+b,a.reader,a.partialOkay,a.stopOnPartial),!a.parser.g);d++);}
function ih(a){var b=gh(a);for(a.reader.skip(78);a.reader.Oa()&&!a.parser.g;)a.parser.Kc(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function jh(a){var b=gh(a);a.reader.skip(8);var c=a.reader.kb();a.reader.skip(6);c==2?a.reader.skip(48):a.reader.skip(12);for(c==1&&a.reader.skip(16);a.reader.Oa()&&!a.parser.g;)a.parser.Kc(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function kh(a,b){return function(c){a(c.reader.Yb(c.reader.getLength()-c.reader.Da(),b))}}
function bh(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 eh(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function gh(a){return 8+(a.has64BitSize?8:0)+(a.flags!=null?4:0)}E("shaka.util.Mp4Parser",ah);ah.headerSize=gh;ah.typeToString=eh;ah.allData=kh;ah.audioSampleEntry=jh;ah.visualSampleEntry=ih;ah.sampleDescription=hh;ah.children=fh;ah.prototype.parseNext=ah.prototype.Kc;ah.prototype.parse=ah.prototype.parse;
ah.prototype.stop=ah.prototype.stop;ah.prototype.fullBox=ah.prototype.ba;ah.prototype.boxes=ah.prototype.boxes;ah.prototype.box=ah.prototype.box;var ch=0,dh=1;function lh(a,b){var c=null,d=null,e=null,f=null,g=a.P();b&1&&(e=a.Qc());b&2&&(f=a.P());b&8&&(c=a.P());b&16&&(d=a.P());return{trackId:g,dd:c,ed:d,yh:e,Mg:f}}function mh(a,b){return b==1?(b=a.P(),a=a.P(),{baseMediaDecodeTime:b*4294967296+a}):{baseMediaDecodeTime:a.P()}}function nh(a,b){b==1?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.P();a.skip(4);a=a.kb();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
function oh(a,b,c){var d=a.P(),e=[],f=null;c&1&&(f=a.kf());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={vf:null,sampleSize:null,ke:null};c&256&&(h.vf=a.P());c&512&&(h.sampleSize=a.P());c&1024&&a.skip(4);c&2048&&(h.ke=b==0?a.P():a.kf());e.push(h)}return{Cj:d,uf:e,Me:f}}function ph(a){a=a.P();return{codec:eh(a)}};function qh(){this.j=new Map;this.i=this.h=0;this.g=rh}
qh.prototype.init=function(a){var b=this,c=[],d=[];(new ah).boxes("moov trak mdia minf stbl mvex".split(" "),fh).ba("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.P();f=f.P();b.h=e;b.i=f}).ba("tkhd",function(e){var f=e.reader;e=e.version;e==1?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));var g=f.P();e==1?f.skip(8):f.skip(4);f.skip(4);f.skip(8);f.skip(2);f.skip(2);f.skip(2);f.skip(2);f.skip(36);f.kb();f.kb();f.kb();f.kb();c.push(g)}).ba("mdhd",function(e){e=nh(e.reader,e.version);d.push(e.timescale)}).ba("stsd",
hh).boxes("avc1 avc3 dvav dva1 hev1 hvc1 dvh1 dvhe vvc1 vvi1 dvc1 dvi1".split(" "),function(e){e=e.name;sh.has(e)&&(b.g=sh.get(e))}).box("encv",ih).box("sinf",fh).box("frma",function(e){e=ph(e.reader).codec;sh.has(e)&&(b.g=sh.get(e))}).parse(a,!0,!0);if(!c.length||!d.length||c.length!=d.length)throw new V(2,2,2010);this.g==rh&&Qa("Unable to determine bitstream format for CEA parsing!");c.forEach(function(e,f){b.j.set(e,d[f])})};
qh.prototype.parse=function(a){var b=this;if(this.g==rh)return[];var c=[],d=0,e=[];(new ah).box("moof",function(f){d=f.start;e=[];fh(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,dd:b.h,ed:b.i,Fg:[],timescale:9E4});fh(f)}).ba("trun",function(f){var g=e[e.length-1];f=oh(f.reader,f.version,f.flags);g.Fg.push(f)}).ba("tfhd",function(f){var g=e[e.length-1];f=lh(f.reader,f.flags);g.dd=f.dd||b.h;g.ed=f.ed||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).ba("tfdt",function(f){var g=
e[e.length-1];f=mh(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Da(),k=t(e),l=k.next();!l.done;l=k.next())l=l.value,l.baseMediaDecodeTime===null?Qa("Unable to find base media decode time for CEA captions!"):(f.reader.seek(h),th(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.dd,l.ed,g,l.Fg,c))}).parse(a,!1,!0);return c};
function th(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.uf});n=[].concat.apply([],C(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Me);b.Oa();){g=b.P();var q=b.mb(),r=null;r=!1;h=1;switch(a.g){case uh:r=q&31;r=r==6;break;case vh:h=2;b.skip(1);r=q>>1&63;r=r==39||r==40;break;case wh:h=2;b.skip(1);r=q>>1&63;r=r==23||r==24;break;default:return}if(r)for(q=0,l<n.length&&(q=n[l].ke||0),q=(c+q)/d,h=b.Yb(g-h,!1),h=t($g(h)),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:q});
else try{b.skip(g-h)}catch(u){break}m-=g+4;m==0&&(c=l<n.length?c+(n[l].vf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}E("shaka.cea.Mp4CeaParser",qh);var rh=0,uh=1,vh=2,wh=3,sh=(new Map).set("avc1",uh).set("avc3",uh).set("dvav",uh).set("dva1",uh).set("hev1",vh).set("hvc1",vh).set("dvh1",vh).set("dvhe",vh).set("vvc1",wh).set("vvi1",wh).set("dvc1",wh).set("dvi1",wh);Xc("video/mp4",function(){return new qh});/*

 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 xh(a,b){this.j=a;if(b===void 0?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)d>=2&&a[d]==3&&a[d-1]==0&&a[d-2]==0||(b[c]=a[d],c++);this.j=S(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function yh(a){var b=a.j.byteLength-a.i,c=Math.min(4,a.i);if(c!==0){for(var d=0,e=0;e<c;e++)d=d<<8|a.j[b+e];a.h=d<<(4-c)*8;a.g=c*8;a.i-=c}}function zh(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=c*8;a.g-=c;yh(a)}a.h<<=b;a.g-=b}
function Ah(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;a.g>0?a.h<<=c:a.i>0&&yh(a);c=b-c;return c>0?d<<c|Ah(a,c):d}function Bh(a){for(var b=0;a.g===0;){if(a.i===0)return b;yh(a)}for(;;){var c=Math.clz32(a.h);c>a.g&&(c=a.g);b+=c;a.h<<=c;a.g-=c;if(a.g>0||a.i===0)break;yh(a)}return b}function Ch(a){zh(a,1+Bh(a))}function Dh(a){var b=Bh(a);return Ah(a,b+1)-1}function Eh(a){return Ah(a,1)===1}
function Fh(a,b){for(var c=8,d=8,e=0;e<b;e++)d!==0&&(d=Dh(a),d=(c+(1&d?1+d>>>1:-1*(d>>>1))+256)%256),c=d===0?c:d}E("shaka.util.ExpGolomb",xh);function Gh(){}function Hh(a,b){return b+10<=a.length&&a[b]===73&&a[b+1]===68&&a[b+2]===51&&a[b+3]<255&&a[b+4]<255&&a[b+6]<128&&a[b+7]<128&&a[b+8]<128&&a[b+9]<128?!0:!1}function Ih(a,b){return b+10<=a.length&&a[b]===51&&a[b+1]===68&&a[b+2]===73&&a[b+3]<255&&a[b+4]<255&&a[b+6]<128&&a[b+7]<128&&a[b+8]<128&&a[b+9]<128?!0:!1}function Jh(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 Kh(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if(a.type==="APIC"){if(a.size<2||a.data[0]!==3)return null;var c=a.data.subarray(1).indexOf(0);if(c===-1)return null;var d=ec(S(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(f===-1)return null;var g=ec(S(a.data,3+c,f)),h;d==="--\x3e"?h=ec(S(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(a.type==="TXXX"){if(a.size<2||a.data[0]!==3)return null;
d=a.data.subarray(1).indexOf(0);if(d===-1)return null;c=ec(S(a.data,1,d));a=ec(S(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if(a.type==="WXXX"){if(a.size<2||a.data[0]!==3)return null;d=a.data.subarray(1).indexOf(0);if(d===-1)return null;c=ec(S(a.data,1,d));a=ec(S(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if(a.type==="PRIV"){if(a.size<2)return null;c=a.data.indexOf(0);if(c===-1)return null;c=ec(S(a.data,0,c));b.description=c;c=="com.apple.streaming.transportStreamTimestamp"?
(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(a.type[0]==="T"){if(a.size<2||a.data[0]!==3)return null;a=ec(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return a.type[0]==="W"?(a=ec(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Ob(a.data),b):null}
function Lh(a){for(var b=0,c=[];Hh(a,b);){var d=Jh(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=Jh(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Kh(e))&&c.push(f);b+=e.size+10}Ih(a,b)&&(b+=10)}return c}E("shaka.util.Id3Utils",Gh);Gh.getID3Data=function(a,b){for(var c=b=b===void 0?0:b,d=0;Hh(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Jh(a,b+6),Ih(a,b+10)&&(d+=10),b+=d;return d>0?a.subarray(c,c+d):new Uint8Array([])};
Gh.getID3Frames=Lh;function Mh(){this.L=null;this.M=!1;this.C=this.N=null;this.D=[];this.j=[];this.g=[];this.G=this.I=null;this.l=[];this.i=[];this.h=[];this.K=null;this.o=[];this.m=[];this.F=this.u=this.B=null}p=Mh.prototype;p.clearData=function(){this.D=[];this.j=[];this.g=[];this.l=[];this.i=[];this.h=[];this.o=[];this.m=[]};p.Tg=function(a){this.F!=null&&this.F!=a&&(this.u=this.B=null);this.F=a};
p.parse=function(a){if(a.length<564)return this;for(var b=Math.max(0,Nh(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(a[e]==71){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if((a[e+3]&48)>>4>1){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.L=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.L:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Td:-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(m>0)for(var n=h+5,q=m;q>2;){var r=f[n+1]+2;switch(f[n]){case 5:var u=n+2;u=f[u]<<24|f[u+1]<<16|f[u+2]<<8|f[u+3];g.audio==-1&&u===1332770163?(g.audio=l,g.audioCodec="opus"):g.video==-1&&u===1096167473&&(g.video=l,g.videoCodec="av1");break;case 106:g.audio==-1&&(g.audio=l,g.audioCodec="ac3");break;case 122:g.audio==-1&&(g.audio=l,g.audioCodec="ec3");break;case 124:g.audio==-1&&(g.audio=l,g.audioCodec="aac")}n+=r;q-=r}break;
case 15:g.audio==-1&&(g.audio=l,g.audioCodec="aac");break;case 17:g.audio==-1&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:g.Td==-1&&(g.Td=l);break;case 27:g.video==-1&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:g.audio==-1&&(g.audio=l,g.audioCodec="mp3");break;case 36:g.video==-1&&(g.video=l,g.videoCodec="hvc");break;case 129:g.audio==-1&&(g.audio=l,g.audioCodec="ac3");break;case 132:case 135:g.audio==-1&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;f.video!=-1&&(this.N=f.video,this.C=
f.videoCodec);f.audio!=-1&&(this.I=f.audio,this.G=f.audioCodec);f.Td!=-1&&(this.K=f.Td);d&&!this.M&&(d=!1,e=b-188);this.M=!0;break;case this.N:h=a.subarray(h,e+188);f?(this.j.push(this.D.length),this.D.push(h)):this.j.length&&this.D.push(h);break;case this.I:h=a.subarray(h,e+188);f?(this.i.push(this.l.length),this.l.push(h)):this.i.length&&this.l.push(h);break;case this.K:h=a.subarray(h,e+188);f?(this.m.push(this.o.length),this.o.push(h)):this.m.length&&this.o.push(h);break;default:d=!0}}return this};
function Oh(a,b,c){return vc(a,b[c],c+1<b.length?b[c+1]:a.length)}
function Ph(a,b){if((b[0]<<16|b[1]<<8|b[2])!==1)return null;var c=b[4]<<8|b[5];if(c&&c>b.byteLength-6)return null;var d=null,e=null,f=b[7];if(f&192){var g=(b[9]&14)*536870912+(b[10]&255)*4194304+(b[11]&254)*16384+(b[12]&255)*128+(b[13]&254)/2;a.B==null&&(a.B=g);d=Qh(g,a.B);e=a.B=d;f&64&&(e=(b[14]&14)*536870912+(b[15]&255)*4194304+(b[16]&254)*16384+(b[17]&255)*128+(b[18]&254)/2,a.u==null&&(a.u=e),e=d!=g?Qh(e,a.u):e);a.u=e}a=b[8]+9;return b.byteLength<=a?null:{data:b.subarray(a),packetLength:c,pts:d,
dts:e,nalus:[]}}p.Pi=function(a){R("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.ef(a,{md:null,state:null})};
p.ef=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;this.C=="hvc"&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0,n=this.C==="hvc";f==-1&&(l=0,m=n?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var q=a[h++];if(f)if(f===1)f=q?0:2;else if(q)if(q==1){q=h-f-1;if(l>=0)k.push({data:a.subarray(l+e,q),fullData:a.subarray(l,q),type:m,time:c,state:null});else if(f=k.length?k[k.length-1]:b.md)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)),q>0&&(q=a.subarray(0,q),f.data=uc(f.data,q),f.fullData=uc(f.fullData,q),f.state=0);h<d?(m=n?a[h]>>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=q?0:1}l>=0&&f>=0&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.md&&(c=k.length?k[k.length-1]:b.md)&&(c.data=uc(c.data,a),c.fullData=uc(c.fullData,a));b.state=f;return k};
p.getMetadata=function(){for(var a=[],b=0;b<this.m.length;b++){var c=Oh(this.o,this.m,b);(c=Ph(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Lh(c.data),dts:c.dts,pts:c.pts})}return a};
p.$f=function(){if(this.i.length&&!this.h.length)for(var a=0;a<this.i.length;a++){var b=Oh(this.l,this.i,a),c=Ph(this,b),d=this.h.length?this.h[this.h.length-1]:null;c&&c.pts!=null&&c.dts!=null&&(!d||d.pts!=c.pts&&d.dts!=c.dts)?this.h.push(c):this.h.length&&(b=c?c.data:b)&&(d=this.h[this.h.length-1],d.data=uc(d.data,b))}return this.h};
p.Rd=function(a){a=a===void 0?!0:a;if(this.j.length&&!this.g.length){for(var b=0;b<this.j.length;b++){var c=Oh(this.D,this.j,b),d=Ph(this,c),e=this.g.length?this.g[this.g.length-1]:null;d&&d.pts!=null&&d.dts!=null&&(!e||e.pts!=d.pts&&e.dts!=d.dts)?this.g.push(d):this.g.length&&(c=d?d.data:c)&&(e=this.g[this.g.length-1],e.data=uc(e.data,c))}if(a){b={md:null,state:null};e=[];c=t(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.ef(d,b),d.nalus.length&&(e.push(d),b.md=d.nalus[d.nalus.length-
1]);this.g=e}}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if(a=="audio"){a=null;var b=this.$f();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return a=="video"?(a=null,b=this.Rd(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.cg=function(){return{audio:this.G,video:this.C}};p.Sd=function(){for(var a=[],b=t(this.Rd()),c=b.next();!c.done;c=b.next())a.push.apply(a,C(c.value.nalus));return a};
p.pi=function(){R("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.hg();return{height:a.height,width:a.width}};p.hg=function(){return this.C=="hvc"?Rh(this):Sh(this)};function Th(a){var b=a.Rd();return b.length>1&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(Math.abs(1/(b-a)*9E4)):null}
function Sh(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Sd();if(!c.length)return b;c=c.find(function(r){return r.type==7});if(!c)return b;c=new xh(c.data);var d=Ah(c,8),e=Ah(c,8),f=Ah(c,8);Ch(c);if(Uh.includes(d)){var g=Dh(c);g===3&&zh(c,1);Ch(c);Ch(c);zh(c,1);if(Eh(c)){g=g!==3?8:12;for(var h=0;h<g;h++)Eh(c)&&(h<6?Fh(c,16):Fh(c,64))}}Ch(c);g=Dh(c);if(g===0)Dh(c);else if(g===1)for(zh(c,1),Ch(c),Ch(c),g=Dh(c),h=0;h<g;h++)Ch(c);Ch(c);zh(c,1);g=Dh(c);h=Dh(c);var k=Ah(c,1);k===0&&zh(c,
1);zh(c,1);var l=0,m=0,n=0,q=0;Eh(c)&&(l=Dh(c),m=Dh(c),n=Dh(c),q=Dh(c));b.height=String((2-k)*(h+1)*16-n*2-q*2);b.width=String((g+1)*16-l*2-m*2);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=Th(a);return b}
function Rh(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Sd();if(!c.length)return b;c=c.find(function(F){return F.type==33});if(!c)return b;var d=new xh(c.fullData,!0);Ah(d,8);Ah(d,8);Ah(d,4);var e=Ah(d,3);Eh(d);var f=Ah(d,2),g=Ah(d,1),h=Ah(d,5),k=Ah(d,32);c=Ah(d,8);for(var l=Ah(d,8),m=Ah(d,8),n=Ah(d,8),q=Ah(d,8),r=Ah(d,8),u=Ah(d,8),v=[],w=[],x=0;x<e;x++)v.push(Eh(d)),w.push(Eh(d));if(e>0)for(x=e;x<8;x++)Ah(d,2);for(x=0;x<e;x++)v[x]&&Ah(d,88),w[x]&&Ah(d,8);Dh(d);e=Dh(d);e==3&&Ah(d,
1);v=Dh(d);w=Dh(d);var y=x=0,z=0,A=0;Eh(d)&&(x+=Dh(d),y+=Dh(d),z+=Dh(d),A+=Dh(d));b.width=String(v-(x+y)*(e===1||e===2?2:1));b.height=String(w-(z+A)*(e===1?2:1));d=function(F){for(var G=0,B=0;B<32;B++)G|=(F>>B&1)<<31-B;return G>>>0}(k);g=g==1?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+u;r&&(f+="."+r.toString(16).toUpperCase());q&&(f+="."+q.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=Th(a);return b}function Qh(a,b){var c=1;for(a>b&&(c=-1);Math.abs(b-a)>4294967296;)a+=c*8589934592;return a}function Vh(a){return Nh(a)<0?!1:!0}function Nh(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(a[c]==71&&a[c+188]==71&&a[c+376]==71)return c;var d=a.indexOf(71,c+1);c=d>=0&&d<b?d:c+1}return-1}E("shaka.util.TsParser",Mh);Mh.syncOffset=Nh;Mh.probe=Vh;Mh.prototype.getVideoInfo=Mh.prototype.hg;
Mh.prototype.getVideoResolution=Mh.prototype.pi;Mh.prototype.getVideoNalus=Mh.prototype.Sd;Mh.prototype.getCodecs=Mh.prototype.cg;Mh.prototype.getStartTime=Mh.prototype.getStartTime;Mh.prototype.getVideoData=Mh.prototype.Rd;Mh.prototype.getAudioData=Mh.prototype.$f;Mh.prototype.getMetadata=Mh.prototype.getMetadata;Mh.prototype.parseNalus=Mh.prototype.ef;Mh.prototype.parseAvcNalus=Mh.prototype.Pi;Mh.prototype.parse=Mh.prototype.parse;Mh.prototype.setDiscontinuitySequence=Mh.prototype.Tg;
Mh.prototype.clearData=Mh.prototype.clearData;Mh.Timescale=9E4;var Uh=[100,110,122,244,44,83,86,118,128,138,139,134];function Wh(){this.g=null}Wh.prototype.init=function(){};Wh.prototype.parse=function(a){this.g?this.g.clearData():this.g=new Mh;var b=[];a=S(a);if(!Vh(a))return b;a=this.g.parse(a);var c=a.cg(),d=a.Sd();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)&&d.time!=null)for(var e=t($g(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
E("shaka.cea.TsCeaParser",Wh);Xc("video/mp2t",function(){return new Wh});E("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});E("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});E("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function Xh(a){var b=0,c=Sb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+4+2;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if((e&1)!=0||e+a>c.byteLength){c=[];break a}var f=S(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Yh(a){a=rc(ud(a));a=Xh(a).filter(function(b){return b.type===Zh})[0];if(!a)return null;a=fc(a.value,!0);return(a=md(a,"WRMHEADER"))?a:null}
function $h(a){try{var b=Yh(a);if(b)a:{for(var c=t(wd(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(h.tagName=="LA_URL"){var k=ud(h);break a}}}k=""}else k="";return k}catch(l){return""}}var Zh=1;function ai(a){var b=this;this.g=[];this.data=[];(new ah).boxes(["moov","moof"],fh).ba("pssh",function(c){if(!(c.version>1)){var d=S(c.reader.h,-12,c.size);b.data.push(d);c=c.reader.Yb(16,!1);b.g.push(tc(c))}}).parse(a)}
function bi(a,b,c,d){var e=a.length,f=12+b.length+4+e;d>0&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Sb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;d<1?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(d>0)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 ci(){this.g=new Map}ci.prototype.release=function(){this.g.clear()};
function di(a,b,c,d){var e=ei(a,b),f=null;a=[];var g=[];b=null;var h=new Set(e.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(h.size>1)throw new V(2,4,4010);if(!c){g=e.filter(function(l){return l.Tc=="urn:mpeg:dash:sea:2012"});if(g.length>1)throw new V(2,4,4050);g.length&&(b=fi(g[0]));(g=e.find(function(l){return l.Tc=="urn:mpeg:dash:mp4protection:2011"}))&&g.encryptionScheme&&(k=g.encryptionScheme);g=e.filter(function(l){return l.Tc=="urn:mpeg:dash:mp4protection:2011"?(f=l.init||
f,!1):l.Tc!="urn:mpeg:dash:sea:2012"});g.length&&(a=gi(f,k,g,d,h),a.length==0&&(a=[xc("",k,f)]))}if(e.length&&!b&&(c||!g.length))for(a=[],c=t(Object.values(d)),d=c.next();!d.done;d=c.next())d=d.value,Wb(d)||(d=xc(d,k,f),a.push(d));if(h=Array.from(h)[0]||null)for(k=t(a),c=k.next();!c.done;c=k.next())for(c=t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=h;return{Rf:h,zj:f,drmInfos:a,Ge:b,Zf:!0}}
function hi(a,b,c,d,e){var f=di(a,b,d,e);if(c.Zf){a=c.drmInfos.length==1&&!c.drmInfos[0].keySystem;b=f.drmInfos.length==0;if(c.drmInfos.length==0||a&&!b)c.drmInfos=f.drmInfos;c.Zf=!1}else if(f.drmInfos.length>0&&(c.drmInfos=c.drmInfos.filter(function(g){return f.drmInfos.some(function(h){return h.keySystem==g.keySystem})}),c.drmInfos.length==0))throw new V(2,4,4008);return f.Rf||c.Rf}
function ii(a){var b=yd(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=ud(b)))return b;if((b=yd(a.node,"urn:microsoft:playready","pro"))&&ud(b))return $h(b);if(a=yd(a.node,"urn:mpeg:cenc:2013","pssh"))if(a=ud(a)){b=rc(a);a=8;b=Sb(b);var c=b.getUint8(a);a+=20;c>0&&(a+=4+16*b.getUint32(a));a=S(b,a+4);a=pc(a);a=md("<pro>"+a+"</pro>");return $h(a)}return""}
function gi(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.Tc];if(h){var k;if((k=yd(g.node,"urn:microsoft:playready","pro"))&&ud(k)){k=ud(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:bi(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if(g.Tc==="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"){l=g;var m=e;if(m.size==0)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
172,227,60,30,82,226,251,75]),q=new Uint8Array([]);l=[{initData:bi(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=xc(h,b,g.init||a||k||l);if(h=ji.get(h))k.licenseServerUri=h(g);a:{if(g=yd(g.node,"https://dashif.org/CPS","Certurl"))if(g=ud(g))break a;g=""}k.serverCertificateUri=g;f.push(k)}}return f}function ei(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())(d=ki(a,d.value))&&c.push(d);return c}
function ki(a,b){var c=b.attributes.schemeIdUri,d=Bd(b,"urn:mpeg:cenc:2013","default_KID"),e=zd(b,"urn:mpeg:cenc:2013","pssh").map(vd),f=b.attributes.value;if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new V(2,4,4009);var g=[];try{g=e.map(function(h){if(!a.g.has(h)){var k=rc(h);a.g.set(h,k)}return{initDataType:"cenc",initData:a.g.get(h),keyId:null}})}catch(h){throw new V(2,4,4007);}return{node:b,Tc:c,keyId:d,init:g.length>0?g:null,encryptionScheme:f}}
function fi(a){if(!window.crypto||!window.crypto.subtle)throw Qa("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=yd(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new V(2,4,4051);if(b.attributes.schemeIdUri!="urn:mpeg:dash:sea:aes128-cbc:2013")throw new V(2,4,4051);b=yd(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(a.byteLength!=16)throw new V(2,4,4048);return{Ci:b,iv:a}}
var ji=(new Map).set("com.apple.fps",function(a){if("apple"===window.shakaMediaKeysPolyfill)throw new V(2,4,4054);if(a=yd(a.node,"https://dashif.org/CPS","Laurl"))if(a=ud(a))return a;return""}).set("com.widevine.alpha",function(a){var b=yd(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=ud(b))?b:(a=yd(a.node,"urn:microsoft","laurl"))?nc(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",ii).set("com.microsoft.playready.recommendation",ii).set("com.microsoft.playready.software",
ii).set("com.microsoft.playready.hardware",ii).set("org.w3.clearkey",function(a){var b=yd(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=ud(b))?b:(a=yd(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&a.attributes.Lic_type==="EME-1.0"&&a&&(a=ud(a))?a:""});function li(a,b){var c=mi();this.l=a.maxAttempts==null?c.maxAttempts:a.maxAttempts;this.j=a.baseDelay==null?c.baseDelay:a.baseDelay;this.o=a.fuzzFactor==null?c.fuzzFactor:a.fuzzFactor;this.m=a.backoffFactor==null?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=b===void 0?!1:b)this.g=1}
function ni(a){var b,c;return D(function(d){if(d.h==1){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(b==0)return d.return();c=a.h*(1+(Math.random()*2-1)*a.o);return d.g(new Promise(function(e){(new W(e)).ra(c/1E3)}),2)}a.h*=a.m;d.j()})}function mi(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function oi(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}oi.prototype.resolve=function(){};oi.prototype.reject=function(){};function pi(a,b){this.promise=a;this.i=b;this.g=null}function qi(a){return new pi(Promise.reject(a),function(){return Promise.resolve()})}function ri(){var a=Promise.reject(new V(2,7,7001));a.catch(function(){});return new pi(a,function(){return Promise.resolve()})}function si(a){return new pi(Promise.resolve(a),function(){return Promise.resolve()})}function ti(a){return new pi(a,function(){return a.catch(function(){})})}pi.prototype.abort=function(){this.g||(this.g=this.i());return this.g};
function ui(a){return new pi(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}pi.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
pi.prototype.Wa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=vi(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new oi;f.catch(function(){});var g=new V(2,7,7001);this.promise.then(c(!0),c(!1));return new pi(f,function(){return d()})};
function vi(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()}}}da.Object.defineProperties(pi.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}});E("shaka.util.AbortableOperation",pi);pi.prototype.chain=pi.prototype.Wa;pi.prototype["finally"]=pi.prototype.finally;
pi.all=ui;pi.prototype.abort=pi.prototype.abort;pi.notAbortable=ti;pi.completed=si;pi.aborted=ri;pi.failed=qi;function wi(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}
wi.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};wi.prototype.stopImmediatePropagation=function(){this.g=!0};wi.prototype.stopPropagation=function(){};E("shaka.util.FakeEvent",wi);function xi(){this.ab=new db;this.If=this}xi.prototype.addEventListener=function(a,b){this.ab&&this.ab.push(a,b)};xi.prototype.removeEventListener=function(a,b){this.ab&&this.ab.remove(a,b)};xi.prototype.dispatchEvent=function(a){if(!this.ab)return!0;var b=this.ab.get(a.type)||[],c=this.ab.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.If;a.currentTarget=this.If;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
xi.prototype.release=function(){this.ab=null};function yi(){this.g=[]}function zi(a,b){a.g.push(b.finally(function(){Xa(a.g,b)}))}yi.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 Ai(a,b,c,d,e,f,g){xi.call(this);this.i=null;this.j=!1;this.u=new yi;this.g=new Set;this.h=new Set;this.o=a||null;this.m=b||null;this.B=c||null;this.C=d||null;this.D=e||null;this.G=f||null;this.F=g||null;this.l=new Map}ma(Ai,xi);p=Ai.prototype;p.configure=function(a){this.i=a};function Bi(a,b,c,d){d=d===void 0?!1:d;c=c||Ci;var e=Di.get(a);(!e||c>=e.priority)&&Di.set(a,{priority:c,ge:b,Qi:d})}
function Ei(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)}p.Ti=function(a){this.g.add(a)};p.jj=function(a){this.g.delete(a)};p.Ah=function(){this.g.clear()};p.Ui=function(a){this.h.add(a)};p.kj=function(a){this.h.delete(a)};p.Bh=function(){this.h.clear()};p.Qf=function(){this.l.clear()};
function Fi(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:c===void 0?null:c}}p.destroy=function(){this.j=!0;this.g.clear();this.h.clear();this.l.clear();xi.prototype.release.call(this);return this.u.destroy()};
p.request=function(a,b,c){var d=this,e=new Gi;if(this.j){var f=Promise.reject(new V(2,7,7001));f.catch(function(){});return new Hi(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?id(b.retryParameters):mi();b.uris=id(b.uris);f=Ii(this,a,b,c);var g=f.Wa(function(){return Ji(d,a,b,c,new li(b.retryParameters,!1),0,null,e)}),h=g.Wa(function(q){return Ki(d,a,q,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.Wa(function(q){var r=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=r;q.si||!d.o||u.fromCache||b.method=="HEAD"||a!=Li||d.o(u.timeMs,u.data.byteLength,Mi(c),b,c);d.F&&d.F(a,u,c);return u},function(q){q&&(q.severity=2);throw q;});f=new Hi(n.promise,function(){return n.abort()},e);zi(this.u,f);return f};
function Ii(a,b,c,d){function e(h){f=f.Wa(function(){c.body&&(c.body=Ob(c.body));return h(b,c,d)})}var f=si(void 0);a.D&&e(a.D);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Wa(void 0,function(h){if(h instanceof V&&h.code==7001)throw h;throw new V(2,1,1006,h);})}
function Ji(a,b,c,d,e,f,g,h){a.i.forceHTTP&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.i.forceHTTPS&&(c.uris[f]=c.uris[f].replace("http://","https://"));f>0&&a.G&&a.G(b,d,c.uris[f],c.uris[f-1]);var k=new tb(c.uris[f]),l=k.Ab,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=Di.get(l))?l.ge:null;if(!n)return qi(new V(2,1,1E3,k));var q=l.Qi;(k=a.l.get(k.hb))&&(c.headers["common-access-token"]=k);var r=null,u=null,v=!1,w=!1,x;return ti(ni(e)).Wa(function(){if(a.j)return ri();
x=Date.now();var y=0;c.requestStartTime=Date.now();var z=n(c.uris[f],c,b,function(G,B,H){r&&r.stop();u&&u.ra(F/1E3);a.o&&b==Li&&(y++,c.packetNumber=y,a.o(G,B,Mi(d),c,d),m=!0,h.g=H)},function(G){w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.m&&a.m(G,c,b)},{minBytesForProgressEvents:a.i.minBytesForProgressEvents});if(!q)return z;var A=c.retryParameters.connectionTimeout;A&&(r=new W(function(){v=!0;z.abort()}),r.ra(A/1E3));var F=c.retryParameters.stallTimeout;F&&(u=new W(function(){v=!0;z.abort()}));
return z}).Wa(function(y){r&&r.stop();u&&u.stop();y.timeMs==void 0&&(y.timeMs=Date.now()-x);var z=y.headers["common-access-token"];if(z){var A=new tb(y.uri);a.l.set(A.hb,z)}z={response:y,si:m};!w&&a.m&&a.m(y.headers,c,b);a.B&&a.B(c,y);return z},function(y){r&&r.stop();u&&u.stop();if(a.C){var z=null,A=0;y instanceof V&&(z=y,y.code==1001&&(A=y.data[1]));a.C(c,z,A,v)}if(a.j)return ri();v&&(y=new V(1,1,1003,c.uris[f],b));if(y instanceof V){if(y.code==7001)throw y;if(y.code==1010)throw g;if(y.severity==
1){z=(new Map).set("error",y);z=new wi("retry",z);z.cancelable=!0;a.dispatchEvent(z);if(z.defaultPrevented)throw y;f=(f+1)%c.uris.length;return Ji(a,b,c,d,e,f,y,h)}}throw y;})}
function Ki(a,b,c,d){var e=si(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Kg:void 0},f=a.next())g.Kg=f.value,e=e.Wa(function(h){return function(){var k=c.response;k.data&&(k.data=Ob(k.data));return(0,h.Kg)(b,k,d)}}(g));return e.Wa(function(){return c},function(h){var k=2;if(h instanceof V){if(h.code==7001)throw h;k=h.severity}throw new V(k,1,1007,h);})}function Mi(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.mc)return!1}return!0}E("shaka.net.NetworkingEngine",Ai);
Ai.prototype.request=Ai.prototype.request;Ai.prototype.destroy=Ai.prototype.destroy;Ai.makeRequest=Fi;Ai.defaultRetryParameters=function(){return mi()};Ai.prototype.clearCommonAccessTokenMap=Ai.prototype.Qf;Ai.prototype.clearAllResponseFilters=Ai.prototype.Bh;Ai.prototype.unregisterResponseFilter=Ai.prototype.kj;Ai.prototype.registerResponseFilter=Ai.prototype.Ui;Ai.prototype.clearAllRequestFilters=Ai.prototype.Ah;Ai.prototype.unregisterRequestFilter=Ai.prototype.jj;
Ai.prototype.registerRequestFilter=Ai.prototype.Ti;Ai.unregisterScheme=function(a){Di.delete(a)};Ai.registerScheme=Bi;Ai.prototype.configure=Ai.prototype.configure;function Gi(){this.g=0}Ai.NumBytesRemainingClass=Gi;function Hi(a,b,c){pi.call(this,a,b);this.h=c}ma(Hi,pi);Ai.PendingRequest=Hi;var Li=1;Ai.RequestType={MANIFEST:0,SEGMENT:Li,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8,CMCD:9};
Ai.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 Ci=3;Ai.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Ci};var Di=new Map;function Ni(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(n==null)return h;k=="RepresentationID"&&l&&(l=void 0);k=="Time"&&typeof n!="bigint"&&(Math.abs(n-Math.round(n))>=.2&&Qa("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 Ti(a,b){var c=Ui(a,b,"timescale"),d=1;c&&(d=Id(c)||1);c=Ui(a,b,"duration");var e=(c=Id(c||""))?c/d:null,f=Ui(a,b,"startNumber"),g=Number(Ui(a,b,"presentationTimeOffset"))||0,h=Jd(f||"");if(f==null||h==null)h=1;f=null;if(b=Vi(a,b,"SegmentTimeline")){b=td(b,"S");f=d;a=a.Z.duration||Infinity;for(var k=h,l=[],m=-g,n=0;n<b.length;++n){var q=b[n],r=b[n+1],u=Ad(q,"t",Jd),v=Ad(q,"d",Jd),w=Ad(q,"r",Hd);q=Ad(q,"k",Hd)||0;u!=null&&(u-=g);if(v){u=u!=null?u:m;w=w||0;if(w<0)if(r){r=Ad(r,"t",Jd);if(r==
null)break;else if(u>=r)break;w=Math.ceil((r-u)/v)-1}else{if(a==Infinity)break;else if(u/f>=a)break;w=Math.ceil((a*f-u)/v)-1}l.length>0&&u!=m&&(l[l.length-1].end=u/f);for(r=0;r<=w;++r)m=u+v,l.push({start:u/f,se:u,end:m/f,Df:m,gf:q,Zi:l.length+k}),u=m}}f=l}return{timescale:d,re:c,Ra:e,qd:h,zb:g/d||0,vc:g,timeline:f}}function Wi(a,b){return[b(a.J),b(a.$),b(a.ia)].filter(bf)}function Ui(a,b,c){b=Wi(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 Vi(a,b,c){b=Wi(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=xd(d.value,c));d=b.next());return a}
function Xi(a,b,c,d,e,f){for(var g=Bd(a,"http://www.w3.org/1999/xlink","href"),h=Bd(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=od("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(f>=5)return qi(new V(2,4,4028));if(h!="onLoad")return qi(new V(2,4,4027));var q=wc([d],[g]);return e.request(0,Fi(q,b)).Wa(function(r){r=ld(r.data,a.tagName);if(!r)return qi(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 Yi(a,b,c,q[0],e,f+1)})}
function Yi(a,b,c,d,e,f){f=f===void 0?0:f;if(Bd(a,"http://www.w3.org/1999/xlink","href")){var g=Xi(a,b,c,d,e,f);c&&(g=g.Wa(void 0,function(){return Yi(a,b,c,d,e,f)}));return g}g=[];for(var h=t(sd(a)),k=h.next(),l={};!k.done;l={bd:void 0},k=h.next())l.bd=k.value,Bd(l.bd,"http://www.w3.org/1999/xlink","href")=="urn:mpeg:dash:resolve-to-zero:2013"?a.children=a.children.filter(function(m){return function(n){return n!==m.bd}}(l)):l.bd.tagName!="SegmentTimeline"&&g.push(Yi(l.bd,b,c,d,e,f));return ui(g).Wa(function(){return a})}
;function Zi(a,b,c,d,e,f,g,h){this.Ka=a;this.startByte=b;this.endByte=c;this.Ze=d===void 0?null:d;this.timescale=e===void 0?null:e;this.h=f===void 0?null:f;this.aesKey=g===void 0?null:g;this.g=this.mimeType=this.codecs=null;this.encrypted=h===void 0?!1:h}Zi.prototype.Ec=function(){return this.startByte};Zi.prototype.Cc=function(){return this.endByte};Zi.prototype.Xg=function(a){this.h=a};Zi.prototype.ec=function(){return this.h};
function $i(a,b){return a===b?!0:a&&b?a.Ec()==b.Ec()&&a.Cc()==b.Cc()&&cb(a.Ka().sort(),b.Ka().sort())&&Nb(a.ec(),b.ec()):a==b}E("shaka.media.InitSegmentReference",Zi);Zi.prototype.getEndByte=Zi.prototype.Cc;Zi.prototype.getStartByte=Zi.prototype.Ec;
function X(a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v){l=l===void 0?[]:l;r=r===void 0?aj:r;this.startTime=a;this.h=this.endTime=b;this.G=c;this.startByte=d;this.endByte=e;this.oa=f;this.l=g;this.F=h;this.D=k;this.g=l;this.tilesLayout=m===void 0?"":m;this.C=n===void 0?null:n;this.B=q===void 0?null:q;this.status=r;this.preload=!1;this.i=!0;this.u=!1;this.aesKey=u===void 0?null:u;this.thumbnailSprite=null;this.j=-1;this.m=v===void 0?!1:v;this.kd=this.mc=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.xg();
this.m&&this.g.length&&this.g[this.g.length-1].wg();this.o=this.bandwidth=this.mimeType=this.codecs=null;this.I=!1}p=X.prototype;p.Ka=function(){return this.G()};p.getStartTime=function(){return this.startTime};p.Ph=function(){return this.endTime};p.Ec=function(){return this.startByte};p.Cc=function(){return this.endByte};
function bj(a){if(a.endByte)return a.endByte+1-a.startByte;if(a.bandwidth){var b=a.bandwidth*(a.endTime-a.startTime);if(!isNaN(b)&&b>0)return b}if(a.g.length>0&&a.m)for(a=t(a.g),a=a.next();!a.done;a=a.next()){bj(a.value);break}return null}p.ni=function(){return this.tilesLayout};p.mi=function(){return this.C};p.Jb=function(){return this.status};p.Hi=function(){this.status=cj};p.Gi=function(){this.preload=!0};p.isPreload=function(){return this.preload};p.ld=function(){this.i=!1};p.xi=function(){return this.i};
p.xg=function(){this.mc=!0};p.Ai=function(){return this.mc};p.wg=function(){this.kd=!0};p.zi=function(){return this.kd};p.Fi=function(){this.u=!0};p.ti=function(){return this.u};p.Zg=function(a){this.thumbnailSprite=a};p.ki=function(){return this.thumbnailSprite};p.offset=function(a){this.startTime+=a;this.endTime+=a;this.h+=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.h+=a};
p.gj=function(a){this.B==null?Pa("Sync attempted without sync time!"):(a=this.B-a-this.startTime,Math.abs(a)>=.001&&this.offset(a))};p.Xg=function(a,b){this.o=a;this.I=b===void 0?!1:b};p.ec=function(a){var b=this.o;(a===void 0||a)&&this.I&&(this.o=null);return b};function dj(a,b){a.oa=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())dj(c.value,b)}E("shaka.media.SegmentReference",X);X.prototype.getSegmentData=X.prototype.ec;X.prototype.setSegmentData=X.prototype.Xg;X.prototype.syncAgainst=X.prototype.gj;
X.prototype.offset=X.prototype.offset;X.prototype.getThumbnailSprite=X.prototype.ki;X.prototype.setThumbnailSprite=X.prototype.Zg;X.prototype.hasByterangeOptimization=X.prototype.ti;X.prototype.markAsByterangeOptimization=X.prototype.Fi;X.prototype.isLastPartial=X.prototype.zi;X.prototype.markAsLastPartial=X.prototype.wg;X.prototype.isPartial=X.prototype.Ai;X.prototype.markAsPartial=X.prototype.xg;X.prototype.isIndependent=X.prototype.xi;X.prototype.markAsNonIndependent=X.prototype.ld;
X.prototype.isPreload=X.prototype.isPreload;X.prototype.markAsPreload=X.prototype.Gi;X.prototype.markAsUnavailable=X.prototype.Hi;X.prototype.getStatus=X.prototype.Jb;X.prototype.getTileDuration=X.prototype.mi;X.prototype.getTilesLayout=X.prototype.ni;X.prototype.getEndByte=X.prototype.Cc;X.prototype.getStartByte=X.prototype.Ec;X.prototype.getEndTime=X.prototype.Ph;X.prototype.getStartTime=X.prototype.getStartTime;X.prototype.getUris=X.prototype.Ka;var aj=0,cj=1;X.Status={pj:aj,xj:cj,uj:2};function ej(a,b,c,d,e,f,g,h){var k,l=(new ah).ba("sidx",function(m){k=fj(b,d,e,f,g,c,m,h)});a&&l.parse(a);if(k)return k;throw new V(2,3,3004);}
function fj(a,b,c,d,e,f,g,h){h=h===void 0?!1:h;var k=[];g.reader.skip(4);var l=g.reader.P();if(l==0)throw new V(2,3,3005);if(g.version==0){var m=g.reader.P();var n=g.reader.P()}else m=g.reader.Qc(),n=g.reader.Qc();g.reader.skip(2);var q=g.reader.kb();a=(h?-g.size:a)+g.size+n;for(h=0;h<q;h++){var r=g.reader.P();n=(r&2147483648)>>>31;r&=2147483647;var u=g.reader.P();g.reader.skip(4);if(n==1)throw new V(2,3,3006);k.push(new X(m/l+c,(m+u)/l+c,function(){return f},a,a+r-1,b,c,d,e));m+=u;a+=r}g.parser.stop();
return k};function gj(a){this.h=Sb(a);this.g=new Sg(this.h,0)}gj.prototype.Oa=function(){return this.g.Oa()};
function hj(a){var b=ij(a);if(b.length>7)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=ij(a);a:{d=t(jj);for(var e=d.next();!e.done;e=d.next())if(Nb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Da();else{if(b.length==8&&b[1]&224)throw new V(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=e==0?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Da()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Da();d=Sb(a.h,a.g.Da(),b);a.g.skip(b);return new kj(c,
d)}function ij(a){var b=a.g.Da(),c=a.g.mb();if(c==0)throw new V(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return S(a.h,b,c)}var jj=[[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 kj(a,b){this.id=a;this.g=b}
function lj(a){if(a.g.byteLength>8)throw new V(2,3,3002);if(a.g.byteLength==8&&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 mj(a,b,c,d,e,f,g){b=new gj(b);if(hj(b).id!=440786851)throw new V(2,3,3008);var h=hj(b);if(h.id!=408125543)throw new V(2,3,3009);b=h.g.byteOffset;h=new gj(h.g);for(var k=null;h.Oa();){var l=hj(h);if(l.id==357149030){k=l;break}}if(!k)throw new V(2,3,3010);k=new gj(k.g);l=1E6;for(h=null;k.Oa();){var m=hj(k);if(m.id==2807729)l=lj(m);else if(m.id==17545)if(m.g.byteLength==4)h=m.g.getFloat32(0);else if(m.g.byteLength==8)h=m.g.getFloat64(0);else throw new V(2,3,3003);}if(h==null)throw new V(2,3,
3011);k=l/1E9;h*=k;a=hj(new gj(a));if(a.id!=475249515)throw new V(2,3,3007);return nj(a,b,k,h,c,d,e,f,g)}function nj(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new gj(a.g);for(var n=null,q=null;a.Oa();){var r=hj(a);if(r.id==187){var u=oj(r);u&&(r=c*u.lj,u=b+u.Vi,n!=null&&m.push(new X(n+g,r+g,l,q,u-1,f,g,h,k)),n=r,q=u)}}n!=null&&m.push(new X(n+g,d+g,l,q,null,f,g,h,k));return m}
function oj(a){var b=new gj(a.g);a=hj(b);if(a.id!=179)throw new V(2,3,3013);a=lj(a);b=hj(b);if(b.id!=183)throw new V(2,3,3012);b=new gj(b.g);for(var c=0;b.Oa();){var d=hj(b);if(d.id==241){c=lj(d);break}}return{lj:a,Vi:c}};function pj(a){this.g=a;this.m=null;this.i=0;this.o=!1}p=pj.prototype;p.getNumReferences=function(){return this.g.length};p.getNumEvicted=function(){return this.i};p.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.Ii=function(){this.o=!0};p.Hb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};p.Ne=function(){return this.g[0]||null};
p.find=function(a){var b=this.g.length-1;if(b<0)return null;if(a<this.g[0].startTime)return this.i;var c=bb(this.g,function(e){return e.startTime<=a})-1;if(c<0)return null;var d=this.g[c];b=c<b?this.g[c+1].startTime:d.endTime;return a>=d.startTime&&a<b?c+this.i:null};p.get=function(a){if(this.g.length==0)return null;a-=this.i;return a<0||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
p.$d=function(a){if(!this.o&&a.length){var b=Math.round(a[0].startTime*1E3)/1E3,c=bb(this.g,function(d){return Math.round(d.startTime*1E3)/1E3<b});this.g.length=c;this.g.push.apply(this.g,C(a))}};p.ae=function(a,b){for(var c=Math.max(b,this.g.length>0?this.g[0].startTime:-Infinity),d=0;d<a.length&&a[d].endTime<=c;)d++;d>0&&(a=a.slice(d));this.$d(a);this.Ia(b)};p.Ia=function(a){if(!this.o){var b=bb(this.g,function(c){return c.endTime<=a});b>0&&(this.i+=b,this.g=this.g.slice(b))}};
p.fd=function(a,b,c){c=c===void 0?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;var d=bb(this.g,function(e){return e.endTime<=a});d>0&&(c||(this.i+=d),this.g=this.g.slice(d));this.g.length!=0&&(c=this.g[this.g.length-1],b=new X(c.startTime,b,c.G,c.startByte,c.endByte,c.oa,c.l,c.F,c.D,c.g,c.tilesLayout,c.C,c.B,c.status,c.aesKey),b.mimeType=c.mimeType,b.codecs=c.codecs,b.j=c.j,this.g[this.g.length-1]=b)}};
p.ue=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new W(function(){var d=b();d?c.g.push.apply(c.g,C(d)):(c.m.stop(),c.m=null)}),this.m.Aa(a))};pj.prototype[Symbol.iterator]=function(){return this.qb(0)};
pj.prototype.qb=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?!1:c;var d=this.find(a);if(d==null)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&e.g.length>0)for(var g=e.g.length-1;g>=0;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.i;)g--,h=e.g[g];if(!h.i)return Pa("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new qj(this,d,f,c)};pj.prototype.Ld=function(){return-1};
function rj(a,b,c){a=new X(a,a+b,function(){return c},0,null,null,a,a,a+b);return new pj([a])}E("shaka.media.SegmentIndex",pj);pj.forSingleSegment=rj;pj.prototype.getIteratorForTime=pj.prototype.qb;pj.prototype.updateEvery=pj.prototype.ue;pj.prototype.fit=pj.prototype.fd;pj.prototype.evict=pj.prototype.Ia;pj.prototype.mergeAndEvict=pj.prototype.ae;pj.prototype.offset=pj.prototype.offset;pj.prototype.get=pj.prototype.get;pj.prototype.find=pj.prototype.find;pj.prototype.markImmutable=pj.prototype.Ii;
pj.prototype.release=pj.prototype.release;pj.prototype.getNumEvicted=pj.prototype.getNumEvicted;pj.prototype.getNumReferences=pj.prototype.getNumReferences;function qj(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}p=qj.prototype;p.Vc=function(a){this.reverse=a};p.Dh=function(){return this.h};p.current=function(){var a=this.i.get(this.h);a&&a.g.length>0&&a.m&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&a.g.length>0?a.g[this.g]:a};
p.next=function(){var a=this.i.get(this.h);this.reverse?a&&a.g.length>0?(this.g--,this.g<0&&(this.h--,this.g=(a=this.i.get(this.h))&&a.g.length>0?a.g.length-1:0)):(this.h--,this.g=0):a&&a.g.length>0?(this.g++,a.m&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};p.rf=function(){var a=this.current();if(a&&a.mc&&!a.i&&(a=this.i.get(this.h))&&a.g.length>0)for(var b=a.g[this.g];b.i&&!(this.g<=0);)this.g--,b=a.g[this.g]};
E("shaka.media.SegmentIterator",qj);qj.prototype.resetToLastIndependent=qj.prototype.rf;qj.prototype.next=qj.prototype.next;qj.prototype.current=qj.prototype.current;qj.prototype.currentPosition=qj.prototype.Dh;qj.prototype.setReverse=qj.prototype.Vc;function sj(){pj.call(this,[]);this.h=[]}ma(sj,pj);p=sj.prototype;p.clone=function(){var a=new sj;a.h=this.h.slice();a.i=this.i;return a};p.release=function(){this.h=[]};p.Hb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Hb(a)};
function tj(a,b){a=t(a.h);for(var c=a.next();!c.done;c=a.next())b(c.value)}p.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(e!=null)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};function uj(a,b){a=t(a.h);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.find(b)!=null)return c.Ld();return-1}
p.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};p.offset=function(){};p.$d=function(){};p.Ia=function(a){if(this.h.length){var b=this.h[0];b.Ia(a);b.getNumReferences()==0&&(this.h.shift(),this.i+=b.getNumEvicted(),b.release(),this.Ia(a))}};p.ae=function(){};p.fd=function(){};p.ue=function(){};E("shaka.media.MetaSegmentIndex",sj);sj.prototype.updateEvery=sj.prototype.ue;
sj.prototype.fit=sj.prototype.fd;sj.prototype.mergeAndEvict=sj.prototype.ae;sj.prototype.evict=sj.prototype.Ia;sj.prototype.merge=sj.prototype.$d;sj.prototype.offset=sj.prototype.offset;sj.prototype.get=sj.prototype.get;sj.prototype.find=sj.prototype.find;sj.prototype.forEachTopLevelReference=sj.prototype.Hb;sj.prototype.release=sj.prototype.release;function vj(a,b,c){b=Vi(a,b,"Initialization");if(!b)return null;var d=a.J.Na(),e=b.attributes.sourceURL;e&&(d=wc(d,[nc(e)],a.fb()));e=0;var f=null;if(b=Ad(b,"range",Gd))e=b.start,f=b.end;c=new Zi(function(){return d},e,f,wj(a),null,null,c,a.$.encrypted);c.codecs=a.J.codecs;c.mimeType=a.J.mimeType;a.Z&&!a.Z.Wd&&(c.g=a.Z.start+a.Z.duration);return c}
function xj(a,b,c){var d=Number(Ui(a,yj,"presentationTimeOffset"))||0,e=Ui(a,yj,"timescale"),f=1;e&&(f=Id(e)||1);var g=d/f||0,h=vj(a,yj,c);zj(a,h);var k=jd(a);return{endTime:-1,timeline:-1,dc:function(){var l=Vi(k,yj,"RepresentationIndex");var m=k.J.Na();l&&(l=nc(l.attributes.sourceURL))&&(m=wc(m,[l],k.fb()));l=Aj(k);return Bj(k,b,h,m,l.start,l.end,g)},timescale:f}}
function Bj(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,v,w,x,y,z,A,F,G,B,H,J,O;return D(function(M){if(M.h==1)return h=a.presentationTimeline,k=!a.Xa||!a.Z.Wd,l=a.Z.start,m=a.Z.duration,n=a.J.mimeType.split("/")[1],q=b,r=null,u=[q(d,e,f,!1),n=="webm"?q(c.Ka(),c.startByte,c.endByte,!0):null],q=null,M.g(Promise.all(u),2);v=M.i;w=v[0];x=v[1]||null;y=null;z=l-g;A=l;F=m?l+m:Infinity;G=a.J.Na();B=G.length!=d.length||G.some(function(I,L){return I!=d[L]});y=n=="mp4"?ej(w,e,G,c,z,A,F,B):mj(w,x,G,c,z,A,F);H=t(y);for(J=
H.next();!J.done;J=H.next())O=J.value,O.codecs=a.J.codecs,O.mimeType=a.J.mimeType,O.bandwidth=a.bandwidth;h.cf(y);r=new pj(y);k&&r.fd(A,F,!0);return M.return(r)})}function yj(a){return a.Uc}function Aj(a){var b=Vi(a,yj,"RepresentationIndex");a=Ui(a,yj,"indexRange");a=Gd(a||"");b&&(a=Ad(b,"range",Gd,a));return a}function zj(a,b){Cj(a,b);if(!Aj(a))throw new V(2,4,4002);}
function Cj(a,b){var c=a.J.mimeType.split("/")[1];if(a.J.contentType!=Cc&&c!="mp4"&&c!="webm")throw new V(2,4,4006);if(c=="webm"&&!b)throw new V(2,4,4005);}
function wj(a){var b=a.J;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.fe,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.$.label||null,roles:a.roles||null,language:a.$.language||null}};function Dj(a,b,c){var d=vj(a,Ej,c),e=Fj(a);if(!e.Ra&&!e.timeline&&e.Ic.length>1)throw new V(2,4,4002);if(!e.Ra&&!a.Z.duration&&!e.timeline&&e.Ic.length==1)throw new V(2,4,4002);if(e.timeline&&e.timeline.length==0)throw new V(2,4,4002);var f=null,g=null;a.ia.id&&a.J.id&&(g=b.get(a.ia.id+","+a.J.id))&&(f=g.segmentIndex);var h=Gj(a.Z.start,a.Z.duration,a.J.Na,e,d,c,a.J.mimeType,a.J.codecs,a.bandwidth,a.fb);b=!f;f?f.ae(h,a.presentationTimeline.Ib()):f=new pj(h);a.presentationTimeline.cf(h);a.Xa&&a.Z.Wd||
f.fd(a.Z.start,a.Z.duration?a.Z.start+a.Z.duration:Infinity,b);g&&(g.segmentIndex=f);return{endTime:-1,timeline:-1,dc:function(){f&&f.getNumReferences()!=0||f.$d(h);return Promise.resolve(f)},timescale:e.timescale}}function Ej(a){return a.Pb}function Fj(a){var b=Hj(a);a=Ti(a,Ej);var c=a.qd;c==0&&(c=1);var d=0;a.Ra?d=a.Ra*(c-1):a.timeline&&a.timeline.length>0&&(d=a.timeline[0].start);return{Ra:a.Ra,startTime:d,qd:c,zb:a.zb,timescale:a.timescale,timeline:a.timeline,Ic:b}}
function Gj(a,b,c,d,e,f,g,h,k,l){var m=d.Ic.length;d.timeline&&d.timeline.length!=d.Ic.length&&(m=Math.min(d.timeline.length,d.Ic.length));for(var n=a-d.zb,q=b?a+b:Infinity,r=[],u=d.startTime,v={},w=0;w<m;v={ve:void 0,le:void 0},w++){v.le=d.Ic[w];var x=u;u=void 0;u=d.Ra!=null?x+d.Ra:d.timeline?d.timeline[w].end:x+b;v.ve=null;v=new X(a+x,a+u,function(y){return function(){y.ve==null&&(y.ve=wc(c(),[y.le.Ji],l()));return y.ve}}(v),v.le.start,v.le.end,e,n,a,q,[],"",null,null,aj,f);v.codecs=h;v.mimeType=
g;v.bandwidth=k;r.push(v)}return r}function Hj(a){return[a.J.Pb,a.$.Pb,a.ia.Pb].filter(bf).map(function(b){return td(b,"SegmentURL")}).reduce(function(b,c){return b.length>0?b:c}).map(function(b){b.attributes.indexRange&&!a.Ve&&(a.Ve=!0);var c=nc(b.attributes.media);b=Ad(b,"mediaRange",Gd,{start:0,end:null});return{Ji:c,start:b.start,end:b.end}})};function Ij(a,b,c,d,e,f,g,h,k,l){k||a.J.Ud||(a.J.Ud=Ui(a,Jj,"initialization"));var m=a.J.Ud?Kj(a,g):null,n=Lj(a);Mj(n);var q=jd(a);if(n.hd)return Cj(a,m),{endTime:-1,timeline:-1,dc:function(){var x=Ni(n.hd,q.J.originalId,null,null,q.bandwidth||null,null);x=wc(q.J.Na(),[x]);return Bj(q,b,m,x,0,null,n.zb)},timescale:n.timescale};if(n.Ra)return d||a.$.contentType==="image"||a.$.contentType==="text"||(d=a.Z.start,l=a.ia.id,c=a.Z.duration,l=(l=l!=null&&f.get(l)||c)?d+l:Infinity,a.presentationTimeline.bf(n.Ra),
a.presentationTimeline.Cg(d,l)),{endTime:-1,timeline:-1,dc:function(){return Nj(q,n,e,m,f,g,h,a.J.me)},timescale:n.timescale};var r=null;d=d=null;a.ia.id&&a.J.id&&(d=a.ia.id+","+a.J.id,d=c.get(d))&&(r=d.segmentIndex);var u=a.Z.start,v=a.Z.duration?u+a.Z.duration:Infinity;if(r)l=r,Oj(l,n,u,v,m,a.Xa),l.Ia(a.presentationTimeline.Ib());else{c=0;k=-1;if(a.ia.id!=null&&a.J.id!=null){var w=l.get(a.ia.id);if(w)k=w.timeline;else for(l=t(l.values()),w=l.next();!w.done;w=l.next())if(w=w.value,Math.abs(n.zb-
w.endTime)<=Fc&&w.nf.includes(a.J.id)){k=w.timeline;break}else w.timeline>=c&&(c=w.timeline+1)}k==-1&&(k=c);r=new Pj(a.Xa,n,a.J.originalId,a.bandwidth,a.J.Na,a.fb,u,v,m,g,a.J.me,k)}n.timeline&&a.$.contentType!=="image"&&a.$.contentType!=="text"&&a.presentationTimeline.Dg(r.h?r.h.timeline:[],u);d&&a.Xa&&(d.segmentIndex=r);d=(d=(d=n.timeline)&&d[d.length-1])?d.end+n.zb:-1;l=-1;r instanceof Pj&&(l=r.Ld());return{endTime:d,timeline:l,dc:function(){r instanceof Pj&&r.getNumReferences()==0&&Oj(r,n,u,v,
m,a.Xa);return Promise.resolve(r)},timescale:n.timescale}}function Jj(a){return a.$b}function Lj(a){var b=Ti(a,Jj),c=Ui(a,Jj,"media"),d=Ui(a,Jj,"index"),e=Ui(a,Jj,"k"),f=0;e&&(f=parseInt(e,10));return{re:b.re,Ra:b.Ra,timescale:b.timescale,qd:b.qd,zb:b.zb,vc:b.vc,timeline:b.timeline,xb:c&&nc(c),hd:d,mimeType:a.J.mimeType,codecs:a.J.codecs,bandwidth:a.bandwidth,Li:f}}
function Mj(a){var b=a.hd?1:0;b+=a.timeline?1:0;b+=a.Ra?1:0;if(b==0)throw new V(2,4,4002);b!=1&&(a.hd&&(a.timeline=null),a.re=null,a.Ra=null);if(!a.hd&&!a.xb)throw new V(2,4,4002);}
function Nj(a,b,c,d,e,f,g,h){function k(M){var I=M-w,L=I*v,Q=b.re,K=I*Q;"BigInt"in window&&K>Number.MAX_SAFE_INTEGER&&(K=BigInt(I)*BigInt(Q));L+=q;I=L+v;Q=Math.min(I,m());var N=[],T=b.Li;if(T)for(var U=(Q-L)/T,ja={},Ba=0;Ba<T;ja={dh:void 0},Ba++){var $a=L+U*Ba,Na=$a+U;ja.dh=Ba;ja=new X($a,Na,function(ab){return function(){var Ab=Ni(x,z,M,ab.dh,y,K);return wc(A(),[Ab],F())}}(ja),0,null,d,G,q,m(),[],"",null,null,aj,f);ja.codecs=a.J.codecs;ja.mimeType=a.J.mimeType;h==0?Ba>0&&ja.ld():Ba%h!=0&&ja.ld();
N.push(ja)}L=new X(L,Q,function(){if(T)return[];var ab=Ni(x,z,M,null,y,K);return wc(A(),[ab],F())},0,null,d,G,q,m(),N,"",null,null,aj,f,N.length>0);L.codecs=a.J.codecs;L.mimeType=a.J.mimeType;L.bandwidth=a.bandwidth;L.h=I;return L}function l(){var M=[Math.max(n.Ib(),q),Math.min(n.Wb(),m())].map(function(I){return I-q});M=[Math.ceil(M[0]/v),Math.ceil(M[1]/v)-1];a.J.Va&&M[1]++;return M.map(function(I){return I+w})}function m(){var M=r!=null&&e.get(r)||u;return M?q+M:Infinity}var n=a.presentationTimeline,
q=a.Z.start,r=a.ia.id,u=a.Z.duration,v=b.Ra,w=b.qd,x=b.xb,y=a.bandwidth||null,z=a.J.originalId,A=a.J.Na,F=a.fb,G=q-b.zb,B=l();c=a.Xa?Math.max(B[0],B[1]-c+1):B[0];g=g||B[1];var H=new Qj(c,g,w,q,v,k);B=n.Wb()<m();var J=n.T();if(B||J){var O=Math.max(c,g+1);c=v;a.J.Va&&(c=.1);H.ue(c,function(){var M=n.Ib();H.Ia(M);var I=t(l());I.next();I=I.next().value;for(var L=[];O<=I;){var Q=k(O);L.push(Q);O++}return M>m()&&!L.length?null:L})}return Promise.resolve(H)}
function Kj(a,b){var c=a.J.Ud;c||(c=Ui(a,Jj,"initialization"));if(!c)return null;c=nc(c);var d=a.J.originalId,e=a.bandwidth||null,f=a.J.Na,g=a.fb;b=new Zi(function(){var h=Ni(c,d,null,null,e,null);return wc(f(),[h],g())},0,null,wj(a),null,null,b,a.$.encrypted);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;a.Z&&!a.Z.Wd&&(b.g=a.Z.start+a.Z.duration);return b}function Qj(a,b,c,d,e,f){pj.call(this,Array(Math.max(0,b-a+1)));this.h=a;this.u=c;this.j=d;this.l=e;this.B=f}ma(Qj,pj);p=Qj.prototype;
p.find=function(a){var b=this.g.length-1;if(b<0)return null;var c=this.get(this.i);if(!c)return null;if(a<c.startTime)return this.i;c=Math.floor((a-this.j)/this.l)+this.u-this.h;if(c<this.i)return null;var d=this.get(c);if(!d)return null;b=(b=c-this.i<b?this.get(c+1):null)?b.startTime:d.endTime;return a>=d.startTime&&a<b?c:null};p.get=function(a){var b=a-this.i;if(b<0||b>=this.g.length)return null;var c=this.g[b];c||(c=this.B(this.h+a),this.g[b]=c);return c};p.Ne=function(){return this.get(this.i)};
p.Hb=function(a){for(var b=0;b<this.g.length;b++){var c=this.get(b+this.i);c&&a(c)}};p.Ia=function(a){if(!this.o){var b=this.g.length-1;if(!(b<0)){var c=this.get(this.i);!c||c.endTime>a||(a=(b=this.get(this.i+b))&&b.endTime<=a?this.g.length:Math.max(0,Math.min(this.g.length,Math.floor((a-this.j)/this.l+this.u-1)-(this.h+this.i)+1)),a>0&&(this.i+=a,this.g=this.g.slice(a)))}}};
function Pj(a,b,c,d,e,f,g,h,k,l,m,n){pj.call(this,[]);this.D=a;this.h=b;this.G=c;this.C=d;this.F=e;this.K=f;this.j=g;this.l=h;this.u=k;this.B=l;this.I=m;this.L=n;Rj(this)}ma(Pj,pj);p=Pj.prototype;p.getNumReferences=function(){return this.h?this.h.timeline.length:0};p.release=function(){pj.prototype.release.call(this);this.h=null};
p.Ia=function(a){if(this.h){var b=this.h.timeline;if(b){for(var c=0;c<b.length&&b[c].end+this.j<=a;)c++;c>0&&(this.h.timeline=b.slice(c),this.g.length>=c&&(this.g=this.g.slice(c)),this.i+=c,this.getNumReferences()===0&&this.release())}}};
function Oj(a,b,c,d,e,f){Sj(a,e);a.D=f;if(a.h){if(a.h.vc!==b.vc)for(c=b.vc-a.h.vc,e=0;e<b.timeline.length;e++)f=b.timeline[e],f.se+=c,f.Df+=c,f.start=(f.se+c)/b.timescale,f.end=(f.Df+c)/b.timescale;a.h.xb!==b.xb&&(a.h.xb=b.xb);c=a.h.timeline;if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.end>g.end})}else b=b.timeline.slice();b.length>0&&a.h.timeline.push.apply(a.h.timeline,C(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;Rj(a)}
function Sj(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)&&dj(c,b)}}function Rj(a){if(a.h&&!a.o){for(var b=[],c=t(a.h.timeline),d=c.next();!d.done;d=c.next())d=d.value,d.start>=a.l||d.end<=0||b.push(d);a.h.timeline=b;a.Ia(a.j)}}
p.find=function(a){var b=this;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 c=this.h.timeline;if(a<this.j||a>=this.l)return null;var d=c.length-1,e=bb(c,function(h){return h.start+b.j<=a})-1;if(e<0)return null;var f=c[e],g=f.start+this.j;c=e<d?c[e+1].start+this.j:this.l===Infinity?f.end+this.j:this.l;return a>=g&&a<c?e+this.i:null};
p.get=function(a){var b=this;a-=this.i;if(a<0||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){c=this.h.timeline[a];var d=c.Zi,e=c.se+this.h.vc,f=this.j-this.h.zb,g=this.j+c.end,h=g;a===this.getNumReferences()-1&&this.l!==Infinity&&(h=this.D&&Math.abs(h-this.l)>.1?Math.min(h,this.l):this.l);var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],q=!1;c.gf&&this.h&&this.h.xb&&(q=this.h.xb.includes("$SubNumber$"));if(q){q=(c.end-c.start)/c.gf;for(var r={},u=0;u<c.gf;r={we:void 0,
eh:void 0},u++){var v=c.start+q*u,w=v+q;r.eh=u;r.we=null;r=new X(this.j+v,this.j+w,function(x){return function(){if(!b.h)return[];x.we==null&&(x.we=Tj(b.h.xb,b.G,d,b.C,e,x.eh,b.F,b.K));return x.we}}(r),0,null,this.u,f,this.j,this.l,[],"",null,null,aj,this.B);r.codecs=k;r.mimeType=l;r.bandwidth=m;this.I==0?u>0&&r.ld():u%this.I!=0&&r.ld();n.push(r)}}c=new X(this.j+c.start,h,function(){return n.length>0||!b.h?[]:Tj(b.h.xb,b.G,d,b.C,e,null,b.F,b.K)},0,null,this.u,f,this.j,this.l,n,"",null,null,aj,this.B,
n.length>0);c.codecs=k;c.mimeType=l;c.h=g;c.bandwidth=m;this.g[a]=c}return c};p.Hb=function(a){Rj(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function Tj(a,b,c,d,e,f,g,h){a=Ni(a,b,c,f,d||null,e);return wc(g(),[a],h()).map(function(k){return k.toString()})}p.Ld=function(){return this.L};function Y(a,b,c){this.i=a;this.G=b;this.o=this.l=Infinity;this.h=1;this.g=this.j=null;this.B=0;this.C=!0;this.K=!1;this.I=0;this.D=c===void 0?!0:c;this.F=0;this.u=!1;this.m=a}p=Y.prototype;p.getDuration=function(){return this.l};p.Wh=function(){return this.h};p.dj=function(a){this.i=a};p.Qb=function(a){this.l=a};p.ci=function(){return this.i};p.Rg=function(a){this.B=a};p.xf=function(a){a&&!this.C&&(this.K=!0);this.C=a};p.Wg=function(a){this.o=a};p.Qd=function(){return this.o};
p.Sg=function(a){this.G=a};p.Oh=function(){return this.G};p.Dg=function(a,b){if(a.length!=0){var c=(Date.now()+this.B)/1E3;a=a.filter(function(e){return e.start+b<c});if(a.length!=0){var d=a[a.length-1].end+b;this.ee(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);this.i!=null&&this.D&&!this.u&&(this.i=c-this.g-this.h)}}};
p.cf=function(a){if(a.length!=0){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.ee(b);this.g=Math.max(this.g,c);this.i!=null&&this.D&&!this.u&&(this.i=d-this.g-this.h)}};p.Cg=function(a,b){this.ee(a);b==Infinity||this.T()||(this.g=Math.max(this.g,b))};p.Xh=function(){return this.g};p.ug=function(){this.u=!0};
p.Bi=function(){return this.u};p.Ug=function(a){this.m=a};p.Th=function(){return this.m};p.ee=function(a){this.j==null?this.j=a:this.K||(this.j=Math.min(this.j,a))};p.bf=function(a){this.h=Math.max(this.h,a)};p.offset=function(a){this.j!=null&&(this.j+=a);this.g!=null&&(this.g+=a)};p.T=function(){return this.l==Infinity&&!this.C};p.Hc=function(){return this.l!=Infinity&&!this.C};p.Ib=function(){return Math.max(this.I,this.Wb()-this.o)};p.ah=function(a){this.I=a};
p.Wb=function(){return this.T()||this.Hc()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.h-this.i)+this.F,this.l):this.g?Math.min(this.g,this.l):this.l};p.gd=function(a){var b=Math.max(this.j,this.I);return this.o==Infinity?Math.ceil(b*1E3)/1E3:Math.max(b,Math.min(this.Wb()-this.o+a,this.cb()))};p.sb=function(){return this.gd(0)};p.cb=function(){return Math.max(0,this.Wb()-(this.T()||this.Hc()?this.G:0))};p.kh=function(){return this.i==null||this.g!=null&&this.D?!1:!0};
p.Qg=function(a){this.F=a};p.Jh=function(){return this.F};E("shaka.media.PresentationTimeline",Y);Y.prototype.getAvailabilityTimeOffset=Y.prototype.Jh;Y.prototype.setAvailabilityTimeOffset=Y.prototype.Qg;Y.prototype.usingPresentationStartTime=Y.prototype.kh;Y.prototype.getSeekRangeEnd=Y.prototype.cb;Y.prototype.getSeekRangeStart=Y.prototype.sb;Y.prototype.getSafeSeekRangeStart=Y.prototype.gd;Y.prototype.getSegmentAvailabilityEnd=Y.prototype.Wb;Y.prototype.setUserSeekStart=Y.prototype.ah;
Y.prototype.getSegmentAvailabilityStart=Y.prototype.Ib;Y.prototype.isInProgress=Y.prototype.Hc;Y.prototype.isLive=Y.prototype.T;Y.prototype.offset=Y.prototype.offset;Y.prototype.notifyMaxSegmentDuration=Y.prototype.bf;Y.prototype.notifyMinSegmentStartTime=Y.prototype.ee;Y.prototype.getInitialProgramDateTime=Y.prototype.Th;Y.prototype.setInitialProgramDateTime=Y.prototype.Ug;Y.prototype.isStartTimeLocked=Y.prototype.Bi;Y.prototype.lockStartTime=Y.prototype.ug;Y.prototype.getMaxSegmentEndTime=Y.prototype.Xh;
Y.prototype.notifyPeriodDuration=Y.prototype.Cg;Y.prototype.notifySegments=Y.prototype.cf;Y.prototype.notifyTimeRange=Y.prototype.Dg;Y.prototype.getDelay=Y.prototype.Oh;Y.prototype.setDelay=Y.prototype.Sg;Y.prototype.getSegmentAvailabilityDuration=Y.prototype.Qd;Y.prototype.setSegmentAvailabilityDuration=Y.prototype.Wg;Y.prototype.setStatic=Y.prototype.xf;Y.prototype.setClockOffset=Y.prototype.Rg;Y.prototype.getPresentationStartTime=Y.prototype.ci;Y.prototype.setDuration=Y.prototype.Qb;
Y.prototype.setPresentationStartTime=Y.prototype.dj;Y.prototype.getMaxSegmentDuration=Y.prototype.Wh;Y.prototype.getDuration=Y.prototype.getDuration;function Uj(a){if(Vj.has(a))return Vj.get(a);var b=window.ManagedMediaSource||window.MediaSource;return b?(b=b.isTypeSupported(a),Vj.set(a,b),b):!1}function Wj(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.prototype?!!a.prototype.setLiveSeekableRange&&!!a.prototype.clearLiveSeekableRange:!1}var Vj=new Map;function Xj(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Ie(d);b.has(e)||(c.push(d),b.add(e))}b=Dc("audio",c);d=Dc("video",c);a=Dc(Cc,c);d=Yj(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
function Yj(a){if(a.length<=1)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?Uj('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
function Zj(a,b,c){var d,e,f,g,h;return D(function(k){if(k.h==1)return d=b,d.cryptoKey?k.A(2):k.g(d.fetchKey(),3);e=d.iv;if(!e)for(e=S(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;g>=0;g--)e[g]=f&255,f>>=8;b.blockCipherMode=="CBC"?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 ak(a,b,c){var d,e,f,g,h,k,l;return D(function(m){switch(m.h){case 1:a:{var n=a.length;for(var q=0;q<a.length;q++){var r=a.charCodeAt(q);if(r===63||r===35){n=q;break}}for(q=n-1;q>=0;q--){r=a.charCodeAt(q);if(r===46){if(q+1<n){n=a.slice(q+1,n).toLowerCase();break a}break}if(r===47)break}n=""}d=n;if(e=bk.get(d))return m.return(e);f=0;g=Fi([a],c);m.m(2);g.method="HEAD";return m.g(b.request(f,g).promise,4);case 4:h=m.i;e=h.headers["content-type"];m.o(3);break;case 2:k=m.l();if(!k||k.code!=1002&&
k.code!=1001){m.A(3);break}g.method="GET";return m.g(b.request(f,g).promise,6);case 6:l=m.i,e=l.headers["content-type"];case 3:return m.return(e?e.toLowerCase().split(";").shift():"")}})}function ck(a,b,c,d,e){a=Fi(a,d,e);if(b!=0||c!=null)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a}
var bk=(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 dk(a){this.o=null;this.B=a;this.G=new yi;this.j=[];this.h=null;this.m=[];this.C=null;this.F=[];this.D=300;this.l=new Map;this.i=new Map;this.g=null;this.u="UNKNOWN"}dk.prototype.configure=function(a){this.o=a};dk.prototype.destroy=function(){this.B=this.o=null;this.j=[];this.h=null;this.m=[];this.F=[];this.l.clear();this.g!=null&&(this.g.stop(),this.g=null);return this.G.destroy()};dk.prototype.setManifestType=function(a){this.u=a};
function ek(a,b){var c,d,e,f,g,h,k;return D(function(l){if(l.h==1)return c=wc(a.j,[fk(a,b)]),d=Fi(c,a.o.retryParameters),e=a.B.networkingEngine.request(8,d),zi(a.G,e),l.m(2),l.g(e.promise,4);if(l.h!=2)return f=l.i,g=ec(f.data),h=JSON.parse(g),h.VERSION==1&&gk(a,h,f.uri),l.o(0);if((k=l.l())&&k.code==7001)return l.return();a.g!=null&&(a.g.stop(),a.g=null);a.g=new W(function(){ek(a,b)});a.g.ra(a.D);l.j()})}
function fk(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;a.u=="DASH"?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):a.u=="HLS"&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Lb(e);e.cd&&xb(b,e);return b.toString()}
function gk(a,b,c){a.g!=null&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new W(function(){ek(a,d)});if(c=b.TTL)a.D=c;a.g.ra(a.D);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}function hk(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}dk.prototype.banLocation=function(a){this.i.set(a,Date.now()+6E4)};
function ik(a,b,c){c=c===void 0?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Lc:void 0},f=e.next())if(g.Lc=f.value,f=b.get(g.Lc))d.push({hf:g.Lc,location:f});else if(f=a.F.find(function(k){return function(l){return l.rj==k.Lc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].ph?(h=new tb(h),vb(h,f["URI-REPLACEMENT"].ph),d.push({hf:g.Lc,location:h.toString()})):d.push({hf:g.Lc,location:h}))}e=Date.now();g=t(a.i.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
h=a.i.get(f),e>h&&a.i.delete(f);d=d.filter(function(k){for(var l=t(a.i.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new tb(k.location)).hb))return!1;return!0});d.length&&(a.C=d[0].hf);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:wc(a.j,d)};function jk(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.o=!1;this.m=new Set}p=jk.prototype;p.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.o=!1;this.m.clear()};p.oi=function(){return this.l};p.Ue=function(){return this.j.slice()};p.Rh=function(){return this.i};
p.Tf=function(a,b){if(a){if(a.type=="audio")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(a.type=="video")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==Cc)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(a.type=="image")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 kk(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[lk(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[mk(n),n]})),l=new Map(h.textStreams.map(function(n){return[nk(n),n]}));h=new Map(h.imageStreams.map(function(n){return[ok(n),n]}));if(b){var m=pk(Cc);l.set(nk(m),m);m=pk("image");h.set(ok(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Mf:c,nh:d,hh:e,kg:f}}
p.He=function(a,b,c){c=c===void 0?!1:c;var d=this,e,f,g,h,k,l,m,n,q,r,u,v,w,x,y,z,A,F,G,B,H,J,O,M,I,L,Q,K,N,T,U,ja;return D(function(Ba){if(Ba.h==1){e=Ec;if(!b&&a.length==1)return f=kk(a,!1),g=f.Mf,h=f.nh,k=f.hh,l=f.kg,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(q=0;q<a.length;q++)r=a[q],d.m.has(r.id)||(d.m.add(r.id),n==-1&&(n=q));if(n==-1)return Ba.return();u=kk(a,!0);v=u.Mf;w=u.nh;x=u.hh;
y=u.kg;return Ba.g(Promise.all([qk(d,d.h,v,n,m),qk(d,d.g,w,n,m),qk(d,d.j,x,n,m),qk(d,d.i,y,n,m)]),2)}z=0;A=[];if(d.g.length&&d.h.length)for(M=t(d.h),I=M.next();!I.done;I=M.next())for(L=I.value,Q=t(d.g),K=Q.next();!K.done;K=Q.next())N=K.value,T=Vb(L.drmInfos,N.drmInfos),L.drmInfos.length&&N.drmInfos.length&&!T.length||(U=(L.bandwidth||0)+(N.bandwidth||0),L.dependencyStream&&(U+=L.dependencyStream.bandwidth||0),N.dependencyStream&&(U+=N.dependencyStream.bandwidth||0),ja=z++,A.push({id:ja,language:L.language,
disabledUntilTime:0,primary:L.primary,audio:L,video:N,bandwidth:U,drmInfos:T,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(F=d.g.length?d.g:d.h,G=t(F),B=G.next();!B.done;B=G.next())H=B.value,J=z++,O=H.bandwidth||0,H.dependencyStream&&(O+=H.dependencyStream.bandwidth||0),A.push({id:J,language:H.language,disabledUntilTime:0,primary:H.primary,audio:H.type==e.U?H:null,video:H.type==e.na?H:null,bandwidth:O,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
d.l=A;Ba.j()})};
function qk(a,b,c,d,e){var f=rk,g=sk,h,k,l,m,n,q,r,u,v,w,x,y,z,A,F,G,B,H,J,O;return D(function(M){switch(M.h){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){M.A(4);break}n=m.value;return M.g(tk(a,n,c,d,g,h,e),5);case 5:q=M.i;if(!q)throw new V(2,4,4037);m=l.next();M.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())y=x.value,(z=uk(a,b,y,c,f,g,h))&&b.push(z);A=t(h);
for(F=A.next();!F.done;F=A.next())for(G=F.value,B=t(G),H=B.next(),J={};!H.done;J={zf:void 0},H=B.next())if(J.zf=H.value,!vk(J.zf)&&(O=b.some(function(I){return function(L){return wk(I.zf,L)}}(J))))throw new V(2,4,4037);return M.return(b)}})}function tk(a,b,c,d,e,f,g){return D(function(h){if(h.h==1)return xk(a,c,b,g>0),b.matchedStreams?b.segmentIndex?h.g(yk(b,d+g),2):h.A(2):h.return(!1);zk(b,d,e,f,g);return h.return(!0)})}
function yk(a,b){var c,d,e,f,g,h;return D(function(k){if(k.h==1){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 k.g(Promise.all(c),2)}if(a.segmentIndex instanceof sj)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);k.j()})}
function uk(a,b,c,d,e,f,g){if(vk(c))return null;var h=e(c);xk(a,d,h);h.createSegmentIndex&&(h.createSegmentIndex=function(){return D(function(k){if(h.segmentIndex)return k.A(0);h.segmentIndex=new sj;return k.g(yk(h,0),0)})},h.closeSegmentIndex=function(){h.segmentIndex&&(h.segmentIndex.release(),h.segmentIndex=null);if(h.matchedStreams)for(var k=t(h.matchedStreams),l=k.next();!l.done;l=k.next()){l=l.value;var m;if(m=l.segmentIndex){a:{m=t(b);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n!==
h&&n.segmentIndex&&n.matchedStreams&&n.matchedStreams.includes(l)){m=!0;break a}m=!1}m=!m}m&&(l.segmentIndex.release(),l.segmentIndex=null)}});if(!h.matchedStreams||!h.matchedStreams.length)return null;zk(h,0,f,g,0);return h}
function zk(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;a.type=="audio"&&kf(a.language,g.language)==0&&(h=!1);if(h&&((h=d[b-e])&&h.delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
function rk(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){};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 sk(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);a.originalId==null?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=rk(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
for(var g=new sj,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),sk(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),sk(a.trickModeVideo,b));b.dependencyStream?(a.dependencyStream||(a.dependencyStream=rk(b.dependencyStream),a.dependencyStream.matchedStreams=[],a.dependencyStream.createSegmentIndex=
function(){if(a.dependencyStream.segmentIndex)return Promise.resolve();for(var g=new sj,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),sk(a.dependencyStream,b.dependencyStream)):a.dependencyStream&&(a.dependencyStream.matchedStreams.push(b),sk(a.dependencyStream,b))}
function xk(a,b,c,d){d=(d===void 0?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=Ak(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
function Ak(a,b,c){var d={audio:lk,video:mk,text:nk,image:ok}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return wk(l,m)},video:function(l,m){return wk(l,m)},text:Bk,image:Ck}[c.type];for(var g={audio:Dk,video:Ek,text:Fk,image:Gk}[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.o&&!vk(e)&&b.delete(d(e));return e}
function Hk(a,b){return a.mimeType!=b.mimeType?!1:Ik(a.codecs)===Ik(b.codecs)}p.$g=function(a){this.o=a};function wk(a,b){return a.drmInfos&&!Tb(a.drmInfos,b.drmInfos)?!1:!0}function Bk(a,b){return b.language?a.forced!==b.forced||kf(a.language,b.language)==0||b.kind!=a.kind?!1:!0:!0}function Ck(){return!0}
function Dk(a,b,c){var d=Jk(a,b,c);if(d===Kk)return!0;if(d===Lk)return!1;d=kf(a.language,b.language);var e=kf(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=Mk(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Kk)return!0;if(d==Lk)return!1;d=Mk(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Kk?!0:d==Lk?!1:a.bandwidth&&Nk(a.bandwidth,b.bandwidth,c.bandwidth)==Kk?!0:!1}
function Ek(a,b,c){var d=Jk(a,b,c);if(d===Kk)return!0;if(d===Lk)return!1;d=Mk(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Kk)return!0;if(d==Lk)return!1;if(a.frameRate){d=Mk(a.frameRate,b.frameRate,c.frameRate);if(d==Kk)return!0;if(d==Lk)return!1}return a.bandwidth&&Nk(a.bandwidth,b.bandwidth,c.bandwidth)==Kk?!0:!1}
function Fk(a,b,c){var d=kf(a.language,b.language),e=kf(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 Gk(a,b,c){return Mk(a.width*a.height,b.width*b.height,c.width*c.height)==Kk?!0:!1}
function pk(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new pj([]),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 Mk(a,b,c){if(b==a&&a!=c)return Lk;if(c==a&&a!=b)return Kk;if(b>a){if(c<=a||c-a<b-a)return Kk;if(c-a>b-a)return Lk}else{if(c>a)return Lk;if(a-c<a-b)return Kk;if(a-c>a-b)return Lk}return Ok}function Jk(a,b,c){var d=a.mimeType===b.mimeType&&a.codecs===b.codecs,e=a.mimeType===c.mimeType&&a.codecs===c.codecs;if(d&&!e)return Lk;if(!d&&e)return Kk;b=Hk(a,b);a=Hk(a,c);return b&&!a?Lk:!b&&a?Kk:Ok}function Nk(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Kk:b<a?Lk:Ok}
function vk(a){switch(a.type){case Cc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}function mk(a){return Pk([a.fastSwitching,a.width,a.frameRate,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 lk(a){return Pk([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}function nk(a){return Pk([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}function ok(a){return Pk([a.width,a.codecs,a.mimeType])}function Pk(a){return JSON.stringify(a)}function Ik(a){if(!Qk.has(a)){var b=Ge(a);Qk.set(a,b)}return Qk.get(a)}
E("shaka.util.PeriodCombiner",jk);jk.prototype.setUseStreamOnce=jk.prototype.$g;jk.prototype.combinePeriods=jk.prototype.He;jk.prototype.deleteStream=jk.prototype.Tf;jk.prototype.getImageStreams=jk.prototype.Rh;jk.prototype.getTextStreams=jk.prototype.Ue;jk.prototype.getVariants=jk.prototype.oi;var Kk=1,Ok=0,Lk=-1,Qk=new Map;function Rk(){}function Sk(a){a=ic(a);return(new tb(a)).hb}function Tk(a,b,c){function d(h){Sb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(S(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new V(2,6,6015);var e;typeof b=="string"?e=mc(b,!0):e=b;a=ic(a);a=mc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Uk(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=ic(a).split("skd://").pop();return Tk(a,c,b)}
function Vk(a,b){a===2&&(a=b.drmInfo)&&Zb(a.keySystem)&&(b.headers["Content-Type"]="application/octet-stream")}E("shaka.drm.FairPlay",Rk);
Rk.commonFairPlayResponse=function(a,b){if(a===2&&(a=b.originalRequest.drmInfo)&&Zb(a.keySystem)){try{var c=ec(b.data)}catch(e){return}a=!1;c=c.trim();c.substr(0,5)==="<ckc>"&&c.substr(-6)==="</ckc>"&&(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)))}};Rk.muxFairPlayRequest=function(a,b){Vk(a,b)};
Rk.expressplayFairPlayRequest=function(a,b){if(a===2){var c=b.drmInfo;c&&Zb(c.keySystem)&&Vk(a,b)}};Rk.conaxFairPlayRequest=function(a,b){Vk(a,b)};Rk.ezdrmFairPlayRequest=function(a,b){Vk(a,b)};Rk.verimatrixFairPlayRequest=function(a,b){a===2&&(a=b.drmInfo)&&Zb(a.keySystem)&&(a=S(b.body),a=qc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=jc("spc="+a))};Rk.muxInitDataTransform=function(a,b,c){return Uk(a,b,c)};
Rk.expressplayInitDataTransform=function(a,b,c){return Uk(a,b,c)};Rk.conaxInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=ic(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(c.length*2);d=Rb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Tk(a,d,b)};Rk.ezdrmInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=ic(a).split(";").pop();return Tk(a,c,b)};
Rk.verimatrixInitDataTransform=function(a,b,c){return Uk(a,b,c)};Rk.initDataTransform=Tk;Rk.defaultGetContentId=Sk;Rk.isFairPlaySupported=function(){var a;return D(function(b){if(b.h==1)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},b.m(2),b.g(navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(b.h!=2)return b.return(!0);b.l();return b.return(!1)})};function Wk(a,b,c){c=c===void 0?!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)}
Wk.prototype.add=function(a,b){var c=this.h;b=b===void 0?!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||d.channelsCount>2||e.channelsCount>2)&&d.channelsCount!=e.channelsCount||d.spatialAudio!==e.spatialAudio||b&&!Xk(d,e))&&Ya(d.roles,e.roles)&&d.groupId===e.groupId)}!d&&(d=c.video&&a.video)&&(c=c.video,d=a.video,d=!((!b||Xk(c,d))&&Ya(c.roles,d.roles)));return d?!1:(this.g.add(a),
!0)};Wk.prototype.values=function(){return this.g.values()};function Xk(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(c){return Ie(c)});b=b.codecs.split(",").map(function(c){return Ie(c)});return Ya(a,b)}E("shaka.media.AdaptationSet",Wk);function Yk(){this.h=this.g=null}Yk.prototype.configure=function(a){this.g=a};Yk.prototype.getConfiguration=function(){return this.g};
Yk.prototype.create=function(a){var b;if(this.g.language){var c=Zk(a,this.g.language);c.length&&(b=c)}b||(b=a.filter(function(f){return f.primary}),b=b.length?b:a);a=$k(b,this.g.role);a.length&&(b=a);a=al(b,this.g.videoRole);a.length&&(b=a);this.g.videoLayout&&(a=bl(b,this.g.videoLayout),a.length&&(b=a));this.g.hdrLevel&&(a=cl(b,this.g.hdrLevel),a.length&&(b=a));var d=[this.g.channelCount,this.g.preferredAudioChannelCount];a=d.filter(function(f,g){return f&&d.indexOf(f)===g});if(a.length)for(a=t(a),
c=a.next();!c.done;c=a.next())if(c=dl(b,c.value),c.length){b=c;break}this.g.audioLabel&&(a=el(b,this.g.audioLabel),a.length&&(b=a));this.g.videoLabel&&(a=fl(b,this.g.videoLabel),a.length&&(b=a));a=gl(b,this.g.spatialAudio);a.length&&(b=a);var e=[this.g.audioCodec,this.g.activeAudioCodec].concat(C(this.g.preferredAudioCodecs));a=e.filter(function(f,g){return f&&e.indexOf(f)===g});if(a.length)for(a=t(a),c=a.next();!c.done;c=a.next())if(c=hl(b,c.value),c.length){b=c;break}a=P();a=this.g.codecSwitchingStrategy==
"smooth"&&a.Za();return this.h=new Wk(b[0],b,!a)};Yk.prototype.getLastAdaptationSet=function(){return this.h};function Zk(a,b){b=ff(b);var c=nf(b,a.map(function(d){return mf(d)}));return c?a.filter(function(d){return c==mf(d)}):[]}function $k(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):c.audio.roles.length==0:!1})}function al(a,b){return a.filter(function(c){return c.video?b?c.video.roles.includes(b):c.video.roles.length==0:!1})}
function el(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function fl(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}function dl(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 cl(a,b){if(b=="AUTO"){var c=a.some(function(d){return d.video&&d.video.hdr&&d.video.hdr=="HLG"?!0:!1});b=P().Dc(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})}function bl(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function gl(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function hl(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function il(){}
function jl(a,b,c,d,e){var f=e in d,g=new Set(["__proto__","constructor","prototype"]);var h=f?c.constructor==Object&&Object.keys(d).length==0:c.constructor==Object&&Object.keys(c).length==0;for(var k=f||h,l=!0,m=t(Object.keys(b)),n=m.next();!n.done;n=m.next()){n=n.value;var q=e+"."+n,r=f?d[e]:c[n];g.has(n)?(Pa("Invalid config, dangerous key "+q),l=!1):k||n in c?b[n]===void 0?r===void 0||k?delete a[n]:a[n]=id(r):h?a[n]=b[n]:r.constructor==Object&&b[n]&&b[n].constructor==Object?(a[n]||(a[n]=id(r)),
n=jl(a[n],b[n],r,d,q),l=l&&n):typeof b[n]!=typeof r||b[n]==null||typeof b[n]!="function"&&b[n].constructor!=r.constructor?(Pa("Invalid config, wrong type for "+q),l=!1):typeof c[n]=="function"&&c[n].length!=b[n].length?(Qa("Unexpected number of arguments for "+q),a[n]=b[n]):a[n]=Array.isArray(a[n])?b[n].slice():b[n]:(Pa("Invalid config, unrecognized key "+q),l=!1)}return l}
function kl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(e<0)break;if(e==0||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 ll(a,b){return a&&b}
function ml(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])&&Object.keys(f[h]).length===0)delete f[h];else{var k=f[h];Array.isArray(k)&&k.length===0?delete f[h]:typeof f[h]=="function"?delete f[h]:e(f[h])&&(c(f[h]),Object.keys(f[h]).length===0&&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]),Object.keys(l).length>0||!e(l))h[k]=l}else Array.isArray(l)&&Array.isArray(g[k])?Ya(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&&typeof f==="object"&&!Array.isArray(f)}a=d(a,b);c(a);return a}E("shaka.util.ConfigUtils",il);il.getDifferenceFromConfigObjects=ml;il.convertToConfigObject=kl;il.mergeConfigObjects=jl;function nl(){}
function ol(){var a=Infinity,b=P();navigator.connection&&navigator.connection.saveData&&(a=360);var c={retryParameters:mi(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(h,k,l){"apple"===window.shakaMediaKeysPolyfill&&k=="skd"&&(k=l.serverCertificate,l=Sk(h),h=Tk(h,l,k));return h},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,
minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"},d="reload";b.Za()&&(d="smooth");var e={retryParameters:mi(),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,enableAudioGroups:!0,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:pl,manifestPreprocessorTXml:ql,sequenceMode:!1,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:b.uc(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:pl,manifestPreprocessorTXml:ql,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},
f={trackSelectionCallback:function(h){return D(function(k){return k.return(h)})},downloadSizeCallback:function(h){var k;return D(function(l){if(l.h==1)return navigator.storage&&navigator.storage.estimate?l.g(navigator.storage.estimate(),3):l.return(!0);k=l.i;return l.return(k.usage+h<k.quota*.95)})},progressCallback:function(h,k){return ll([h,k])},usePersistentLicense:!0,numberOfParallelDownloads:5},g={drm:c,manifest:e,streaming:{retryParameters:mi(),failureCallback:function(h){return ll([h])},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:!0,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:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3},mediaSource:{codecSwitchingStrategy:d,addExtraFeaturesToSourceBuffer:function(h){return ll([h],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(h,k,l){return ll([h,k,l])},dispatchAllEmsgBoxes:!1,
useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:f,abrFactory:function(){return new Yf},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(Yk,[null].concat(C(Aa.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,
minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!1},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredAudioRole:"",preferredVideoRole:"",
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,targets:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,
disableDASHInterstitial:!1,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:Infinity,preloadPrevItem:!0,repeatMode:0}};f.trackSelectionCallback=function(h){return D(function(k){return k.return(rl(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return b.Ha(g)}
function sl(){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 tl(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 jl(a,b,c||ol(),d,"")}
function rl(a,b,c){var d=c;d=="AUTO"&&(c=a.some(function(h){return h.hdr&&h.hdr=="HLG"?!0:!1}),d=P().Dc(c));var e=a.filter(function(h){return h.type!="variant"||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=nf(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return ff(h.language)==f}));c.length==0&&(c=e.filter(function(h){return h.primary}));c.length==0&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&h.height<=480});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!=Cc&&c.type!="image"||b.push(c);return b}function pl(a){return ll([a],a)}function ql(a){return ll([a],a)}E("shaka.util.PlayerConfiguration",nl);nl.mergeConfigObjects=tl;nl.createDefaultForLL=sl;nl.createDefault=ol;function ul(a){return(new Date(Date.UTC(1900,0,1,0,0,0,0)+a)).getTime()};function vl(a,b){var c=new DOMParser,d=wl.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}
var wl=new jb(function(){if(typeof trustedTypes!=="undefined"){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 xl(){var a=this;this.j=this.g=null;this.B=[];this.h=null;this.Ga=1;this.I=[];this.l={be:"",type:"",profiles:[],Nb:null,Va:0,Na:null,od:0};this.u=new Map;this.C=new Map;this.G=new Map;this.o=new Map;this.F=new Map;this.Ba=new Map;this.m=new jk;this.S=0;this.Fa=new Ka(5);this.M=new W(function(){if(a.L&&!a.g.continueLoadingWhenPaused&&(a.K.eb(a.L,"timeupdate"),a.L.paused)){a.K.La(a.L,"timeupdate",function(){return yl(a)});return}yl(a)});this.W=new yi;this.O=null;this.D=[];this.ka=Infinity;this.za=
!1;this.i=null;this.N=0;this.X=!1;this.K=new eb;this.L=null;this.Y=!1;this.ha="";this.ya=function(){return!1};this.aa=[];this.sa=new Set;this.xa=new ci}p=xl.prototype;p.configure=function(a,b){var c=this.j&&a.updatePeriod!=this.g.updatePeriod&&a.updatePeriod>=0;this.g=a;b&&(this.ya=b);c&&this.h&&this.h.presentationTimeline.T()&&this.M.Rb();this.i&&this.i.configure(this.g);this.m&&this.m.$g(this.g.dash.useStreamOnceInPeriodFlattening)};
p.start=function(a,b){var c=this,d;return D(function(e){if(e.h==1)return c.za=b.isLowLatencyMode(),c.B=[a],c.j=b,e.g(zl(c),2);d=e.i;c.j&&Al(c,d);if(!c.j)throw new V(2,7,7001);return e.return(c.h)})};
p.stop=function(){for(var a=t(this.o.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.h=null;this.o.clear();this.F.clear();this.u.clear();this.C.clear();this.G.clear();this.l={be:"",type:"",profiles:[],Nb:null,Va:0,Na:null,od:0};this.m=null;this.M!=null&&(this.M.stop(),this.M=null);this.i&&this.i.destroy();this.K&&(this.K.release(),this.K=null);this.sa.clear();this.xa.release();return this.W.destroy()};
p.update=function(){var a=this,b;return D(function(c){if(c.h==1)return c.m(2),c.g(zl(a),4);if(c.h!=2)return c.o(0);b=c.l();if(!a.j||!b)return c.return();a.j.onError(b);c.j()})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.h&&this.h.presentationTimeline.T()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.h.presentationTimeline.Wb();var c=b.segmentIndex.find(a);c!=null&&(b=b.segmentIndex.get(c))&&(this.S=b.endTime-a,Al(this,0))}}};
p.banLocation=function(a){this.i&&this.i.banLocation(a)};p.setMediaElement=function(a){this.L=a};
function zl(a){var b,c,d,e,f,g,h,k,l,m,n;return D(function(q){if(q.h==1)return b=4,c="MPD",d=Bl(a),e=a.B,d.length?(e=d,c="Patch",b=6):a.B.length>1&&a.i&&(f=ik(a.i,"Location",!0),f.length&&(e=f)),g=Fi(e,a.g.retryParameters),h=Date.now(),q.g(Cl(a,g,0,{type:b}),2);if(q.h!=3){k=q.i;if(!a.j)return q.return(0);k.uri&&k.uri!=k.originalUri&&!a.B.includes(k.uri)&&a.B.unshift(k.uri);l=new tb(k.uri);a.ha=l.g.toString();return q.g(Dl(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.Fa.sample(1,n);a.sa.clear();
return q.return(n)})}
function Dl(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u;return D(function(v){if(v.h==1){e=b;f=a.g.dash.manifestPreprocessor;g=pl;if(f!=g){R("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");var w=e;try{var x=ic(w);var y=vl(x,d)}catch(z){y=null}h=y;if(!h)throw new V(2,4,4001,c);f(h);e=jc(h.outerHTML)}k=ld(e,d);if(!k)throw new V(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=ql;l!=m&&l(k);if(d==="Patch")return v.return(El(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(Fl(a,
k,c));q=a.g.dash.xlinkFailGracefully;r=Yi(k,a.g.retryParameters,q,c,a.j.networkingEngine);zi(a.W,r);return v.g(r.promise,2)}u=v.i;return v.return(Fl(a,u,c))})}
function Fl(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,x,y,z,A,F,G,B,H,J,O,M,I,L,Q,K,N,T,U,ja,Ba,$a,Na,ab,Ab,Pb,mb,Da,Jb,kc,ua,Oi,qn,Pi,Qi,St,Ri,Si,vg,rn,Ed,sn,tn,un;return D(function(lc){switch(lc.h){case 1:a.i&&a.i.l.clear();d=[c];e=[];f=new Map;g=td(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=vd(l))q=wc(d,[n])[0],m&&(a.i?hk(a.i,"Location",m,q):f.set(m,q)),e.push(q);a.i?(r=ik(a.i,"Location",!0),r.length>0&&(d=a.B=r)):e.length&&(d=a.B=e);a.l.be=
b.attributes.id||"";a.l.od=Ad(b,"publishTime",Dd)||0;a.I=td(b,"PatchLocation");u=Promise.resolve();if((v=xd(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.i)a.i.j=d,a.i.h=w;else if(a.i=new dk(a.j),a.i.configure(a.g),a.i.setManifestType("DASH"),a.i.j=d,a.i.h=w,x=vd(v))(y=Ad(v,"queryBeforeStart",Ld,!1))?u=ek(a.i,x):ek(a.i,x);z=t(f.keys());for(A=z.next();!A.done;A=z.next())F=A.value,G=f.get(F),hk(a.i,"Location",F,G)}B=td(b,"BaseURL");H=!1;if(a.i)for(J=t(B),O=J.next();!O.done;O=
J.next())M=O.value,I=M.attributes.serviceLocation,L=vd(M),I&&L&&(hk(a.i,"BaseURL",I,L),H=!0);a.aa.splice(0);H&&a.i||(Q=B.map(vd),a.aa.push.apply(a.aa,C(wc(d,Q))));K=a.i;N=a.aa;T=Gl;U=T.call(xl,K,H,N);a.l.Na=U;ja=0;B&&B.length&&(ja=Ad(B[0],"availabilityTimeOffset",Kd)||0);a.l.Va=ja;a.S=Ad(b,"minimumUpdatePeriod",Fd,-1);Ba=Ad(b,"availabilityStartTime",Dd);$a=Ad(b,"timeShiftBufferDepth",Fd);Na=a.g.dash.ignoreSuggestedPresentationDelay;ab=null;Na||(ab=Ad(b,"suggestedPresentationDelay",Fd));Ab=a.g.dash.ignoreMaxSegmentDuration;
Pb=null;Ab||(Pb=Ad(b,"maxSegmentDuration",Fd));mb=b.attributes.type||"static";a.h&&a.h.presentationTimeline&&(a.Y=a.h.presentationTimeline.T()&&mb=="static");a.l.type=mb;if(a.h)for(Da=a.h.presentationTimeline,Jb=Da.Ib(),kc=t(a.o.values()),ua=kc.next();!ua.done;ua=kc.next())Oi=ua.value,Oi.segmentIndex&&Oi.segmentIndex.Ia(Jb);else qn=a.g.dash.ignoreMinBufferTime,Pi=0,qn||(Pi=Ad(b,"minBufferTime",Fd)||0),Qi=0,Qi=ab!=null?Math.min(ab,$a||Infinity):a.g.defaultPresentationDelay>0?a.g.defaultPresentationDelay:
Math.min(Pi*1.5,$a||Infinity),Da=new Y(Ba,Qi,a.g.dash.autoCorrectDrift);Da.xf(mb=="static");(St=Da.T())&&!isNaN(a.g.availabilityWindowOverride)&&($a=a.g.availabilityWindowOverride);$a==null&&($a=Infinity);Da.Wg($a);Ri=b.attributes.profiles||"";a.l.profiles=Ri.split(",");Si={Xa:mb!="static",presentationTimeline:Da,ia:null,Z:null,$:null,J:null,bandwidth:0,Ve:!1,Va:ja,Nb:null,profiles:Ri.split(","),roles:null,fb:Hl};return lc.g(u,2);case 2:a.N=0;vg=Il(a,Si,U,b,!1);rn=vg.duration;Ed=vg.periods;(mb!="static"||
a.Y)&&vg.Xf||Da.Qb(rn||Infinity);a.X&&a.za&&Da.Qg(a.ka);Da.bf(Pb||1);a.X&&a.za&&(sn=ab!=null?ab:a.g.defaultPresentationDelay,Da.Sg(sn));if(!a.h)return lc.g(a.m.He(Ed,Si.Xa),6);a.h.periodCount=Ed.length;a.h.gapCount=a.N;return lc.g(Jl(a,Ed,!1),4);case 6:var Ut=Da,Vt=a.m.l,Wt=a.m.Ue(),Xt=a.m.i,Yt=a.g.dash.sequenceMode;var Ra=xd(b,"ServiceDescription");if(Ra){var Kb=xd(Ra,"Latency");Ra=xd(Ra,"PlaybackRate");if(Kb||Ra){var Cb={};Kb&&("target"in Kb.attributes&&(Cb.targetLatency=parseInt(Kb.attributes.target,
10)/1E3),"max"in Kb.attributes&&(Cb.maxLatency=parseInt(Kb.attributes.max,10)/1E3),"min"in Kb.attributes&&(Cb.minLatency=parseInt(Kb.attributes.min,10)/1E3));Ra&&("max"in Ra.attributes&&(Cb.maxPlaybackRate=parseFloat(Ra.attributes.max)),"min"in Ra.attributes&&(Cb.minPlaybackRate=parseFloat(Ra.attributes.min)));Kb=Cb}else Kb=null}else Kb=null;a:{Ra=td(b,"SupplementalProperty");if(Ra.length)for(Ra=t(Ra),Cb=Ra.next();!Cb.done;Cb=Ra.next())if(Cb=Cb.value,Cb.attributes.schemeIdUri=="urn:mpeg:dash:chaining:2016"){Ra=
Cb.attributes.value;break a}Ra=null}a.h={presentationTimeline:Ut,variants:Vt,textStreams:Wt,imageStreams:Xt,offlineSessionIds:[],sequenceMode:Yt,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Kb,nextUrl:Ra,periodCount:Ed.length,gapCount:a.N,isLowLatency:a.X,startTime:null};if(!Da.kh()){lc.A(7);break}tn=td(b,"UTCTiming");return lc.g(Kl(a,U,tn),8);case 8:un=lc.i;if(!a.j)return lc.return();Da.Rg(un);case 7:Da.ug(),a.m&&!a.h.presentationTimeline.T()&&a.m.release();case 4:a.j.makeTextStreamsForClosedCaptions(a.h),
Ll(a),Ml(a,Ed),lc.j()}})}function Jl(a,b,c){var d;return D(function(e){if(e.h==1)return e.g(a.m.He(b,!0,c),2);a.h.variants=a.m.l;d=a.m.Ue();d.length>0&&(a.h.textStreams=d);a.h.imageStreams=a.m.i;a.j.filter(a.h);e.j()})}
function El(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,x,y,z,A,F,G,B,H,J,O,M,I;return D(function(L){if(L.h==1){c=b.attributes.mpdId;d=Ad(b,"originalPublishTime",Dd);if(!c||c!==a.l.be||d!==a.l.od)throw a.I=[],new V(1,4,4052);e=[];f=[];g=new Set;h=t(sd(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Nd(l.attributes.sel||""),n=m[m.length-1],q=vd(l)||"",n.name==="MPD")if(n.Sb==="mediaPresentationDuration"){r=vd(l)||"";var Q=Fd(r);if(Q!=null){a.l.Nb=Q;for(var K=t(a.u.values()),N=K.next();!N.done;N=K.next())N.value.Nb=
Q}}else if(n.Sb==="type"){a.h.presentationTimeline.xf(q=="static");a.l.type=q;Q=t(a.u.values());for(K=Q.next();!K.done;K=Q.next())K.value.Xa=q=="dynamic";q=="static"&&(a.S=-1)}else n.Sb==="publishTime"?a.l.od=Dd(q)||0:n.Sb===null&&l.tagName==="add"&&f.push(l);else if(n.name==="PatchLocation")Od(a.I,l);else if(n.name==="Period")l.tagName==="add"?f.push(l):l.tagName==="remove"&&n.id&&Nl(a,n.id);else if(n.name==="SegmentTemplate"){K=Nd(l.attributes.sel||"");Q=K[K.length-1];if(Q.Sb){K=Ol(a,K);N=vd(l)||
"";for(var T=t(K),U=T.next();!U.done;U=T.next())U=a.u.get(U.value),Qd(U.J.$b,l.tagName,Q.Sb,N);Q=K}else Q=[];u=Q;v=t(u);for(w=v.next();!w.done;w=v.next())x=w.value,g.add(x)}else if(n.name==="SegmentTimeline"||n.name==="S"){Q=Nd(l.attributes.sel||"");Q=Ol(a,Q);K=t(Q);for(N=K.next();!N.done;N=K.next())N=a.u.get(N.value),N=Vi(N,Jj,"SegmentTimeline"),T=td(N,"S"),Od(T,l),N.children=T;y=Q;z=t(y);for(A=z.next();!A.done;A=z.next())F=A.value,g.add(F)}G=t(g);for(B=G.next();!B.done;B=G.next())H=B.value,Pl(a,
H);J=t(f);for(O=J.next();!O.done;O=J.next())M=O.value,e.push.apply(e,C(Il(a,{Xa:a.l.type=="dynamic",presentationTimeline:a.h.presentationTimeline,ia:null,Z:null,$:null,J:null,bandwidth:0,Ve:!1,Va:a.l.Va,profiles:a.l.profiles,Nb:a.l.Nb,roles:null,fb:Hl},a.l.Na,M,!0).periods));if(!e.length)return L.A(2);a.h.periodCount+=e.length;a.h.gapCount=a.N;return L.g(Jl(a,e,!0),2)}a.l.type=="static"&&(I=a.l.Nb,a.h.presentationTimeline.Qb(I||Infinity));L.j()})}
function Nl(a,b){a.h.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);Vi(e,Jj,"SegmentTimeline").children=[];Pl(a,d);a.u.delete(d)}a.D=a.D.filter(function(f){return f!==b});a.G.delete(b)}
function Ol(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,g.name==="Period"?c=g.id:g.name==="AdaptationSet"?(d=g.id,g.position!==null&&(e=g.position)):g.name==="Representation"&&(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.ia.id===c&&a.$.id===d&&a.J.id&&b.push(c+","+a.J.id);else if(e>-1)for(d=t(a.u.values()),a=d.next();!a.done;a=d.next())a=a.value,a.ia.id===c&&a.$.position===e&&a.J.id&&b.push(c+","+
a.J.id);return b}function Pl(a,b){var c=a.u.get(b),d=a.o.get(b);d.segmentIndex&&d.segmentIndex.Ia(a.h.presentationTimeline.Ib());try{var e=Ij(c,function(f,g,h,k){return Ql(a,f,g,h,k)},a.o,!0,a.g.dash.initialSegmentLimit,a.Ba,c.J.aesKey,null,!0,a.C);d.createSegmentIndex=function(){return D(function(f){if(f.h==1)return d.segmentIndex?f.A(0):f.g(e.dc(),3);d.segmentIndex=f.i;f.j()})}}catch(f){if(b=c.J.contentType,b!=Cc&&b!="application"&&b!="image"||f.code!=4002)throw f;}}
function Il(a,b,c,d,e){var f=b.Nb;f||(f=Ad(d,"mediaPresentationDuration",Fd),a.l.Nb=f);var g=0;a.h&&a.h.presentationTimeline&&a.Y&&(g=a.h.presentationTimeline.sb());var h=[],k=g;d=td(d,"Period");var l=b.Xa;l||a.G.clear();for(var m=l&&!e?new Set(a.D.slice(1,-1)):null,n=0;n<d.length;n++){var q=d[n],r=d[n+1],u=Ad(q,"start",Fd,k),v=q.attributes.id,w=Ad(q,"duration",Fd);u=n==0&&u==0&&a.Y?g:u;var x=null;if(r){var y=Ad(r,"start",Fd);y!=null&&(x=y-u+g)}else f!=null&&(x=f-u+g);y=Fc;x&&w&&Math.abs(x-w)>y&&
x>w&&a.N++;x==null&&(x=w);if(!(a.O!==null&&v!=null&&u!==null&&u<a.O)||a.D.includes(v)||n+1==d.length){u!==null&&(a.O===null||u>a.O)&&(a.O=u);k={start:u,duration:x,node:q,Wd:x==null||!r};q=null;r=n>0&&n<d.length-1;l&&m&&r&&!e&&(v!=null||(v="__shaka_period_"+u),m.has(v)&&(v=a.G.get(v))&&(q=v));q||(q=Rl(a,b,c,k),l&&q.id&&a.G.set(q.id,q));h.push(q);q.id&&x&&a.Ba.set(q.id,x);if(x==null){k=null;break}k=u+x}}l&&!e&&Sl(a,h);if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.D.includes(c)||a.D.push(c);
else a.D=h.map(function(z){return z.id});return f!=null?{periods:h,duration:f+g,Xf:!1}:{periods:h,duration:k,Xf:!0}}function Sl(a,b){b=new Set(b.map(function(e){return e.id}));for(var c=t(Array.from(a.G.keys())),d=c.next();!d.done;d=c.next())d=d.value,b.has(d)||a.G.delete(d)}
function Ll(a){var b=Array.from(a.F.keys()).filter(function(h){return!a.D.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.F.get(c)),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.o.get(f);g&&(g.segmentIndex&&g.segmentIndex.getNumReferences()!=0?d=!1:(a.m&&a.m.Tf(g,c),a.o.delete(f)))}d&&a.F.delete(c)}}function Ml(a,b){b=new Set(b.map(function(e){return e.id}));for(var c=t(a.C.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.has(d)||a.C.delete(d)}
function Rl(a,b,c,d){b.ia=Tl(a,d.node,null,c);b.Z=d;b.ia.Va=b.Va;b.ia.id||(b.ia.id="__shaka_period_"+d.start);var e=td(d.node,"EventStream");c=b.presentationTimeline.Ib();e=t(e);for(var f=e.next();!f.done;f=e.next())Ul(a,d.start,d.duration,f.value,c);c=td(d.node,"SupplementalProperty");c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"&&(e=Vl(a,e)))b.fb=e;c=td(d.node,"AdaptationSet").map(function(r,u){return Wl(a,b,u,r)}).filter(bf);if(b.Xa){e=
[];f=t(c);for(var g=f.next();!g.done;g=f.next()){g=t(g.value.Xi);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.Eh),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={Af:void 0},m=l.next())if(n.Af=m.value,e.has(n.Af.originalId)){f||
(f=td(d.node,"AdaptationSet").map(function(r,u){return Wl(a,b,u,r)}).filter(bf));m=t(f);for(var q=m.next();!q.done;q=m.next())if(q=q.value.streams.find(function(r){return function(u){return u.originalId==r.Af.originalId}}(n)))q.dependencyStream=e.get(q.originalId),q.originalId+=q.dependencyStream.originalId,k.push(q)}k.length&&h.streams.push.apply(h.streams,C(k))}d=t(Za(c,function(r){return!!r.jh}));c=d.next().value;d=d.next().value;if(!a.g.disableIFrames)for(c=t(c),e=c.next();!e.done;e=c.next())for(e=
e.value,f=e.jh.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())Vf(k.value,e.streams);c=Xl(a.g.disableAudio,d,"audio");e=Xl(a.g.disableVideo,d,"video");f=Xl(a.g.disableText,d,Cc);d=Xl(a.g.disableThumbnails,d,"image");if(e.length===0&&c.length===0)throw new V(2,4,4004);return{id:b.ia.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}
function Xl(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,C(e.streams));return d},[])}
function Wl(a,b,c,d){function e(I){var L=I.attributes["dvb:fontFamily"];I=I.attributes["dvb:url"];L&&I&&(I=wc(b.$.Na(),[I],b.fb()),a.j.addFont(L,I[0]))}function f(I){switch(I){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(I){switch(I){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.$=Tl(a,d,b.ia,null);b.$.position=c;var h=!1;c=td(d,"Role");var k=c.map(function(I){return I.attributes.value}).filter(bf),
l=void 0,m=b.$.contentType==Cc;m&&(l="subtitle");c=t(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var q=n.attributes.schemeIdUri;if(q==null||q=="urn:mpeg:dash:role:2011")switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=td(d,"EssentialProperty");c=null;var u=!1;n=null;q=!1;r=t(r);for(var v=r.next();!v.done;v=r.next()){v=v.value;var w=v.attributes.schemeIdUri;if(w=="http://dashif.org/guidelines/trickmode")c=v.attributes.value;else if(w=="urn:mpeg:mpegB:cicp:TransferCharacteristics")var x=
g(parseInt(v.attributes.value,10));else if(w=="urn:mpeg:mpegB:cicp:ColourPrimaries")var y=f(parseInt(v.attributes.value,10));else w!="urn:mpeg:mpegB:cicp:MatrixCoefficients"&&(w=="urn:mpeg:dash:ssr:2023"&&a.g.dash.enableFastSwitching?u=!0:w=="urn:dvb:dash:fontdownload:2014"?e(v):w=="urn:mpeg:dash:urlparam:2014"?(n=Vl(a,v))||(q=!0):q=!0)}if(q)return null;var z=null;q=td(d,"SupplementalProperty");q=t(q);for(r=q.next();!r.done;r=q.next())r=r.value,v=r.attributes.schemeIdUri,v=="http://dashif.org/guidelines/last-segment-number"?
z=parseInt(r.attributes.value,10)-1:v=="urn:mpeg:mpegB:cicp:TransferCharacteristics"?x=g(parseInt(r.attributes.value,10)):v=="urn:mpeg:mpegB:cicp:ColourPrimaries"?y=f(parseInt(r.attributes.value,10)):v=="urn:dvb:dash:fontdownload:2014"?e(r):v=="urn:mpeg:dash:urlparam:2014"&&(n=Vl(a,r));n&&(b.fb=n);n=td(d,"Accessibility");var A=new Map,F;n=t(n);for(q=n.next();!q.done;q=n.next())if(r=q.value,q=r.attributes.schemeIdUri,r=r.attributes.value,q!="urn:scte:dash:cc:cea-608:2015"||a.g.disableText)if(q!="urn:scte:dash:cc:cea-708:2015"||
a.g.disableText)q=="urn:mpeg:dash:role:2011"?r!=null&&(k.push(r),r=="captions"&&(l="caption")):q=="urn:tva:metadata:cs:AudioPurposeCS:2007"&&(r=="1"?F="visually impaired":r=="2"?F="hard of hearing":r=="9"&&(F="spoken subtitles"));else if(q=1,r!=null)for(r=t(r.split(";")),v=r.next();!v.done;v=r.next()){w=v.value;var G=v=void 0;w.includes("=")?(w=w.split("="),v="svc"+w[0],G=w[1].split(",")[0].split(":").pop()):(v="svc"+q,q++,G=w);A.set(v,ff(G))}else A.set("svc1","und");else if(q=1,r!=null)for(r=r.split(";"),
v=t(r),w=v.next();!w.done;w=v.next()){G=w.value;var B=w=void 0;G.includes("=")?(G=G.split("="),w=G[0].startsWith("CC")?G[0]:"CC"+G[0],B=G[1]||"und"):(w="CC"+q,r.length==2?q+=2:q++,B=G);A.set(w,ff(B))}else A.set("CC1","und");n=td(d,"ContentProtection");var H=di(a.xa,n,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);b.$.encrypted=n.length>0;var J=ff(b.$.language||"und"),O=b.$.label,M=new Map;d=td(d,"Representation");if(!a.g.ignoreSupplementalCodecs){n=[];q=t(d);for(r=q.next();!r.done;r=q.next())if(v=r.value,
r=Bd(v,"urn:scte:dash:scte214-extensions","supplementalCodecs"))v=id(v),v.attributes.codecs=r.split(" ").join(","),v.attributes.id&&(v.attributes.supplementalId=v.attributes.id+"_supplementalCodecs"),n.push(v);d.push.apply(d,C(n))}n=d.map(function(I){var L=Yl(a,b,H,l,J,O,h,k,A,I,F,z);return L&&(L.hdr=L.hdr||x,L.colorGamut=L.colorGamut||y,L.fastSwitching=u,I=I.attributes.dependencyId)?(L.baseOriginalId=I,M.set(I,L),null):L}).filter(function(I){return!!I});if(n.length==0&&M.size==0){c=b.$.contentType==
"image";if(a.g.dash.ignoreEmptyAdaptationSet||m||c)return null;throw new V(2,4,4003);}if(!b.$.contentType||b.$.contentType=="application")for(b.$.contentType=Zl(n[0].mimeType,n[0].codecs),m=t(n),q=m.next();!q.done;q=m.next())q.value.type=b.$.contentType;m=b.$.id||"__fake__"+a.Ga++;q=t(n);for(r=q.next();!r.done;r=q.next()){r=r.value;v=t(H.drmInfos);for(w=v.next();!w.done;w=v.next())w=w.value,w.keyIds=w.keyIds&&r.keyIds?new Set([].concat(C(w.keyIds),C(r.keyIds))):w.keyIds||r.keyIds;a.g.enableAudioGroups&&
(r.groupId=m)}d=d.map(function(I){return I.attributes.supplementalId||I.attributes.id}).filter(bf);return{id:m,contentType:b.$.contentType,language:J,Aj:h,streams:n,drmInfos:H.drmInfos,jh:c,Xi:d,Eh:M}}
function Vl(a,b){if((b=yd(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&Ad(b,"useMPDUrlQuery",Ld,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return c=="$querypart$"?a.ha:c.split("&").map(function(d){if(d=="$querypart$")return a.ha;var e=/\$query:(.*?)\$/g.exec(d);if(e&&e.length==2){e=e[1];var f=(new zb(a.ha)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null}
function Yl(a,b,c,d,e,f,g,h,k,l,m,n){b.J=Tl(a,l,b.$,null);var q=b.J.id;a.ka=Math.min(a.ka,b.J.Va);a.X=a.ka>0;if(!$l(b.J))return null;var r=b.Z.start;b.bandwidth=Ad(l,"bandwidth",Id)||0;b.roles=h;var u=td(l,"SupplementalProperty"),v=td(l,"EssentialProperty"),w=td(l,"ContentProtection");l=null;var x=v.find(function(K){return K.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"});x?l=Vl(a,x):(x=u.find(function(K){return K.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"}))&&(l=Vl(a,x));l&&(b.fb=
l);x=b.J.contentType;l=x==Cc||x=="application";x=x=="image";w.length&&(b.$.encrypted=!0);try{var y=void 0;if(c.Ge){var z=b.J.Na,A=b.fb,F=wc(z(),[c.Ge.Ci],A()),G=Fi(F,a.g.retryParameters);y={bitsKey:128,blockCipherMode:"CBC",iv:c.Ge.iv,firstMediaSequenceNumber:0,fetchKey:function(){var K,N,T;return D(function(U){if(U.h==1)return U.g(Cl(a,G,6),2);if(U.h!=3){K=U.i;if(!K.data||K.data.byteLength!=16)throw new V(2,4,4049);N={name:"AES-CBC"};T=y;return U.g(window.crypto.subtle.importKey("raw",K.data,N,!0,
["decrypt"]),3)}T.cryptoKey=U.i;y.fetchKey=void 0;U.j()})}}}b.J.aesKey=y;z=function(K,N,T,U){return Ql(a,K,N,T,U)};if(b.J.Uc)var B=xj(b,z,y);else if(b.J.Pb)B=Dj(b,a.o,y);else if(b.J.$b)B=Ij(b,z,a.o,!!a.h,a.g.dash.initialSegmentLimit,a.Ba,y,n,!1,a.C);else{var H=b.Z.duration||0,J=b.J.Na,O=b.J.mimeType,M=b.J.codecs;B={endTime:-1,timeline:-1,dc:function(){var K=rj(r,H,J());K.Hb(function(N){N.mimeType=O;N.codecs=M});return Promise.resolve(K)},timescale:1}}}catch(K){if((l||x)&&K.code==4002)return null;
throw K;}n=hi(a.xa,w,c,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);w=u.some(function(K){return K.attributes.schemeIdUri=="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&K.attributes.value=="JOC"});u=u.some(function(K){return K.attributes.schemeIdUri=="tag:dolby.com,2016:dash:virtualized_content:2016"&&K.attributes.value=="1"});u=w||u;w=!1;l&&(w=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var I;if(x&&((v=v.find(function(K){return["http://dashif.org/thumbnail_tile",
"http://dashif.org/guidelines/thumbnail_tile"].includes(K.attributes.schemeIdUri)}))&&(I=v.attributes.value),!I))return null;var L;l=b.J.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"))&&(L="PQ");v=b.J.id?b.ia.id+","+b.J.id:"";a.I.length&&q&&a.u.set(b.ia.id+","+q,am(b));b.J.ie&&bm(a,b.J.ie,B,b.presentationTimeline);B.endTime!=-1&&b.ia.id!=null&&b.J.id!=null&&((q=a.C.get(b.ia.id))?(q.endTime=B.endTime,
q.nf.includes(b.J.id)||q.nf.push(b.J.id),a.C.set(b.ia.id,q)):a.C.set(b.ia.id,{endTime:B.endTime,timeline:B.timeline,nf:[b.J.id]}));var Q=v&&a.o.has(v)?a.o.get(v):{id:a.Ga++,originalId:b.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){Q.segmentIndex&&(Q.segmentIndex.release(),Q.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:l,frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,
height:b.J.height,kind:d,encrypted:c.drmInfos.length>0,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.$.language,label:f,type:b.$.contentType,primary:g,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:w,channelsCount:b.J.fe,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:u,closedCaptions:k,hdr:L,colorGamut:void 0,videoLayout:void 0,tilesLayout:I,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Be(b.J.mimeType,
b.J.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};Q.createSegmentIndex=function(){var K;return D(function(N){if(N.h==1){if(Q.segmentIndex)return N.A(0);K=Q;return N.g(B.dc(),3)}K.segmentIndex=N.i;N.j()})};v&&b.Xa&&!a.o.has(v)&&(b=b.ia.id||"",a.F.has(b)||a.F.set(b,[]),a.o.set(v,Q),a.F.get(b).push(v));return Q}
function bm(a,b,c,d){if(!a.sa.has(b)){a.sa.add(b);var e=Ad(b,"presentationTime",Jd)||0,f=xd(b,"UTCTiming"),g;if(g=f&&f.attributes.schemeIdUri)f=f.attributes.schemeIdUri,g=!(f==="urn:mpeg:dash:utc:http-ntp:2014"||f==="urn:mpeg:dash:utc:ntp:2014"||f==="urn:mpeg:dash:utc:sntp:2014");g?b=(Ad(b,"wallClockTime",Dd)||0)*1E3:(b=Ad(b,"wallClockTime",Jd)||0,b=ul(b));c=new Date(b-e/c.timescale*1E3);e=c.getTime()/1E3;isNaN(e)||(d.u||d.Ug(e),d=(new Map).set("detail",{wallClockTime:b,programStartDate:c}),d=new wi("prft",
d),a.j.onEvent(d))}}function am(a){function b(c){if(!c)return null;c=jd(c);c.Uc=null;c.Pb=null;c.$b=Sd(c.$b);c.ie=null;return c}a=jd(a);a.ia=b(a.ia);a.$=b(a.$);a.J=b(a.J);a.Z&&(a.Z=jd(a.Z),a.Z.node=null);return a}
function yl(a){var b,c;return D(function(d){switch(d.h){case 1:return b=0,d.m(2),d.g(zl(a),4);case 4:b=d.i;d.o(3);break;case 2:if(c=d.l(),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();Al(a,b);d.j()}})}function Al(a,b){if(!(a.S<0)){var c=a.S;a.g.updatePeriod>=0&&(c=a.g.updatePeriod);a.M.ra(Math.max(c-b,La(a.Fa)))}}
function Tl(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,fe:null,audioSamplingRate:null,Va:0,me:1,encrypted:!1};d=d||c.Na;var e=b.attributes.id,f=b.attributes.supplementalId,g=td(b,"BaseURL"),h,k=!1;if(a.i)for(var l=t(g),m=l.next();!m.done;m=l.next()){var n=m.value;m=n.attributes.serviceLocation;n=vd(n);m&&n&&(hk(a.i,e,m,n),k=!0)}k&&a.i||(h=g.map(vd));var q=a.i;a=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;
m=Xj([b.attributes.codecs||c.codecs]).join(",");n=Ad(b,"frameRate",Md)||c.frameRate;var r=b.attributes.sar||c.pixelAspectRatio,u=cm(td(b,"InbandEventStream"),c.emsgSchemeIdUris),v=td(b,"AudioChannelConfiguration");v=dm(v)||c.fe;var w=Ad(b,"audioSamplingRate",Jd)||c.audioSamplingRate;a||(a=Zl(l,m));var x=xd(b,"SegmentBase"),y=xd(b,"SegmentTemplate"),z=x?Ad(x,"availabilityTimeOffset",Kd)||0:0,A=y?Ad(y,"availabilityTimeOffset",Kd)||0:0,F=g&&g.length?Ad(g[0],"availabilityTimeOffset",Kd)||0:0;z=c.Va+F+
z+A;A=null;(F=xd(b,"SegmentSequenceProperties"))&&(F=Ad(F,"cadence",Id))&&(A=F);F=b.attributes.label;var G=td(b,"Label");G&&G.length&&(G=G[0],ud(G)&&(F=ud(G)));return{Na:function(){return wc(d(),g.length?q&&k?ik(q,e):h?h:[]:[])},Uc:x||c.Uc,Pb:xd(b,"SegmentList")||c.Pb,$b:y||c.$b,ie:xd(b,"ProducerReferenceTime")||c.ie,width:Ad(b,"width",Jd)||c.width,height:Ad(b,"height",Jd)||c.height,contentType:a,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:r,emsgSchemeIdUris:u,id:f||e,originalId:e,language:b.attributes.lang,
fe:v,audioSamplingRate:w,Va:z,Ud:null,me:A||c.me,label:F||null,encrypted:!1}}function cm(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 dm(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))&&b>0&&b<c.length)return c[b]}}return null}
function $l(a){var b=a.Uc?1:0;b+=a.Pb?1:0;b+=a.$b?1:0;if(b==0)return a.contentType==Cc||a.contentType=="application"?!0:!1;b!=1&&(a.Uc&&(a.Pb=null),a.$b=null);return!0}
function em(a,b,c,d){var e,f,g,h,k,l,m;return D(function(n){if(n.h==1)return e=[nc(c)],f=wc(b(),e),g=Fi(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g,{isPreload:a.ya()}),zi(a.W,h),n.g(h.promise,2);k=n.i;if(d=="HEAD"){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=ec(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
function Kl(a,b,c){var d,e,f,g,h,k,l,m;return D(function(n){switch(n.h){case 1:d=c.map(function(q){return{scheme:q.attributes.schemeIdUri,value:q.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;n.m(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":Qa("NTP UTCTiming scheme is not supported");break;default:Qa("Unrecognized scheme in UTCTiming element",k)}n.A(9);break;case 7:return n.g(em(a,b,l,"HEAD"),10);case 10:return n.return(n.i);case 8:return n.g(em(a,b,l,"GET"),11);case 11:return n.return(n.i);case 9:n.o(3);
break;case 5:n.l();case 3:g=f.next();n.A(2);break;case 4:return Qa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
function Ul(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=Ad(d,"timescale",Jd)||1,k=Ad(d,"presentationTimeOffset",Jd)||0;d=t(td(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=Ad(l,"presentationTime",Jd)||0,n=Ad(l,"duration",Jd)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;c!=null&&(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:Rd(l),eventNode:Sd(l)},a.j.onTimelineRegionAdded(l))}}
function Ql(a,b,c,d,e){var f,g,h,k;return D(function(l){if(l.h==1)return f=Li,g=e?0:1,h=ck(b,c,d,a.g.retryParameters),l.g(Cl(a,h,f,{type:g}),2);k=l.i;return l.return(k.data)})}function Zl(a,b){b=Be(a,b);return Qe(b)?Cc:a.split("/")[0]}function Cl(a,b,c,d){d||(d={});d.isPreload=a.ya();b=a.j.networkingEngine.request(c,b,d);zi(a.W,b);return b.promise}
function Bl(a){var b=a.l.od;if(!a.l.be||!b||!a.I.length)return[];var c=Date.now()/1E3,d=a.I.filter(function(e){e=Jd(e.attributes.ttl);return!e||b+e>c}).map(vd).filter(bf);return d.length?wc(a.B,d):[]}function Hl(){return""}function Gl(a,b,c){return function(){return a&&b?ik(a,"BaseURL"):c.slice()}}E("shaka.dash.DashParser",xl);Lc("application/dash+xml",function(){return new xl});Lc("video/vnd.mpeg.dash.mpd",function(){return new xl});function fm(){}E("shaka.dependencies",fm);fm.has=function(a){return gm.has(a)};fm.add=function(a,b){if(!hm[a])throw Error(a+" is not supported");a==im?R("mux.js","mux.js is no longer used in Shaka Player."):gm.set(a,function(){return b})};var im="muxjs",hm={Bj:im,ISOBoxer:"ISOBoxer"};fm.Allowed=hm;var gm=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function jm(){}function km(a,b){var c=document.createElement("source");c.src=a;c.type=b===void 0?"":b;return c}function lm(a){for(var b=!1,c=a.getElementsByTagName("source"),d=c.length-1;d>=0;--d)a.removeChild(c[d]),b=!0;a.src&&(a.removeAttribute("src"),b=!0);return b}function mm(a){for(;a.firstChild;)a.removeChild(a.firstChild)}
function Pc(){if(nm)return nm;om||(om=new W(function(){nm=null}));(nm=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(nm=document.createElement("video"));om.ra(1);return nm}
function pm(a,b){var c,d,e,f,g;return D(function(h){if(h.h==1)return"fonts"in document&&"FontFace"in window?h.g(document.fonts.ready,2):h.return();if(!("entries"in document.fonts))return h.return();c=function(k){k=k.entries();for(var l=[],m=k.next();m.done===!1;)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&&f.display==="swap")return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);h.j()})}
E("shaka.util.Dom",jm);jm.removeAllChildren=mm;jm.clearSourceFromVideo=lm;var om=null,nm=null;function qm(){this.j=new jb(function(){for(var a=navigator.userAgent.toLowerCase(),b=t([{type:"VR",mf:/oculus|quest/},{type:"TV",mf:/smart[ _]?tv|android ?tv/},{type:"MOBILE",mf:/iphone|ipad|ipod|android/}]),c=b.next();!c.done;c=b.next())if(c=c.value,c.mf.test(a))return c.type;a=navigator.userAgentData;var d;b=(a==null?void 0:(d=a.platform)==null?void 0:d.toLowerCase())||"";if(a){if(a.mobile)return"MOBILE";if(b.includes("android"))return"TV"}return"DESKTOP"});this.l=new jb(function(){var a=navigator.userAgent;
return navigator.vendor.includes("Apple")&&(a.includes("Version/")||a.includes("OS/"))?"WEBKIT":a.includes("Edge/")?"EDGE":a.includes("Chrome/")?"CHROMIUM":a.includes("Firefox/")?"GECKO":"UNKNOWN"})}function Oc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}p=qm.prototype;p.Bb=function(){return!!navigator.mediaCapabilities};p.Ja=function(){return this.j.value()};p.va=function(){return this.l.value()};p.Rc=function(){return!1};p.pf=function(){return!1};
p.Vd=function(){return!1};p.Jg=function(){return!1};p.qf=function(){return!1};p.uc=function(){return!0};p.Za=function(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType};p.rd=function(){return!0};p.Ng=function(){return 0};p.Gb=function(){return Promise.resolve({width:Infinity,height:Infinity})};p.bh=function(){return!1};p.yf=function(){return!1};
p.Ha=function(a){var b=this.Ja();if(b==="TV"||b==="CONSOLE"||b==="CAST")a.ads.customPlayheadTracker=!0,a.ads.skipPlayDetection=!0,a.ads.supportsMultipleMediaElements=!1;return a};p.Ig=function(){return[]};p.Dc=function(a){return window.matchMedia!==void 0&&(window.matchMedia("(color-gamut: p3)").matches||window.matchMedia("(dynamic-range: high)").matches)?a?"HLG":"PQ":"SDR"};p.gh=function(){return!1};p.yg=function(){return!1};p.je=function(){return!1};p.qe=function(){return!0};p.zg=function(){return!1};
p.fh=function(){return!0};p.tc=function(){return!1};p.$e=function(a){return a==="com.apple.fps"};p.pe=function(){return!0};p.toString=function(){return"Device: "+this.ib()+" v"+this.ma()+"; Type: "+this.Ja()};function rm(){qm.call(this);this.g=new jb(function(){var a=navigator.userAgent.match(/Version\/(\d+)(?:\.(\d+))?/);a||(a=navigator.userAgent.match(/OS (\d+)(?:_(\d+))?/));return a?[parseInt(a[1],10),parseInt(a[2]||"0",10)]:[0,0]});this.h=new jb(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}ma(rm,qm);p=rm.prototype;p.ma=function(){return this.g.value()[0]};p.ib=function(){return"Apple Browser"};
p.Ja=function(){return this.h.value()};p.va=function(){return"WEBKIT"};p.Bb=function(){return!1};p.Rc=function(a,b){return!sm(this)&&b==="audio"};p.Vd=function(){return!sm(this)};p.Jg=function(a){return!sm(this)&&a==="audio"};p.Ha=function(a){qm.prototype.Ha.call(this,a);a.abr.minTimeToSwitch=.5;return a};p.gh=function(){return!0};p.pe=function(){return!1};function sm(a){a=a.g.value();return a[0]>=27?!0:a[0]===26&&a[1]>=4}
(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(lb=function(){return new rm});function tm(){if(!um())throw Error("Not a Chromecast device!");qm.call(this);this.h=new jb(function(){var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null});this.g=new jb(function(){var a=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;a=a.toLowerCase();return a.includes("android")?vm:a.includes("fuchsia")?wm:xm})}ma(tm,qm);p=tm.prototype;p.ma=function(){return this.h.value()};p.ib=function(){return"Chromecast with "+this.g.value()};
p.Ja=function(){return"CAST"};p.va=function(){return"CHROMIUM"};p.Bb=function(){return qm.prototype.Bb.call(this)&&this.g.value()!==xm};p.Za=function(){return qm.prototype.Za.call(this)&&this.g.value()!==xm};p.Ng=function(){switch(this.g.value()){case vm:return 0;case wm:return 3;default:return 1}};
p.Gb=function(){var a,b,c,d,e;return D(function(f){switch(f.h){case 1:a=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;b={width:1280,height:720};f.m(2);if(!(c=a)){f.A(4);break}return f.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:c=f.i;case 4:if(c){b.width=3840;b.height=2160;f.A(6);break}if(!(d=a)){f.A(7);break}return f.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:d=
f.i;case 7:d&&(b.width=1920,b.height=1080);case 6:f.o(3);break;case 2:e=f.l(),Pa("Failed to check canDisplayType:",e);case 3:return f.return(b)}})};p.Ha=function(a){qm.prototype.Ha.call(this,a);a.streaming.stallSkip=0;return a};p.tc=function(){return!0};function um(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}var vm="Android",wm="Fuchsia",xm="Linux";um()&&(lb=function(){return new tm});function ym(){qm.call(this);var a=this;this.i=new jb(function(){var b=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/);return b?parseInt(b[2],10):null});this.g=new jb(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"});this.h=new jb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?
navigator.platform.toLowerCase().includes("win32"):!1});this.u=new jb(function(){return qm.prototype.Za.call(a)?navigator.userAgent.match(/Edge?\//)?!a.h.value():!0:!1});this.o=new jb(function(){return navigator.userAgent.includes("sony.hbbtv.tv")});this.m=new jb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":navigator.userAgent.includes("Android")?!0:!1})}ma(ym,qm);p=ym.prototype;p.ma=function(){return this.i.value()};
p.ib=function(){return this.g.value()};p.Rc=function(a){return Yb(a)?this.g.value()==="Edge"&&this.h.value():!1};p.pf=function(){return this.g.value()==="Edge"&&this.h.value()};p.Vd=function(){return this.g.value()==="Edge"&&this.h.value()};p.Za=function(){return this.u.value()};
p.Ha=function(a){qm.prototype.Ha.call(this,a);if(this.h.value())switch(this.g.value()){case "Firefox":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case "Chrome":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}this.m.value()&&(a.drm.defaultAudioRobustnessForWidevine="",a.drm.defaultVideoRobustnessForWidevine="");
return a};p.je=function(){return this.g.value()==="Edge"||this.o.value()};p.tc=function(){if(this.va()==="GECKO"){var a=this.ma();return a!==null?a>=100:qm.prototype.tc.call(this)}return qm.prototype.tc.call(this)};p.$e=function(a){return this.va()==="GECKO"?a.startsWith("com.microsoft.playready.recommendation"):qm.prototype.$e.call(this,a)};nb=function(){return new ym};function zm(){qm.apply(this,arguments)}ma(zm,qm);p=zm.prototype;p.ma=function(){return null};p.ib=function(){return"Hisense"};p.Ja=function(){return"TV"};p.Bb=function(){return!1};p.Za=function(){return!1};p.Gb=function(){var a={width:1920,height:1080},b=null;if(window.Hisense_Get4KSupportState)try{b=window.Hisense_Get4KSupportState()}catch(c){}b==null&&(b=navigator.userAgent.includes("UHD"));b&&(a.width=3840,a.height=2160);return Promise.resolve(a)};
p.Ha=function(a){qm.prototype.Ha.call(this,a);a.streaming.stallSkip=0;return a};if(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))lb=function(){return new zm};function Am(){qm.call(this);this.g=new jb(function(){var a=navigator.userAgent.match(/PlayStation (\d+)/);return a?parseInt(a[1],10):null})}ma(Am,qm);p=Am.prototype;p.ib=function(){return"PlayStation"};p.Ja=function(){return"CONSOLE"};p.va=function(){return"WEBKIT"};p.ma=function(){return this.g.value()};p.Bb=function(){return!1};p.uc=function(){return!1};p.Za=function(){return!1};p.yf=function(){return this.ma()===4};
p.Gb=function(){var a,b,c,d,e;return D(function(f){switch(f.h){case 1:return a={width:1920,height:1080},b=!1,f.m(2),f.g(window.msdk.device.getDisplayInfo(),4);case 4:c=f.i;b=c.resolution==="4K";f.o(3);break;case 2:return f.l(),f.m(5),f.g(window.msdk.device.getDisplayInfoImmediate(),7);case 7:d=f.i;b=d.resolution==="4K";f.o(3);break;case 5:e=f.l(),Qa("PlayStation: Failed to get the display info:",e);case 3:return b&&(a.width=3840,a.height=2160),f.return(a)}})};
p.Ha=function(a){qm.prototype.Ha.call(this,a);this.ma()===4&&a.drm.preferredKeySystems.push("com.microsoft.playready");a.streaming.clearDecodingCache=!0;return a};p.je=function(){return this.ma()===4};p.qe=function(){return this.ma()!==4};navigator.userAgent.includes("PlayStation")&&(lb=function(){return new Am});function Bm(){qm.call(this);var a=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=a?parseInt(a[1],10):null;this.h=a?parseInt(a[2],10):null}ma(Bm,qm);p=Bm.prototype;p.ma=function(){return this.g};p.ib=function(){return"Tizen"};p.va=function(){return"CHROMIUM"};p.Ja=function(){return"TV"};p.Rc=function(){return!0};p.qf=function(){return this.ma()===3};p.Bb=function(){return!1};p.uc=function(){var a=this.ma();return a!==null?a>=4:qm.prototype.uc.call(this)};p.Za=function(){return!1};
p.rd=function(){return this.g&&this.h?this.g===5?this.h>=5:this.g>5:qm.prototype.rd.call(this)};
p.Gb=function(){var a=window.devicePixelRatio;a={width:window.screen.width*a>1920?3840:1920,height:window.screen.height*a>1080?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var b=webapis.systeminfo.getMaxVideoResolution();a.width=b.width;a.height=b.height}else 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(c){Qa("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};p.Ha=function(a){qm.prototype.Ha.call(this,a);a.drm.ignoreDuplicateInitData=this.ma()!==2;this.ma()===3&&(a.streaming.crossBoundaryStrategy="reset_to_encrypted");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;a.streaming.gapPadding=2;return a};p.Ig=function(){var a=[];this.g!==null&&this.g<5&&a.push("opus");return a};
p.Dc=function(a){try{if(webapis.avinfo.isHdrTvSupport())return a?"HLG":"PQ"}catch(b){return qm.prototype.Dc.call(this,a)}return"SDR"};p.yg=function(){return!0};p.zg=function(){return this.ma()===3};navigator.userAgent.includes("Tizen")&&(lb=function(){return new Bm});function Cm(){qm.apply(this,arguments)}ma(Cm,qm);Cm.prototype.ma=function(){return null};Cm.prototype.ib=function(){return"Vizio"};Cm.prototype.Ja=function(){return"TV"};Cm.prototype.Bb=function(){return!1};navigator.userAgent.includes("VIZIO SmartCast")&&(lb=function(){return new Cm});function Dm(){qm.call(this);this.i=new jb(function(){return navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")});this.h=new jb(function(){return navigator.userAgent.includes("SOPOpenBrowser")});this.g=new jb(function(){if(navigator.userAgent.includes("DT_STB_BCM"))return 11;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})}ma(Dm,qm);p=Dm.prototype;p.ma=function(){return this.g.value()};
p.ib=function(){return"WebKit STB"};p.Ja=function(){return"TV"};p.va=function(){return"WEBKIT"};p.Bb=function(){return!1};p.uc=function(){var a=this.g.value();return a!==null?a>=15:!0};p.Rc=function(){return this.h.value()};p.Gb=function(){return Promise.resolve({width:window.screen.width*window.devicePixelRatio,height:window.screen.height*window.devicePixelRatio})};p.qe=function(){return!this.i.value()};p.pe=function(){return!1};
if(navigator.userAgent.includes("SOPOpenBrowser")||navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))lb=function(){return new Dm};function Em(){qm.call(this);var a=this;this.h=Fm();this.g=null;try{var b=new PalmServiceBridge;b.onservicecallback=function(c){c=JSON.parse(c);var d,e,f,g;a.g=(g=(f=(d=c.configs)==null?void 0:d["tv.model.supportHDR"])!=null?f:(e=c.configs)==null?void 0:e["tv.config.supportDolbyHDRContents"])!=null?g:!1};b.call("luna://com.webos.service.config/getConfigs",JSON.stringify({configNames:["tv.model.supportHDR","tv.config.supportDolbyHDRContents"]}))}catch(c){Qa("WebOS: getConfigs call failed",c)}}
ma(Em,qm);p=Em.prototype;p.ma=function(){return this.h};p.ib=function(){return"WebOS"};p.Ja=function(){return"TV"};p.va=function(){return"CHROMIUM"};p.Bb=function(){return!1};p.uc=function(){var a=this.ma();return a!==null?a>3:qm.prototype.uc.call(this)};p.Za=function(){return!1};p.rd=function(){var a=this.ma();return a!==null?a>3:qm.prototype.rd.call(this)};
p.Gb=function(){var a={width:1920,height:1080};try{var b=JSON.parse(window.PalmSystem.deviceInfo);a.width=Math.max(1920,b.screenWidth);a.height=Math.max(1080,b.screenHeight)}catch(c){Qa("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};p.Ha=function(a){qm.prototype.Ha.call(this,a);this.ma()===3&&(a.streaming.crossBoundaryStrategy="reset");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;return a};
p.Dc=function(a){return this.g==null?(Qa("WebOS: getConfigs call haven't finished"),qm.prototype.Dc.call(this,a)):this.g?a?"HLG":"PQ":"SDR"};function Fm(){var a=null,b=navigator.userAgent.match(/Chrome\/(\d+)/);b&&(a=parseInt(b[1],10));switch(a){case 38:return 3;case 53:return 4;case 68:return 5;case 79:return 6;case 87:return 22;case 94:return 23;case 108:return 24;case 120:return 25;default:return null}}p.fh=function(){return!1};p.tc=function(){var a=this.ma();return a!==null?a>=6:qm.prototype.tc.call(this)};
if(navigator.userAgent.includes("Web0S")){var Gm=new Em;lb=function(){return Gm}};function Hm(){qm.call(this);this.g=navigator.userAgent.includes("Edge/");var a=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=a?parseInt(a[1],10):null}ma(Hm,qm);p=Hm.prototype;p.ma=function(){return this.h};p.ib=function(){return"Xbox"};p.Ja=function(){return"CONSOLE"};p.va=function(){return this.g?"EDGE":"CHROMIUM"};p.Rc=function(){return!0};p.pf=function(){return!0};p.Vd=function(){return!0};p.bh=function(){return this.g};
p.Gb=function(){var a={width:1920,height:1080},b=Im();if(b)try{var c=new b.Media.Protection.ProtectionCapabilities,d=b.Media.Protection.ProtectionCapabilityResult;b=null;do b=c.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(b===d.maybe);b===d.probably&&(a.width=3840,a.height=2160)}catch(e){Qa("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
p.Ha=function(a){qm.prototype.Ha.call(this,a);a.drm.parseInbandPsshEnabled=this.g;a.drm.preferredKeySystems.push("com.microsoft.playready");this.g&&(a.streaming.gapPadding=.01);return a};p.je=function(){return!0};function Im(){var a=null;try{a=typeof Windows!=="undefined"?Windows:chrome.webview.hostObjects.sync.Windows}catch(b){}return a}if(navigator.userAgent.includes("Xbox One")||Im()!==null)lb=function(){return new Hm};function Jm(a){this.g=!1;this.h=new oi;this.i=a}Jm.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 Km(a,b){if(a.g){if(b instanceof V&&b.code==7003)throw b;throw new V(2,7,7003,b);}};function Lm(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 Mm(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Nm(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 Om(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Pm(a){var b=this;this.D=a;this.j=this.B=null;this.O=!1;this.K=0;this.g=null;this.o=new eb;this.i=new Map;this.W=[];this.C=new Map;this.L=!1;this.l=new oi;this.h=null;this.u=function(c){c.severity==2&&b.l.reject(c);a.onError(c)};this.X=new Map;this.ha=new Map;this.M=new W(function(){return Qm(b)});this.aa=!1;this.N=[];this.ka=!1;this.F=new W(function(){Rm(b)});this.l.catch(function(){});this.m=new Jm(function(){return Sm(b)});this.Y=!1;this.G=this.I=null;this.S=function(){return!1}}p=Pm.prototype;
p.destroy=function(){return this.m.destroy()};function Sm(a){var b;return D(function(c){switch(c.h){case 1:return a.o.release(),a.o=null,a.l.reject(),a.F.stop(),a.F=null,a.M.stop(),a.M=null,c.g(Tm(a),2);case 2:if(!a.j){c.A(3);break}c.m(4);return c.g(a.j.setMediaKeys(null),6);case 6:c.o(5);break;case 4:b=c.l(),Qa("DrmEngine.destroyNow_ exception",b);case 5:a.j=null;case 3:a.g=null,a.B=null,a.C=new Map,a.h=null,a.u=function(){},a.D=null,a.Y=!1,a.I=null,c.j()}})}
p.configure=function(a,b){this.h=a;b&&(this.S=b);this.F&&this.O&&this.g&&this.F.Aa(this.h.updateExpirationTime)};function Um(a,b,c,d){d=d===void 0?!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.h.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.aa=a.C.size>0;return Vm(a,b,d)}
function Vm(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,x,y,z,A;return D(function(F){if(F.h==1){Wm(a.h.clearKeys,b);d=b.some(function(G){return G.video&&G.video.drmInfos.length||G.audio&&G.audio.drmInfos.length?!0:!1});e=Nm(a.h.servers);f=Nm(a.h.advanced||{});!d&&c&&Xm(b,e);g=new WeakSet;h=t(b);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Ym(l),n=t(m),q=n.next();!q.done;q=n.next())r=q.value,g.has(r)||(g.add(r),Zm(r,e,f,a.h.keySystemsMapping));u=function(G,B){var H=[];G=t(G);for(var J=G.next();!J.done;J=
G.next()){J=J.value;var O=J[B]||f.has(J.keySystem)&&f.get(J.keySystem)[B]||"";O==""&&Xb(J.keySystem)&&(B=="audioRobustness"?O=[a.h.defaultAudioRobustnessForWidevine]:B=="videoRobustness"&&(O=[a.h.defaultVideoRobustnessForWidevine]));if(typeof O==="string")H.push(J);else if(Array.isArray(O)){O.length===0&&(O=[""]);O=t(O);for(var M=O.next();!M.done;M=O.next()){var I={};H.push(Object.assign({},J,(I[B]=M.value,I)))}}}return H};v=new WeakSet;w=t(b);for(x=w.next();!x.done;x=w.next())y=x.value,y.video&&
!v.has(y.video)&&(y.video.drmInfos=u(y.video.drmInfos,"videoRobustness"),y.video.drmInfos=u(y.video.drmInfos,"audioRobustness"),v.add(y.video)),y.audio&&!v.has(y.audio)&&(y.audio.drmInfos=u(y.audio.drmInfos,"videoRobustness"),y.audio.drmInfos=u(y.audio.drmInfos,"audioRobustness"),v.add(y.audio));return F.g(xf(b,a.aa,a.Y,a.h.preferredKeySystems),2)}Km(a.m);z=d||e.size>0;if(!z)return a.O=!0,F.return(Promise.resolve());A=$m(a,b);return F.return(d?A:A.catch(function(){}))})}
function an(a){var b;return D(function(c){switch(c.h){case 1:if(a.j.mediaKeys)return c.return();if(!a.I){c.A(2);break}return c.g(a.I,3);case 3:return Km(a.m),c.return();case 2:return c.m(4),a.I=a.j.setMediaKeys(a.B),c.g(a.I,6);case 6:c.o(5);break;case 4:b=c.l(),a.u(new V(2,6,6003,b.message));case 5:Km(a.m),c.j()}})}function bn(a,b){return D(function(c){if(c.h==1)return c.g(an(a),2);cn(a,b.initDataType,S(b.initData));c.j()})}
p.Eb=function(a){var b=this,c,d;return D(function(e){if(e.h==1){if(b.j===a)return e.return();if(!b.B)return b.o.La(a,"encrypted",function(){b.u(new V(2,6,6010))}),e.return();b.j=a;b.h.delayLicenseRequestUntilPlayed&&b.o.La(b.j,"play",function(){for(var f=t(b.N),g=f.next();!g.done;g=f.next())dn(b,g.value);b.ka=!0;b.N=[]});b.j.remote?(b.o.H(b.j.remote,"connect",function(){return Tm(b)}),b.o.H(b.j.remote,"connecting",function(){return Tm(b)}),b.o.H(b.j.remote,"disconnect",function(){return Tm(b)})):
"webkitCurrentPlaybackTargetIsWireless"in b.j&&b.o.H(b.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Tm(b)});b.G=b.g?b.g.initData.find(function(f){return f.initData.length>0})||null:null;c=b.g.keySystem;return(d=P().$e(c))||!b.G&&b.g.keySystem==="com.apple.fps"&&!b.C.size?e.A(2):e.g(an(b),2)}en(b).catch(function(){});!d&&(b.G||b.C.size||b.h.parseInbandPsshEnabled)||b.o.H(b.j,"encrypted",function(f){return bn(b,f)});e.j()})};
function fn(a){var b,c,d,e,f;return D(function(g){switch(g.h){case 1:if(!a.B||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.A(2);break}b=Fi([a.g.serverCertificateUri],a.h.retryParameters);g.m(3);c=a.D.kc.request(5,b,{isPreload:a.S()});return g.g(c.promise,5);case 5:d=g.i;a.g.serverCertificate=S(d.data);g.o(4);break;case 3:throw e=g.l(),new V(2,6,6017,e);case 4:if(a.m.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
g.m(6);return g.g(a.B.setServerCertificate(a.g.serverCertificate),8);case 8:g.o(0);break;case 6:throw f=g.l(),new V(2,6,6004,f.message);}})}
function en(a){var b,c,d,e,f;return D(function(g){if(g.h==1){if(!a.C.size)return g.A(2);a.C.forEach(function(h,k){gn(a,k,h)});return g.g(a.l,3)}if(g.h!=2){b=a.g&&a.g.keyIds||new Set([]);if(b.size>0&&hn(a))return g.return(a.l);a.L=!1;a.l=new oi;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,cn(a,f.initDataType,f.initData);jn(a)&&a.l.resolve();return g.return(a.l)})}
function cn(a,b,c){if(c.length){try{c=a.h.initDataTransform(c,b,a.g)}catch(g){b=g;g instanceof V||(b=new V(2,6,6016,g));a.u(b);return}if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Nb(c,e.value.initData))return;var f=!1;a.C.forEach(function(g){!f&&Nb(c,g.initData)&&(f=!0)});if(f)return}a.L=!0;a.i.size>0&&jn(a)&&(a.l.resolve(),a.L=!1,a.l=new oi,a.l.catch(function(){}));kn(a,b,c,a.g.sessionType)}}
p.Oe=function(){var a=this,b=this.i.keys();b=Lm(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)};p.Pe=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};function ln(a){return a.K?a.K:NaN}p.Pd=function(){return Om(this.ha)};
function $m(a,b){var c,d,e,f,g,h,k;return D(function(l){switch(l.h){case 1:c=new Map;d=mn(a,b,c);if(!d){if(!navigator.requestMediaKeySystemAccess)throw new V(2,6,6020);throw new V(2,6,6001);}Km(a.m);l.m(2);d.getConfiguration();e=a.h.keySystemsMapping[d.keySystem]||d.keySystem;a.g=nn(a,e,c.get(e));if(!a.g.licenseServerUri)throw new V(2,6,6012,a.g.keySystem);return l.g(d.createMediaKeys(),4);case 4:f=l.i;Km(a.m);a.B=f;if(!(a.h.minHdcpVersion!=""&&"getStatusForPolicy"in a.B)){l.A(5);break}l.m(6);return l.g(a.B.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),
8);case 8:g=l.i;if(g!="usable")throw new V(2,6,6018);Km(a.m);l.o(5,2);break;case 6:h=l.l(2);if(h instanceof V)throw h;throw new V(2,6,6019,h.message);case 5:return a.O=!0,a.F.Aa(a.h.updateExpirationTime),l.g(fn(a),9);case 9:Km(a.m);l.o(0);break;case 2:k=l.l();Km(a.m,k);a.g=null;if(k instanceof V)throw k;throw new V(2,6,6002,k.message);}})}
function mn(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(Ym(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(c.size==1&&c.has(""))throw new V(2,6,6E3);d=a.h.preferredKeySystems;d.length||(e=Nm(a.h.servers),e.size==1&&(d=Array.from(e.keys())));e=t(d);var g=e.next();for(f={};!g.done;f={Hg:void 0},g=e.next()){f.Hg=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(q){return q.supported&&
q.keySystemAccess!=null&&q.keySystemAccess.keySystem==n.Hg}}(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.h.keySystemsMapping[l]&&(m=c.get(a.h.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 on(a){jn(a)&&a.l.resolve()}function pn(a,b){(new W(function(){b.loaded=!0;on(a)})).ra(vn)}
function gn(a,b,c){var d,e,f,g,h,k,l;D(function(m){switch(m.h){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.o.H(d,"message",function(n){wn(a)?a.N.push(n):dn(a,n)});a.o.H(d,"keystatuseschange",function(n){return xn(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,df:Infinity,Db:null,type:"persistent-license"};a.i.set(d,f);m.m(2);return m.g(d.load(b),4);case 4:return g=m.i,Km(a.m),g||(a.i.delete(d),
h=a.h.persistentSessionOnlinePlayback?1:2,a.u(new V(h,6,6013)),f.loaded=!0),pn(a,f),on(a),m.return(d);case 2:k=m.l(),Km(a.m,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.u(new V(l,6,6005,k.message)),f.loaded=!0,on(a);case 3:return m.return(Promise.resolve())}})}
function kn(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.u(new V(2,6,6005,f.message));return}a.o.H(e,"message",function(f){wn(a)?a.N.push(f):dn(a,f)});a.o.H(e,"keystatuseschange",function(f){return xn(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,df:Infinity,Db:null,type:d});a.h.logLicenseExchange&&qc(c);e.generateRequest(b,c).catch(function(f){if(!a.m.g){a.i.delete(e);var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;h<0&&(h+=4294967296);h="0x"+h.toString(16)}a.u(new V(2,6,6006,
f.message,f,h))}})}function wn(a){return a.j?a.h.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.ka:a.h.delayLicenseRequestUntilPlayed}function yn(a){return D(function(b){return b.h==1?!a.L||wn(a)?b.A(0):b.g(a.l,3):b.g(Promise.all(a.W.map(function(c){return c.promise})),0)})}
function dn(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,x;D(function(y){switch(y.h){case 1:c=b.target;a.h.logLicenseExchange&&qc(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];b.messageType=="individualization-request"&&f&&f.individualizationServer&&(e=f.individualizationServer);g=Fi([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&
f.headers)for(h in f.headers)g.headers[h]=f.headers[h];if(Wb(a.g.keySystem)){var z=g,A=a.g;try{var F=ic(z.body);if(F){var G=JSON.parse(F);G.type||(G.type=A.sessionType,z.body=jc(JSON.stringify(G)))}}catch(B){}}if(Yb(a.g.keySystem))if(z=fc(g.body,!0,!0),z.includes("PlayReadyKeyMessage")){z=md(z,"PlayReadyKeyMessage");A=wd(z,"HttpHeader");A=t(A);for(F=A.next();!F.done;F=A.next())G=F.value,F=wd(G,"name")[0],G=wd(G,"value")[0],g.headers[ud(F)]=ud(G);z=wd(z,"Challenge")[0];g.body=rc(ud(z))}else g.headers["Content-Type"]=
"text/xml; charset=utf-8";k=Date.now();y.m(2);m=a.D.kc.request(2,g,{isPreload:a.S()});a.W.push(m);return y.g(m.promise,4);case 4:l=y.i;Xa(a.W,m);y.o(3);break;case 2:n=y.l();if(a.m.g)return y.return();q={sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType};r=new V(2,6,6007,n,q);a.i.size==1?(a.u(r),d&&d.Db&&d.Db.reject(r)):(d&&d.Db&&d.Db.reject(r),a.i.delete(c),jn(a)&&(a.l.resolve(),a.M.ra(.1)));return y.return();case 3:if(a.m.g)return y.return();a.K+=(Date.now()-
k)/1E3;a.h.logLicenseExchange&&qc(l.data);y.m(5);return y.g(c.update(l.data),7);case 7:y.o(6);break;case 5:return v=(u=y.l())&&u.message||String(u),w=new V(2,6,6008,v),a.u(w),d&&d.Db&&d.Db.reject(w),y.return();case 6:if(a.m.g)return y.return();x=new wi("drmsessionupdate");a.D.onEvent(x);d&&(d.Db&&d.Db.resolve(),pn(a,d));y.j()}})}
function xn(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if(typeof g=="string"){var h=g;g=f;f=h}h=P();if(Yb(a.g.keySystem)&&g.byteLength==16&&h.je()){h=Sb(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)}f!="status-pending"&&(c.loaded=!0);f=="expired"&&(d=!0);g=tc(g).slice(0,32);a.X.set(g,f)});var e=b.expiration-Date.now();(e<0||d&&e<1E3)&&c&&!c.Db&&(a.i.delete(b),zn(b));jn(a)&&(a.l.resolve(),
a.M.ra(An))}function Qm(a){var b=a.X,c=a.ha;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return d=="expired"})&&a.u(new V(2,6,6014));a.D.Eg(Om(c))}
function Bn(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,x,y,z,A,F,G,B,H,J,O,M,I;return D(function(L){if(L.h==1){a="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead 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 L.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"]};q=[null,"cenc","cbcs"];r=new Map;u=P();v=function(Q,K,N){var T,U,ja,Ba,$a,Na,ab,Ab,Pb,mb,Da,Jb,kc;return D(function(ua){switch(ua.h){case 1:return ua.m(2),ua.g(K.createMediaKeys(),5);case 5:T=ua.i;case 4:ua.o(3);break;case 2:return ua.l(),ua.return();case 3:ja=(U=K.getConfiguration().sessionTypes)?U.includes("persistent-license"):
!1;u.zg()&&(ja=!1);Ba=K.getConfiguration().videoCapabilities;$a=K.getConfiguration().audioCapabilities;Na={persistentState:ja,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};r.get(Q)?Na=r.get(Q):r.set(Q,Na);(ab=Ba[0].encryptionScheme)&&!Na.encryptionSchemes.includes(ab)&&Na.encryptionSchemes.push(ab);(Ab=Ba[0].robustness)&&!Na.videoRobustnessLevels.includes(Ab)&&Na.videoRobustnessLevels.push(Ab);(Pb=$a[0].robustness)&&!Na.audioRobustnessLevels.includes(Pb)&&
Na.audioRobustnessLevels.push(Pb);if(!(N&&"getStatusForPolicy"in T)){ua.A(0);break}mb=t(f);Da=mb.next();case 7:if(Da.done){ua.A(0);break}Jb=Da.value;if(Na.minHdcpVersions.includes(Jb)){ua.A(8);break}return ua.g(T.getStatusForPolicy({minHdcpVersion:Jb}),10);case 10:if(kc=ua.i,kc=="usable")Na.minHdcpVersions.includes(Jb)||Na.minHdcpVersions.push(Jb);else{ua.A(0);break}case 8:Da=mb.next(),ua.A(7)}})};w=function(Q,K,N,T,U){U=U===void 0?!1:U;var ja,Ba,$a,Na,ab,Ab,Pb,mb,Da,Jb,kc;return D(function(ua){switch(ua.h){case 1:ua.m(2);
ja=id(n);Ba=t(ja.videoCapabilities);for($a=Ba.next();!$a.done;$a=Ba.next())Na=$a.value,Na.encryptionScheme=K,Na.robustness=N;ab=t(ja.audioCapabilities);for(Ab=ab.next();!Ab.done;Ab=ab.next())Pb=Ab.value,Pb.encryptionScheme=K,Pb.robustness=T;mb=id(ja);mb.persistentState="required";mb.sessionTypes=["persistent-license"];Da=[mb,ja];kc=P();return kc.Ja()=="MOBILE"?ua.g(cf(5,navigator.requestMediaKeySystemAccess(Q,Da)),7):ua.g(navigator.requestMediaKeySystemAccess(Q,Da),6);case 6:Jb=ua.i;ua.A(5);break;
case 7:Jb=ua.i;case 5:return ua.g(v(Q,Jb,U),8);case 8:ua.o(0);break;case 2:ua.l(),ua.j()}})};x=function(Q){return P().va()==="WEBKIT"&&Wb(Q)?!1:!0};y=[];z=t(a);for(A=z.next();!A.done;A=z.next())if(F=A.value,r.set(F,null),x(F)){G=!0;B=t(q);for(H=B.next();!H.done;H=B.next())J=H.value,y.push(w(F,J,"","",G)),G=!1;O=t(k[F]||[]);for(M=O.next();!M.done;M=O.next())I=M.value,y.push(w(F,null,I,"")),y.push(w(F,null,"",I))}return L.g(Promise.all(y),2)}return L.return(Om(r))})}
function zn(a){return D(function(b){if(b.h==1)return b.m(2),b.g(cf(Cn,Promise.all([a.close().catch(function(){}),a.closed])),4);if(b.h!=2)return b.o(0);b.l();b.j()})}
function Tm(a){var b;return D(function(c){b=Array.from(a.i.entries());a.i.clear();return c.g(Promise.all(b.map(function(d){d=t(d);var e=d.next().value;var f=d.next().value;return D(function(g){if(g.h==1)return g.m(2),a.C.has(e.sessionId)||f.type!=="persistent-license"||a.h.persistentSessionOnlinePlayback?g.g(zn(e),5):g.g(e.remove(),5);if(g.h!=2)return g.o(0);g.l();g.j()})})),0)})}function Ym(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
function Rm(a){a.i.forEach(function(b,c){var d=b.df,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.df=e)})}function jn(a){a=a.i.values();return Mm(a,function(b){return b.loaded})}function hn(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if(a.X.get(c.value)!=="usable")return!1;return!0}
function Xm(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 nn(a,b,c){var d=[],e=[],f=[],g=[],h=[],k=new Set,l=new Set;Dn(c,d,e,g,f,h,k,l);a=a.aa?"persistent-license":"temporary";b={keySystem:b,encryptionScheme:d[0],licenseServerUri:e[0],distinctiveIdentifierRequired:c[0].distinctiveIdentifierRequired,persistentStateRequired:c[0].persistentStateRequired,sessionType:c[0].sessionType||a,audioRobustness:c[0].audioRobustness||"",videoRobustness:c[0].videoRobustness||"",serverCertificate:g[0],serverCertificateUri:f[0],initData:h,keyIds:k,mediaTypes:c[0].mediaTypes};
l.size>0&&(b.keySystemUris=l);c=t(c);for(l=c.next();!l.done;l=c.next())l=l.value,l.distinctiveIdentifierRequired&&(b.distinctiveIdentifierRequired=l.distinctiveIdentifierRequired),l.persistentStateRequired&&(b.persistentStateRequired=l.persistentStateRequired);return b}
function Dn(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={Ca:void 0},l=a.next()){m.Ca=l.value;b.includes(m.Ca.encryptionScheme)||b.push(m.Ca.encryptionScheme);Wb(m.Ca.keySystem)&&m.Ca.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Ca.licenseServerUri)||k.push(m.Ca.licenseServerUri):c.includes(m.Ca.licenseServerUri)||c.push(m.Ca.licenseServerUri);e.includes(m.Ca.serverCertificateUri)||e.push(m.Ca.serverCertificateUri);m.Ca.serverCertificate&&(d.some(function(r){return function(u){return Nb(u,
r.Ca.serverCertificate)}}(m))||d.push(m.Ca.serverCertificate));if(m.Ca.initData){l=t(m.Ca.initData);for(var n=l.next(),q={};!n.done;q={We:void 0},n=l.next())q.We=n.value,f.some(function(r){return function(u){var v=r.We;return u.keyId&&u.keyId==v.keyId?!0:u.initDataType==v.initDataType&&Nb(u.initData,v.initData)}}(q))||f.push(q.We)}if(m.Ca.keyIds)for(l=t(m.Ca.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Ca.keySystemUris&&h)for(m=t(m.Ca.keySystemUris),l=m.next();!l.done;l=m.next())h.add(l.value)}if(k.length==
1)c.push(k[0]);else if(k.length>0){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,C(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}}
function Zm(a,b,c,d){var e=a.keySystem;if(e&&(!Wb(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__&&e=="com.microsoft.playready"&&(a.keySystem="com.chromecast.playready")}}function Wm(a,b){a=Nm(a);if(a.size!=0){a=yc(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 Cn=1,vn=5,An=.5;function En(){this.g=Fn;this.j=(new Map).set(Fn,2).set(Gn,1);this.i=0;this.h=-1}function Hn(a,b){var c=a.g!==b;a.g=b;c&&b===Fn&&(a.i=Date.now());return c}var Gn=0,Fn=1;function In(a){var b=[];if(!(a.encrypted&&a.drmInfos.length>0))return new Uint8Array([]);a=t(a.drmInfos);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.initData){c=t(c.initData);for(var d=c.next();!d.done;d=c.next())b.push(d.value.initData)}return uc.apply(oc,C(b))}function Jn(a){for(var b=[],c=3;c>=0;c--)b.push(a>>8*c&255);return b}function Kn(a){for(var b=0,c=0;c<a.length;c+=1)b|=a.charCodeAt(c)<<(a.length-c-1)*8;return b}
function Ln(a){var b=Aa.apply(1,arguments),c=Mn.get(a);c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Mn.set(a,c));for(var d=8,e=b.length-1;e>=0;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 Mn=new Map;function Nn(a){a=S(a);var b=null;(new ah).boxes(["moov","trak","mdia","minf","stbl"],fh).ba("stsd",hh).box("enca",function(c){b=c.reader.h;return jh(c)}).box("sinf",fh).box("frma",function(c){c.parser.stop();ph(c.reader).codec==="ec-3"&&b&&b.getUint16(16)!==2&&b.setUint16(16,2)}).parse(a);return a}
function On(a,b,c){var d=b=S(b),e=!1,f,g=[],h=[];(new ah).boxes(["moov","trak","mdia","minf","stbl"],function(l){g.push(l);fh(l)}).ba("stsd",function(l){f=l;g.push(l);hh(l)}).boxes(["encv","enca"],function(l){e=!0;l.parser.stop()}).boxes("dvav dva1 dvh1 dvhe dvc1 dvi1 hev1 hvc1 avc1 avc3".split(" "),function(l){h.push({box:l,Ag:1701733238})}).boxes("ac-3 ec-3 ac-4 Opus fLaC mp4a".split(" "),function(l){h.push({box:l,Ag:1701733217})}).parse(b);if(e)return b;if(h.length==0||!f)throw Va(tc(b)),new V(2,
3,3019,c);h.reverse();c=t(h);for(var k=c.next();!k.done;k=c.next())k=k.value,d=Pn(a,d,f,k.box,g,k.Ag);d=Qn(a,d);return P().pf()?(a=new Uint8Array(b.byteLength+d.byteLength),a.set(d),a.set(b,d.byteLength),a):d}function Rn(a){a=S(a);var b=[];(new ah).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(Sn(a.subarray(e?e.start+e.size:0,f.start+f.size)))}return uc.apply(oc,C(c))}
function Sn(a){var b,c,d,e,f=[];(new ah).boxes(["moof","traf"],function(m){f.push(m);fh(m)}).ba("tfhd",function(m){b=m;d=lh(m.reader,m.flags)}).ba("trun",function(m){c=m;e=oh(m.reader,m.version,m.flags)}).parse(a);if(d&&d.Mg!==2){var g=b.start+gh(b)+4+(d.yh!==null?8:0),h=Sb(a);if(d.Mg!==null)h.setUint32(g,2);else{Tn(a,b.start,b.size+4);var k=h.getUint32(b.start+8);h.setUint32(b.start+8,k|2);e&&e.Me!==null&&h.setInt32(c.start+gh(c)+4,e.Me+4);k=a.subarray(0,g);h=a.subarray(g);a=new Uint8Array(a.byteLength+
4);a.set(k);k=[];for(var l=3;l>=0;l--)k.push(2>>8*l&255);a.set(new Uint8Array(k),g);a.set(h,g+4);g=t(f);for(h=g.next();!h.done;h=g.next())h=h.value,Tn(a,h.start,h.size+4)}}return a}
function Pn(a,b,c,d,e,f){var g=new Uint8Array([].concat(C(Jn(Kn(d.name.split(".")[0])))));g=Ln("frma",g);var h="cenc";var k=a.drmInfos[0];k&&k.encryptionScheme&&(h=k.encryptionScheme);h=new Uint8Array([0,0,0,0].concat(C(Jn(Kn(h))),[0,1,0,0]));h=Ln("schm",h);k=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.drmInfos);for(var l=a.next();!l.done;l=a.next())if((l=l.value)&&l.keyIds&&l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){k=m.value;m=new Uint8Array(k.length/2);for(var n=
0;n<k.length/2;n+=1)m[n]=parseInt(String(k[n*2]+k[n*2+1]),16);k=m}}a=new Uint8Array([0,0,0,0,0,0,1,8]);a=Ln("tenc",a,k);a=Ln("schi",a);h=Ln("sinf",g,h,a);a=b.subarray(d.start,d.start+d.size);g=new Uint8Array(d.size+h.byteLength);g.set(a,0);Sb(g).setUint32(4,f);g.set(h,d.size);Tn(g,0,g.byteLength);f=new Uint8Array(b.byteLength+g.byteLength);d=P().Vd()?d.start:d.start+d.size;h=b.subarray(d);f.set(b.subarray(0,d));f.set(g,d);f.set(h,d+g.byteLength);b=t(e);for(e=b.next();!e.done;e=b.next())e=e.value,
Tn(f,e.start,e.size+g.byteLength);b=Sb(f,c.start);c=gh(c);e=b.getUint32(c);b.setUint32(c,e+1);return f}function Qn(a,b){a=In(a);if(a.byteLength===0)return b;var c=0,d=0;(new ah).box("moov",function(h){c=h.start;d=h.size;h.parser.stop()}).parse(b);var e=c+d;Tn(b,c,d+a.byteLength);var f=new Uint8Array(b.byteLength+a.byteLength),g=b.subarray(e);f.set(b.subarray(0,e));f.set(a,e);f.set(g,e+a.byteLength);return f}
function Tn(a,b,c){a=Sb(a,b);b=a.getUint32(0);b!=0&&(b==1?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}function Un(a){var b=S(a),c=[];(new ah).boxes(["moov","trak","mdia","minf","stbl"],function(d){c.push({start:d.start,size:d.size});fh(d)}).box("stsd",function(d){c.push({start:d.start,size:d.size});for(var e=Sb(b,d.start),f=0;f<d.size-3;f++){var g=e.getUint32(f);g==1633889587?e.setUint32(f,1700998451):g==1684103987&&e.setUint32(f,1684366131)}}).parse(b);return b};function Vn(a){return a.length==1&&a.end(0)-a.start(0)<1E-4}function Wn(a){return!a||Vn(a)?null:a.length==1&&a.start(0)<0?0:a.length?a.start(0):null}function Xn(a){return!a||Vn(a)?null:a.length?a.end(a.length-1):null}function Yn(a,b){return!a||!a.length||Vn(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Zn(a,b){if(!a||!a.length||Vn(a))return 0;var c=0;a=t($n(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 ao(a,b,c){if(!a||!a.length||Vn(a))return null;a=$n(a).findIndex(function(d,e,f){return d.start>b&&(e==0||f[e-1].end-b<=c)});return a>=0?a:null}function $n(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 bo(a,b,c,d){var e=this;this.u=d;this.g=a;this.D=b;this.h=c;this.l=new eb;this.o=!1;this.m=0;this.C=!1;this.G=this.F=0;this.j=co(this);this.B=!1;this.l.H(a,"waiting",function(){return eo(e)});this.i=(new W(function(){eo(e)})).Aa(this.h.gapJumpTimerTime)}bo.prototype.release=function(){this.l&&(this.l.release(),this.l=null);this.i!=null&&(this.i.stop(),this.i=null);this.j&&(this.j.release(),this.j=null);this.g=this.D=this.u=null};
bo.prototype.Jc=function(){this.B=!0;this.i&&this.i.Aa(this.h.gapJumpTimerTime);eo(this)};
function eo(a){if(a.g.readyState!=0){if(a.g.seeking){if(!a.o)return}else a.o=!1;if(!a.g.paused||a.g.currentTime==a.m&&(a.g.autoplay||a.g.currentTime!=a.m))if(!a.j||!fo(a.j)){var b=a.g.currentTime,c=a.g.buffered,d=ao(c,b,a.h.gapDetectionThreshold);if(d==null&&a.j&&!fo(a.j))for(var e=$n(c),f=0;f<e.length-1;f++)if(Math.abs(b-e[f].end)<.1&&e[f+1].start>e[f].end){d=f+1;break}d==null||d==0&&!a.B||(e=c.start(d),(f=a.h.gapPadding)&&(e=Math.ceil((e+f)*100)/100),e>=a.D.cb()||e-b<.001||(d!=0&&c.end(d-1),go(a,
e),b==a.m&&(a.m=e),a.F++,a.u(new wi("gapjumped"))))}}}function go(a,b){a.C=!0;a.l.La(a.g,"seeked",function(){a.C=!1});a.g.currentTime=b}function co(a){if(!a.h.stallEnabled)return null;var b=a.h.stallThreshold,c=a.h.stallSkip;return new ho(new io(a.g),b,function(){var d;return D(function(e){if(e.h==1)return d=$n(a.g.buffered),d.length?c?(a.g.currentTime+=c,e.A(2)):e.g(a.g.play(),3):e.return();if(e.h!=2){if(!a.g)return e.return();a.g.pause();a.g.play()}a.G++;a.u(new wi("stalldetected"));e.j()})})}
function ho(a,b,c){this.h=a;this.m=jo(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.i=!1;this.o=b;this.j=c}ho.prototype.release=function(){this.h&&this.h.release();this.j=this.h=null};function fo(a){var b=a.h,c=jo(b),d=b.g.currentTime,e=Date.now()/1E3;if(a.g!=d||a.m!=c)a.l=e,a.g=d,a.m=c,a.i=!1;d=e-a.l;if(c=d>=a.o&&c&&!a.i)a.j&&a.j(a.g,d),a.i=!0,a.g=b.g.currentTime;return c}
function io(a){var b=this;this.g=a;this.h=new eb;this.i=!1;this.h.H(this.g,"audiofocuspaused",function(){b.i=!0});this.h.H(this.g,"audiofocusgranted",function(){b.i=!1});this.h.H(this.g,"audiofocuslost",function(){b.i=!0})}function jo(a){if(a.g.paused||a.g.playbackRate==0||a.i||a.g.buffered.length==0)var b=!1;else a:{b=a.g.currentTime;a=t($n(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}
io.prototype.release=function(){this.h&&this.h.release();this.h=null};function ko(a,b,c){this.h=a;this.i=b;this.g=c}function lo(a,b){return D(function(c){if(c.h==1)return c.g(sf(a.g,b,a.h.drm.preferredKeySystems,a.h.drm.keySystemsMapping),2);a.h.streaming.dontChooseCodecs||pf(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes,a.h.preferredTextFormats);if(!b.variants.some(Qf))throw new V(2,4,4032);return c.return(mo(a,b))})}
function no(a,b){var c=a.h.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=rf(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}
function mo(a,b){var c=no(a,b);if(b){var d=a.g?a.g.g:null;if(d&&a.g.B){for(var e=new Set,f=t(b.variants),g=f.next();!g.done;g=f.next())g=g.value,g.audio&&e.add(g.audio),g.video&&e.add(g.video);e=t(e);for(f=e.next();!f.done;f=e.next())oo(a,d.keySystem,f.value)}po(a,b)}return c}
function oo(a,b,c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){for(var e=t(d.initData||[]),f=e.next();!f.done;f=e.next())f=f.value,cn(a.g,f.initDataType,f.initData);e=a.g;e.g&&(e.g.mediaTypes!==d.mediaTypes&&(e.g.mediaTypes=d.mediaTypes),Ub(d)&&(e.g=nn(e,e.g.keySystem,[e.g,d])))}}
function po(a,b){function c(l){if(l&&!h.has(l)&&(h.add(l),l.keyIds.size)){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=d[e?"00":m];n?qo.includes(n)&&g.add(n):f.add(m)}}}var d=a.g?a.g.Pd():{};a=Object.keys(d);var e=a.length&&a[0]=="00";a=!1;var f=new Set,g=new Set,h=new WeakSet;b=t(b.variants);for(var k=b.next();!k.done;k=b.next()){k=k.value;if(!k.allowedByApplication)a=!0;else if(k.allowedByKeySystem)return;c(k.audio);c(k.video)}a={hasAppRestrictions:a,missingKeys:Array.from(f),
restrictedKeyStatuses:Array.from(g)};throw new V(2,4,4012,a);}var qo=["output-restricted","internal-error"];function ro(a,b,c){c=c===void 0?Number.EPSILON:c;if(a===b)return!0;a=Math.abs(a-b);return a<=c?!0:c!==Number.EPSILON?Math.abs(a-c)<=Number.EPSILON:!1};function so(a,b,c,d,e){var f=this;this.g=a;this.O=c;this.B=d;this.ha=b;this.l=new Map;this.D=new Map;this.Ga=new Map;this.h=null;this.Fa=!1;this.C=e||null;this.m=new Map;this.u=new eb;this.j=new Map;this.K=null;this.M=new oi;this.Ba="";this.wb=!1;this.za=!0;this.N=!1;this.L=this.Y=null;this.i=to(this,this.M);this.Sa=this.G=!1;this.F=new Jm(function(){return uo(f)});this.I=!1;this.S="UNKNOWN";this.jb=this.ub=!1;this.ab=new oi;this.o=!1;this.ya=null;this.aa=new Map;this.sa=this.W=this.xa=this.X=null;
this.ka=new oi;this.g.remote&&(this.N=this.g.remote.state!="disconnected",this.u.H(this.g.remote,"connect",function(){f.N=f.g.remote.state!="disconnected"}),this.u.H(this.g.remote,"connecting",function(){f.N=f.g.remote.state!="disconnected"}),this.u.H(this.g.remote,"disconnect",function(){f.N=f.g.remote.state!="disconnected"}))}
function to(a,b){a.za=!0;if(window.ManagedMediaSource){a.L||(a.g.disableRemotePlayback=!0);var c=new ManagedMediaSource;a.u.H(c,"startstreaming",function(){a.za=!0});a.u.H(c,"endstreaming",function(){a.za=!1})}else c=new MediaSource;a.u.La(c,"sourceopen",function(){URL.revokeObjectURL(a.Ba);b.resolve()});a.u.La(a.g,"playing",function(){a.wb=!0});a.Ba=vo(c);wo(a);a.B.useSourceElements?(a.Y=km(a.Ba),a.g.appendChild(a.Y),a.L&&a.g.appendChild(a.L),a.g.load()):a.g.src=a.Ba;return c}
function xo(a,b,c){if(a.g&&window.ManagedMediaSource&&a.i&&a.B.useSourceElements){var d;((d=a.L)==null?void 0:d.parentElement)===a.g&&a.g.removeChild(a.L);a.L=km(b,c);a.g.appendChild(a.L);a.g.disableRemotePlayback=!1}}
function yo(){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="hvc1.2.20000000.L153.B0",video/mp4; codecs="hvc1.2.4.L120.b0",video/mp4; codecs="hvc1.2.4.L123.b0",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="av01.0.31M.10.0.111.09.16.09.0",video/mp4; codecs="av01.0.31M.10.0.112.09.18.09.0",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.08.01",video/mp4; codecs="dav1.10.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.03",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",audio/mp4; codecs="apac.31.00",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(C(Ce)),b=
{};P();a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(Qe(c))b[c]=!0;else if(Oc()){var d=Je(c),e=Ef(Ke(c),d);d=Be(d,e);b[c]=Uj(d)||(ue(d)?!0:!1)}else b[c]=Pc().canPlayType(c)!="";d=c.split(";")[0];b[d]=b[d]||b[c]}return b}p=so.prototype;p.destroy=function(){return this.F.destroy()};
function uo(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,u,v;return D(function(w){if(w.h==1){b=[];c=t(a.m);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.m.set(l,h.slice(0,1)),k&&b.push(k.p.catch(af)),m=t(h.slice(1)),n=m.next();!n.done;n=m.next())q=n.value,q.p.reject(new V(2,7,7003,void 0));a.h&&b.push(a.h.destroy());return w.g(Promise.all(b),2)}r=t(a.j.values());for(u=r.next();!u.done;u=r.next())v=u.value,v.destroy();a.u&&(a.u.release(),a.u=null);a.g&&(wo(a),
a.g.load(),a.g.disableRemotePlayback=!1);a.g=null;a.Y=null;a.L=null;a.B=null;a.i=null;a.h=null;a.ha=null;a.l.clear();a.Ga.clear();a.j.clear();a.K=null;a.m.clear();a.C=null;a.aa.clear();a.O=null;w.j()})}function wo(a){if(a.g){a.g.removeAttribute("src");var b;((b=a.Y)==null?void 0:b.parentElement)===a.g&&a.g.removeChild(a.Y);var c;((c=a.L)==null?void 0:c.parentElement)===a.g&&a.g.removeChild(a.L)}}
p.init=function(a,b,c,d){b=b===void 0?!1:b;c=c===void 0?"UNKNOWN":c;d=d===void 0?!1:d;var e=this,f,g,h,k,l,m;return D(function(n){if(n.h==1)return f=Ec,n.g(e.M,2);if(n.h!=3){if(!zo(e)&&!Ao(e))return n.A(3);Pa("Expected MediaSource to be open during init(); reopening the media source.");e.M=new oi;e.i=to(e,e.M);return n.g(e.M,3)}e.I=b;e.S=c;e.ub=d;e.jb=!e.I&&e.S=="HLS"&&!e.ub;e.aa.clear();e.X=null;e.xa=null;e.W=null;e.sa=null;e.ka=new oi;g=t(a.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=
a.get(k),Bo(e,k,l,l.codecs),e.o?(e.m.set(f.U,[]),e.m.set(f.na,[])):e.m.set(k,[]);(m=a.get(f.U))&&m.isAudioMuxedInVideo&&(e.o=!0);n.j()})};
function Bo(a,b,c,d){b=="audio"&&d&&(d=Ef(d,c.mimeType));b=="video"&&d&&c.mimeType=="video/mp4"&&(d=Ff(d));var e=Be(c.mimeType,d);if(b==Cc)Co(a,e,a.I,c.external);else{var f=a.B.forceTransmux;if(!Uj(e)||!a.I&&Ce.includes(e))f=!0;var g=De(c.mimeType,d);if(f){f=Ac("audio",(d||"").split(","));d=Ac("video",(d||"").split(","));if(f&&d){a.o=!0;Bo(a,"audio",c,f);Bo(a,"video",c,d);return}if(d=ue(g))e=d(),a.j.set(b,e),e=e.convertCodecs(b,g)}g=e+a.B.addExtraFeaturesToSourceBuffer(e);Km(a.F);try{var h=a.i.addSourceBuffer(g)}catch(k){throw new V(2,
3,3015,k,"The mediaSource_ status was "+a.i.readyState+" expected 'open'",null);}a.I&&(h.mode=Do);a.u.H(h,"error",function(){var k=a.m.get(b)[0];k.p.reject(new V(2,3,3014,a.g.error?a.g.error.code:0,k.uri))});a.u.H(h,"updateend",function(){return Eo(a,b)});a.l.set(b,h);a.D.set(b,e);a.Ga.set(b,!!c.drmInfos.length)}}p.configure=function(a){this.B=a;this.h&&(this.h.C=a.modifyCueCallback)};function Fo(a){return a.za&&!a.N&&!a.G}
function Co(a,b,c,d){a.h||(a.h=new Me(a.ha),a.h&&(a.h.C=a.B.modifyCueCallback));var e=a.h,f=a.Fa;a=a.S;b=="application/cea-608"||b=="application/cea-708"?e.i=null:(e.i=Oe.get(b)(),e.i.setSequenceMode?e.i.setSequenceMode(c):R("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):R("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.F=f,e.B=d)}
function zo(a){return a.G?!1:a.i?a.i.readyState=="ended":!0}function Ao(a){return a.G?!1:a.i?a.i.readyState=="closed":!0}function Go(a,b){return a.l.size?b==Cc?a.h.g:Wn(Ho(a,b)):null}function Io(a,b){return a.l.size?b==Cc?a.h.h:Xn(Ho(a,b)):null}function Jo(a,b,c){if(b==Cc)return a=a.h,a.h==null||a.h<c?0:a.h-Math.max(c,a.g);a=Ho(a,b);return Zn(a,c)}
p.Vb=function(){var a={total:this.G?[]:$n(this.g.buffered),audio:$n(Ho(this,"audio")),video:$n(Ho(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;b!=null&&c!=null&&a.text.push({start:b,end:c})}return a};function Ho(a,b){if(a.G||a.N||Ao(a))return null;try{return a.l.get(b).buffered}catch(c){return a.l.has(b),null}}
function Ko(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=null,k=[],l=S(c);if(Ce.includes(f))c=Lh(l),c.length&&d&&((g=c.find(function(v){return v.description==="com.apple.streaming.transportStreamTimestamp"}))&&typeof g.data=="number"&&(h=Math.round(g.data)/1E3),a.O.onMetadata([{cueTime:d.startTime,data:l,frames:c,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(f.includes("/mp4")&&d&&d.oa){l=new ah;var m=e.emsgSchemeIdUris!=null&&e.emsgSchemeIdUris.length>0||a.B.dispatchAllEmsgBoxes,n=[];m&&l.ba("emsg",
function(v){a:{var w=e.emsgSchemeIdUris;if(v.version===0){var x=v.reader.Pc();var y=v.reader.Pc();var z=v.reader.P();var A=v.reader.P();var F=v.reader.P();var G=v.reader.P();var B=d.startTime+A/z}else z=v.reader.P(),B=v.reader.Qc()/z+d.l,A=B-d.startTime,F=v.reader.P(),G=v.reader.P(),x=v.reader.Pc(),y=v.reader.Pc();v=v.reader.Yb(v.reader.getLength()-v.reader.Da(),!0);if(w&&w.includes(x)||a.B.dispatchAllEmsgBoxes)if(x=="urn:mpeg:dash:event:2012")a.O.Oi();else{w=B;if(x!=="https://aomedia.org/emsg/ID3"||
F!==4294967295)w+=F/z;z={startTime:B,endTime:w,schemeIdUri:x,value:y,timescale:z,presentationTimeDelta:A,eventDuration:F,id:G,messageData:v};break a}z=null}z&&n.push(z)});var q=d.oa.timescale;b=q&&!isNaN(q);var r=0,u=!1;b&&l.ba("prft",function(v){var w=v.reader,x=v.version;w.P();v=w.P();var y=w.P();v=v*1E3+y/4294967296*1E3;x===0?w=w.P():(x=w.P(),w=w.P(),w=x*4294967296+w);v=ul(v);w=(new Map).set("detail",{wallClockTime:v,programStartDate:new Date(v-w/q*1E3)});w=new wi("prft",w);a.O.onEvent(w)}).boxes(["moof",
"traf"],fh).ba("tfdt",function(v){u||(r=mh(v.reader,v.version).baseMediaDecodeTime/q,u=!0,m||v.parser.stop())});(m||b)&&l.parse(c,!1,g);u&&d.l==0&&(h=r);l=t(n);for(c=l.next();!c.done;c=l.next())Lo(a,c.value,d,h)}else f.includes("/mp4")||f.includes("/webm")||!Vh(l)||(a.aa.has(b)||a.aa.set(b,new Mh),k=a.aa.get(b),k.clearData(),k.Tg(d.j),k.parse(l),l=k.getStartTime(b),l!=null&&(h=l),k=k.getMetadata());return{timestamp:h,metadata:k}}
function Lo(a,b,c,d){var e=ro(b.startTime,c.startTime+b.presentationTimeDelta/b.timescale);d&&a.S=="HLS"&&!e&&(c=-d+c.startTime,b.startTime+=c,b.endTime+=c);a.O.Mi(b);!b.messageData||b.schemeIdUri!="https://aomedia.org/emsg/ID3"&&b.schemeIdUri!="https://developer.apple.com/streaming/emsg-id3"||(c=Lh(b.messageData),c.length&&(d=b.startTime,a.O.onMetadata([{cueTime:d,data:b.messageData,frames:c,dts:d,pts:d}],0,b.endTime)))}
function Mo(a,b,c,d,e,f,g,h,k,l,m){g=g===void 0?!1:g;h=h===void 0?!1:h;k=k===void 0?!1:k;l=l===void 0?!1:l;var n,q,r,u,v,w,x,y,z,A,F,G,B,H,J,O,M,I,L,Q,K;return D(function(N){switch(N.h){case 1:n=Ec;if(b!=n.Ma){N.A(2);break}if(a.S!="HLS"){N.A(3);break}return N.g(a.ab,4);case 4:q=N.i,a.h.u=q;case 3:return N.g(Re(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.Ka()[0]:null),5);case 5:return N.return();case 2:if(l||!a.o){N.A(6);break}return N.g(Mo(a,n.U,c,d,e,f,g,h,k,!0),7);case 7:return N.g(Mo(a,n.na,
c,d,e,f,g,h,k,!0),8);case 8:return N.return();case 6:if(!a.l.has(b))return N.return();r=a.l.get(b).timestampOffset;u=a.D.get(b);a.j.has(b)&&(u=a.j.get(b).getOriginalMimeType());if(d&&(v=Ko(a,b,c,d,e,u,k),w=v.timestamp,x=v.metadata,w!=null&&(a.X==null&&b==n.na&&(a.X=w,a.xa=d.startTime,a.W!=null&&(y=0,a.xa==a.sa&&(y=a.X-a.W),a.ka.resolve(y))),a.W==null&&b==n.U&&(a.W=w,a.sa=d.startTime,a.X!=null&&(z=0,a.xa==a.sa&&(z=a.X-a.W),a.ka.resolve(z))),A=w,F=Ce,!a.I&&F.includes(a.D.get(b))&&(A=0),G=d.startTime-
A,B=Math.abs(r-G),(B>=.001||g||h)&&(!k||G>0||!r)&&(r=G,a.jb&&(No(a,b,function(){return Oo(a,b)},null),No(a,b,function(){return Po(a,b,r)},null))),(H=b==n.na||!a.l.has(n.na))&&a.ab.resolve(r)),x.length))a.O.onMetadata(x,r,d?d.endTime:null);f&&b==n.na&&(a.h||Co(a,"application/cea-608",a.I,!1),a.K||(J=u.split(";",1)[0],a.K=new Tc(J)),d?(O=Wc(a.K,c),O.length&&Xe(a.h,O,r)):a.K.init(c,h,m));if(!a.j.has(b)){N.A(9);break}return N.g(a.j.get(b).transmux(c,e,d,a.i.duration,b),10);case 10:M=N.i,ArrayBuffer.isView(M)?
c=M:(I=M,I.init!=null&&(L=I.init,No(a,b,function(){a.C&&Hc(a.C,L,r,e);a.l.get(b).appendBuffer(L)},d?d.Ka()[0]:null)),c=I.data);case 9:c=Qo(a,e,c,d,b);if(!d||!a.I||b==n.Ma){N.A(11);break}if(!g&&!h){N.A(11);break}Q=d.startTime;if(a.S!="HLS"||a.o||b!=n.U||!a.l.has(n.na)){N.A(13);break}return N.g(a.ka,14);case 14:K=N.i,Math.abs(K)>.15&&(Q-=K);case 13:No(a,b,function(){return Oo(a,b)},null),No(a,b,function(){return Po(a,b,Q)},null);case 11:return N.g(No(a,b,function(){var T=c;a.C&&Hc(a.C,T,r,e);a.l.get(b).appendBuffer(T)},
d?d.Ka()[0]:null),15);case 15:N.j()}})}function Ro(a,b){var c=Io(a,"video")||0;Ve(a.h,b,c)}function So(a){a.h&&Ve(a.h,"",0)}p.remove=function(a,b,c,d){var e=this,f,g;return D(function(h){return h.h==1?(f=Ec,a==f.na&&e.K&&(e.K.remove(d),g=e.h.g||0,e.h.remove(g,c,!0)),a==f.Ma?h.g(e.h.remove(b,c),0):c>b?h.g(No(e,a,function(){return To(e,a,b,c)},null),5):h.A(0)):e.o?h.g(No(e,f.U,function(){return To(e,f.U,b,c)},null),0):h.A(0)})};
function Uo(a,b){var c;return D(function(d){return d.h==1?(c=Ec,b==c.Ma?a.h?d.g(a.h.remove(0,Infinity),0):d.return():b===c.na&&a.K&&a.h?d.g(a.h.remove(0,Infinity,!0),4):d.A(4)):d.h!=6?d.g(No(a,b,function(){return To(a,b,0,a.i.duration)},null),6):a.o?d.g(No(a,c.U,function(){return To(a,c.U,0,a.i.duration)},null),0):d.A(0)})}
p.flush=function(a){var b=this,c;return D(function(d){return d.h==1?(c=Ec,a==c.Ma?d.return():d.g(No(b,a,function(){b.g.currentTime-=.001;Eo(b,a)},null),2)):b.o?d.g(No(b,c.U,function(){var e=c.U;b.g.currentTime-=.001;Eo(b,e)},null),0):d.A(0)})};
function Vo(a,b,c,d,e,f,g,h,k){var l,m,n;return D(function(q){if(q.h==1){l=Ec;if(b==l.Ma)return f||(a.h.u=c),Ue(a.h,d,e),q.return();m=[];return q.g(Wo(a,b,g,h,k),2)}n=q.i;n||(m.push(No(a,b,function(){return Oo(a,b)},null)),a.o&&m.push(No(a,l.U,function(){return Oo(a,l.U)},null)));f||(m.push(No(a,b,function(){return Po(a,b,c)},null)),a.o&&m.push(No(a,l.U,function(){return Po(a,l.U,c)},null)));if(d!=0||e!=Infinity)m.push(No(a,b,function(){return Xo(a,b,d,e)},null)),a.o&&m.push(No(a,l.U,function(){return Xo(a,
l.U,d,e)},null));return m.length?q.g(Promise.all(m),0):q.A(0)})}function Yo(a,b,c){var d,e;return D(function(f){if(f.h==1){d=Ec;if(b==d.Ma)return f.return();b==d.na&&(a.ab=new oi);if(!a.I||(e=Io(a,b))&&Math.abs(e-c)<.15)return f.return();No(a,b,function(){return Oo(a,b)},null);a.o&&No(a,d.U,function(){return Oo(a,d.U)},null);return f.g(No(a,b,function(){return Po(a,b,c)},null),2)}return a.o?f.g(No(a,d.U,function(){return Po(a,d.U,c)},null),0):f.A(0)})}
p.endOfStream=function(a){var b=this;return D(function(c){return c.g(Zo(b,function(){zo(b)||Ao(b)||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};p.Qb=function(a){var b=this;return D(function(c){return c.g(Zo(b,function(){if(b.B.durationReductionEmitsUpdateEnd&&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 oi,uri:null};b.m.get(e).unshift(f)}b.i.duration=a;b.ya=a}),0)})};p.getDuration=function(){return this.i.duration};
function $o(a,b,c){D(function(d){return a.F.g||a.g.error||a.N||a.G||zo(a)||Ao(a)?d.return():d.g(Zo(a,function(){zo(a)||Ao(a)||a.i.setLiveSeekableRange(b,c)}),0)})}function ap(a){D(function(b){return a.F.g||a.g.error||a.N||a.G||zo(a)||Ao(a)?b.return():b.g(Zo(a,function(){zo(a)||Ao(a)||a.i.clearLiveSeekableRange()}),0)})}function To(a,b,c,d){if(d<=c)Eo(a,b);else{if(a.C){var e=a.C;b==="video"&&e.g&&e.g.flushBuffer(c,d)}a.l.get(b).remove(c,d)}}
function Oo(a,b){var c=a.l.get(b),d=c.appendWindowStart,e=c.appendWindowEnd;c.abort();c.appendWindowStart=d;c.appendWindowEnd=e;Eo(a,b)}function Po(a,b,c){c<0&&(c+=.001);a.l.get(b).timestampOffset=c;Eo(a,b)}function Xo(a,b,c,d){var e=a.l.get(b);if(e.appendWindowEnd!==d||e.appendWindowStart!==c)e.appendWindowStart=0,e.appendWindowEnd=d,e.appendWindowStart=c;Eo(a,b)}
function Eo(a,b){if(a.G||a.F.g){var c=a.m.get(b);c&&c.length&&((c=c[0])&&c.p&&c.p.resolve(),a.m.set(b,[]))}else if(c=a.m.get(b)[0])c.p.resolve(),bp(a,b)}function No(a,b,c,d){Km(a.F);c={start:c,p:new oi,uri:d};a.m.get(b).push(c);a.m.get(b).length==1&&cp(a,b);return c.p}
function Zo(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,x,y,z;return D(function(A){switch(A.h){case 1:Km(a.F);c=[];d=Array.from(a.l.keys());e=new Map;f=t(d);g=f.next();for(h={};!g.done;h={ready:void 0},g=f.next())k=g.value,h.ready=new oi,l={start:function(F){return function(){return F.ready.resolve()}}(h),p:h.ready,uri:null},m=a.m.get(k),m.push(l),c.push(h.ready),e.set(k,l),m.length==1&&l.start();A.m(2);return A.g(Promise.all(c),4);case 4:A.o(3);break;case 2:n=A.l();if(a.F.g){q=t(d);for(r=q.next();!r.done;r=
q.next())u=r.value,v=a.m.get(u),e.has(u)&&Xa(v,e.get(u));return A.return()}throw n;case 3:return A.m(5,6),A.g(b(),6);case 6:A.F();w=t(d);for(x=w.next();!x.done;x=w.next())y=x.value,bp(a,y);A.G(0);break;case 5:throw z=A.l(),new V(2,3,3015,z,a.g.error||"No error in the media element",null);}})}function bp(a,b){a.m.get(b).shift();cp(a,b)}
function cp(a,b){var c=a.m.get(b)[0];if(c)try{c.start()}catch(d){d.name=="QuotaExceededError"?c.p.reject(new V(2,3,3017,b)):Fo(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)),bp(a,b)}}function dp(a,b){a.ha=b;a.h&&(a.h.l=b)}
function Qo(a,b,c,d,e){if(Fe(a.D.get(e))!="mp4")return c;var f=d===null,g=a.Ga.get(e),h=a.O.Uh(),k=!1;d&&d.oa&&(k=d.oa.encrypted);d=d?d.Ka()[0]:null;var l=P();a.B.correctEc3Enca&&f&&e==="audio"&&(c=Nn(c));a.B.insertFakeEncryptionInInit&&g&&l.Rc(h,e)&&(f?c=On(b,c,d):!k&&l.Jg(e)&&(c=Rn(c)));f&&l.qf()&&(c=Un(c));return c}
function ep(a,b,c,d){return No(a,b,function(){if(b!==Cc){a.D.get(b);if(P().Za()){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.D.set(b,c)}Eo(a,b)}},null)}
function fp(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,x,y,z,A,F;return D(function(G){if(G.h==1){if(a.G||a.N)return G.return();c=Ec;a.G=!0;a.o=!1;d=a.g.currentTime;e=a.g.autoplay;a.g.paused||(a.Sa=!0);a.wb&&(a.g.autoplay=!1);G.K(2);a.u.Ya();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(B){}}a.j.clear();a.l.clear();n=a.i.duration;a.M=new oi;a.i=to(a,a.M);return G.g(a.M,4)}if(G.h!=
2){!isNaN(n)&&n?a.i.duration=n:!isNaN(a.ya)&&a.ya&&(a.i.duration=a.ya);q=new oi;r=a.i.sourceBuffers;u=b.size;v=0;w=function(){v++;v===u&&(q.resolve(),a.u.eb(r,"addsourcebuffer",w))};a.u.H(r,"addsourcebuffer",w);x=t(b.keys());for(y=x.next();!y.done;y=x.next())z=y.value,A=b.get(z),Bo(a,z,A,A.codecs);(F=b.get(c.U))&&F.isAudioMuxedInVideo&&(a.o=!0);a.o&&!a.m.has(c.U)&&a.m.set(c.U,[]);return G.g(q,2)}G.F();a.G=!1;Km(a.F);a.u.La(a.g,"loadedmetadata",function(){a.F.g||(a.g.currentTime=d)});a.u.La(a.g,"canplaythrough",
function(){a.F.g||(a.g.autoplay=e,a.Sa&&(a.Sa=!1,a.g.play()))});return G.G(0)})}function gp(a,b){return Zo(a,function(){return fp(a,b)})}
function hp(a,b,c,d){var e=!1,f=Ac("audio",(d||"").split(",")),g=Ac("video",(d||"").split(",")),h=g;b=="audio"&&(h=f);h||(h=d);var k=Be(c,h),l=Je(a.D.get(b)),m=a.B.forceTransmux;!Uj(k)||!a.I&&Ce.includes(k)?m=!0:m||c==l||(m=!P().pe()&&Ce.includes(c));if(m&&(a=De(c,h),h=ue(a))){var n=h();f&&g&&(e=!0);k=n.convertCodecs(b,a)}!n&&b==="video"&&f&&(k=Be(c,d));b=Ge(Ke(k));return{Cb:n,hj:e,Nf:Je(k),codec:b,mimeType:k}}
function ip(a,b,c,d,e){if(b==Cc)return{type:jp,ce:c,Cb:null};var f=Ge(Ke(a.D.get(b))),g=Je(a.D.get(b)),h=hp(a,b,c,d),k=h.Cb,l=h.hj,m=h.Nf,n=h.codec;h=h.mimeType;var q=!0;l&&a.D.has("audio")&&(c=hp(a,"audio",c,d),d=Ge(Ke(a.D.get("audio"))),q=Je(a.D.get("audio")),q=d==c.codec&&q==c.Nf,c.Cb&&c.Cb.destroy());if(f===n&&g===m&&q)return{type:jp,ce:h,Cb:k};f=!0;if(a.o&&!e.has("audio")||l&&k&&!a.j.has(b))f=!1;b=P();if(f&&a.B.codecSwitchingStrategy==="smooth"&&b.Za())return{type:kp,ce:h,Cb:k};k&&k.destroy();
return{type:lp,ce:h,Cb:null}}
function Wo(a,b,c,d,e){var f,g,h,k,l,m;return D(function(n){if(n.h==1){f=Ec;g=ip(a,b,c,d,e);h=g.type;k=g.Cb;l=g.ce;if(m=e.get(f.U))a.o=m.isAudioMuxedInVideo;if(h==jp)return a.j.has(b)&&!k?(a.j.get(b).destroy(),a.j.delete(b)):!a.j.has(b)&&k?a.j.set(b,k):k&&(a.j.has(b)&&a.j.get(b).transmux!==k.transmux?(a.j.get(b).destroy(),a.j.set(b,k)):k.destroy()),n.return(!1);if(h==kp)return n.g(ep(a,b,l,k),3);if(h!=lp)return n.A(3);k&&k.destroy();return n.g(gp(a,e),3)}return n.return(!0)})}
function mp(a,b,c,d,e){a=ip(a,b,c,d,e);a.Cb&&a.Cb.destroy();return a.type==lp}var vo=window.URL.createObjectURL,Do="sequence",jp="none",lp="reset",kp="changeType";function np(a){var b=this;this.g=a;this.j=!1;this.h=this.g.Te();this.i=new W(function(){b.g.isPaused()||b.g.Ki(b.h*.25)})}np.prototype.release=function(){this.set(this.Bc());this.i&&(this.i.stop(),this.i=null);this.g=null};np.prototype.set=function(a){this.h=a;op(this)};np.prototype.Bc=function(){return this.g.Bc()};function op(a){a.i.stop();var b=a.j?0:a.h;if(b>=0&&b<=16)try{a.g.Te()!=b&&a.g.Vg(b);return}catch(c){}a.i.Aa(.25);a.g.Te()!=0&&a.g.Vg(0)};function pp(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=qp.value().get(b),c.La(a,b,d))}var qp=new jb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function rp(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){e.l==null&&(e.l=d());return e.l};this.o=!1;this.h=new eb;this.i=new sp(a);pp(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){tp(e,e.j())})}rp.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i!=null&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function up(a){return a.o?a.g.currentTime:a.j()}
function vp(a,b){a.g.readyState>0?wp(a.i,b):pp(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){tp(a,a.j())})}function tp(a,b){Math.abs(a.g.currentTime-b)<.001?xp(a):(a.h.La(a.g,"seeking",function(){xp(a)}),wp(a.i,a.g.currentTime&&a.g.currentTime!=0?a.g.currentTime:b))}function xp(a){a.o=!0;a.h.H(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
function sp(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new W(function(){b.i<=0?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}sp.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function wp(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Aa(.1)};function yp(a){this.g=a;this.i=!1;this.h=null;this.j=new eb}p=yp.prototype;p.ready=function(){function a(){if(b.h==null||b.h==0&&b.g.duration!=Infinity)b.i=!0;else{var c=b.g.currentTime,d=null;if(typeof b.h==="number")d=b.h;else if(b.h instanceof Date){var e=zp(b);e!==null&&(d=b.h.getTime()/1E3-e,d=Ap(b,d))}d==null?b.i=!0:(d<0&&(d=Math.max(0,c+d)),c!=d?(b.j.La(b.g,"seeking",function(){b.i=!0}),b.g.currentTime=d):b.i=!0)}}var b=this;pp(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){a()})};
p.release=function(){this.j&&(this.j.release(),this.j=null);this.g=null};p.ze=function(a){this.h=this.i?this.h:a};p.$c=function(){var a=this.i?this.g.currentTime:this.h;a instanceof Date&&(a=a.getTime()/1E3-(zp(this)||0),a=Ap(this,a));return a||0};p.Hf=function(){return 0};p.Ff=function(){return 0};p.Gf=function(){return!1};p.Bg=function(){};p.lg=function(){var a=Xn(this.g.buffered);return a!=null&&a>=this.g.duration-1};
function zp(a){return a.g.getStartDate&&(a=a.g.getStartDate().getTime(),!isNaN(a))?a/1E3:null}function Ap(a,b){a=a.g.seekable;a.length>0&&(b=Math.max(a.start(0),b),b=Math.min(a.end(a.length-1),b));return b}
function Bp(a,b,c,d,e,f){var g=this;this.h=a;this.g=b.presentationTimeline;this.l=c;this.u=e;this.o=null;this.i=new bo(a,b.presentationTimeline,c,f);this.j=new rp(a,function(){a:{var h=g.i;h.o=!0;h.B=!1;h.i&&h.i.Aa(h.h.gapJumpTimerTime);eo(h);var k=up(g.j);h=Cp(g,k);if(!Wj()&&Math.abs(h-k)>.001){k=!1;var l=P().Ng();if(l){var m=Date.now()/1E3;if(!g.o||g.o<m-l)g.o=m,k=!0}else k=!0;if(k){vp(g.j,h);h=void 0;break a}}g.u();h=void 0}return h},function(h){var k=g.i;k.g.seeking&&!k.o&&(k.o=!0,k.m=h);k.i&&
k.i.Aa(k.h.gapJumpTimerTime);eo(k)},function(){return Dp(g,d)});this.m=new W(function(){if(g.h.readyState!=0&&!g.h.paused){var h=up(g.j),k=g.g.sb(),l=g.g.cb();l-k<3&&(k=l-3);h<k&&(h=Cp(g,h),g.h.currentTime=h)}})}p=Bp.prototype;p.ready=function(){this.m.Aa(.25)};p.release=function(){this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.m&&(this.m.stop(),this.m=null);this.h=this.j=this.g=this.l=null;this.u=function(){}};p.ze=function(a){vp(this.j,Dp(this,a))};
p.$c=function(){var a=up(this.j);return this.h.readyState>0&&!this.h.paused?Ep(this,a):a};p.Hf=function(){return this.i.G};p.Ff=function(){return this.i.F};p.Gf=function(){return this.i.C};function Dp(a,b){b==null?b=a.g.getDuration()<Infinity?a.g.sb():a.g.cb():b instanceof Date?b=b.getTime()/1E3-(a.g.m||a.g.i):b<0&&(b=a.g.cb()+b);return Fp(a,Ep(a,b))}p.Bg=function(){this.i.Jc()};p.lg=function(){if(this.g.T()){var a=this.g.Wb(),b=Xn(this.h.buffered);if(b!=null&&b>=a)return!0}return!1};
function Fp(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Cp(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.sb(),f=a.g.cb(),g=a.g.getDuration();f-e<3&&(e=f-3);var h=a.g.gd(c),k=a.g.gd(d);c=a.g.gd(c+d);return b>=g?Fp(a,b):b>f?f-a.l.safeSeekEndOffset:b<e?a.g.T()&&a.l.returnToEndOfLiveWindowWhenOutside?f-a.l.safeSeekEndOffset:Yn(a.h.buffered,k)?k:c:b>=h||Yn(a.h.buffered,b)?b:c}function Ep(a,b){var c=a.g.sb();if(b<c)return c;a=a.g.cb();return b>a?a:b};function Gp(a){var b=this;this.j=a;this.h=new eb;this.g=new Set;this.i=(new W(function(){Hp(b,!1)})).Rb();a.paused||this.i.Aa(.25);this.h.H(a,"playing",function(){b.i.Rb().Aa(.25)});this.h.H(a,"pause",function(){b.i.stop()});this.h.H(a,"seeked",function(){b.i.Rb();a.paused||b.i.Aa(.25)})}Gp.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 Hp(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 Ip(a){xi.call(this);this.g=new Map;this.h=a}ma(Ip,xi);Ip.prototype.release=function(){this.g.clear();xi.prototype.release.call(this)};function Jp(a,b){var c=a.g.get(b);c||(c={pd:[],Le:null,contentType:b},a.g.set(b,c));return c}function Kp(a,b,c){var d=Jp(a,b.contentType);Lp(a,d);a={Ze:b,position:c};d=d.pd;b=d.findIndex(function(e){return e.position>=c});b>=0?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
Ip.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.Le;a:{var e=c.pd;for(var f=e.length-1;f>=0;f--){var g=e[f];if(g.position<=a){e=g.Ze;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&&!cb(d.roles,e.roles);(g||h||d)&&Mp(this,a,e.contentType)&&(c.Le=e,d=new wi("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Mp(this,a,e.contentType)&&(c.Le=e,JSON.stringify(e),c=new wi("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
function Mp(a,b,c){return(a=a.h()[c])&&a.length>0&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function Lp(a,b){if((a=a.h()[b.contentType])&&a.length>0){var c=a[0].start,d=a[a.length-1].end,e=b.pd;b.pd=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.pd=[]};function Np(a){xi.call(this);this.h=new Map;this.i=a;this.g=null}ma(Np,xi);Np.prototype.release=function(){this.h.clear();this.g&&(this.g.stop(),this.g=null);xi.prototype.release.call(this)};function Op(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 wi("regionadd",new Map([["region",b]])),a.dispatchEvent(b),Pp(a))}
function Pp(a){a.g||(a.g=(new W(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 wi("regionremove",new Map([["region",e]])),a.dispatchEvent(d))}!a.h.size&&a.g&&(a.g.stop(),a.g=null)})).Aa(2))};function Qp(a,b,c,d,e){function f(g,h){return h.fastSwitching&&g.mc&&g.kd?!1:!0}this.m=a;this.i=b;this.l=c;this.g=new Map;this.j=new Map;this.h=null;this.o=d;this.u=e||f}function Rp(a,b){a.l=b;a=t(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
function Sp(a,b,c){c=c===void 0?!1:c;if(!a.i.segmentIndex)return Promise.resolve();a.h||(a.h=a.i.segmentIndex.qb(b,!0,a.o));if(!a.h)return Promise.resolve();c&&a.h.next();for(b=[];a.g.size<a.m;){c=a.h.next().value;if(!c)break;var d=!0;c.isPreload()&&c.endByte!=null&&(d=!1);c.Jb()==2&&(d=!1);c.ec(!1)&&(d=!1);d&&c.oa&&b.push(Tp(a,c.oa));d&&!a.g.has(c)&&(d=new Up(a.l),b.push(Vp(d,c,a.i)),a.g.set(c,d));if(!a.u(c,a.i))break}Wp(a);return Promise.all(b)}
function Tp(a,b){if(!a.i.segmentIndex||b.ec()||Array.from(a.j.keys()).some(function(e){return $i(e,b)}))return Promise.resolve();var c=new Up(a.l),d=Vp(c,b,a.i);a.j.set(b,c);return d}function Xp(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Yp(a,c)}function Zp(a){Xp(a,a.g);Xp(a,a.j);a.h=null}Qp.prototype.Ia=function(a,b){b=b===void 0?!1:b;for(var c=t(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Yp(this,d);b&&Wp(this)};
Qp.prototype.Vc=function(a){this.o=a;this.h&&this.h.Vc(a)};function Wp(a){if(a.g.size)for(var b=Array.from(a.g.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={Xe:void 0},d=c.next())e.Xe=d.value,b.some(function(f){return function(g){return $i(g.oa,f.Xe)}}(e))||Yp(a,e.Xe)}function $p(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&Yp(a,d)}Wp(a)}function aq(a,b){b&&b!==a.i&&(Zp(a),a.i=b)}
function Yp(a,b){var c=a.g;b instanceof Zi&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function Up(a){this.g=a;this.nd=this.Bf=null}function Vp(a,b,c){var d=new Uint8Array(0);a.nd=a.g(b,c,function(e){return D(function(f){if(f.h==1)return d.byteLength>0?d=uc(d,e):d=e,a.Bf?f.g(a.Bf(d),3):f.A(0);d=new Uint8Array(0);f.j()})});return a.nd.promise.catch(function(e){return e instanceof V&&e.code==7001?Promise.resolve():Promise.reject(e)})}Up.prototype.abort=function(){this.nd&&this.nd.abort()};function bq(a,b){var c=this;this.g=b;this.j=a;this.i=null;this.M=new Map;this.C=1;this.B=this.o=null;this.X=0;this.h=new Map;this.N=!1;this.Y=null;this.D=!1;this.l=new Jm(function(){return cq(c)});this.S=Date.now()/1E3;this.m=new Map;this.W={projection:null,hfov:null};this.ha=0;this.aa=Infinity;this.G=null;this.O=[];this.u=new W(function(){if(c.j&&c.g)if(c.j.presentationTimeline.T()){var d=c.j.presentationTimeline.sb(),e=c.j.presentationTimeline.cb();e-d>1?$o(c.g.R,d,e):ap(c.g.R)}else ap(c.g.R),c.u&&
c.u.stop();else c.u&&c.u.stop()});this.I=null;this.K=!1;this.L=new W(function(){var d=c.g.video;!d.ended&&c.I&&(c.K=!0,d.currentTime=c.I,c.I=null)});this.F=new eb}p=bq.prototype;p.destroy=function(){return this.l.destroy()};
function cq(a){var b,c,d,e,f,g,h;return D(function(k){if(k.h==1){a.u&&a.u.stop();a.u=null;a.L&&a.L.stop();a.L=null;a.F&&(a.F.release(),a.F=null);b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,dq(e),b.push(eq(e)),e.V&&(Zp(e.V),e.V=null);f=t(a.m.values());for(g=f.next();!g.done;g=f.next())h=g.value,Zp(h);return k.g(Promise.all(b),2)}a.h.clear();a.m.clear();a.g=null;a.j=null;a.i=null;a.I=null;k.j()})}
p.configure=function(a){this.i=a;this.Y=new li({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.h.get("audio");b&&b.V&&(Zp(b.V),b.V=null);b=t(this.m.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,Zp(this.m.get(c)),this.m.delete(c)}a.disableTextPrefetch&&(b=this.h.get(Cc))&&
b.V&&(Zp(b.V),b.V=null);a.disableVideoPrefetch&&(b=this.h.get("video"))&&b.V&&(Zp(b.V),b.V=null);b=t(this.h.keys());for(c=b.next();!c.done;c=b.next())c=this.h.get(c.value),c.V?($p(c.V,a.segmentPrefetchLimit),a.segmentPrefetchLimit>0||(Zp(c.V),c.V=null)):a.segmentPrefetchLimit>0&&(c.V=fq(this,c.stream));a.disableAudioPrefetch||gq(this)};function hq(a,b,c){a.j.presentationTimeline.T()||(a.ha=b,a.aa=c)}
p.start=function(a){var b=this;return D(function(c){if(c.h==1)return c.g(iq(b,a||new Map),2);Km(b.l);b.N=!0;c.j()})};function jq(a,b){var c,d,e,f,g,h,k;D(function(l){switch(l.h){case 1:return c=Ec,a.X++,d=a.X,l.m(2),l.g(Uo(a.g.R,c.Ma),4);case 4:l.o(3);break;case 2:if(e=l.l(),a.g)a.g.onError(e);case 3:f=Be(b.mimeType,b.codecs),Co(a.g.R,f,a.j.sequenceMode,b.external),g=a.g.R.ha,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.X==d&&(k=kq(a,b),a.h.set(c.Ma,k),lq(a,k,0)),l.j()}})}
function mq(a){var b=a.h.get(Cc);b&&(dq(b),eq(b).catch(function(){}),a.G=a.h.get(Cc),a.h.delete(Cc),b.stream&&b.stream.closeSegmentIndex&&b.stream.closeSegmentIndex());a.B=null}
function nq(a,b){for(var c=a.g.bb()<0,d=t(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.ea&&e.ea.Vc(c),e.V&&e.V.Vc(c);d=t(a.m.values());for(e=d.next();!e.done;e=d.next())e.value.Vc(c);if(c=a.h.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Zb&&(oq(a,b,!1,0,!1),c.Zb=d);else if(b=c.Zb)c.Zb=null,oq(a,b,!0,0,!1)}
function pq(a,b,c,d,e,f){c=c===void 0?!1:c;d=d===void 0?0:d;e=e===void 0?!1:e;f=f===void 0?!1:f;a.o=b;a.N&&(b.video&&oq(a,b.video,c,d,e,f),b.audio&&oq(a,b.audio,c,d,e,f))}function qq(a,b){D(function(c){if(c.h==1)return a.G=null,a.B=b,a.N?b.segmentIndex?c.A(2):c.g(b.createSegmentIndex(),2):c.return();oq(a,b,!0,0,!1);c.j()})}function rq(a){var b=a.h.get(Cc);b&&oq(a,b.stream,!0,0,!0)}
function sq(a,b){for(var c=t(a.M.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.M.delete(d))}}
function oq(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=Cc?g&&(g.Zb&&(b.trickModeVideo?(g.Zb=b,b=b.trickModeVideo):g.Zb=null),g.stream!=b||e)&&(a.m.has(b)?g.V=a.m.get(b):g.V&&aq(g.V,b),b.type==Cc&&g.stream!=b&&(e=Be(b.mimeType,b.codecs),Co(a.g.R,e,a.j.sequenceMode,b.external)),!a.m.has(g.stream)&&g.stream.closeSegmentIndex&&(g.wa?(e="("+g.type+":"+g.stream.id+")",a.M.has(e)||a.M.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,
g.stream=b,g.ea=null,g.Fe=!!f,b.dependencyStream?g.Ub=kq(a,b.dependencyStream):g.Ub=null,tq(a),e&&(g.Ta=null,g.Mb=null,g.Lb=null,b.isAudioMuxedInVideo&&(b=null,g.type==="video"?b=a.h.get("audio"):g.type==="audio"&&(b=a.h.get("video")),b&&(eq(b).catch(function(){}),b.Ta=null,b.Mb=null,b.Lb=null,uq(a,b),vq(a,b).catch(function(h){if(a.g)a.g.onError(h)})))),c?g.pb?g.Xc=!0:g.wa?(g.ob=!0,g.zc=d,g.Xc=!0):(dq(g),wq(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.wa||g.Ua||lq(a,g,0),vq(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
jq(a,b)}
function vq(a,b){var c,d,e;return D(function(f){if(f.h==1){if(!b.Ea)return f.return();c=b.stream;d=b.Ea;return c.segmentIndex?f.A(2):f.g(c.createSegmentIndex(),2)}if(f.h!=4)return e=c.dependencyStream,!e||e.segmentIndex?f.A(4):f.g(e.createSegmentIndex(),4);if(b.Ea!=d||b.stream!=c)return f.return();var g=a.g.rb();var h=Io(a.g.R,b.type),k=b.stream.segmentIndex.find(b.ua?b.ua.endTime:g),l=k==null?null:b.stream.segmentIndex.get(k);k=l?bj(l):null;l&&!k&&(k=(l.endTime-l.getStartTime())*(b.stream.bandwidth||a.o.bandwidth)/
8);k?((l=l.oa)&&(k+=(l.endByte?l.endByte+1-l.startByte:null)||0),l=a.g.getBandwidthEstimate(),g=k*8/l<(h||0)-g-a.i.rebufferingGoal||b.Ea.h.g>k?!0:!1):g=!0;g&&b.Ea.abort();f.j()})}
p.qc=function(){if(this.g){for(var a=this.g.rb(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e;if(e=!this.K)e=this.g.R,d==Cc?(e=e.h,e=e.g==null||e.h==null?!1:a>=e.g&&a<e.h):(e=Ho(e,d),e=Yn(e,a)),e=!e;if(e){this.S=0;c.V&&(c.V.h=null);if(c.type==="audio"){e=t(this.m.values());for(var f=e.next();!f.done;f=e.next())f.value.h=null}c.ea=null;(Io(this.g.R,d)!=null||c.wa)&&uq(this,c);c.Ea&&(c.Ea.abort(),c.Ea=null);d===Cc&&(d=this.g.R,d.K&&d.K.g.clear());c.qc=!0}!this.K||
c.pb||c.wa||c.Ua||lq(this,c,0)}xq(this)&&yq(this)}};function uq(a,b){b.pb||b.ob||(b.wa?(b.ob=!0,b.zc=0):Go(a.g.R,b.type)==null?b.Ua==null&&lq(a,b,0):(dq(b),wq(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
function iq(a,b){var c,d,e,f,g,h,k,l;return D(function(m){if(m.h==1){if(!a.o)throw new V(2,5,5006);c=zq(a,!0);d=a.g.R;return m.g(d.init(c,a.j.sequenceMode,a.j.type,a.j.ignoreManifestTimestampsInSegmentsMode),2)}Km(a.l);a.updateDuration();e=t(c.keys());for(f=e.next();!f.done;f=e.next())g=f.value,h=c.get(g),a.h.has(g)||(k=kq(a,h),b.has(h.id)&&(l=b.get(h.id),Rp(l,function(n,q,r){return Aq(n,q,r||null,a.i.retryParameters,a.g.kc)}),k.V=l),a.h.set(g,k),lq(a,k,0));tq(a);m.j()})}
function kq(a,b){var c={stream:b,type:b.type,ea:null,V:fq(a,b),ua:null,Ta:null,Zd:null,Mb:null,Lb:null,Xd:null,Yd:null,Zb:null,endOfStream:!1,wa:!1,Ua:null,ob:!1,zc:0,Xc:!1,pb:!1,qc:!0,Fe:!1,lf:!1,Fc:!1,Ea:null,Ub:null};b.dependencyStream&&(c.Ub=kq(a,b.dependencyStream));return c}
function fq(a,b){if(b.type==="video"&&a.i.disableVideoPrefetch||b.type==="audio"&&a.i.disableAudioPrefetch||b.type===Cc&&(b.mimeType=="application/cea-608"||b.mimeType=="application/cea-708")||b.type===Cc&&a.i.disableTextPrefetch)return null;if(a.m.has(b))return a.m.get(b);var c=a.h.get(b.type);return(c=c&&c.V)&&b===c.i?c:a.i.segmentPrefetchLimit>0?new Qp(a.i.segmentPrefetchLimit,b,function(d,e,f){return Aq(d,e,f||null,a.i.retryParameters,a.g.kc)},a.g.bb()<0,a.g.fj):null}
function gq(a){for(var b=a.i.segmentPrefetchLimit,c=a.i.prefetchAudioLanguages,d=t(a.j.variants),e=d.next(),f={};!e.done;f={gb:void 0},e=d.next())if(f.gb=e.value,f.gb.audio)if(a.m.has(f.gb.audio)){if(e=a.m.get(f.gb.audio),$p(e,b),!(b>0&&c.some(function(h){return function(k){return ef(h.gb.audio.language,k)}}(f)))){var g=a.h.get(f.gb.audio.type);e!==(g&&g.V)&&Zp(e);a.m.delete(f.gb.audio)}}else b<=0||!c.some(function(h){return function(k){return ef(h.gb.audio.language,k)}}(f))||!(e=fq(a,f.gb.audio))||
(f.gb.audio.segmentIndex||f.gb.audio.createSegmentIndex(),a.m.set(f.gb.audio,e))}p.updateDuration=function(){var a=Wj(),b=this.j.presentationTimeline.getDuration();b<Infinity?(a&&(this.u&&this.u.stop(),ap(this.g.R)),this.g.R.Qb(b)):a?(this.u&&this.u.Aa(.5),this.g.R.Qb(Infinity)):this.g.R.Qb(4294967296)};
function Bq(a,b){var c,d,e,f,g,h,k,l,m;return D(function(n){switch(n.h){case 1:Km(a.l);c=Ec;if(b.wa||b.Ua==null||b.pb)return n.return();b.Ua=null;if(!b.ob){n.A(2);break}return n.g(wq(a,b,b.Xc,b.zc),3);case 3:return n.return();case 2:sq(a,b);if(b.stream.segmentIndex){n.A(4);break}d=b.stream;n.m(5);return n.g(b.stream.createSegmentIndex(),7);case 7:n.o(6);break;case 5:return e=n.l(),n.g(Cq(a,b,e),8);case 8:return n.return();case 6:if(d!=b.stream)return d.closeSegmentIndex&&d.closeSegmentIndex(),b.wa||
b.Ua||lq(a,b,0),n.return();case 4:if(!b.Ub){n.A(9);break}if(b.Ub.stream.segmentIndex){n.A(9);break}n.m(11);return n.g(b.Ub.stream.createSegmentIndex(),13);case 13:n.o(9);break;case 11:n.l();case 9:n.m(14);f=Dq(a,b);f!=null&&(lq(a,b,f),b.Fc=!1);n.o(15);break;case 14:return g=n.l(),n.g(Cq(a,b,g),16);case 16:return n.return();case 15:if(b.type===c.Ma)return n.return();h=[];b.stream&&!b.stream.isAudioMuxedInVideo&&h.push(b);k=b.type===c.U?c.na:c.U;(l=a.h.get(k))&&l.stream&&!l.stream.isAudioMuxedInVideo&&
h.push(l);if(!a.N||!h.every(function(q){return q.endOfStream})){n.A(0);break}return n.g(a.g.R.endOfStream(),18);case 18:Km(a.l),m=a.g.R.getDuration(),m!=0&&m<a.j.presentationTimeline.getDuration()&&a.j.presentationTimeline.Qb(m),n.j()}})}
function Dq(a,b){if(Eq(b))return Ro(a.g.R,b.stream.originalId||""),null;b.type==Cc&&So(a.g.R);if(b.stream.isAudioMuxedInVideo&&b.type=="audio")return null;if(b.type!=Cc&&Ao(a.g.R))return Fq(a,!0),null;var c=a.i.updateIntervalSeconds/Math.max(1,Math.abs(a.g.bb()));if(!Fo(a.g.R)&&b.type!=Cc)return c/2;var d=a.g.rb();if(b.type==="audio")for(var e=t(a.m.keys()),f=e.next();!f.done;f=e.next())f=a.m.get(f.value),f.Ia(d,!0),Sp(f,d);e=b.ua?b.ua.endTime:d;var g=Jo(a.g.R,b.type,d);f=Math.max(1,Math.max(a.i.rebufferingGoal,
a.i.bufferingGoal)*a.C);var h=a.j.presentationTimeline.getDuration()-e,k=Io(a.g.R,b.type);if(h<1E-6&&k)return b.endOfStream=!0,b.type=="video"&&((c=a.h.get(Cc))&&Eq(c)&&(c.endOfStream=!0),(c=a.h.get("audio"))&&c.stream.isAudioMuxedInVideo&&(c.endOfStream=!0)),null;b.endOfStream=!1;if(g>=f)return c/2;h=!b.ea;k=Gq(a,b,d,k);if(!k)return a=Infinity,(b=b.ua)&&(a=b.endTime-b.startTime),Math.min(a/2,c);g=b.Ta;var l=k.oa;g&&l&&$i(l,g)&&(g.g=l.g);g=!1;h&&b.Fe&&(g=!0,b.Fe=!1);h=Infinity;l=t(a.h.values());for(var m=
l.next();!m.done;m=l.next())m=m.value,Eq(m)||m.stream.isAudioMuxedInVideo||m.ea&&!m.ea.current()||(h=Math.min(h,m.ua?m.ua.endTime:d));if(e>=h+a.j.presentationTimeline.h)return c;b.V&&b.ea&&!a.m.has(b.stream)&&(b.V.Ia(k.startTime+.001),Sp(b.V,k.startTime).catch(function(){}));if(xq(a)&&Hq(a,b,k))return null;Iq(a,b,d,k,g).catch(function(){});b.Ub&&Jq(a,b.Ub,d,f);return null}
function Gq(a,b,c,d){if(b.ea){var e=b.ea.current();e&&b.ua&&(c=b.ua.endTime,ro(b.ua.startTime,e.startTime,.002)&&ro(c,e.endTime,.002)&&(e=b.ea.next().value));return e}if(b.ua||d)return e=b.ua?b.ua.endTime:d,c=a.g.bb()<0,b.stream.segmentIndex&&(b.ea=b.stream.segmentIndex.qb(e,!1,c)),b.ea&&b.ea.next().value;d=a.j.sequenceMode||xq(a)?0:a.i.inaccurateManifestTolerance;var f=Math.max(c-d,0),g=a.g.R.getDuration();Math.abs(f-g)<1&&(d=1,f=Math.max(c-d,0));g=a.g.bb()<0;a=null;d&&(b.stream.segmentIndex&&(b.ea=
b.stream.segmentIndex.qb(f,!1,g)),a=b.ea&&b.ea.next().value);a||(b.stream.segmentIndex&&(b.ea=b.stream.segmentIndex.qb(c,!1,g)),a=b.ea&&b.ea.next().value);for(;((e=a)==null?void 0:e.Jb())===2;)d=c=void 0,a=(d=(c=b.ea)==null?void 0:c.next().value)!=null?d:null;return a}
function Iq(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,u,v,w,x,y,z,A,F,G;return D(function(B){switch(B.h){case 1:f=Ec;g=b.stream;h=b.ea;b.wa=!0;B.m(2);if(d.Jb()==2)throw new V(1,1,1011);return B.g(Kq(a,b,d,e),4);case 4:Km(a.l);if(a.D)return B.return();k=g.mimeType=="video/mp4"||g.mimeType=="audio/mp4";l=window.ReadableStream;if((m=a.i.lowLatencyMode&&a.j.isLowLatency)&&l&&k&&(a.j.type!="HLS"||d.u))return r=new Uint8Array(0),v=u=!1,x=function(H){var J,O,M,I;return D(function(L){switch(L.h){case 1:if(u)return L.return();
v=!0;Km(a.l);if(a.D)return L.return();L.m(2);r=uc(r,H);J=!1;O=0;(new ah).box("mdat",function(Q){O=Q.size+Q.start;J=!0}).parse(r,!1,!0);if(!J){L.A(4);break}M=r.subarray(0,O);r=r.subarray(O);return L.g(Lq(a,b,c,g,d,M,!0,e),5);case 5:b.V&&b.ea&&Sp(b.V,d.startTime,!0);case 4:L.o(0);break;case 2:w=I=L.l(),L.j()}})},B.g(Mq(a,b,d,x),9);n=Mq(a,b,d);return B.g(n,7);case 7:q=B.i;Km(a.l);if(a.D)return B.return();Km(a.l);return b.ob?(b.wa=!1,lq(a,b,0),B.return()):B.g(Lq(a,b,c,g,d,q,!1,e),6);case 9:y=B.i;if(w)throw w;
if(v){B.A(10);break}u=!0;Km(a.l);return a.D?B.return():b.ob?(b.wa=!1,lq(a,b,0),B.return()):B.g(Lq(a,b,c,g,d,y,!1,e),10);case 10:b.V&&b.ea&&Sp(b.V,d.startTime,!0);case 6:Km(a.l);if(a.D)return B.return();b.ua=d;h.next();b.wa=!1;b.lf=!1;z=a.g.R.Vb();A=z[b.type];Ua(JSON.stringify(A));b.ob||(F=null,b.type===f.na?F=a.h.get(f.U):b.type===f.U&&(F=a.h.get(f.na)),F&&F.type==f.U?a.g.Jc(d,b.stream,F.stream.isAudioMuxedInVideo,!1):a.g.Jc(d,b.stream,b.stream.codecs.includes(","),!1));dq(b);lq(a,b,0);B.o(0);break;
case 2:G=B.l();Km(a.l,G);if(a.D)return B.return();b.wa=!1;if(G.code==7001)b.wa=!1,dq(b),lq(a,b,0),B.A(0);else if(b.type==f.Ma&&a.i.ignoreTextStreamFailures)a.h.delete(f.Ma),B.A(0);else{if(G.code==3017)return B.g(Nq(a,b,G),0);b.Fc=!0;G.category==1&&b.V&&Yp(b.V,d);G.severity=2;return B.g(Cq(a,b,G),0)}}})}
function Jq(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w;return D(function(x){switch(x.h){case 1:e=Ec;f=b.stream;for(k=(h=(g=f.segmentIndex)&&g.qb(c))&&h.next().value;k&&a.O.includes(k.startTime);)k=h&&h.next().value;if(!k){x.A(0);break}l=k.oa;if(!l||$i(l,b.Ta)){x.A(3);break}b.Ta=l;x.m(4);return x.g(Mq(a,b,l),6);case 6:m=x.i;if(!a.g)return x.return();var y=a.g.R;y.C&&Hc(y.C,m,0,f);a.O=[];x.o(3);break;case 4:throw n=x.l(),b.Ta=null,n;case 3:if(b.ua&&b.ua==k){x.A(0);break}b.ua=k;x.m(8);return x.g(Mq(a,b,
k),10);case 10:q=x.i;if(!a.g)return x.return();y=a.g.R;y.C&&Hc(y.C,q,0,f);a.O.push(k.startTime);x.o(9);break;case 8:throw r=x.l(),b.ua=null,r;case 9:if(!a.g)return x.return();b.ob||(u=null,b.type===e.na?u=a.h.get(e.U):b.type===e.U&&(u=a.h.get(e.na)),u&&u.type==e.U?a.g.Jc(k,b.stream,u.stream.isAudioMuxedInVideo,!0):a.g.Jc(k,b.stream,b.stream.codecs.includes(","),!0));v=Math.max.apply(Math,[0].concat(C(a.O)));w=a.g.rb();if(w+d>v)return x.g(Jq(a,b,k.startTime,d),0);x.A(0)}})}
function Nq(a,b,c){var d,e,f,g,h,k,l,m,n,q,r;return D(function(u){switch(u.h){case 1:d=!1;e=t(a.h.values());for(f=e.next();!f.done;f=e.next())if(g=f.value,g!=b&&g.lf){d=!0;break}if(d){u.A(2);break}if(a.i.avoidEvictionOnQuotaExceededError){h=Oq(a,c);if(k=a.g.disableStream(b.stream,h))return u.return();lq(a,b,4);return u.return()}l=Math.round(100*a.C);if(l>20){a.C-=.2;u.A(3);break}if(l>4){a.C-=.04;u.A(3);break}m=Oq(a,c);n=a.g.disableStream(b.stream,m);if(!n){b.Fc=!0;a.D=!0;a.g.onError(c);u.A(5);break}a.C=
1;q=a.g.rb();return u.g(Pq(a,b,q),5);case 5:return u.return();case 3:return b.lf=!0,r=a.g.rb(),u.g(Pq(a,b,r),2);case 2:lq(a,b,4),u.j()}})}
function Kq(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,x,y,z;return D(function(A){switch(A.h){case 1:e=Ec;f=b.ua==null;g=[];h=Math.max(0,Math.max(c.F,a.ha)-.1);k=Math.min(c.D,a.aa)+.1;l=c.codecs||b.stream.codecs;m=Ie(l);n=Je(c.mimeType||b.stream.mimeType);q=c.l;if(q==b.Zd&&h==b.Mb&&k==b.Lb&&m==b.Xd&&n==b.Yd){A.A(2);break}r=b.Xd&&b.Yd&&mp(a.g.R,b.type,n,l,zq(a));if(!r){A.A(3);break}u=null;b.type===e.na?u=a.h.get(e.U):b.type===e.U&&(u=a.h.get(e.na));if(!u){A.A(3);break}return A.g(eq(u).catch(function(){}),
5);case 5:u.Ta=null,u.Mb=null,u.Lb=null,uq(a,u);case 3:return A.g(Qq(a,b,q,h,k,c,m,n),2);case 2:return $i(c.oa,b.Ta)||(b.Ta=c.oa,c.i&&c.oa&&(v=Mq(a,b,c.oa),w=function(){var F,G,B,H,J,O,M,I,L,Q,K;return D(function(N){switch(N.h){case 1:return N.m(2),N.g(v,4);case 4:return F=N.i,Km(a.l),G=null,B=new Map,H={projection:null,hfov:null},b.stream&&(J=b.stream.videoLayout)&&(O=J.split("/"),O.includes("PROJ-RECT")?H.projection="rect":O.includes("PROJ-EQUI")?H.projection="equi":O.includes("PROJ-HEQU")?H.projection=
"hequ":O.includes("PROJ-PRIM")?H.projection="prim":O.includes("PROJ-AIV")&&(H.projection="hequ")),M=new ah,M.box("moov",fh).box("trak",fh).box("mdia",fh).ba("mdhd",function(T){G=nh(T.reader,T.version).timescale}).ba("hdlr",function(T){T=T.reader;T.skip(4);T=T.Yb(4,!1);switch(String.fromCharCode(T[0],T[1],T[2],T[3])){case "soun":B.set(e.U,G);break;case "vide":B.set(e.na,G)}G=null}),b.type!==e.na||H.projection||M.box("minf",fh).box("stbl",fh).ba("stsd",hh).boxes("encv avc1 avc3 hev1 hvc1 dvav dva1 dvh1 dvhe dvc1 dvi1".split(" "),
ih).box("vexu",fh).box("proj",fh).ba("prji",function(T){T=T.reader.Pc();H.projection=T}).box("hfov",function(T){T=T.reader.P()/1E3;H.hfov=T}),M.parse(F,!0,!0),b.type===e.na&&Rq(a,H),B.has(b.type)?c.oa.timescale=B.get(b.type):G!=null&&(c.oa.timescale=G),I=b.stream.segmentIndex,I instanceof sj&&(L=uj(I,c.startTime)),Q=b.stream.closedCaptions&&b.stream.closedCaptions.size>0,N.g(a.g.Of(b.type,F),5);case 5:return N.g(Mo(a.g.R,b.type,F,null,b.stream,Q,b.qc,d,!1,!1,L),6);case 6:N.o(0);break;case 2:throw K=
N.l(),b.Ta=null,K;}})},x=c.startTime,f&&(y=Io(a.g.R,b.type),y!=null&&(x=y)),a.g.Ni(x,c.oa),g.push(w()))),z=b.ua?b.ua.j:-1,c.j!=z&&g.push(Yo(a.g.R,b.type,c.startTime)),A.g(Promise.all(g),0)}})}
function Qq(a,b,c,d,e,f,g,h){var k,l,m,n,q;return D(function(r){switch(r.h){case 1:k=Ec;l=zq(a);r.m(2);b.Mb=d;b.Lb=e;g&&(b.Xd=g);h&&(b.Yd=h);b.Zd=c;m=a.j.sequenceMode||a.j.type=="HLS";n=null;b.type===k.na?n=a.h.get(k.U):b.type===k.U&&(n=a.h.get(k.na));if(!(n&&n.stream&&n.stream.isAudioMuxedInVideo)){r.A(4);break}return r.g(Vo(a.g.R,n.type,c,d,e,m,n.stream.mimeType,n.stream.codecs,l),4);case 4:return r.g(Vo(a.g.R,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),6);case 6:r.o(0);
break;case 2:throw q=r.l(),b.Mb=null,b.Lb=null,b.Xd=null,b.Yd=null,b.Zd=null,q;}})}
function Lq(a,b,c,d,e,f,g,h){g=g===void 0?!1:g;h=h===void 0?!1:h;var k,l,m,n,q;return D(function(r){switch(r.h){case 1:return k=d.closedCaptions&&d.closedCaptions.size>0,a.i.shouldFixTimestampOffset&&(l=d.mimeType=="video/mp4"||d.mimeType=="audio/mp4",m=null,e.oa&&(m=e.oa.timescale),(n=l&&m&&d.type==="video"&&a.j.type=="DASH")&&(new ah).box("moof",fh).box("traf",fh).ba("tfdt",function(u){var v,w,x,y,z,A;return D(function(F){v=mh(u.reader,u.version);w=v.baseMediaDecodeTime;if(!w)return F.return();
x=-w/m;y=Number(b.Zd)||0;if(!(y<x))return F.A(0);z=b.Mb;A=b.Lb;return F.g(Qq(a,b,x,z,A,e),0)})}).parse(f,!1,g)),r.g(Pq(a,b,c),2);case 2:return Km(a.l),q=b.qc,b.qc=!1,r.g(a.g.Of(b.type,f),3);case 3:return r.g(Mo(a.g.R,b.type,f,e,d,k,q,h,g),4);case 4:Km(a.l),r.j()}})}
function Pq(a,b,c){var d,e,f,g,h,k,l,m,n;return D(function(q){if(q.h==1){a.G==b&&(a.G=null);d=b.stream.segmentIndex;d instanceof sj&&(d.Ia(a.j.presentationTimeline.Ib()),e=[],tj(d,function(r){e.push(r.Ld())}));f=Math.max(a.i.bufferBehind*a.C,a.j.presentationTimeline.h);g=Go(a.g.R,b.type);if(g==null)return q.return();h=c-g;k=a.i.evictionGoal;l=a.j.presentationTimeline.sb();m=a.j.presentationTimeline.cb();n=h-f;m-l>k&&(n=Math.max(h-f,l-k-g));return n<=k?q.return():q.g(a.g.R.remove(b.type,g,g+n,e),2)}if(q.h!=
4)return Km(a.l),a.G?q.g(Pq(a,a.G,c),4):q.A(0);Km(a.l);q.j()})}function Eq(a){return a&&a.type==Cc&&(a.stream.mimeType=="application/cea-608"||a.stream.mimeType=="application/cea-708")}
function Mq(a,b,c,d){var e,f,g,h,k;return D(function(l){switch(l.h){case 1:if(e=c.ec())return l.return(e);f=null;if(b.V){var m=b.V,n=m.g;c instanceof Zi&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.Bf=d),f=m.nd):f=null}f||(f=Aq(c,b.stream,d||null,a.i.retryParameters,a.g.kc));g=0;b.ea&&(g=b.ea.h);b.Ea=f;return l.g(f.promise,2);case 2:h=l.i;b.Ea=null;k=h.data;if(!c.aesKey){l.A(3);break}return l.g(Zj(k,c.aesKey,g),4);case 4:k=l.i;case 3:return l.return(k)}})}
function Aq(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a instanceof X?a:void 0,h=g?1:0;a=ck(a.Ka(),a.startByte,a.endByte,d,c);a.contentType=b.type;return e.request(Li,a,{type:h,stream:b,segment:g,isPreload:f})}
function wq(a,b,c,d){var e,f;return D(function(g){if(g.h==1)return b.ob=!1,b.Xc=!1,b.zc=0,b.pb=!0,b.ua=null,b.ea=null,b.V&&!a.m.has(b.stream)&&Zp(b.V),d?(e=a.g.rb(),f=a.g.R.getDuration(),g.g(a.g.R.remove(b.type,e+d,f),3)):g.g(Uo(a.g.R,b.type),4);if(g.h!=3)return Km(a.l),c?g.g(a.g.R.flush(b.type),3):g.A(3);Km(a.l);b.pb=!1;b.endOfStream=!1;b.wa||b.Ua||lq(a,b,0);g.j()})}
function lq(a,b,c){var d=b.type;if(d!=Cc||a.h.has(d))b.Ua=(new W(function(){var e;return D(function(f){if(f.h==1)return f.m(2),f.g(Bq(a,b),4);if(f.h!=2)return f.o(0);e=f.l();if(a.g)a.g.onError(e);f.j()})})).ra(c)}function dq(a){a.Ua!=null&&(a.Ua.stop(),a.Ua=null)}function eq(a){return D(function(b){return a.Ea?b.g(a.Ea.abort(),0):b.A(0)})}
function Cq(a,b,c){var d,e,f,g,h;return D(function(k){switch(k.h){case 1:return c.code==3024?(b.wa=!1,dq(b),lq(a,b,0),k.return()):k.g(ni(a.Y),2);case 2:Km(a.l);if(c.category===1&&c.code!=1003){if(b.Zb)return nq(a,!1),k.return();d=Oq(a,c);c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(c.handled||c.code!=1011){k.A(3);break}e=a.g.rb();f=Io(a.g.R,b.type);for(g=Gq(a,b,e,f);((h=g)==null?void 0:h.Jb())===2;)b.ua=g,g=Gq(a,b,e,f);if(!g){k.A(3);break}return k.g(Yo(a.g.R,b.type,g.startTime),
5);case 5:return b.wa=!1,b.Fc=!1,dq(b),lq(a,b,0),k.return();case 3:if(!c.handled||c.code!=1011)a.g.onError(c);c.handled||a.i.failureCallback(c);k.j()}})}function Oq(a,b){return a.i.maxDisabledTime===0&&b.code==1011?1:a.i.maxDisabledTime}
function Fq(a,b){b=b===void 0?!1:b;var c,d,e,f,g,h;return D(function(k){if(k.h==1){c=Date.now()/1E3;d=a.i.minTimeBetweenRecoveries;if(!b&&(!a.i.allowMediaSourceRecoveries||c-a.S<d))return k.return(!1);a.S=c;e=Ec;if(f=a.h.get(e.U))dq(f),f.Ea&&(f.Ea.abort(),f.Ea=null),f.Ta=null,f.Mb=null,f.Lb=null,f.wa=!1,f.ob=!1,f.zc=0,f.Xc=!1,f.pb=!1,f.ea&&f.ea.rf();if(g=a.h.get(e.na))dq(g),g.Ea&&(g.Ea.abort(),g.Ea=null),g.Ta=null,g.Mb=null,g.Lb=null,g.wa=!1,g.ob=!1,g.zc=0,g.Xc=!1,g.pb=!1,g.ea&&g.ea.rf();h=a.g.video.paused;
return k.g(gp(a.g.R,zq(a)),2)}!g||g.pb||g.wa||g.Ua||lq(a,g,0);!f||f.pb||f.wa||f.Ua||lq(a,f,0);h||a.g.video.play();return k.return(!0)})}function Rq(a,b){if(a.W.projection!=b.projection||a.W.hfov!=b.hfov){if(b.projection!=null||b.hfov!=null){var c=(new Map).set("detail",b);c=new wi("spatialvideoinfo",c)}else c=new wi("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.W=b}}
function xq(a){if(a.i.crossBoundaryStrategy!=="keep")return!0;var b=P();if(!b.Za()){b=t(a.h.keys());for(var c=b.next();!c.done;c=b.next())if(c=a.h.get(c.value),c.type!==Ec.Ma&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1)return!0}else if(!b.pe())for(b=t(a.h.keys()),c=b.next();!c.done;c=b.next())if(c=a.h.get(c.value),c.type!==Ec.Ma&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1){a=new Set;b=t(c.fullMimeTypes);for(c=b.next();!c.done;c=b.next())a.add(Fe(c.value));return a.size>1}return!1}
function tq(a){a.F.Ya();xq(a)&&(a.F.H(a.g.video,"waiting",function(){return yq(a)}),a.F.H(a.g.video,"timeupdate",function(){return yq(a)}))}function yq(a){if(xq(a)){a.L.stop();var b=a.g.rb(),c=a.h.get("video")||a.h.get("audio");c&&(c=c.Ta)&&c.g!==null&&(b=c.g-b,b<0||b>1||(a.I=c.g+.1,a.L.ra(b)))}}
function Hq(a,b,c){if(b.type===Cc)return!1;var d=b.Ta;if(!d)return!1;var e=c.oa;c=d.g!==e.g;a.i.crossBoundaryStrategy==="reset_to_encrypted"&&(d.encrypted||e.encrypted||(c=!1),d.encrypted&&(a.i.crossBoundaryStrategy="keep"));a.i.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&d.encrypted==e.encrypted&&(c=!1);if(a.i.crossBoundaryStrategy==="keep"&&d.mimeType&&e.mimeType){var f=Ge(Ke(d.mimeType)),g=Ge(Ke(e.mimeType));d.mimeType==e.mimeType&&f==g&&(c=!1)}(a.h.get("video")||a.h.get("audio"))===
b&&c&&(a.K||b.qc)&&(a.K=!1,Fq(a,!0).then(function(){var h=(new Map).set("oldEncrypted",d.encrypted).set("newEncrypted",e.encrypted);a.g.onEvent(new wi("boundarycrossed",h))}));return c}
function zq(a,b){function c(f){if(f.fullMimeTypes&&f.fullMimeTypes.size>1&&a.h.has(f.type)){var g=a.h.get(f.type),h=Io(a.g.R,g.type),k=a.g.rb();(g=Gq(a,g,k,h))&&g.codecs&&g.mimeType&&(f.codecs=g.codecs,f.mimeType=g.mimeType)}}b=b===void 0?!1:b;var d=new Map,e=a.o.audio;e&&(c(e),d.set("audio",e));if(e=a.o.video)c(e),d.set("video",e);b&&a.B&&d.set(Cc,a.B);return d};function Sq(){this.g=null;this.h=[]}function Tq(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 Uq(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 Vq(){this.i=this.h=null;this.g=[]}function Wq(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 Xq(){this.C=this.Y=NaN;this.l="";this.j=this.vg=this.u=this.B=this.L=this.D=this.o=this.m=this.K=this.F=this.i=this.W=this.X=this.N=this.O=this.S=NaN;this.M=0;this.G=this.I=NaN;this.g=new Sq;this.h=new Vq}function Yq(a,b,c){a.S=b;a.O=c}function Zq(a,b,c){a.Y=b;a.C=c}function $q(a,b){a.i=isNaN(a.i)?b:Math.max(a.i,b)}function ar(a,b){b>=0&&(a.o=b)}function br(a,b){b>=0&&(a.D=b)}function cr(a,b){b>=0&&(a.L=b)}function dr(a,b){a.j=isNaN(a.j)?b:a.j+b}
function er(a){var b=a.Y,c=a.C,d=a.l,e=a.B,f=a.O,g=a.S,h=a.N,k=a.X,l=a.W,m=a.u,n=a.i,q=a.F,r=a.K,u=a.m,v=Tq(a.g,"playing"),w=Tq(a.g,"paused"),x=Tq(a.g,"buffering"),y=a.o,z=a.D,A=a.L,F=a.vg,G=a.j,B=a.M,H=a.I,J=a.G,O=Uq(a.g),M=[];a=t(a.h.g);for(var I=a.next();!I.done;I=a.next())I=I.value,M.push({timestamp:I.timestamp,id:I.id,type:I.type,fromAdaptation:I.fromAdaptation,bandwidth:I.bandwidth});return{width:b,height:c,currentCodecs:d,streamBandwidth:e,decodedFrames:f,droppedFrames:g,corruptedFrames:h,
stallsDetected:k,gapsJumped:l,estimatedBandwidth:m,completionPercent:n,loadLatency:q,manifestTimeSeconds:r,drmTimeSeconds:u,playTime:v,pauseTime:w,bufferingTime:x,licenseTime:y,liveLatency:z,maxSegmentDuration:A,manifestSizeBytes:F,bytesDownloaded:G,nonFatalErrorCount:B,manifestPeriodCount:H,manifestGapCount:J,stateHistory:O,switchHistory:M}};function fr(a,b,c,d){xi.call(this);this.N=a;this.X=b;this.Ba=d.networkingEngine;this.m=c;this.B=null;this.za=0;this.Ga=d.Md;this.F=d.Di;this.Sa=d.Ei;this.g=d.config;this.l=this.G=this.h=null;this.sa=!1;this.I=d.Si;this.xa=!1;this.j=null;this.ha=!1;this.o=null;this.M=new Map;this.ya=!1;this.Fa=d.Ri;this.Y=new Xq;this.ka=new oi;this.u=new oi;this.O=null;this.C=!1;this.aa=d.wh;this.W=this.i=null;this.S=!1;this.L=[];this.K=[];this.D=!0}ma(fr,xi);function gr(a,b,c){(a=b?a.K:a.L)?a.push(c):c()}
function hr(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 ir(a,b){a.O=b;a.S=!0;if(a.L){b=t(a.L);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.L=null}p=fr.prototype;p.getStartTime=function(){return this.m};p.Od=function(){return this.N};p.Re=function(){return this.h};function jr(a){a.xa=!0;return a.I}p.getStats=function(){return this.Y};function kr(a){a.ha=!0;return a.j}p.bi=function(){return this.i?Jf(this.i):null};
p.ai=function(){return this.W?Kf(this.W):null};function lr(a){a.ya=!0;return a.M}
p.start=function(){var a=this;(function(){var b;return D(function(c){switch(c.h){case 1:return c.g(Promise.resolve(),2);case 2:return c.m(3),c.g(mr(a),5);case 5:nr(a);if("webkit"===window.shakaMediaKeysPolyfill){c.A(6);break}return c.g(or(a),7);case 7:nr(a);case 6:return c.g(pr(a),8);case 8:nr(a);if(!a.aa){c.A(9);break}return c.g(qr(a),10);case 10:nr(a);case 9:if(!a.aa||!a.j){c.A(11);break}return c.g(yn(a.j),12);case 12:nr(a);case 11:a.u.resolve();c.o(0);break;case 3:b=c.l(),b instanceof V&&(b.code==
7001||b.code==7003)||a.u.reject(b),c.j()}})})()};p.dispatchEvent=function(a){return this.O?this.O.dispatchEvent(a):xi.prototype.dispatchEvent.call(this,a)};p.onError=function(a){a.severity===2&&(this.u.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new wi("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function nr(a){if(a.C)throw new V(2,7,7003);}function rr(a,b){a.dispatchEvent(new wi("onstatechange",(new Map).set("state",b)))}
function mr(a){var b,c,d,e,f,g;return D(function(h){switch(h.h){case 1:rr(a,"manifest-parser");a.l||(a.G=Qc(a.N,a.X),a.l=a.G(),a.l.configure(a.g.manifest,function(){return a.D}));b=Date.now()/1E3;rr(a,"manifest");if(a.h){h.A(2);break}return h.g(a.l.start(a.N,a.Sa),3);case 3:return a.h=h.i,sr(a.h),h.g(tr(a),2);case 2:return a.ka.resolve(),c=new wi("manifestparsed",void 0),h.g(Promise.resolve(),5);case 5:a.dispatchEvent(c);if(a.h.variants.length==0)throw new V(2,4,4036);sr(a.h);d=no(a.F,a.h);if(!d){h.A(6);
break}e=new wi("trackschanged",void 0);return h.g(Promise.resolve(),7);case 7:nr(a),a.dispatchEvent(e);case 6:f=Date.now()/1E3,g=f-b,g>=0&&(a.Y.K=g),h.j()}})}
function or(a,b){var c,d,e,f;return D(function(g){switch(g.h){case 1:if(!a.h||a.j)return g.return();rr(a,"drm-engine");a.za=Date.now()/1E3;a.j=a.Ga();a.F.g=a.j;a.j.configure(a.g.drm,function(){return a.D});c=Rf(a.h.variants);d=!0;a.h&&a.h.presentationTimeline&&(d=a.h.presentationTimeline.T());return g.g(Um(a.j,c,a.h.offlineSessionIds,d),2);case 2:nr(a);if(!b){g.A(3);break}return g.g(a.j.Eb(b),4);case 4:nr(a);case 3:return g.g(lo(a.F,a.h),5);case 5:e=g.i;if(!e){g.A(0);break}f=new wi("trackschanged",
void 0);return g.g(Promise.resolve(),7);case 7:a.dispatchEvent(f),g.j()}})}p.configure=function(a,b){a=kl(a,b);tl(this.g,a)};p.getConfiguration=function(){return id(this.g)};
function tr(a){return D(function(b){a.B||(a.B=a.g.adaptationSetCriteriaFactory(),a.B.configure({language:a.g.preferredAudioLanguage,role:a.g.preferredAudioRole,videoRole:a.g.preferredVideoRole,channelCount:0,hdrLevel:a.g.preferredVideoHdrLevel,spatialAudio:a.g.preferSpatialAudio,videoLayout:a.g.preferredVideoLayout,audioLabel:a.g.preferredAudioLabel,videoLabel:a.g.preferredVideoLabel,codecSwitchingStrategy:a.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,
preferredAudioCodecs:a.g.preferredAudioCodecs,preferredAudioChannelCount:a.g.preferredAudioChannelCount}));if(a.i||!a.h.variants.length||a.h.variants.length!=1&&a.h.type!="HLS")return b.A(0);a.i=ur(a);return a.i?b.g(vr(a.i),0):b.A(0)})}function pr(a){return D(function(b){if(b.h==1)return!a.i||a.h.variants.includes(a.i)?b.A(0):b.g(wr(a.i),3);a.i=ur(a);return a.i?b.g(vr(a.i),0):b.A(0)})}
function qr(a){var b,c,d,e,f;return D(function(g){!a.i&&(b=ur(a))&&(a.i=b);if(!a.i)return g.A(0);c=a.h.presentationTimeline.T();d=[];e=a.i;e.video&&d.push(xr(a,e.video,c));e.audio&&d.push(xr(a,e.audio,c));(f=Sf(a.h.textStreams,a.g.preferredTextLanguage,a.g.preferredTextRole,a.g.preferForcedSubs)[0]||null)&&Wf(e.audio,f,a.g)&&(d.push(xr(a,f,c)),a.W=f);return g.g(Promise.all(d),0)})}
function ur(a){if(!a.o){var b=a.g.abrFactory;a.o=b();a.o.configure(a.g.abr)}b=Rf(a.h.variants);b=a.B.create(b);a.o.setVariants(Array.from(b.values()));return a.o.chooseVariant(!0)}
function xr(a,b,c){var d,e,f,g,h;return D(function(k){if(k.h==1)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Qp(d,b,function(l,m,n){return Aq(l,m,n||null,a.g.streaming.retryParameters,a.Ba,a.D)},!1),a.M.set(b.id,e),b.segmentIndex?k.A(2):k.g(b.createSegmentIndex(),2);f=typeof a.m==="number"?a.m:0;g=b.segmentIndex.qb(f);h=null;g&&(h=g.current(),h||(h=g.next().value));h||(h=b.segmentIndex.Ne());return h?c?h.oa?k.g(Tp(e,h.oa),0):k.A(0):k.g(Sp(e,h.startTime),0):k.A(0)})}
function vr(a){var b,c,d,e;return D(function(f){b=[];c=t([a.video,a.audio]);for(d=c.next();!d.done;d=c.next())(e=d.value)&&!e.segmentIndex&&b.push(e.createSegmentIndex());return b.length>0?f.g(Promise.all(b),0):f.A(0)})}function wr(a){var b,c,d,e;return D(function(f){b=[];c=t([a.video,a.audio]);for(d=c.next();!d.done;d=c.next())(e=d.value)&&e.segmentIndex&&e.closeSegmentIndex&&b.push(e.closeSegmentIndex());return b.length>0?f.g(Promise.all(b),0):f.A(0)})}p.nj=function(){return this.u};
p.destroy=function(){var a=this,b,c,d;return D(function(e){if(e.h==1)return a.C=!0,!a.l||a.sa?e.A(2):e.g(a.l.stop(),2);if(e.h!=4)return a.o&&a.o.release(),a.I&&!a.xa&&a.I.release(),!a.j||a.ha?e.A(4):e.g(a.j.destroy(),4);if(a.M.size>0&&!a.ya)for(b=t(a.M.values()),c=b.next();!c.done;c=b.next())d=c.value,Zp(d);e.j()})};function sr(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))}E("shaka.media.PreloadManager",fr);
fr.prototype.destroy=fr.prototype.destroy;fr.prototype.waitForFinish=fr.prototype.nj;fr.prototype.getPrefetchedTextTrack=fr.prototype.ai;fr.prototype.getPrefetchedVariantTrack=fr.prototype.bi;function yr(a,b){xi.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{yc:null,xc:zr,fc:function(d,e){return Ar(c,"enter",d,e)}},{yc:Br,xc:zr,fc:function(d,e){return Ar(c,"enter",d,e)}},{yc:Cr,xc:zr,fc:function(d,e){return Ar(c,"enter",d,e)}},{yc:zr,xc:Br,fc:function(d,e){return Ar(c,"exit",d,e)}},{yc:zr,xc:Cr,fc:function(d,e){return Ar(c,"exit",d,e)}},{yc:Br,xc:Cr,fc:function(d,e){e?Ar(c,"skip",d,e):(Ar(c,"enter",d,e),Ar(c,"exit",d,e))}},{yc:Cr,xc:Br,fc:function(d,e){return Ar(c,"skip",
d,e)}}];this.h=new eb;this.h.H(this.i,"regionremove",function(d){c.g.delete(d.region)})}ma(yr,xi);yr.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;xi.prototype.release.call(this)};
yr.prototype.j=function(a,b){if(!this.l||a!=0){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?Br:a>d.endTime?Cr:zr;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.yc==e&&h.xc==f&&h.fc(d,b)}}};function Ar(a,b,c,d){b=new wi(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Br=1,zr=2,Cr=3;function Dr(a,b,c,d,e,f,g){if(c>=200&&c<=299&&c!=202||c==304)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"],originalRequest:f};f=null;try{f=ic(b)}catch(h){}throw new V(c==401||c==403?2:1,1,1001,d,c,f,a,g,e||d);};function Er(){}
function Fr(a,b,c,d,e,f){var g=new Gr;try{Nm(b.headers).forEach(function(m,n){g.append(n,m)})}catch(m){return qi(new V(1,1,1002,a,m,c))}var h=new Hr,k={Pf:!1,ih:!1};a=Ir(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 pi(a,function(){k.Pf=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new W(function(){k.ih=!0;h.abort()});l.ra(b/
1E3);a.finally(function(){l.stop()})}return a}
function Ir(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,u,v,w,x,y,z,A,F,G,B;return D(function(H){switch(H.h){case 1:return l=Jr,m=Kr,q=new ArrayBuffer(0),u=r=0,v={},w=Date.now(),H.m(2),H.g(l(a,d),4);case 4:n=H.i;v=Lr(n.headers);g(v);if(d.method=="HEAD"){H.A(5);break}y=(x=n.headers.get("Content-Length"))?parseInt(x,10):0;if(!n.body)return H.g(n.arrayBuffer(),9);z=n.clone().body.getReader();A=function(J){function O(){var M,I,L,Q;return D(function(K){switch(K.h){case 1:return K.m(2),K.g(z.read(),4);case 4:M=K.i;
K.o(3);break;case 2:return K.l(),K.return();case 3:if(M.done){K.A(5);break}r+=M.value.byteLength;if(!h){K.A(5);break}return K.g(h(M.value),5);case 5:I=Date.now();L=r-u;if(I-w>100&&L>=k||M.done)Q=M.done?0:y-r,f(I-w,L,Q),u=r,w=I;M.done?J.close():(J.enqueue(M.value),O());K.j()}})}O()};new m({start:A});return H.g(n.arrayBuffer(),8);case 8:q=H.i;H.A(5);break;case 9:q=H.i,F=Date.now(),f(F-w,q.byteLength,0);case 5:b.headers.Range&&(G=b.headers.Range.replace("bytes=","").split("-").filter(function(J){return J}).map(function(J){return parseInt(J,
10)}),G.length==2&&q.byteLength!=G[1]-G[0]+1&&Qa("Payload length does not match range requested bytes",b,n));H.o(3);break;case 2:B=H.l();if(e.Pf)throw new V(1,1,7001,a,c);if(e.ih)throw new V(1,1,1003,a,c);throw new V(1,1,1002,a,B,c);case 3:return H.return(Dr(v,q,n.status,a,n.url,b,c))}})}function Lr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
function Mr(){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)}E("shaka.net.HttpFetchPlugin",Er);Er.isSupported=Mr;Er.parse=Fr;var Jr=window.fetch,Hr=window.AbortController,Kr=window.ReadableStream,Gr=window.Headers;Mr()&&(Bi("http",Fr,2,!0),Bi("https",Fr,2,!0),Bi("blob",Fr,2,!0));function Nr(){}
function Or(a,b,c,d,e,f){var g=new Pr,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;var q={};g.onabort=function(){n(new V(1,1,7001,a,c))};g.onreadystatechange=function(){if(g.readyState===XMLHttpRequest.HEADERS_RECEIVED){var u=g.getAllResponseHeaders().trim().split("\r\n"),v={};u=t(u);for(var w=u.next();!w.done;w=u.next()){w=w.value;var x=w.indexOf(": ");x!==-1&&(v[w.slice(0,
x).toLowerCase()]=w.slice(x+2))}q=v;e(q)}};g.onload=function(){var u=g.response;try{var v=Dr(q,u,g.status,a,g.responseURL,b,c);m(v)}catch(w){n(w)}};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(v-h>100&&x>=w||u.lengthComputable&&u.loaded==u.total)d(v-h,x,g.readyState==4?0:u.total-u.loaded),k=u.loaded,h=v};for(var r in b.headers)try{g.setRequestHeader(r.toLowerCase(),
b.headers[r])}catch(u){throw new V(1,1,1002,a,u,c);}g.send(b.body)});return new pi(l,function(){g.abort();return Promise.resolve()})}E("shaka.net.HttpXHRPlugin",Nr);Nr.parse=Or;var Pr=window.XMLHttpRequest;Bi("http",Or,1,!0);Bi("https",Or,1,!0);Bi("blob",Or,1,!0);/*
 @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 Qr={ach:"Lwo",ady:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"T\u0255\u0265i",ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-AR":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-MA":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-SA":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)","ay-BO":"Aymar aru",az:"Az\u0259rbaycan dili","az-AZ":"Az\u0259rbaycan dili",
"be-BY":"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",bg:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438","bg-BG":"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",bn:"\u09ac\u09be\u0982\u09b2\u09be","bn-IN":"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)","bn-BD":"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)","bs-BA":"Bosanski",ca:"Catal\u00e0","ca-ES":"Catal\u00e0",cak:"Maya Kaqchikel","ck-US":"\u13e3\u13b3\u13a9 (tsalagi)",
cs:"\u010ce\u0161tina","cs-CZ":"\u010ce\u0161tina",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (\u00d6sterreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"Dolnoserb\u0161\u0107ina",el:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac","el-GR":"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",en:"English","en-GB":"English (UK)","en-AU":"English (Australia)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-IN":"English (India)",
"en-PI":"English (Pirate)","en-UD":"English (Upside Down)","en-US":"English (US)","en-ZA":"English (South Africa)","en@pirate":"English (Pirate)",eo:"Esperanto","eo-EO":"Esperanto",es:"Espa\u00f1ol","es-AR":"Espa\u00f1ol (Argentine)","es-419":"Espa\u00f1ol (Latinoam\u00e9rica)","es-CL":"Espa\u00f1ol (Chile)","es-CO":"Espa\u00f1ol (Colombia)","es-EC":"Espa\u00f1ol (Ecuador)","es-ES":"Espa\u00f1ol (Espa\u00f1a)","es-LA":"Espa\u00f1ol (Latinoam\u00e9rica)","es-NI":"Espa\u00f1ol (Nicaragua)","es-MX":"Espa\u00f1ol (M\u00e9xico)",
"es-US":"Espa\u00f1ol (Estados Unidos)","es-VE":"Espa\u00f1ol (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"\u0641\u0627\u0631\u0633\u06cc","fa-IR":"\u0641\u0627\u0631\u0633\u06cc","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"F\u00f8royskt",fr:"Fran\u00e7ais","fr-CA":"Fran\u00e7ais (Canada)","fr-FR":"Fran\u00e7ais (France)","fr-BE":"Fran\u00e7ais (Belgique)","fr-CH":"Fran\u00e7ais (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)",
gl:"Galego","gl-ES":"Galego","gn-PY":"Ava\u00f1e'\u1ebd","gu-IN":"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0","gx-GR":"\u1f19\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ae \u1f00\u03c1\u03c7\u03b1\u03af\u03b1",he:"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f","he-IL":"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f",hi:"\u0939\u093f\u0928\u094d\u0926\u0940","hi-IN":"\u0939\u093f\u0928\u094d\u0926\u0940",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"Hornjoserb\u0161\u0107ina",ht:"Krey\u00f2l",hu:"Magyar","hu-HU":"Magyar","hy-AM":"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",
id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"\u00cdslenska","is-IS":"\u00cdslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"\u65e5\u672c\u8a9e","ja-JP":"\u65e5\u672c\u8a9e","jv-ID":"Basa Jawa","ka-GE":"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8","kk-KZ":"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",km:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a","km-KH":"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",kab:"Taqbaylit",kn:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1","kn-IN":"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1 (India)",
ko:"\ud55c\uad6d\uc5b4","ko-KR":"\ud55c\uad6d\uc5b4 (\u97e9\u56fd)",ku:"Kurd\u00ee","ku-TR":"Kurd\u00ee",la:"Latin","la-VA":"Latin",lb:"L\u00ebtzebuergesch","li-NL":"L\u00e8mb\u00f6rgs",lt:"Lietuvi\u0173","lt-LT":"Lietuvi\u0173",lv:"Latvie\u0161u","lv-LV":"Latvie\u0161u",mai:"\u092e\u0948\u0925\u093f\u0932\u0940, \u09ae\u09c8\u09a5\u09bf\u09b2\u09c0","mg-MG":"Malagasy",mk:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438","mk-MK":"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 (\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438)",
ml:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02","ml-IN":"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02","mn-MN":"\u041c\u043e\u043d\u0433\u043e\u043b",mr:"\u092e\u0930\u093e\u0920\u0940","mr-IN":"\u092e\u0930\u093e\u0920\u0940",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"\u1017\u1019\u102c\u1005\u1000\u102c",nb:"Norsk (bokm\u00e5l)","nb-NO":"Norsk (bokm\u00e5l)",ne:"\u0928\u0947\u092a\u093e\u0932\u0940","ne-NP":"\u0928\u0947\u092a\u093e\u0932\u0940",nl:"Nederlands","nl-BE":"Nederlands (Belgi\u00eb)",
"nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"\u0b13\u0b21\u0b3c\u0b3f\u0b06",pa:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40","pa-IN":"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40 (\u0a2d\u0a3e\u0a30\u0a24 \u0a28\u0a42\u0a70)",pl:"Polski","pl-PL":"Polski","ps-AF":"\u067e\u069a\u062a\u0648",pt:"Portugu\u00eas","pt-BR":"Portugu\u00eas (Brasil)","pt-PT":"Portugu\u00eas (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"Rom\u00e2n\u0103","ro-RO":"Rom\u00e2n\u0103",ru:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",
"ru-RU":"\u0420\u0443\u0441\u0441\u043a\u0438\u0439","sa-IN":"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d","se-NO":"Davvis\u00e1megiella","si-LK":"\u0db4\u0dc5\u0dcf\u0dad",sk:"Sloven\u010dina","sk-SK":"Sloven\u010dina (Slovakia)",sl:"Sloven\u0161\u010dina","sl-SI":"Sloven\u0161\u010dina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"\u0421\u0440\u043f\u0441\u043a\u0438","sr-RS":"\u0421\u0440\u043f\u0441\u043a\u0438 (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili",
"sw-KE":"Kiswahili",ta:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd","ta-IN":"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",te:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41","te-IN":"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",tg:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301","tg-TJ":"\u0442\u043e\u04b7\u0438\u043a\u04e3",th:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22","th-TH":"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",tl:"Filipino","tl-PH":"Filipino",
tlh:"tlhIngan-Hol",tr:"T\u00fcrk\u00e7e","tr-TR":"T\u00fcrk\u00e7e","tt-RU":"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",uk:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430","uk-UA":"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",ur:"\u0627\u0631\u062f\u0648","ur-PK":"\u0627\u0631\u062f\u0648",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Ti\u1ebfng Vi\u1ec7t","vi-VN":"Ti\u1ebfng Vi\u1ec7t","xh-ZA":"isiXhosa",yi:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9","yi-DE":"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",
zh:"\u4e2d\u6587","zh-HANS":"\u4e2d\u6587\u7b80\u4f53","zh-HANT":"\u4e2d\u6587\u7e41\u9ad4","zh-CN":"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09","zh-HK":"\u4e2d\u6587\uff08\u9999\u6e2f\uff09","zh-SG":"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09","zh-TW":"\u4e2d\u6587\uff08\u53f0\u7063\uff09","zu-ZA":"isiZulu"},Rr=t(Object.keys(Qr)),Sr=Rr.next();!Sr.done;Sr=Rr.next()){var Tr=Sr.value;Qr[Tr.toLowerCase()]=Qr[Tr]};function Ur(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Ur(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=me,e=a.fontStyle==ne,f=a.textDecoration.includes(oe);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;e==""&&b&&(e=b.color);d="";(e=Vr(e))&&(d+="."+e);e=a.backgroundColor;e==""&&b&&(e=b.backgroundColor);(b=Vr(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+(k===void 0?"":k)+">"+g+"</"+h+">"},a.payload)}
function Vr(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("#")&&a.length>7&&(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 Wr(a,b){var c=[];a=t(Xr(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,C(Wr(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Ur(d,b);c.push(e)}return c}
function Xr(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={Ie:void 0},c=a.next())d.Ie=c.value,b.some(function(e){return function(f){return de(e.Ie,f)}}(d))||b.push(d.Ie);return b}
function Yr(a){function b(d){for(var e=5381,f=d.length;f;)e=e*33^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){}a.textAlign=="center"&&c.align!="center"&&(c.align="middle");a.writingMode=="vertical-lr"?c.vertical="lr":a.writingMode=="vertical-rl"&&
(c.vertical="rl");a.lineInterpretation==1&&(c.snapToLines=!1);a.line!=null&&(c.line=a.line);a.position!=null&&(c.position=a.position);return c}
function Zr(a,b){var c=Wr(b),d=[];b=a.cues?Array.from(a.cues):[];c=t(c);for(var e=c.next(),f={};!e.done;f={Gc:void 0},e=c.next())f.Gc=e.value,!b.some(function(g){return function(h){return h.startTime==g.Gc.startTime&&h.endTime==g.Gc.endTime&&h.text==g.Gc.payload?!0:!1}}(f))&&f.Gc.payload&&(e=Yr(f.Gc))&&d.push(e);b=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-d.indexOf(g):d.indexOf(g)-
d.indexOf(h)});b=t(b);for(c=b.next();!c.done;c=b.next())a.addCue(c.value)}function $r(a,b){var c=!1;a.mode==="disabled"&&(c=!0,a.mode="hidden");for(var d=0;d<a.cues.length;){var e=a.cues[d];b(e)?a.removeCue(e):d++}c&&(a.mode="disabled")};function as(a){var b=this;this.i=a;this.l=new eb;this.j=null;this.h=new Map;this.g=-1;this.u=!1;this.m=null;this.C=function(){var c;(c=b.m)==null||c.stop();b.m=null;b.l.eb(b.i,"textchanged",b.o);b.l.eb(b.j.textTracks,"change",b.B);c=t(b.h.values());for(var d=c.next();!d.done;d=c.next())d.value.remove();b.h.clear();b.g=-1;b.j=null};this.o=function(){var c=new Map,d=b.i.Xb();d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;if(b.h.has(e.id)){var f=b.h.get(e.id);e.active||f.track.mode==="disabled"||
(f.track.mode="disabled");b.h.delete(e.id)}else{var g=f=b.j.ownerDocument.createElement("track");var h=P();h=e.forced&&h.va()==="WEBKIT"?"forced":e.kind==="caption"?"captions":"subtitles";g.kind=h;g=f;h=void 0;if(e.label)h=e.label;else if(e.language)if(e.language in Qr)h=Qr[e.language];else{var k=lf(e.language);k in Qr&&(h=Qr[k]+" ("+e.language+")")}h||(h=e.originalTextId,e.language&&e.language!==e.originalTextId&&(h+=" ("+e.language+")"));g.label=h;e.language?e.language in Qr?f.srclang=e.language:
(g=lf(e.language),h=void 0,f.srclang=(h=g)!=null?h:"und"):f.srclang="und";f.src="data:,WEBVTT";f.track.mode="disabled";b.j.appendChild(f)}c.set(e.id,f);e.active&&(b.g=e.id)}d=t(b.h.values());for(e=d.next();!e.done;e=d.next())e.value.remove();b.g>-1&&(c.has(b.g)?(d=c.get(b.g).track,d.mode==="disabled"&&(d.mode=b.u?"showing":"hidden")):b.g=-1);b.h=c};this.B=function(){if(!b.m){var c=b.j;b.m=(new W(function(){b.m=null;if(b.j===c){var d=-1,e=!1;if(b.h.has(b.g)){var f=b.h.get(b.g);f.track.mode==="showing"?
(d=b.g,e=!0):f.track.mode==="hidden"&&(d=b.g)}if(!e)for(e=t(b.h),f=e.next();!f.done;f=e.next()){var g=t(f.value);f=g.next().value;g=g.next().value;if(g.track.mode==="showing"){d=f;break}else d<0&&g.track.mode==="hidden"&&(d=f)}e=t(b.h);for(f=e.next();!f.done;f=e.next())g=t(f.value),f=g.next().value,g=g.next().value,f!==d&&g.track.mode!=="disabled"&&(g.track.mode="disabled");b.g!==d&&(b.g=d,d>-1&&b.i.wf({id:d}));b.i.Yg(d>-1&&b.h.get(d).track.mode==="showing")}})).ra(0)}};this.l.H(a,"loaded",function(){return b.enableTextDisplayer()});
this.enableTextDisplayer()}p=as.prototype;p.configure=function(){};p.remove=function(a,b){if(this.i)this.h.has(this.g)&&$r(this.h.get(this.g).track,function(c){return c.startTime<b&&c.endTime>a});else return!1;return!0};p.append=function(a){this.h.has(this.g)&&Zr(this.h.get(this.g).track,a)};p.destroy=function(){this.i&&(this.j&&this.C(),this.i=null);var a;(a=this.m)==null||a.stop();this.m=null;var b;(b=this.l)==null||b.release();this.l=null;return Promise.resolve()};p.isTextVisible=function(){return this.u};
p.setTextVisibility=function(a){this.u=a;if(this.h.has(this.g)){var b=this.h.get(this.g).track;b.mode!=="disabled"&&(a=a?"showing":"hidden",b.mode!==a&&(b.mode=a))}else if(this.i&&this.i.Qe()===3)if(b=Array.from(this.i.Se().textTracks).filter(function(d){return["captions","subtitles","forced"].includes(d.kind)}),a){a=null;b=t(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c.mode==="showing"){a=null;break}else a||c.mode!=="hidden"||(a=c);a&&(a.mode="showing")}else for(a=t(b),b=a.next();!b.done;b=
a.next())b=b.value,b.mode==="showing"&&(b.mode="hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){!this.j&&this.i&&this.i.Qe()===2&&(this.j=this.i.Se(),this.l.La(this.i,"unloading",this.C),this.l.H(this.i,"textchanged",this.o),this.l.H(this.j.textTracks,"change",this.B),this.o())};E("shaka.text.NativeTextDisplayer",as);as.prototype.enableTextDisplayer=as.prototype.enableTextDisplayer;as.prototype.setTextLanguage=as.prototype.setTextLanguage;as.prototype.setTextVisibility=as.prototype.setTextVisibility;
as.prototype.isTextVisible=as.prototype.isTextVisible;as.prototype.destroy=as.prototype.destroy;as.prototype.append=as.prototype.append;as.prototype.remove=as.prototype.remove;as.prototype.configure=as.prototype.configure;function bs(a,b){R("SimpleTextDisplayer","Please migrate to NativeTextDisplayer");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,b.kind!=="metadata"&&b.kind!=="chapters"&&(b.mode="disabled",b.label==this.i&&(this.g=b));this.g&&(this.g.mode="hidden")}p=bs.prototype;p.configure=function(){};p.remove=function(a,b){if(!this.g)return!1;$r(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
p.append=function(a){this.g&&Zr(this.g,a)};p.destroy=function(){this.g&&($r(this.g,function(){return!0}),this.g.mode="disabled");this.g=this.h=null;return Promise.resolve()};p.isTextVisible=function(){return this.g?this.g.mode=="showing":!1};p.setTextVisibility=function(a){a&&!this.g&&cs(this);this.g&&(this.g.mode=a?"showing":"hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){cs(this)};function cs(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")}
E("shaka.text.SimpleTextDisplayer",bs);bs.prototype.enableTextDisplayer=bs.prototype.enableTextDisplayer;bs.prototype.setTextLanguage=bs.prototype.setTextLanguage;bs.prototype.setTextVisibility=bs.prototype.setTextVisibility;bs.prototype.isTextVisible=bs.prototype.isTextVisible;bs.prototype.destroy=bs.prototype.destroy;bs.prototype.append=bs.prototype.append;bs.prototype.remove=bs.prototype.remove;bs.prototype.configure=bs.prototype.configure;function ds(){}p=ds.prototype;p.configure=function(){};p.remove=function(){};p.append=function(){};p.destroy=function(){};p.isTextVisible=function(){return!1};p.setTextVisibility=function(){};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){};E("shaka.text.StubTextDisplayer",ds);ds.prototype.enableTextDisplayer=ds.prototype.enableTextDisplayer;ds.prototype.setTextLanguage=ds.prototype.setTextLanguage;ds.prototype.setTextVisibility=ds.prototype.setTextVisibility;
ds.prototype.isTextVisible=ds.prototype.isTextVisible;ds.prototype.destroy=ds.prototype.destroy;ds.prototype.append=ds.prototype.append;ds.prototype.remove=ds.prototype.remove;ds.prototype.configure=ds.prototype.configure;function es(a,b){var c=this;this.j=!1;this.h=[];this.m=a;this.l=b;this.C=this.u=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.B=new W(function(){c.m.paused||fs(c)});gs(this);this.o=new Map;this.i=new eb;this.i.H(document,"fullscreenchange",function(){fs(c,!0)});this.i.H(this.m,"seeking",
function(){fs(c,!0)});this.i.H(this.m,"ratechange",function(){gs(c)});this.i.H(this.m,"resize",function(){var d=c.m,e=d.videoWidth;d=d.videoHeight;e&&d?c.u=e/d:c.u=null});this.G=!1;this.D=null;"ResizeObserver"in window&&(this.D=new ResizeObserver(function(){c.G||(c.G=!0,requestAnimationFrame(function(){c.G=!1;c.g&&c.g.parentElement&&c.j&&fs(c,!0)}))}),this.D.observe(this.l));this.F=new Map}p=es.prototype;p.configure=function(a){this.C=a;gs(this);fs(this,!0)};
p.append=function(a){var b=[].concat(C(this.h));a=t(Xr(a));for(var c=a.next(),d={};!c.done;d={Je:void 0},c=a.next())d.Je=c.value,b.some(function(e){return function(f){return de(f,e.Je)}}(d))||this.h.push(d.Je);this.h.length&&gs(this);fs(this)};
p.destroy=function(){if(!this.g)return Promise.resolve();this.g.parentElement&&this.l.removeChild(this.g);this.g=null;this.j=!1;this.h=[];this.B&&(this.B.stop(),this.B=null);this.o.clear();this.i&&(this.i.release(),this.i=null);this.D&&(this.D.disconnect(),this.D=null);return Promise.resolve()};p.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});fs(this,c>this.h.length);this.h.length||gs(this);return!0};
p.isTextVisible=function(){return this.j};p.setTextVisibility=function(a){(this.j=a)?(this.g.parentElement||this.l.appendChild(this.g),fs(this,!0)):this.g.parentElement&&this.l.removeChild(this.g)};p.setTextLanguage=function(a){a&&a!="und"?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};p.enableTextDisplayer=function(){};function gs(a){a.B&&(a.h.length?a.B.Aa((a.C?a.C.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(a.m.playbackRate))):a.B.stop())}
function hs(a,b){for(;b!=null;){if(b==a.g)return!0;b=b.parentElement}return!1}
function is(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.o.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.oh:null;l&&(g.push(l.Ke),l.nc&&g.push(l.nc),m||(f=!0,a.o.delete(k),l=null));m&&(h.push(k),l?hs(a,n)||(f=!0):(js(a,k,e),l=a.o.get(k),n=l.oh,f=!0));k.nestedCues.length>0&&n&&is(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(q,r){return q.startTime!=
r.startTime?q.startTime-r.startTime:q.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.o.get(d.value),d.nc?(d.nc.contains(c)&&d.nc.removeChild(c),c.appendChild(d.nc),d.nc.appendChild(d.Ke)):c.appendChild(d.Ke)}}function fs(a,b){if(a.g){var c=a.m.currentTime;if(!a.j||(b===void 0?0:b)){b=t(a.F.values());for(var d=b.next();!d.done;d=b.next())mm(d.value);mm(a.g);a.o.clear();a.F.clear()}a.j&&is(a,a.h,a.g,c,[])}}
function js(a,b,c){var d=c.length>1,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&b.nestedCues.length>0;var f=document.createElement(e);e!="br"&&ks(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.u===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==$c?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==$c?"%":"px")+"-"+g.regionAnchorX+"x"+g.regionAnchorY;if(a.F.has(c))c=a.F.get(c);else{e=document.createElement("span");var k=
g.heightUnits==$c?"%":"px",l=g.widthUnits==$c?"%":"px",m=g.viewportAnchorUnits==$c?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,q=g.width;g.heightUnits===2&&(n=g.height*5.33,k="%");g.widthUnits===2&&(q=g.width*h,l="%");e.style.height=n+k;e.style.width=q+l;g.viewportAnchorUnits===2?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.u===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*q/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*q/100+m);g.heightUnits!==0&&g.widthUnits!==0&&g.viewportAnchorUnits!==0&&(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=b.displayAlign=="before"?"flex-start":b.displayAlign=="center"?"center":"flex-end";a.F.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.o.set(b,{Ke:f,oh:e,nc:c})}
function ls(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Ud?c:a==="left"||a==="start"&&b===Wd||a==="end"&&b==="rtl"?"line-left":a==="right"||a==="start"&&b==="rtl"||a==="end"&&b===Wd?"line-right":"center"}
function ks(a,b,c,d,e){var f=b.style,g=c.nestedCues.length==0,h=d.length>1;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=ms(c.linePadding,c,a.l);f.paddingRight=ms(c.linePadding,c,a.l);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
"url('"+c.backgroundImage.replace(/['"()\\]/g,"")+"')",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=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=ns(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.setAttribute("translate",
"no"),l.textContent=k)}if(h&&!d[d.length-1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if(c.textAlign=="left"||c.textAlign=="start")f.width="100%",f.alignItems="flex-start";else if(c.textAlign=="right"||c.textAlign=="end")f.width="100%",f.alignItems="flex-end";f.justifyContent=c.displayAlign=="before"?"flex-start":c.displayAlign=="center"?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=
c.fontStyle;f.letterSpacing=c.letterSpacing;d=a.C?a.C.fontScaleFactor:1;if(d!==1||c.fontSize)f.fontSize=ms(c.fontSize||"1em",c,a.l,d);d=c.line;d!=null&&(g=c.lineInterpretation,g==Yd&&(g=1,h=16,a.u&&a.u<1&&(h=32),d=d<0?100+d/h*100:d/h*100),g==1&&(f.position="absolute",c.writingMode==Xd?(f.width="100%",c.lineAlign==Zd?f.top=d+"%":c.lineAlign=="end"&&(f.bottom=100-d+"%")):c.writingMode=="vertical-lr"?(f.height="100%",c.lineAlign==Zd?f.left=d+"%":c.lineAlign=="end"&&(f.right=100-d+"%")):(f.height="100%",
c.lineAlign==Zd?f.right=d+"%":c.lineAlign=="end"&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;a=ls(c);a=="line-left"?(f.cssFloat="left",c.position!==null&&(f.position="absolute",c.writingMode==Xd?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):a=="line-right"?(f.cssFloat="right",c.position!==null&&(f.position="absolute",c.writingMode==Xd?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):c.position!==null&&c.position!=50&&(f.position="absolute",c.writingMode==
Xd?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%",c.size&&(f.transform="translateX(-50%)"));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==Xd?f.width=c.size+"%":f.height=c.size+"%")}
function ms(a,b,c,d){d=d===void 0?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 ns(a,b){for(var c=a.length-1;c>=0;c--){var d=b(a[c]);if(d||d===0)return d}return null}E("shaka.text.UITextDisplayer",es);es.prototype.enableTextDisplayer=es.prototype.enableTextDisplayer;
es.prototype.setTextLanguage=es.prototype.setTextLanguage;es.prototype.setTextVisibility=es.prototype.setTextVisibility;es.prototype.isTextVisible=es.prototype.isTextVisible;es.prototype.remove=es.prototype.remove;es.prototype.destroy=es.prototype.destroy;es.prototype.append=es.prototype.append;es.prototype.configure=es.prototype.configure;function os(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(g*1E3%1E3);return(f<10?"0":"")+f+":"+(h<10?"0":"")+h+":"+(k<10?"0":"")+k+"."+(g<100?g<10?"00":"0":"")+g}var d=Wr(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 Vd: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}E("shaka.text.WebVttGenerator",function(){});function ps(a,b){this.g=b;this.j=a;this.m=new Map;this.l=void 0;this.D=!1;this.K=!0;this.u=this.I=!1;this.C=this.B=void 0;this.G=0;this.L={request:!1,response:!1,event:!1};this.o={};this.i=new eb;this.F=[];this.h=null}ps.prototype.setMediaElement=function(a){this.h=a;qs(this)};ps.prototype.configure=function(a){this.g=a;rs(this)};function ss(a){a.m.clear();a.D=!1;a.K=!0;a.I=!1;a.u=!1;a.B=0;a.C=0;a.G=0;a.L={request:!1,response:!1,event:!1};ts(a);a.o={};a.h=null;a.i.Ya()}
function us(a,b){a.u=b;a.u?a.l==vs?a.l=ws:a.l==xs&&(a.l=ys):a.l==ws?a.l=vs:a.l==ys&&(a.l=xs)}function zs(a,b){if(a.g&&a.g.enabled&&(As(a,"ps",{sc:"d"}),a.h&&a.h.autoplay)){var c=a.h.play();c&&c.then(function(){a.G=b}).catch(function(){a.G=0})}}
function Bs(a,b,c){try{if(!a.g.enabled)return b;var d=Cs(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=Ds;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=Es;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "audio/x-mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=Fs;break a}e=
void 0}d.ot=e;d.su=!0;var f=Gs(d);return Hs(b,f)}catch(g){return Sa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}
function qs(a){a.i.H(a.h,"playing",function(){a.C||(a.C=Date.now());As(a,"ps",{sc:"p"})});a.i.H(a.h,"volumechange",function(){As(a,a.h.muted?"m":"um")});a.i.H(a.h,"play",function(){a.B||(a.B=Date.now(),As(a,"ps",{sc:"s"}))});a.i.H(a.h,"pause",function(){As(a,"ps",{sc:"a"})});a.i.H(a.j,"buffering",function(){As(a,"ps",{sc:"w"})});a.i.H(a.h,"seeking",function(){return As(a,"ps",{sc:"k"})});a.i.H(document,"fullscreenchange",function(){As(a,document.fullscreenElement?"pe":"pc")});var b=a.h;(b.webkitPresentationMode||
b.webkitSupportsFullscreen)&&a.i.H(b,"webkitpresentationmodechanged",function(){b.webkitPresentationMode?As(a,b.webkitPresentationMode!=="inline"?"pe":"pc"):b.webkitSupportsFullscreen&&As(a,b.webkitDisplayingFullscreen?"pe":"pc")});a.i.H(a.h,"enterpictureinpicture",function(){As(a,"pe")});a.i.H(a.h,"leavepictureinpicture",function(){As(a,"pc")});"documentPictureInPicture"in window&&a.i.H(window.documentPictureInPicture,"enter",function(c){As(a,"pe");a.i.La(c.window,"pagehide",function(){As(a,"pc")})});
a.i.H(document,"visibilitychange",function(){document.hidden?As(a,"b",{bg:!0}):As(a,"b")});a.i.H(a.j,"complete",function(){As(a,"ps",{sc:"e"})})}function rs(a){ts(a);var b=Is(a);b=t(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value.timeInterval,c===void 0&&(c=Js),c>=1){var d=new W(function(){return As(a,Ks)});d.Aa(c);a.F.push(d)}}function ts(a){if(a.F)for(var b=t(a.F),c=b.next();!c.done;c=b.next())c.value.stop();a.F=[]}
function Is(a){return(a=a.g.targets)?a.filter(function(b){return b.mode===Ls&&b.enabled}):[]}function Ms(a){return(a=a.g.targets)?a.filter(function(b){return b.mode===Ns&&b.enabled===!0}):[]}function Cs(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.l,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.j.getBandwidthEstimate()/1E3}}
function As(a,b,c){c=c===void 0?{}:c;b=Object.assign({e:b,ts:Date.now()},c);b=Os(a,b,Ls);c=a.g.targets;if(!(a.g.version<Ps)&&c){var d=Is(a);c=Array.from(new Set([].concat(C(Qs),C(Rs))));d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=Ss(e.includeKeys||[],c);f.includes(Ts)||f.push(Ts);f=Us(b,f);var g=e.events||[],h=f.e,k=f.sta;h&&(!Vs.includes(h)||!(h!=="ps"||k&&Ws.includes(k))||g&&g.length>0&&!g.includes(h))||Xs(a,f,e)}}}
function Ys(a,b,c){if(a.g.enabled){c=Os(a,c,Zs);var d=$s({mode:Zs,useHeaders:a.g.useHeaders,includeKeys:a.g.includeKeys||[]});a.o[d]||(a.o[d]={request:1,response:1});c.sn=a.o[d].request++;d=a.g.includeKeys||[];var e=a.g.version==Ps?Array.from(new Set([].concat(C(Qs),C(at)))):bt;d=Ss(d,e);c=Us(c,d);ct(a,c,b,a.g.useHeaders)}}
function Xs(a,b,c,d){var e=mi(),f=c.url;if(c.useHeaders){b=dt(b);if(!Object.keys(b).length)return;d&&Object.assign(d.headers,b);d=Fi([f],e);Object.assign(d.headers,b)}else{b=Gs(b);if(!b)return;f=Hs(f,b);d&&(d.uri=f);d=Fi([f],e)}a.j.N.request(9,d)}function ct(a,b,c,d){if(d){b=dt(b);if(!Object.keys(b).length)return;Object.assign(c.headers,b)}else{var e=Gs(b);if(!e)return;c.uris=c.uris.map(function(f){return Hs(f,e)})}Ms(a).length>0||!a.m.has(c)||a.m.delete(c)}
function Ss(a,b){if(!a||a.length===0)return b;for(var c=t(a),d=c.next();!d.done;d=c.next())b.includes(d.value);return a=a.filter(function(e){return b.includes(e)})}function Us(a,b){return Object.keys(a).reduce(function(c,d){b.includes(d)&&(c[d]=a[d]);return c},{})}function et(a){if(a.type===0)return ft;if(a=a.stream){var b=a.type;if(b=="video")return a.codecs&&a.codecs.includes(",")?Es:gt;if(b=="audio")return Ds;if(b=="text")return a.mimeType==="application/mp4"?ht:it}}
function $s(a){var b=Object.keys(a).sort().reduce(function(c,d){d!=="enabled"&&(c[d]=a[d]);return c},{});return JSON.stringify(b)}function jt(a,b){b=a.j.Vb()[b];if(!b.length)return NaN;var c=a.h?a.h.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:NaN}function kt(a,b){b=a.j.Vb()[b];if(!b.length)return 0;var c=a.h?a.h.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:0}
function lt(a,b){var c=a.j.Kb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.type==="variant"&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case gt:return a.videoBandwidth||NaN;case Ds:return a.audioBandwidth||NaN;default:return a.bandwidth}}
function mt(a,b,c){var d=b.segment,e=0;d&&(e=d.endTime-d.startTime);e={d:e*1E3,st:a.j.T()?nt:ot};e.ot=et(b);var f=e.ot===gt||e.ot===Ds||e.ot===Es||e.ot===ht;if(b=b.stream){var g=a.j.bb();if(f&&(e.bl=jt(a,b.type),e.ot!==ht)){var h=kt(a,b.type);e.dl=g?h/Math.abs(g):h}b.bandwidth&&(e.br=b.bandwidth/1E3);if(b.segmentIndex&&d){if((g=b.segmentIndex.qb(d.endTime,!0,g<0))&&(g=g.next().value)&&g!=d){if(c&&!cb(d.Ka(),g.Ka())){var k=g.Ka()[0];h=new URL(k);var l=new URL(c);if(h.origin!==l.origin)c=k;else{c=h.pathname.split("/").slice(1);
k=l.pathname.split("/").slice(1,-1);l=Math.min(c.length,k.length);for(var m=0;m<l&&c[m]===k[m];m++)c.shift(),k.shift();for(;k.length;)k.shift(),c.unshift("..");c=c.join("/")+h.search+h.hash}e.nor=c}!g.startByte&&!g.endByte||d.startByte==g.startByte&&d.endByte==g.endByte||(c=g.startByte+"-",g.endByte&&(c+=g.endByte),e.nrr=c)}g=a.j.bb()||1;c=kt(a,b.type)||500;d=(b=b.bandwidth)?b*(d.endTime-d.startTime)/1E3/(c/g/1E3)*a.g.rtpSafetyFactor:NaN;isNaN(d)||(e.rtp=d)}}f&&e.ot!==ht&&(e.tb=lt(a,e.ot)/1E3);return e}
function Os(a,b,c){Object.assign(b,Cs(a));b.pr=a.j.bb();var d=b.ot===gt||b.ot===Es;a.I&&d&&(b.bs=!0,b.su=!0,a.I=!1);b.su==null&&(b.su=a.K);a.j.T()&&(d=pt(a.j),b.ltc=d||void 0);document.hidden&&(b.bg=!0);d=a.C&&a.B?a.C-(a.G||a.B):void 0;d==void 0||a.L[c]||(b.msd=d,a.L[c]=!0);return b}
function Gs(a){function b(n){return c(n/100)*100}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&n!=null&&n!==""&&n!==!1}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c,ttfb:c,ttlb: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)&&(h!=="v"||k!==1)&&(h!="pr"||k!==1)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m=l==="string"&&h!=="ot"&&h!=="sf"&&h!=="st"?h+"="+JSON.stringify(k):
l==="boolean"?h:l==="symbol"?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}
function dt(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,url:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,ttfb:1,ttlb:1,ts:1,rc:1,cmsdd:1,cmsds:1,sn:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3,bg:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[f[g]!=null?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Gs(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
function Hs(a,b){if(!b||a.includes("offline:"))return a;a=new tb(a);a.g.set("CMCD",b);return a.toString()}var Fs="m",Ds="a",gt="v",Es="av",ft="i",it="c",ht="tt",Ps=2,ot="v",nt="l",vs="d",ws="ld",xs="h",ys="lh";E("shaka.util.CmcdManager.StreamingFormat",{DASH:vs,sj:ws,HLS:xs,tj:ys,vj:"s",OTHER:"o"});
var bt="br bl bs cid d dl mtp nor nrr ot pr rtp sf sid st su tb v".split(" "),Qs="br ab bl tbl bs cdn cid ltc mtp pr sf sid bg sta st ts tpb tb lb tab lab pt ec msd v sn".split(" "),at="ab bl tbl bs cdn cid d dl ltc mtp nor ot pr rtp sf sid bg sta st su ts tpb tb lb tab lab pt ec msd v".split(" "),qt="d dl nor ot rtp rc su ttfb ttfbb ttlb url cmsdd cmsds".split(" "),Rs=["e","sta"],Vs="ps e t c b m um pe pc".split(" "),Ws="spawkrfeqd".split(""),Js=10,Ts="ts",Ks="t",Zs="request",Ns="response",Ls="event";function rt(a){this.h=a;this.g=null}p=rt.prototype;p.configure=function(a){this.h=a};p.fg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(st)?this.g.get(st)*1E3:null};p.dg=function(){return this.h.enabled&&this.g&&this.g.has(tt)?this.g.get(tt)*1E3:null};p.ei=function(){return this.h.enabled&&this.g&&this.g.has(ut)?this.g.get(ut):null};p.gi=function(){return this.h.enabled&&this.g&&this.g.has(vt)?this.g.get(vt):null};
p.getBandwidthEstimate=function(a){var b=this.dg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return c>0&&c<=1?a*(1-c)+b*c:a};function wt(a){return a?a.toLowerCase()==="false"?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}E("shaka.util.CmsdManager",rt);rt.prototype.getBandwidthEstimate=rt.prototype.getBandwidthEstimate;rt.prototype.getRoundTripTime=rt.prototype.gi;rt.prototype.getResponseDelay=rt.prototype.ei;rt.prototype.getEstimatedThroughput=rt.prototype.dg;
rt.prototype.getMaxBitrate=rt.prototype.fg;var tt="etp",st="mb",ut="rd",vt="rtt";function xt(){this.g=null;this.h=[]}function yt(a,b){return D(function(c){if(c.h==1)return a.g?c.g(new Promise(function(d){return a.h.push(d)}),2):c.A(2);a.g=b;c.j()})}xt.prototype.release=function(){this.h.length>0?this.h.shift()():this.g=null};function Z(a,b,c){b=b===void 0?null:b;xi.call(this);var d=this;this.m=zt;this.h=null;this.wd=b;this.aa=!1;this.Fd=new eb;this.xd=new eb;this.j=new eb;this.lc=new eb;this.Sc=new eb;this.F=this.G=this.D=this.N=null;this.Hd=0;this.ha=new xt;this.O=this.Fa=this.Y=this.i=this.Oc=this.I=this.l=this.ud=this.W=this.Kf=this.xa=this.L=this.ub=this.za=this.vd=this.S=this.Ga=this.M=this.hc=null;this.Sa=!1;this.Bd=this.o=null;this.Gd=1E9;this.Ed=[];this.Nc=new Map;this.wb=[];this.Ae=-1;this.g=At(this);this.Ce=
sl();this.X=null;this.Id=-1;this.jc=null;this.ya={width:Infinity,height:Infinity};this.zd=new ko(this.g,this.ya,null);this.Dd=[];this.B=null;this.K=this.g.adaptationSetCriteriaFactory();this.K.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredAudioRole,videoRole:this.g.preferredVideoRole,channelCount:0,hdrLevel:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,audioLabel:this.g.preferredAudioLabel,videoLabel:this.g.preferredVideoLabel,
codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount});this.Wc=this.g.preferredTextLanguage;this.Zc=this.g.preferredTextRole;this.Yc=this.g.preferForcedSubs;this.yd=[];c&&c(this);this.L=new ps(this,this.g.cmcd);this.xa=new rt(this.g.cmsd);this.N=Bt(this);this.ka=this.sa=this.Ba=this.C=null;this.Ee=!1;this.Be=[];this.De=
new W(function(){return D(function(e){if(e.h==1)return d.sa?e.g(d.Eb(d.ka,!0),3):e.A(0);if(e.h!=4)return e.g(d.load(d.sa),4);d.Ee?d.ka.pause():d.ka.play();d.sa=null;d.Ee=!1;e.j()})});Ct&&(this.C=Ct(),this.C.configure(this.g.ads),this.Sc.H(this.C,"ad-content-pause-requested",function(e){var f,g;return D(function(h){if(h.h==1){d.De.stop();if(d.sa)return h.A(0);d.ka=d.h;d.Ee=d.jd();f=e.saveLivePosition||!1;g=!0;d.T()&&(g=f);return h.g(d.Wf(!0,g),3)}d.sa=h.i;h.j()})}),this.Sc.H(this.C,"ad-content-resume-requested",
function(e){e=e.offset||0;if(d.sa){var f=d.sa;f.m&&e&&(typeof f.m==="number"?f.m+=e:f.m.setTime(f.m.getTime()+e*1E3))}d.De.ra(.1)}),this.Sc.H(this.C,"ad-content-attach-requested",function(){return D(function(e){if(e.h==1)return d.h||!d.ka?e.A(0):e.g(d.Eb(d.ka,!0),3);d.ka=null;e.j()})}));Dt&&(this.Ba=Dt(this),this.Ba.configure(this.g.queue));this.Fd.H(window,"online",function(){Et(d);d.tf()});this.Cd=new W(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,k.disabledUntilTime>0&&k.disabledUntilTime<=e&&(k.disabledUntilTime=0,f=!0),k.disabledUntilTime>0&&(g=!1);g&&d.Cd.stop();f&&Ft(d,!1,void 0,!1,!1)});this.jb=null;a&&(R("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Eb(a,!0));this.u=null}ma(Z,xi);function Gt(a){a.W!=null&&(Ic(a.W),a.W.release(),a.W=null)}
function Ht(a,b,c){c||b.lcevc.enabled?(Gt(a),a.W==null&&(a.W=new Gc(a.h,a.Kf,b.lcevc,c),a.G&&(a.G.C=a.W))):Gt(a)}function It(a,b){return new wi(a,b)}p=Z.prototype;
p.destroy=function(){var a=this,b;return D(function(c){switch(c.h){case 1:if(a.m==Jt)return c.return();Gt(a);b=a.detach();a.m=Jt;return c.g(b,2);case 2:return c.g(a.Vf(),3);case 3:a.Fd&&(a.Fd.release(),a.Fd=null);a.xd&&(a.xd.release(),a.xd=null);a.j&&(a.j.release(),a.j=null);a.lc&&(a.lc.release(),a.lc=null);a.Sc&&(a.Sc.release(),a.Sc=null);a.Bd=null;a.g=null;a.B=null;a.wd=null;a.L=null;a.xa=null;if(!a.N){c.A(4);break}return c.g(a.N.destroy(),5);case 5:a.N=null;case 4:a.o&&(a.o.release(),a.o=null),
a.Ba&&(a.Ba.destroy(),a.Ba=null),xi.prototype.release.call(a),c.j()}})};function Kt(a,b){a.dispatchEvent(It("onstatechange",(new Map).set("state",b)))}
p.Eb=function(a,b){b=b===void 0?!0:b;var c=this,d,e,f;return D(function(g){switch(g.h){case 1:if(c.m==Jt)throw new V(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.A(2);break}return g.g(c.detach(),2);case 2:return g.g(Lt(c,"attach"),4);case 4:if(g.i)return g.return();g.m(5,6);d||(Kt(c,"attach"),e=function(){var h=Mt(c,!1);h&&Nt(c,h)},c.xd.H(a,"error",e),c.h=a,c.L&&c.L.setMediaElement(a));P();if(!b||!Oc()||c.G){g.A(6);break}return g.g(Ot(c),6);case 6:g.F();c.ha.release();g.G(0);break;case 5:return f=g.l(),
g.g(c.detach(),10);case 10:throw f;}})};p.xh=function(a){this.Kf=a};p.detach=function(a){a=a===void 0?!1:a;var b=this;return D(function(c){if(c.h==1){if(b.m==Jt)throw new V(2,7,7E3);return c.g(b.td(!1,a),2)}if(c.h!=3)return c.g(Lt(b,"detach"),3);if(c.i)return c.return();try{b.h&&(b.xd.Ya(),b.h=null),Kt(b,"detach"),b.C&&!a&&b.C.release()}finally{b.ha.release()}c.j()})};
function Lt(a,b){var c;return D(function(d){return d.h==1?(c=++a.Hd,d.g(yt(a.ha,b),2)):c!=a.Hd?(a.ha.release(),d.return(!0)):d.return(!1)})}
p.td=function(a,b){a=a===void 0?!0:a;b=b===void 0?!1:b;var c=this,d,e,f,g,h,k,l,m,n,q,r,u,v,w,x,y;return D(function(z){switch(z.h){case 1:return c.m!=Jt&&(c.m=zt),z.g(Lt(c,"unload"),2);case 2:if(z.i)return z.return();z.K(3);c.Sa=!1;Kt(c,"unload");Gt(c);d=c.yd.map(function(A){return A()});c.yd=[];return z.g(Promise.all(d),5);case 5:c.dispatchEvent(It("unloading"));c.vd&&(c.vd.release(),c.vd=null);c.za&&(c.za.release(),c.za=null);c.ub&&(c.ub.release(),c.ub=null);c.h&&(c.j.Ya(),c.lc.Ya());c.Cd.stop();
c.hc&&(c.hc.release(),c.hc=null);c.Ga&&(c.Ga.stop(),c.Ga=null);if(!c.I){z.A(6);break}return z.g(c.I.stop(),7);case 7:c.I=null,c.Oc=null;case 6:c.o&&c.o.stop();if(!c.l){z.A(8);break}return z.g(c.l.destroy(),9);case 9:c.l=null;case 8:c.M&&(c.M.release(),c.M=null);c.F&&(c.F.release(),c.F=null);if("webkit"!==window.shakaMediaKeysPolyfill||!c.D){z.A(10);break}return z.g(c.D.destroy(),11);case 11:c.D=null;case 10:if(!c.G){z.A(12);break}return z.g(c.G.destroy(),13);case 13:c.G=null;case 12:if(c.C&&!b)c.C.onAssetUnload();
c.sa&&!b&&(c.sa.destroy(),c.sa=null);b||c.De.stop();c.L&&ss(c.L);c.xa&&(c.xa.g=null);if(!c.u){z.A(14);break}return z.g(c.u.destroy(),15);case 15:c.u=null;case 14:c.aa=!1;if(c.h){e=t(c.Be);for(f=e.next();!f.done;f=e.next())g=f.value,g.src.startsWith("blob:")&&URL.revokeObjectURL(g.src),g.remove();c.Be=[];lm(c.h)&&c.h.load()}if(!c.D){z.A(16);break}return z.g(c.D.destroy(),17);case 17:c.D=null;case 16:c.jb&&c.Y!=c.jb.Od()&&(c.jb.C||c.jb.destroy(),c.jb=null);c.Y=null;c.Fa=null;c.S=null;if(c.i){h=t(c.i.variants);
for(k=h.next();!k.done;k=h.next())for(l=k.value,m=t([l.audio,l.video]),n=m.next();!n.done;n=m.next())(q=n.value)&&q.segmentIndex&&q.segmentIndex.release();r=t(c.i.textStreams);for(u=r.next();!u.done;u=r.next())v=u.value,v.segmentIndex&&v.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(Bf.clear(),bc.clear());c.i=null;c.B=new Xq;c.Jf=null;c.jc=null;c.X=null;c.Id=-1;c.Ed=[];w=t(c.Nc.values());for(x=w.next();!x.done;x=w.next())y=x.value,y.stop();c.Nc.clear();c.wb=[];c.Ae=-1;c.N&&c.N.Qf();
Pt(c);case 3:z.F();c.ha.release();z.G(4);break;case 4:P();if(a&&Oc()&&!c.G&&c.h)return z.g(Ot(c),0);z.A(0)}})};p.mj=function(a){this.O=a};
p.load=function(a,b,c){b=b===void 0?null:b;var d=this,e,f,g,h,k,l,m,n,q,r,u,v,w,x,y;return D(function(z){switch(z.h){case 1:if(d.m==Jt)throw new V(2,7,7E3);if(d.h||!d.ka){z.A(2);break}return z.g(d.Eb(d.ka,!0),3);case 3:d.ka=null;case 2:e=null;f="";c=(g=c)==null?void 0:g.toLowerCase();if(a instanceof fr){if(a.C)throw new V(2,7,7006);e=a;f=e.Od()||""}else f=a||"";return z.g(yt(d.ha,"load"),4);case 4:d.ha.release();if(!d.h)throw new V(2,7,7002);if(!d.Y){z.A(5);break}d.Y=f;return z.g(d.td(!1),5);case 5:h=
++d.Hd;k=function(){return D(function(A){if(A.h==1)return d.Hd==h?A.A(0):e?A.g(e.destroy(),3):A.A(3);throw new V(2,7,7E3);})};l=function(A,F){return D(function(G){switch(G.h){case 1:return G.K(2),G.g(yt(d.ha,F),4);case 4:return G.g(k(),5);case 5:return G.g(A(),6);case 6:return G.g(k(),7);case 7:e&&d.g&&(e.g=d.g);case 2:G.F(),d.ha.release(),G.G(0)}})};z.m(7,8);b==null&&e&&(b=e.getStartTime());d.O=b;d.Sa=!1;d.dispatchEvent(It("loading"));if(e){c=e.X;z.A(10);break}if(c){z.A(10);break}return z.g(l(function(){return D(function(A){if(A.h==
1)return A.g(Qt(d,f),2);c=A.i;A.j()})},"guessMimeType_"),10);case 10:m=!!e;if(e){ir(e,d);d.B=e.getStats();z.A(13);break}return z.g(Rt(d,f,b,c,!0,d.g),14);case 14:(e=z.i)?(e.D=!1,ir(e,d),d.B=e.getStats(),e.start(),e.u.catch(function(){})):d.B=new Xq;case 13:n=!e;q=Date.now()/1E3;d.B=e?e.getStats():new Xq;d.Y=f;d.Fa=c||null;Pt(d);r=function(){var A=d.h?d.h.buffered:null;return{start:Wn(A)||0,end:Xn(A)||0}};d.za=new Np(r);d.za.addEventListener("regionadd",function(A){Tt(d,A.region,"metadataadded")});
if(n)return z.g(l(function(){return D(function(A){return A.g(Zt(d,c),0)})},"initializeSrcEqualsDrmInner_"),25);d.ub=new Np(r);return z.g(l(function(){return D(function(A){if(A.h==1)return A.g(Promise.race([e.ka,e.u]),2);d.Oc=e.G;var F=e;F.sa=!0;d.I=F.l;d.i=e.Re();A.j()})},"waitForFinish"),17);case 17:if(d.G){z.A(18);break}return z.g(l(function(){return D(function(A){return A.g(Ot(d),0)})},"initializeMediaSourceEngineInner_"),18);case 18:return d.i&&d.i.textStreams.length&&(d.u.enableTextDisplayer?
d.u.enableTextDisplayer():R("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),z.g(l(function(){return D(function(A){return A.g(e.u,0)})},"waitForFinish"),20);case 20:d.g=e.getConfiguration();d.zd=e.F;d.I&&d.I.setMediaElement&&d.h&&d.I.setMediaElement(d.h);d.vd=jr(e);d.ud=e.Fa;if(u=e.B)d.K=u;m&&d.h&&d.h.nodeName==="AUDIO"&&($t(d),d.configure("manifest.disableVideo",!0));if(e.j){z.A(21);break}return z.g(l(function(){return D(function(A){return A.g(or(e,
d.h),0)})},"drmEngine_.init"),21);case 21:return d.D=kr(e),z.g(l(function(){return D(function(A){return A.g(d.D.Eb(d.h),0)})},"drmEngine_.attach"),23);case 23:return v=d.g.abrFactory,d.o&&d.Bd==v||(d.Bd=v,d.o&&d.o.release(),d.o=v(),typeof d.o.setMediaElement!="function"&&(R("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),typeof d.o.setCmsdManager!="function"&&(R("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),
d.o.setCmsdManager=function(){}),typeof d.o.trySuggestStreams!="function"&&(R("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){}),d.o.configure(d.g.abr)),w=lr(e),x=e.i,z.g(l(function(){return D(function(A){return A.g(au(d,q,x,w),0)})},"loadInner_"),24);case 24:hr(e);d.Fa&&P().gh()&&Le(d.Fa)&&xo(d.G,d.Y,d.Fa);z.A(16);break;case 25:return z.g(l(function(){return D(function(A){return A.g(bu(d,q,c),0)})},"srcEqualsInner_"),
16);case 16:d.dispatchEvent(It("loaded"));case 8:z.F();if(!e){z.A(27);break}return z.g(e.destroy(),27);case 27:d.jb=null;z.G(0);break;case 7:y=z.l();if(!y||y.code==7E3){z.A(29);break}return z.g(d.td(!1),29);case 29:throw y;}})};function $t(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})}
p.ij=function(a,b,c){a=a===void 0?!0:a;b=b===void 0?!1:b;c=c===void 0?!1:c;var d=this,e;return D(function(f){return f.h==1?f.g(cu(d,c),2):f.h!=3?(e=f.i,f.g(d.td(a,b),3)):f.return(e)})};p.Wf=function(a,b){a=a===void 0?!1:a;b=b===void 0?!1:b;var c=this,d;return D(function(e){return e.h==1?e.g(cu(c,b),2):e.h!=3?(d=e.i,e.g(c.detach(a),3)):e.return(d)})};
function cu(a,b){b=b===void 0?!1:b;var c,d,e;return D(function(f){if(f.h==1){c=null;if(!(a.i&&a.I&&a.Oc&&a.Y&&a.g))return f.A(2);d=a.h.currentTime;b||(d=null);return f.g(du(a,a.Y,d,a.Fa,a.g,!0,!1),3)}if(f.h!=2){c=f.i;a.Dd.push(c);a.I&&a.I.setMediaElement&&a.I.setMediaElement(null);if(e=a.l?a.l.o:null)c.i=e;var g=c,h=a.I,k=a.Oc;g.h=a.i;g.l=h;g.G=k;c.B=a.K;c.start();a.i=null;a.I=null;a.Oc=null;a.o=null;a.Bd=null}return f.return(c)})}
p.preload=function(a,b,c,d){b=b===void 0?null:b;var e=this,f,g,h;return D(function(k){if(k.h==1)return c=(f=c)==null?void 0:f.toLowerCase(),g=At(e),tl(g,d||e.g,At(e)),k.g(Rt(e,a,b,c,!1,g),2);(h=k.i)?h.start():Nt(e,new V(2,7,7005));return k.return(h)})};p.Vf=function(){var a=this,b,c,d,e;return D(function(f){b=[];c=t(a.Dd);for(d=c.next();!d.done;d=c.next())e=d.value,e.C||b.push(e.destroy());a.Dd=[];return f.g(Promise.all(b),0)})};
function Rt(a,b,c,d,e,f){e=e===void 0?!1:e;var g,h,k,l;return D(function(m){if(m.h==1)return d?m.A(2):m.g(Qt(a,b),3);m.h!=2&&(d=m.i);if(g=eu(a,d))return m.return(null);h=f||a.g;k=!1;e&&a.h&&a.h.nodeName==="AUDIO"&&(k=!0);l=du(a,b,c,d||null,h,!e,k);l=e?l.then(function(n){n.D=!1;return n}):l.then(function(n){a.Dd.push(n);return n});return m.return(l)})}
function du(a,b,c,d,e,f,g){f=f===void 0?!0:f;g=g===void 0?!1:g;var h,k,l,m,n,q,r,u,v,w,x,y,z,A,F;return D(function(G){if(G.h==1){h=null;k=id(e);g&&(k.manifest.disableVideo=!0);l=function(){return h.S&&h.C?null:h};m=function(){return l()?l().getConfiguration():a.g};if(a.ya.width!=Infinity||a.ya.height!=Infinity||a.g.ignoreHardwareResolution)return G.A(2);n=P();return G.g(n.Gb(),3)}G.h!=2&&(q=G.i,a.ya.width=q.width,a.ya.height=q.height);r=new ko(k,a.ya,null);u={networkingEngine:a.N,filter:function(B){var H,
J;return D(function(O){if(O.h==1)return O.g(lo(r,B),2);if(O.h!=4){H=O.i;if(!H)return O.A(0);J=It("trackschanged");return O.g(Promise.resolve(),4)}h.dispatchEvent(J);O.j()})},makeTextStreamsForClosedCaptions:function(B){return fu(a,B)},onTimelineRegionAdded:function(B){Op(h.I,B)},onEvent:function(B){return h.dispatchEvent(B)},onError:function(B){return h.onError(B)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},updateDuration:function(){a.l&&h.S&&a.l.updateDuration()},newDrmInfo:function(B){var H=
h.j,J=H?H.g:null;J&&H.B&&oo(r,J.keySystem,B)},onManifestUpdated:function(){var B=(new Map).set("isLive",a.T());h.dispatchEvent(It("manifestupdated",B));gr(h,!1,function(){if(a.C)a.C.onManifestUpdated(a.T())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},onMetadata:function(B,H,J,O){var M=B;if(B=="com.apple.hls.interstitial"||B=="com.apple.hls.overlay")if(M="com.apple.quicktime.HLS",B={startTime:H,endTime:J,values:O},a.C)a.C.onHLSInterstitialMetadata(a,a.h,B);O=t(O);B=O.next();
for(var I={};!B.done;I={jf:void 0},B=O.next())I.jf=B.value,I.jf.name!="ID"&&gr(h,!1,function(L){return function(){gu(a,H,J,M,L.jf)}}(I))},disableStream:function(B){return a.disableStream(B,a.g.streaming.maxDisabledTime)},addFont:function(B,H){return a.addFont(B,H)}};v=new Np(function(){return a.Qa()});v.addEventListener("regionadd",function(B){var H=B.region;hu(a,"timelineregionadded",H,h);gr(h,!1,function(){a.C&&(a.C.onDashTimedMetadata(H),a.C.onDASHInterstitialMetadata(a,a.h,H))})});w=null;k.streaming.observeQualityChanges&&
(w=new Ip(function(){return a.Vb()}),w.addEventListener("qualitychange",function(B){iu(a,B.quality,B.position)}),w.addEventListener("audiotrackchange",function(B){iu(a,B.quality,B.position,!0)}));x=!0;y={kc:a.N,onError:function(B){return h.onError(B)},Eg:function(B){gr(h,!0,function(){a.D&&ju(a,B)})},onExpirationUpdated:function(B,H){var J=It("expirationupdated");h.dispatchEvent(J);if((J=h.l)&&J.onExpirationUpdated)J.onExpirationUpdated(B,H)},onEvent:function(B){h.dispatchEvent(B);if(B.type=="drmsessionupdate"&&
x){x=!1;B=Date.now()/1E3-h.za;var H=a.B||h.getStats();B>=0&&(H.m=B);a.W&&Ic(a.W)}}};z=Bt(a,l);Ei(a.N,z);A=function(){return a.Md(y)};F={config:k,Ei:u,Si:v,Ri:w,Md:A,Di:r,networkingEngine:z,wh:f};h=new fr(b,d,c,F);return G.return(h)})}
function Qt(a,b){var c,d,e,f;return D(function(g){if(g.h==1)return c=a.g.manifest.retryParameters,g.g(ak(b,a.N,c),2);d=g.i;Le(d)?(e=P(),e.va()==="WEBKIT"&&(d="application/vnd.apple.mpegurl")):d==="video/quicktime"&&(f=P(),f.va()==="CHROMIUM"&&(d="video/mp4"));return g.return(d)})}
function eu(a,b){if(!Oc(P()))return!0;if(b){if((a.h||Pc()).canPlayType(b)=="")return!1;if(!Oc(P())||!Mc.has(b))return!0;if(Le(b))return P().va()==="WEBKIT"&&(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(b==="application/dash+xml"||b==="video/vnd.mpeg.dash.mpd")return a.g.streaming.preferNativeDash}return!1}
function ku(a,b){var c=a.g.textDisplayFactory;a.Jf!==c||(b===void 0?0:b)?(b=a.u,a.u=c(),a.u.configure?a.u.configure(a.g.textDisplayer):R("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.u.setTextLanguage||R("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),b?(a.u.setTextVisibility(b.isTextVisible()),b.destroy().catch(function(){})):a.u.setTextVisibility(a.aa),a.G&&dp(a.G,a.u),a.Jf=c,a.l&&rq(a.l)):a.u&&a.u.configure&&a.u.configure(a.g.textDisplayer)}
function Ot(a){var b,c,d;return D(function(e){if(e.h==1)return P(),Kt(a,"media-source"),a.g.mediaSource.useSourceElements&&lm(a.h),ku(a),b=lu(a.h,a.u,{Uh: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&&typeof k.cueTime=="number"&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=t(k.frames),q=n.next();!q.done;q=n.next())gu(a,l,m,"org.id3",q.value);if(a.C)a.C.onHlsTimedMetadata(k,l)}},Mi:function(f){a.ub&&Op(a.ub,{schemeIdUri:f.schemeIdUri,
startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},Oi:function(){a.I&&a.I.update&&a.I.update()}},a.W,a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Fa=d,e.g(b.M,2);a.G=b;e.j()})}
function mu(a,b){a.M=new np({Te:function(){return b.playbackRate},Bc:function(){return b.defaultPlaybackRate},Vg:function(c){b.playbackRate=c},Ki:function(c){var d=b.currentTime;if(Yn(b.buffered,d)&&!(b.readyState<=HTMLMediaElement.HAVE_CURRENT_DATA)){c=d+c;var e=a.Qa();c<e.start?d!==e.start&&(b.currentTime=e.start):c>e.end?d!==e.end&&(b.currentTime=e.end):b.currentTime=c}},isPaused:function(){return b.paused}})}
function nu(a,b,c){function d(){return ou(a)}a.j.H(b,"playing",d);a.j.H(b,"pause",d);a.j.H(b,"ended",d);a.j.H(b,"ratechange",function(){return pu(a)});b.remote&&(a.j.H(b.remote,"connect",function(){a.l&&b.remote.state=="connected"&&qu(a);ru(a)}),a.j.H(b.remote,"connecting",function(){return ru(a)}),a.j.H(b.remote,"disconnect",function(){return D(function(f){if(f.h==1)return a.l&&b.remote.state=="disconnected"?f.g(Fq(a.l),3):f.A(2);f.h!=2&&qu(a);ru(a);f.j()})}));b.audioTracks&&(a.j.H(b.audioTracks,
"addtrack",function(){return ru(a)}),a.j.H(b.audioTracks,"removetrack",function(){return ru(a)}),a.j.H(b.audioTracks,"change",function(){return ru(a)}));b.videoTracks&&(a.j.H(b.videoTracks,"addtrack",function(){return ru(a)}),a.j.H(b.videoTracks,"removetrack",function(){return ru(a)}),a.j.H(b.videoTracks,"change",function(){return ru(a)}));(b.webkitPresentationMode||b.webkitSupportsFullscreen)&&a.j.H(b,"webkitpresentationmodechanged",function(){a.wd&&ku(a,!0)});if(b.textTracks){var e=function(){a.m===
su&&a.u instanceof as&&qu(a);ru(a)};a.j.H(b.textTracks,"addtrack",function(f){if(f.track)switch(f=f.track,f.kind){case "metadata":tu(a,f);break;case "chapters":uu(a,f);break;default:e()}});a.j.H(b.textTracks,"removetrack",e);a.j.H(b.textTracks,"change",e)}b.preload!="none"&&a.j.La(b,"loadedmetadata",function(){var f=a.B,g=Date.now()/1E3-c;g>=0&&(f.F=g)})}
function au(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,x,y,z,A,F,G,B,H,J,O,M,I,L,Q,K,N;return D(function(T){switch(T.h){case 1:Kt(a,"load");e=a.h;mu(a,e);nu(a,e,b);"onchange"in window.screen&&a.j.H(window.screen,"change",function(){if(a.K.getConfiguration){var U=a.K.getConfiguration();U.hdrLevel=="AUTO"?vu(a):a.g.preferredVideoHdrLevel=="AUTO"&&a.g.abr.enabled&&(U.hdrLevel="AUTO",a.K.configure(U),vu(a))}});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=Jc(l));Ht(a,a.g,f);a.Wc=a.g.preferredTextLanguage;a.Zc=a.g.preferredTextRole;a.Yc=a.g.preferForcedSubs;wu(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(U,ja,Ba){a.i&&a.l&&U!=a.l.o&&xu(a,U,!0,ja===void 0?!1:ja,Ba===void 0?0:Ba)});a.o.setMediaElement(e);a.o.setCmsdManager(a.xa);a.l=yu(a);a.l.configure(a.g.streaming);a.m=zu;a.dispatchEvent(It("streaming"));m=c;case 2:q=a.l.o;q||(r=Au(a,!0),c||(m=r));u=[];n=q||m;v=t([n.video,n.audio]);for(w=v.next();!w.done;w=v.next())(x=
w.value)&&!x.segmentIndex&&(u.push(x.createSegmentIndex()),x.dependencyStream&&u.push(x.dependencyStream.createSegmentIndex()));if(!(u.length>0)){T.A(4);break}return T.g(Promise.all(u),4);case 4:if(!n||n.disabledUntilTime!=0){T.A(2);break}vu(a);if(a.I&&a.I.onInitialVariantChosen)a.I.onInitialVariantChosen(n);a.i.isLowLatency&&(a.g.streaming.lowLatencyMode?a.configure(a.Ce):Qa("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.L&&(us(a.L,a.i.isLowLatency&&a.g.streaming.lowLatencyMode),zs(a.L,b*1E3));wu(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);hq(a.l,a.g.playRangeStart,a.g.playRangeEnd);a.Sa=!0;a.dispatchEvent(It("canupdatestarttime"));y=function(U){a.F=Bu(a,U);a.hc=Cu(a,U);Du(a,e,!1)};a.g.streaming.startAtSegmentBoundary||(z=a.O,z==null&&a.i.startTime&&(z=a.i.startTime),y(z));if(q){T.A(7);break}if(!a.g.streaming.startAtSegmentBoundary){T.A(8);break}A=a.i.presentationTimeline;a.O instanceof Date&&
(G=A.m||A.i,B=a.O.getTime()/1E3-G,B!=null&&(F=B));F==null&&(F=typeof a.O==="number"?a.O:a.T()?Infinity:a.h.currentTime);a.O==null&&a.i.startTime&&(F=a.i.startTime);H=A.sb();J=A.cb();F<H?F=H:F>J&&(F=J);return T.g(Eu(m,F),9);case 9:O=T.i,y(O);case 8:xu(a,m,!0,!1,0);case 7:return a.F.ready(),M=a.Xb().find(function(U){return U.active}),M||((I=Sf(a.i.textStreams,a.Wc,a.Zc,a.Yc)[0]||null)&&Wq(a.B.h,I,!0),m&&(I?(Wf(m.audio,I,a.g)&&(a.aa=!0),a.aa&&a.u.setTextVisibility(!0)):(a.aa=!1,a.u.setTextVisibility(!1)),
Fu(a)),I&&(a.g.streaming.alwaysStreamText||a.Ye())&&(qq(a.l,I),Gu(a))),T.g(a.l.start(d),10);case 10:a.g.abr.enabled&&(a.o.enable(),Hu(a));ru(a);a.i.variants.some(function(U){return U.primary});if((L=a.T())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)Q=function(){return Iu(a)},a.j.H(e,"timeupdate",Q);L||(K=function(){return Ju(a)},a.j.H(e,"timeupdate",K),Ju(a),a.i.nextUrl&&(a.g.streaming.preloadNextUrlWindow>
0&&(N=function(){var U;return D(function(ja){if(ja.h==1){U=a.Qa().end-a.h.currentTime;if(isNaN(U)||!(U<=a.g.streaming.preloadNextUrlWindow))return ja.A(0);a.j.eb(e,"timeupdate",N);return ja.g(a.preload(a.i.nextUrl),4)}a.jb=ja.i;ja.j()})},a.j.H(e,"timeupdate",N)),a.j.H(e,"ended",function(){a.load(a.jb||a.i.nextUrl)})));if(a.C)a.C.onManifestUpdated(L);T.j()}})}
function Zt(a,b){var c,d,e;return D(function(f){return f.h==1?(c=Date.now()/1E3,d=!0,a.D=a.Md({kc:a.N,onError:function(g){Nt(a,g)},Eg:function(){},onExpirationUpdated:function(){var g=It("expirationupdated");a.dispatchEvent(g)},onEvent:function(g){a.dispatchEvent(g);if(g.type=="drmsessionupdate"&&d){d=!1;g=a.B;var h=Date.now()/1E3-c;h>=0&&(g.m=h)}}}),a.D.configure(a.g.drm),e=Xf([b]),a.D.Y=!0,f.g(Um(a.D,[e],[]),2)):f.g(a.D.Eb(a.h),0)})}
function bu(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u;return D(function(v){switch(v.h){case 1:Kt(a,"src-equals");d=a.h;a.F=new yp(d);e=!1;a.yd.push(function(){e=!0});a.dispatchEvent(It("canupdatestarttime"));a.O!=null&&a.F.ze(a.O);a.hc=Ku(a,a.O||0);mu(a,d);Du(a,d,!0);d.textTracks&&(ku(a),f=function(w){if(!(a.u instanceof as)){var x=Lu(a).find(function(y){return y.mode!=="disabled"});x&&(x.mode=w?"showing":"hidden");a.u instanceof bs&&(x=Mu(a))&&(x.mode=!w&&a.u.isTextVisible()?"showing":"hidden")}},a.j.H(d,
"enterpictureinpicture",function(){return f(!0)}),a.j.H(d,"leavepictureinpicture",function(){return f(!1)}),d.remote?(a.j.H(d.remote,"connect",function(){return f(!1)}),a.j.H(d.remote,"connecting",function(){return f(!1)}),a.j.H(d.remote,"disconnect",function(){return f(!1)})):"webkitCurrentPlaybackTargetIsWireless"in d&&a.j.H(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){return f(!1)}),g=d,(g.webkitPresentationMode||g.webkitSupportsFullscreen)&&a.j.H(g,"webkitpresentationmodechanged",
function(){g.webkitPresentationMode?f(g.webkitPresentationMode!=="inline"):g.webkitSupportsFullscreen&&f(g.webkitDisplayingFullscreen)}));nu(a,d,b);h=Bs(a.L,a.Y,c);!h.includes("#t=")&&(a.g.playRangeStart>0||isFinite(a.g.playRangeEnd))&&(h+="#t=",a.g.playRangeStart>0&&(h+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(h+=","+a.g.playRangeEnd));if(!a.G){v.A(2);break}return v.g(a.G.destroy(),3);case 3:a.G=null;case 2:return lm(d),d.src=h,k=P(),k.Ja()=="TV"&&d.load(),d.preload!="none"&&!d.autoplay&&
Le(c)&&k.va()==="WEBKIT"&&d.load(),a.m=su,a.dispatchEvent(It("streaming")),l=function(){return new Promise(function(w){var x=new W(w);a.j.H(d.textTracks,"change",function(){return x.ra(.5)});x.ra(.5)})},m=new oi,pp(d,HTMLMediaElement.HAVE_METADATA,a.j,function(){return D(function(w){if(w.h==1)return a.F.ready(),a.Fa&&Le(a.Fa)?w.g(l(),3):(m.resolve(),w.A(0));m.resolve();w.j()})}),pp(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.j,function(){var w,x,y,z,A;return D(function(F){if(F.h==1)return F.g(l(),2);if(e)return F.return();
Nu(a);w=Lu(a);w.some(function(G){return G.mode==="showing"})&&(a.aa=!0,a.u.setTextVisibility(!0));if(!(a.u instanceof as))for(w.length&&(a.u.enableTextDisplayer?a.u.enableTextDisplayer():R("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),x=!1,y=t(w),z=y.next();!z.done;z=y.next())A=z.value,A.mode!=="disabled"&&(x?(A.mode="disabled",Qa("Found more than one enabled text track, disabling it",A)):(Ou(a,A),x=!0));Pu(a);F.j()})}),d.error?m.reject(Mt(a)):
d.preload=="none"&&(Qa('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.'),m.resolve()),a.j.La(d,"error",function(){m.reject(Mt(a))}),v.g(cf(a.g.streaming.loadTimeout,m),4);case 4:if((n=a.T())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)q=
function(){return Iu(a)},a.j.H(d,"timeupdate",q);n||(r=function(){return Ju(a)},a.j.H(d,"timeupdate",r),Ju(a));a.C&&(a.C.onManifestUpdated(n),n&&(u=a.Qa().end,a.j.H(d,"progress",function(){var w=a.Qa().end;u!=w&&(a.C.onManifestUpdated(a.T()),u=w)})));a.Sa=!0;v.j()}})}function Nu(a){var b=a.g.preferredAudioLanguage;b!=""&&a.Og(b,a.g.preferredAudioRole)}function Pu(a){var b=a.g.preferredTextLanguage;b!=""&&a.Pg(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
function tu(a,b){if(b.kind=="metadata"){b.mode="hidden";a.j.H(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,gu(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value);if(b.cues){d=[];e=t(b.cues);for(var f=e.next(),g={};!f.done;g={Tb:void 0},f=e.next())g.Tb=f.value,g.Tb.type=="com.apple.quicktime.HLS"&&g.Tb.startTime!=null&&(f=d.find(function(h){return function(k){return k.startTime==h.Tb.startTime&&k.endTime==h.Tb.endTime}}(g)),
f||(f={startTime:g.Tb.startTime,endTime:g.Tb.endTime,values:[]},d.push(f)),f.values.push(g.Tb.value));d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return h.key=="X-ASSET-URI"||h.key=="X-ASSET-LIST"})&&a.C&&(e.values.push({key:"CUE",description:"",data:e.startTime!=0||a.T()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.C.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new W(function(){var d=Qu(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Rb().ra(.5);
a.yd.push(function(){c.stop()})}}function Tt(a,b,c){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(It(c,b))}function gu(a,b,c,d,e){a.za&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),Op(a.za,b))}function uu(a,b){if(b&&b.kind=="chapters"){b.mode="hidden";var c=(new W(function(){b.mode="hidden"})).Rb().ra(.5);a.yd.push(function(){c.stop()})}}
p.Wi=function(){for(var a=this.ha;a.g;)a.release()};p.Md=function(a){return new Pm(a)};
function Bt(a,b){function c(f){b()?b().dispatchEvent(f):a.dispatchEvent(f)}function d(f){b()?gr(b(),!0,f):f()}b||(b=function(){return null});var e=new Ai(function(f,g,h,k,l){d(function(){a.o&&a.o.segmentDownloaded(f,g,h,k,l)})},function(f,g,h){g=(new Map).set("headers",f).set("request",g).set("requestType",h);c(It("downloadheadersreceived",g));d(function(){if(a.xa){var k=a.xa;if(k.h.enabled){var l=f["cmsd-static"];if(l)try{var m=new Map,n=l.split(",");for(l=0;l<n.length;l++){var q=n[l].split("=");
m.set(q[0],wt(q[1]))}}catch(x){}if(m=f["cmsd-dynamic"]){a:{try{var r=new Map,u=m.split(";");for(m=1;m<u.length;m++){var v=u[m].split("=");r.set(v[0],wt(v[1]))}var w=r;break a}catch(x){w=null;break a}w=void 0}w&&(k.g=w)}}}})},function(f,g){f=(new Map).set("request",f).set("response",g);c(It("downloadcompleted",f))},function(f,g,h,k){f=(new Map).set("request",f).set("error",g).set("httpResponseCode",h).set("aborted",k);c(It("downloadfailed",f))},function(f,g,h){d(function(){if(a.L){var k=a.L,l=h;l=
l===void 0?{}:l;if(k.g.enabled)if(g.method==="HEAD")Ys(k,g,{});else switch(f){case 0:try{if(k.g.enabled){if(l.type){a:{switch(l.type){case 4:var m=k.u?ws:vs;break a;case 3:case 2:m=k.u?ys:xs;break a;case 5:m="s";break a}m=void 0}k.l=m}Ys(k,g,{ot:Fs,su:!k.D})}}catch(q){Sa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",q)}break;case Li:try{if(k.g.enabled){var n=mt(k,l,g.uris[0]);n.ts=Date.now();k.m.has(g)&&k.m.delete(g);k.m.set(g,n.ts);Ys(k,g,n)}}catch(q){Sa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",
q)}break;case 2:case 5:case 6:Ys(k,g,{ot:"k"});break;case 4:Ys(k,g,{ot:"o"})}}})},function(f,g,h,k){(f=b()?b().l:a.I)&&f.banLocation&&f.banLocation(k)},function(f,g,h){if(g.data){var k=g.data.byteLength,l=b()?b().getStats():a.B;l&&(dr(l,k),f===0&&(l.vg=k));k=a.L;h=h===void 0?{}:h;if(Ms(k).length!==0)switch(f){case Li:try{var m=mt(k,h,g.uri);g.originalRequest&&g.originalRequest.timeToFirstByte!=null&&(m.ttfb=g.originalRequest.timeToFirstByte);g.timeMs!=null&&(m.ttlb=g.timeMs);var n=g.originalUri||
g.uri;if(n.includes("CMCD="))try{var q=new URL(n);q.searchParams.delete("CMCD");var r=q.toString()}catch(B){r=n}else r=n;m.url=r;k.m.has(g.originalRequest)?(m.ts=k.m.get(g.originalRequest),k.m.delete(g.originalRequest)):m.ts||(m.ts=Date.now());var u=Ms(k);if(u.length!==0){var v=k.g.version==Ps?Array.from(new Set([].concat(C(Qs),C(qt)))):bt;m.rc=g.status||0;var w=Os(k,m,Ns);g.headers&&g.headers["CMSD-Static"]&&(w.cmsds=btoa(g.headers["CMSD-Static"]));g.headers&&g.headers["CMSD-Dynamic"]&&(w.cmsdd=
btoa(g.headers["CMSD-Dynamic"]));for(var x=t(u),y=x.next();!y.done;y=x.next()){var z=y.value,A=Ss(z.includeKeys||[],v),F=$s(z);k.o[F]||(k.o[F]={request:1,response:1});w.sn=k.o[F].response++;var G=Us(w,A);Xs(k,G,z,g)}}}catch(B){Sa("CMCD_SEGMENT_ERROR","Could not generate response segment CMCD data.",B)}}}});e.configure(a.g.networking);return e}
function Bu(a,b){return new Bp(a.h,a.i,a.g.streaming,b,function(){a.hc&&Hp(a.hc,!a.F.Gf());a.l&&a.l.qc();a.S&&Ru(a,"seeking")},function(c){return a.dispatchEvent(c)})}
function Cu(a,b){var c=a.T()||typeof b==="number"&&b>0;b=new yr(a.vd,c);b.addEventListener("enter",function(f){hu(a,"timelineregionenter",f.region)});b.addEventListener("exit",function(f){hu(a,"timelineregionexit",f.region)});b.addEventListener("skip",function(f){var g=f.region;f.seeking||(hu(a,"timelineregionenter",g),hu(a,"timelineregionexit",g))});var d=new yr(a.za,c);d.addEventListener("enter",function(f){Tt(a,f.region,"metadata")});c=new yr(a.ub,c);c.addEventListener("enter",function(f){f=(new Map).set("detail",
f.region.emsg);a.dispatchEvent(It("emsg",f))});var e=new Gp(a.h);e.g.add(b);e.g.add(d);e.g.add(c);a.ud&&e.g.add(a.ud);return e}function Ku(a,b){b=new yr(a.za,b instanceof Date||b>0);b.addEventListener("enter",function(d){Tt(a,d.region,"metadata")});var c=new Gp(a.h);c.g.add(b);return c}
function Du(a,b,c){a.S=new En;Hn(a.S,Gn);Su(a);Pt(a);a.Ga=new W(function(){Ru(a)});a.g.streaming.rebufferingGoal&&a.Ga.Aa(.25);a.j.H(b,"waiting",function(){return Ru(a,"waiting")});a.j.H(b,"canplaythrough",function(){return Ru(a,"canplaythrough")});a.j.H(b,"playing",function(){return Ru(a,"playing")});a.j.H(b,"seeked",function(){return Ru(a,"seeked")});a.j.H(b,"timeupdate",function(){return Ru(a,"timeupdate")});c&&(a.j.H(b,"progress",function(){return Ru(a,"progress")}),a.j.H(b,"stalled",function(){return Ru(a,
"stalled")}))}function Su(a){var b=a.g.streaming.rebufferingGoal;a.S.j.set(Fn,Math.min(.5,b/2)).set(Gn,b)}
function Ru(a,b){if(a.g.streaming.rebufferingGoal){b=a.G?zo(a.G):!1;b=a.jd()||b||a.F.lg();var c=Zn(a.h.buffered,a.h.currentTime),d=a.S,e=d.j.get(d.g);Hn(d,b||c>=e&&c>0?Fn:Gn)&&Pt(a)}else if(b){c=a.S;d=a.h.currentTime;e=c.h;c.h=d;var f=void 0;switch(b){case "seeking":case "waiting":c.h=-1;f=Gn;break;case "canplaythrough":case "playing":case "seeked":f=Fn;break;case "timeupdate":e>=0&&d-e>.01&&(f=Fn)}f!==void 0&&Hn(c,f)&&Pt(a)}}function lu(a,b,c,d,e){return new so(a,b,c,e,d)}
function yu(a){return new bq(a.i,{rb:function(){return a.F?a.F.$c():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},bb:function(){return a.bb()},video:a.h,R:a.G,kc:a.N,onError:function(b){return Nt(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Jc:function(b,c,d,e){var f=b.startTime,g=b.endTime,h=c.type;if(h!=Cc){if(a.F){a.F.Bg();var k=Go(a.G,h);!a.T()&&a.h.paused&&!a.h.seeking&&k!=null&&k>0&&a.F.$c()<k&&!ro(a.F.$c(),k,.001)&&a.F.ze(k)}Ru(a)}d=(new Map).set("start",f).set("end",
g).set("contentType",h).set("isMuxed",d).set("isDependency",e);a.dispatchEvent(It("segmentappended",d));a.o&&c.fastSwitching&&b.mc&&b.kd&&a.o.trySuggestStreams()},Ni:function(b,c){(c=c.Ze)&&a.ud&&Kp(a.ud,c,b)},Of:function(b,c){var d=a.D;if(d.h.parseInbandPsshEnabled&&!d.G&&["audio","video"].includes(b)){b=new ai(S(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(c==0)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;cn(d,"cenc",c);d=d.l}}else d=Promise.resolve();return d},disableStream:function(b,c){return a.disableStream(b,c)},fj:function(b,c){return a.g.abr.enabled&&c.fastSwitching&&b.mc&&b.kd?!1:!0}})}
p.configure=function(a,b){var c=this.getConfiguration();arguments.length==2&&typeof a=="string"&&(a=kl(a,b));"preferredVariantRole"in a&&(R("preferredVariantRole configuration","Please Use preferredAudioRole instead."),a.preferredAudioRole=a.preferredVariantRole,delete a.preferredVariantRole);a.streaming&&"forceTransmuxTS"in a.streaming&&(R("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,
delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(R("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);if(a.streaming&&"useNativeHlsOnSafari"in a.streaming){R("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var d=P();a.streaming.preferNativeHls=
a.streaming.useNativeHlsOnSafari&&d.va()==="WEBKIT";delete a.streaming.useNativeHlsOnSafari}a.streaming&&typeof a.streaming.liveSync=="boolean"&&(R("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),d=a.streaming.liveSync,a.streaming.liveSync={},a.streaming.liveSync.enabled=d);if(a.streaming&&!(a.streaming.liveSync&&"targetLatency"in a.streaming.liveSync)&&("liveSyncMinLatency"in a.streaming||"liveSyncMaxLatency"in a.streaming)){d=a.streaming.liveSyncMinLatency||0;var e=Math.abs((a.streaming.liveSyncMaxLatency||
1)-d)/2;a.streaming.liveSync=a.streaming.liveSync||{};a.streaming.liveSync.targetLatency=d+e;a.streaming.liveSync.targetLatencyTolerance=e}a.streaming&&"liveSyncMaxLatency"in a.streaming&&(R("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&&(R("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&&(R("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&&(R("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&&(R("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&&(R("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&&(R("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&&(R("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){R("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");
var f=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return f};delete a.mediaSource.sourceBufferExtraFeatures}a.manifest&&a.manifest.hls&&"useSafariBehaviorForLive"in a.manifest.hls&&(R("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&&(R("streaming.parsePrftBox configuration","Now fired without needing a configuration."),
delete a.streaming.parsePrftBox);a.manifest&&a.manifest.dash&&"enableAudioGroups"in a.manifest.dash&&(R("manifest.dash.enableAudioGroups configuration","Please Use manifest.enableAudioGroups instead."),a.manifest.enableAudioGroups=a.manifest.dash.enableAudioGroups,delete a.manifest.dash.enableAudioGroups);a.streaming&&"dispatchAllEmsgBoxes"in a.streaming&&(R("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.dispatchAllEmsgBoxes=
a.streaming.dispatchAllEmsgBoxes,delete a.streaming.dispatchAllEmsgBoxes);a.streaming&&"autoLowLatencyMode"in a.streaming&&(R("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&&(R("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&&(R("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&&(R("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&&(R("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&&(R("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){d=!1;for(var g in a.drm.advanced){var h=a.drm.advanced[g];e=h.videoRobustness;h=h.audioRobustness;"videoRobustness"in a.drm.advanced[g]&&!Array.isArray(a.drm.advanced[g].videoRobustness)&&(a.drm.advanced[g].videoRobustness=[e],d=!0);"audioRobustness"in a.drm.advanced[g]&&!Array.isArray(a.drm.advanced[g].audioRobustness)&&(a.drm.advanced[g].audioRobustness=[h],d=!0)}d&&R("AdvancedDrmConfiguration's videoRobustness and audioRobustness",
"These properties are no longer strings but array of strings, please update your usage of these properties.")}a.streaming&&"forceHTTP"in a.streaming&&(R("streaming.forceHTTP configuration","Please Use networking.forceHTTP instead."),a.networking=a.networking||{},a.networking.forceHTTP=a.streaming.forceHTTP,delete a.streaming.forceHTTP);a.streaming&&"forceHTTPS"in a.streaming&&(R("streaming.forceHTTPS configuration","Please Use networking.forceHTTP instead."),a.networking=a.networking||{},a.networking.forceHTTPS=
a.streaming.forceHTTPS,delete a.streaming.forceHTTPS);a.streaming&&"minBytesForProgressEvents"in a.streaming&&(R("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),a.networking=a.networking||{},a.networking.minBytesForProgressEvents=a.streaming.minBytesForProgressEvents,delete a.streaming.minBytesForProgressEvents);g=tl(this.g,a,At(this));Tu(this,c);return g};p.Ch=function(a){this.Ce=a};
function Tu(a,b){a.zd=new ko(a.g,a.ya,a.D);if(a.I){var c=id(a.g.manifest);a.h&&a.h.nodeName==="AUDIO"&&(c.disableVideo=!0);a.I.configure(c)}a.D&&a.D.configure(a.g.drm);if(a.l){a.l.configure(a.g.streaming);try{a.m!=Jt&&mo(a.zd,a.i)&&ru(a)}catch(e){Nt(a,e)}a.o&&vu(a);c=a.l.o;!c||c.allowedByApplication&&c.allowedByKeySystem||Ft(a)}a.N&&a.N.configure(a.g.networking);a.G&&(a.G.configure(a.g.mediaSource),a.G.Fa=a.g.manifest.segmentRelativeVttTiming);a.u&&ku(a);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?
a.o.enable():a.o.disable(),Hu(a));a.S&&Su(a);a.Ga&&(a.g.streaming.rebufferingGoal?a.Ga.Aa(.25):a.Ga.stop());a.i&&wu(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.C&&a.C.configure(a.g.ads);a.L&&a.L.configure(a.g.cmcd);a.xa&&a.xa.configure(a.g.cmsd);a.Ba&&a.Ba.configure(a.g.queue);if(a.m==zu&&a.K.getConfiguration){c=a.K.getConfiguration();var d=!1;b.preferredVideoHdrLevel!=a.g.preferredVideoHdrLevel&&c.hdrLevel!=a.g.preferredVideoHdrLevel&&(c.hdrLevel=a.g.preferredVideoHdrLevel,d=
!0);b.preferredVideoLayout!=a.g.preferredVideoLayout&&c.videoLayout!=a.g.preferredVideoLayout&&(c.videoLayout=a.g.preferredVideoLayout,d=!0);b.preferSpatialAudio!=a.g.preferSpatialAudio&&c.spatialAudio!=a.g.preferSpatialAudio&&(c.spatialAudio=a.g.preferSpatialAudio,d=!0);b.preferredVideoRole!=a.g.preferredVideoRole&&c.videoRole!=a.g.preferredVideoRole&&(c.videoRole=a.g.preferredVideoRole,d=!0);d&&(a.K.configure(c),Ft(a))}}p.getConfiguration=function(){var a=At(this);tl(a,this.g,At(this));return a};
p.Nh=function(){return this.Ce};p.Zh=function(){var a=At(this);tl(a,this.g,At(this));return ml(this.g,At(this))};p.ag=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=Math.min(this.h.currentTime+this.g.streaming.bufferingGoal,this.Qa().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};
p.Yi=function(){var a=this.getConfiguration(),b;for(b in this.g)delete this.g[b];tl(this.g,At(this),At(this));Tu(this,a)};p.Qe=function(){return this.m};p.eg=function(){return this.i?this.i.type:null};p.Se=function(){return this.h};p.Yh=function(){return this.N};p.Od=function(){return this.Y};p.Fh=function(){return this.C?this.C:null};p.di=function(){return this.Ba?this.Ba:null};
p.T=function(){return this.i&&!this.qa()?this.i.presentationTimeline.T():this.h&&(this.h.src||this.qa())?this.h.duration==Infinity:!1};p.Hc=function(){return this.i?this.i.presentationTimeline.Hc():!1};p.ui=function(){if(this.i&&!this.qa()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&(this.h.src||this.qa())?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1};
p.rg=function(){if(this.i&&!this.qa()){var a=this.i.variants;if(!a.length)return!1;a=a[0];return a.audio||!a.video?!1:!a.video.codecs.includes(",")}return this.h&&(this.h.src||this.qa())&&this.h.audioTracks?this.h.audioTracks.length==0:!1};
p.Qa=function(){if(this.i&&!this.qa()){if(!this.Sa&&this.i.type=="HLS")return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.sb(),end:a.cb()}}if(this.h&&(this.h.src||this.qa())&&(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}};p.ri=function(){this.T()&&(this.h.currentTime=this.Qa().end)};p.wi=function(){return this.Sa};
p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.D?this.D.g:null};p.Pe=function(){return this.D?this.D.Pe():Infinity};p.Oe=function(){return this.D?this.D.Oe():[]};p.Pd=function(){return this.D?this.D.Pd():{}};p.mg=function(){return this.S?this.S.g==Gn:!!this.Y};p.bb=function(){return this.h?this.M?this.M.h:1:0};p.Ef=function(a){this.m==zu&&this.l&&nq(this.l,a)};
p.sd=function(a,b){b=b===void 0?!0:b;if(a==0)Qa("A trick play rate of 0 is unsupported!");else{var c=this.h.playbackRate,d=this.M.h;this.M.set(a);this.m==zu&&(this.o.playbackRateChanged(a),this.Ef(b&&a!=1));Uu(this,a);c===0&&this.h.playbackRate===0&&a!=d&&pu(this)}};p.ad=function(){var a=this.M.Bc();this.m==su&&this.M.set(a);this.m==zu&&(this.M.set(a),this.o.playbackRateChanged(a),this.Ef(!1));this.lc.Ya()};
p.Kb=function(){if(this.i&&!this.qa()){for(var a=this.l?this.l.o:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Qf(e)){var f=Jf(e);f.active=e==a;f.active||c==1||a==null||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}if(this.h&&this.h.audioTracks){var g=Vu(this);a=Array.from(this.h.audioTracks);return a.length?a.map(function(h){return Pf(h,g)}):g?[Pf(null,g)]:[]}return[]};
p.Xb=function(){if(this.i){if(this.qa())return[];for(var a=this.l?this.l.B:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Kf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Lu(this).map(function(f){return Of(f)}):[]};p.Sh=function(){var a=this.Ed;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Lf(b)})};
p.Gh=function(a){var b=this,c,d;return D(function(e){if(e.h==1)return e.g(Wu(b,a),2);c=e.i;if(!c)return e.return(null);d=[];c.segmentIndex.Hb(function(f){var g=Xu(f.tilesLayout||c.tilesLayout);if(g)for(var h=g.rows*g.columns,k=(f.h-f.startTime)/h,l=0;l<h;l++){var m=Yu(f,c,f.startTime+l*k,g);if(!m)break;d.push(m)}});return e.return(d)})};function Xu(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
p.li=function(a,b){var c=this,d,e,f,g;return D(function(h){if(h.h==1)return h.g(Wu(c,a),2);d=h.i;if(!d)return h.return(null);e=d.segmentIndex.find(b);if(e==null)return h.return(null);f=d.segmentIndex.get(e);return(g=Xu(f.tilesLayout||d.tilesLayout))?h.return(Yu(f,d,b,g)):h.return(null)})};
function Wu(a,b){var c,d,e;return D(function(f){if(f.h==1){if(a.m!=zu&&a.m!=su)return f.return(null);c=a.Ed;a.i&&(c=a.i.imageStreams);d=c[0];if(!d)return f.return(null);b!=null&&(d=c.find(function(g){return g.id==b}));return d?d.segmentIndex?f.A(2):f.g(d.createSegmentIndex(),2):f.return(null)}d.closeSegmentIndex&&(a.Nc.has(d)||(e=new W(function(){d&&(d.closeSegmentIndex(),a.Nc.delete(d))}),a.Nc.set(d,e)),a.Nc.get(d).ra(5));return f.return(d)})}
function Yu(a,b,c,d){var e=b.width||0,f=b.height||0,g=e/d.columns,h=f/d.rows,k=d.columns*d.rows,l=a.h-a.startTime;l=a.C||l/k;var m=a.startTime,n=0,q=0;k>1&&(q=Math.floor((c-a.startTime)/l+1E-4),m=a.startTime+q*l,n=q%d.columns*g,q=Math.floor(q/d.columns)*h);if(m>=a.endTime||ro(m,a.endTime,1E-4))return null;d=!1;if(c=a.thumbnailSprite)d=!0,h=c.height,n=c.positionX,q=c.positionY,g=c.width;return{segment:a,imageHeight:f,imageWidth:e,height:h,positionX:n,positionY:q,startTime:m,duration:l,uris:a.Ka(),
startByte:a.Ec(),endByte:a.Cc(),width:g,sprite:d,mimeType:a.mimeType||b.mimeType,codecs:a.codecs||b.codecs}}
p.wf=function(a){function b(){var d=c.i.textStreams.find(function(e){return e.id==a.id});d&&d!=c.l.B&&(Wq(c.B.h,d,!1),qq(c.l,d),qu(c),Gu(c),c.Wc=d.language)}var c=this;if(this.i&&this.F&&(b(),!this.qa()))return;(function(){if(c.h&&c.h.textTracks){var d=Lu(c),e=d.find(function(h){return Mf(h)===a.id});if(e){if(c.u instanceof as){d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f===e?c.aa?"showing":"hidden":"disabled";f.mode!==g&&(f.mode=g)}}else d=d.find(function(h){return h.mode!=="disabled"}),
d!==e&&(d&&(d.mode="disabled",c.j.eb(d,"cuechange"),c.u.remove(0,Infinity)),e&&Ou(c,e));qu(c);Gu(c)}}})()};
function Ou(a,b){a.j.H(b,"cuechange",function(){a.u.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(f.endTime===Infinity||f.endTime<f.startTime)f=null;else{var g=new Td(f.startTime,f.endTime,f.text);g.line=typeof f.line==="number"?f.line:null;f.lineAlign&&(g.lineAlign=f.lineAlign);g.lineInterpretation=f.snapToLines?
Yd:1;g.position=typeof f.position==="number"?f.position:null;f.positionAlign&&(g.positionAlign=f.positionAlign);g.size=f.size;g.textAlign=f.align;f.vertical==="lr"?g.writingMode="vertical-lr":f.vertical==="rl"&&(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=$c,g.region.width=f.region.width,g.region.widthUnits=$c);ee(g);f=g}f&&((g=a.g.mediaSource.modifyCueCallback)&&g(f,null,c),d.push(f))}a.u.append(d)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
p.oe=function(a,b,c){function d(){var f=e.i.variants.find(function(h){return h.id==a.id});if(f&&Qf(f)){var g=e.l.o;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)&&Qa("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack().");e.qa()?xu(e,f,!1,!1,0):xu(e,f,!1,b||!1,c||0);e.K.configure({language:f.language,
role:f.audio&&f.audio.roles&&f.audio.roles[0]||"",videoRole:f.video&&f.video.roles&&f.video.roles[0]||"",channelCount:f.audio&&f.audio.channelsCount?f.audio.channelsCount:0,hdrLevel: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:"",audioLabel:f.audio&&f.audio.label?f.audio.label:"",videoLabel:f.video&&f.video.label?f.video.label:"",codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,
audioCodec:f.audio&&f.audio.codecs?f.audio.codecs:"",activeAudioCodec:g.audio&&g.audio.codecs?g.audio.codecs:"",activeAudioChannelCount:g.audio&&g.audio.channelsCount?g.audio.channelsCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount});vu(e)}}var e=this;b=b===void 0?!1:b;c=c===void 0?0:c;if(this.i&&this.F&&(d(),!this.qa()))return;(function(){if(a.originalAudioId&&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,Mf(g)==a.id){Zu(e,g);break}}})()};
p.$i=function(a,b){function c(){var e=d.K.getConfiguration();e.audioCodec=a.codecs||"";e.audioLabel=a.label||"";e.channelCount=a.channelsCount||0;e.language=a.language;e.role=a.roles[0]||"";e.spatialAudio=a.spatialAudio;var f=d.l.o;if(f=f&&f.audio)e.activeAudioCodec=f.codecs||"",e.activeAudioChannelCount=f.channelsCount||0;d.K.configure(e);Ft(d,!0,b,!1,!1)}var d=this;b=b===void 0?0:b;if(this.i&&this.F&&(c(),!this.qa()))return;(function(){if(d.h&&d.h.audioTracks){var e=ff(a.language),f=Array.from(d.h.audioTracks),
g=null;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=h.language||"und";if(h.label==a.label&&ff(k)==e&&h.kind==a.roles[0]){g=h;break}}g&&Zu(d,g)}})()};
p.getAudioTracks=function(){if(this.i&&!this.qa()){var a=this.Kb();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.m!=zu||this.qa()||(c=a.filter(function(f){return f.originalVideoId===b.originalVideoId&&(f.audioCodec||Ce.includes(f.audioMimeType||""))}));if(!c.length)return[];a=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=[e.language,e.originalLanguage,e.label||"",(e.audioRoles||[]).join(","),e.channelsCount,e.spatialAudio,e.audioCodec||
"",e.accessibilityPurpose||""].join("_");e={active:e.active,language:e.language,label:e.label,mimeType:e.audioMimeType,codecs:e.audioCodec,primary:e.primary,roles:e.audioRoles||[],accessibilityPurpose:e.accessibilityPurpose,channelsCount:e.channelsCount,audioSamplingRate:e.audioSamplingRate,spatialAudio:e.spatialAudio,originalLanguage:e.originalLanguage};a.has(d)?!a.get(d).active&&e.active&&a.set(d,e):a.set(d,e)}return Array.from(a.values())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(f){var g=
f.language;g={active:f.enabled,language:ff(g||"und"),label:f.label,mimeType:null,codecs:null,primary:f.kind=="main",roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:g};f.kind&&(f.kind=="description"&&(g.accessibilityPurpose="visually impaired"),g.roles.push(f.kind));f.configuration&&(f.configuration.codec&&(g.codecs=f.configuration.codec),f.configuration.sampleRate&&(g.audioSamplingRate=f.configuration.sampleRate),f.configuration.numberOfChannels&&
(g.channelsCount=f.configuration.numberOfChannels));return g}):[]};
p.bj=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?0:c;var d=this.Kb();if(d.length){var e=d.find(function(g){return g.active});if(e){d=d.filter(function(g){return(g.videoBandwidth||g.bandwidth)==a.bandwidth&&g.width==a.width&&g.height==a.height&&g.frameRate==a.frameRate&&g.pixelAspectRatio==a.pixelAspectRatio&&g.hdr==a.hdr&&g.colorGamut==a.colorGamut&&g.videoLayout==a.videoLayout&&g.videoMimeType==a.mimeType&&g.videoCodec==a.codecs&&cb(g.videoRoles,a.roles)&&g.videoLabel==a.label});var f;d.length==
1?f=d[0]:f=d.find(function(g){return g.audioId===e.audioId});f||(f=d.find(function(g){return g.language==e.language&&g.label===e.label&&g.channelsCount===e.channelsCount&&g.spatialAudio===e.spatialAudio&&g.audioMimeType===e.audioMimeType&&Ge(g.audioCodec||"")===Ge(e.audioCodec||"")&&cb(g.audioRoles,e.audioRoles)}));f&&!f.active&&this.oe(f,b,c)}}};
p.getVideoTracks=function(){if(this.m==su||this.qa())return[];var a=this.Kb();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.rg()||(c=a.filter(function(f){return f.videoCodec&&f.audioGroupId===b.audioGroupId&&f.originalAudioId===b.originalAudioId?f.audioId===b.audioId?!0:f.language===b.language&&f.label===b.label&&f.channelsCount===b.channelsCount&&f.spatialAudio===b.spatialAudio&&f.audioMimeType===b.audioMimeType&&Ge(f.audioCodec||"")===Ge(b.audioCodec||
"")&&cb(f.audioRoles,b.audioRoles):!1}));if(!c.length)return[];a=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.originalVideoId;e||d.videoId==null||(e=String(d.videoId));e&&a.set(e,{active:d.active,bandwidth:d.videoBandwidth||d.bandwidth,width:d.width,height:d.height,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,mimeType:d.videoMimeType,codecs:d.videoCodec,roles:d.videoRoles||[],label:d.videoLabel})}return Array.from(a.values())};
p.Ih=function(){return $u(this.Kb())};p.ji=function(){return $u(this.Xb())};p.Hh=function(){return Array.from(av(this.Kb()))};p.ii=function(){return Array.from(av(this.Xb()))};
p.Og=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}var m=k.l.o;k.K=k.g.adaptationSetCriteriaFactory();k.K.configure({language:a,role:b||"",videoRole:m.video&&m.video.roles&&m.video.roles[0]||"",channelCount:c||0,hdrLevel:"",spatialAudio:f||!1,videoLayout:"",audioLabel:g||"",videoLabel:"",codecSwitchingStrategy:k.g.mediaSource.codecSwitchingStrategy,
audioCodec:e||"",activeAudioCodec:m.audio&&m.audio.codecs?m.audio.codecs:"",activeAudioChannelCount:m.audio&&m.audio.channelsCount?m.audio.channelsCount:0,preferredAudioCodecs:k.g.preferredAudioCodecs,preferredAudioChannelCount:k.g.preferredAudioChannelCount});var n=k.K.create(k.i.variants),q=null;n=t(n.values());for(var r=n.next();!r.done;r=n.next())r=r.value,Qf(r)&&(!q||l(q,m)>l(r,m))&&(q=r);q!=m&&(q?(m=Jf(q),k.oe(m,!0,d||0)):Ft(k))}var k=this;c=c===void 0?0:c;d=d===void 0?0:d;e=e===void 0?"":e;
f=f===void 0?!1:f;g=g===void 0?"":g;if(this.i&&this.F&&(h(),!this.qa()))return;(function(){if(k.h&&k.h.audioTracks){var l=Sf(k.Kb(),a,b||"",!1)[0];l&&k.oe(l)}})()};p.Pg=function(a,b,c){function d(){e.Wc=a;e.Zc=b||"";e.Yc=c||!1;var f=Sf(e.i.textStreams,e.Wc,e.Zc,e.Yc)[0]||null;f&&f!=e.l.B&&(Wq(e.B.h,f,!1),e.g.streaming.alwaysStreamText||e.Ye())&&(qq(e.l,f),qu(e),Gu(e))}var e=this;c=c===void 0?!1:c;if(this.i&&this.F&&(d(),!this.qa()))return;(function(){var f=Sf(e.Xb(),a,b||"",c||!1)[0];f&&e.wf(f)})()};
p.aj=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}f!=null&&(e.K=e.g.adaptationSetCriteriaFactory(),e.K.configure({language:f.language,role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",videoLabel:"",audioLabel:a,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount}),
Ft(e,b,c))}var e=this;b=b===void 0?!0:b;c=c===void 0?0:c;if(this.i&&this.F&&(d(),!this.qa()))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&&Zu(e,g)}})()};p.Ye=function(){var a=this.aa;return this.u?this.u.isTextVisible():a};p.Mh=function(){return this.wb.map(function(a){return Kf(a)})};
p.Kh=function(a){R("getChapters","Please use an getChaptersAsync.");if(!this.wb.length)return[];var b=ff(a);a=this.wb.filter(function(f){return ff(f.language)==b});if(!a.length)return[];var c=[],d=new Set;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,e.segmentIndex&&e.segmentIndex.Hb(function(f){var g=f.Ka()[0],h=f.startTime+"-"+f.endTime+"-"+g;f={id:h,title:g,startTime:f.startTime,endTime:f.endTime};d.has(h)||(c.push(f),d.add(h))});return c};
p.Lh=function(a){var b=this,c,d,e,f,g,h,k;return D(function(l){switch(l.h){case 1:if(!b.wb.length)return l.return([]);c=ff(a);d=b.wb.filter(function(m){return ff(m.language)==c});if(!d.length)return l.return([]);e=[];f=new Set;g=t(d);h=g.next();case 2:if(h.done){l.A(4);break}k=h.value;if(k.segmentIndex){l.A(5);break}return l.g(k.createSegmentIndex(),5);case 5:k.segmentIndex.Hb(function(m){var n=m.Ka()[0],q=m.startTime+"-"+m.endTime+"-"+n;m={id:q,title:n,startTime:m.startTime,endTime:m.endTime};f.has(q)||
(e.push(m),f.add(q))});h=g.next();l.A(2);break;case 4:return l.return(e)}})};function Lu(a){return Array.from(a.h.textTracks).filter(function(b){return b.kind!="metadata"&&b.kind!="chapters"&&b.label!="Shaka Player TextTrack"})}function Mu(a){return Array.from(a.h.textTracks).find(function(b){return b.label=="Shaka Player TextTrack"})}function Qu(a){return Array.from(a.h.textTracks).filter(function(b){return b.kind=="metadata"})}
p.Yg=function(a){a=!!a;this.aa!=a&&(this.aa=a,this.m==zu?(this.u.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.l.B||(a=Sf(this.i.textStreams,this.Wc,this.Zc,this.Yc),a.length>0&&(qq(this.l,a[0]),qu(this),Gu(this))):mq(this.l))):this.h&&this.h.src&&this.h.textTracks&&this.u.setTextVisibility(a),Fu(this))};
p.$h=function(){if(this.F)var a=this.F.$c();else{if(this.O==null)return new Date;if(this.O instanceof Date)return this.O;a=this.O}if(this.i&&!this.qa()){var b=this.i.presentationTimeline;return new Date(((b.m||b.i)+a)*1E3)}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),b instanceof Date&&!isNaN(b.getTime())?new Date(b.getTime()+a*1E3):null):null};
p.gg=function(){if(this.i&&!this.qa()){var a=this.i.presentationTimeline;a=a.m||a.i;return a===null?null:new Date(a*1E3)}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),a instanceof Date&&!isNaN(a.getTime())?a:null):null};p.Qd=function(){return this.T()?this.i?this.i.presentationTimeline.Qd():null:null};p.Vb=function(){if(this.m==zu)return this.G.Vb();var a={total:[],audio:[],video:[],text:[]};this.m==su&&(a.total=$n(this.h.buffered));return a};
function pt(a){if(!a.h||!a.h.currentTime)return null;var b=a.gg();return b?Math.floor(Date.now()-(b.getTime()+a.h.currentTime*1E3)):null}p.getBandwidthEstimate=function(){return this.o?this.o.getBandwidthEstimate():NaN};
p.getStats=function(){if(this.m!=zu&&this.m!=su)return{width:NaN,height:NaN,currentCodecs:"",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:[]};ou(this);var a=this.h,b=a.currentTime/a.duration;isNaN(b)||this.T()||$q(this.B,Math.round(100*b));this.F&&(this.B.W=this.F.Ff(),this.B.X=this.F.Hf());a.getVideoPlaybackQuality&&(b=a.getVideoPlaybackQuality(),Yq(this.B,Number(b.droppedVideoFrames),Number(b.totalVideoFrames)),this.B.N=Number(b.corruptedVideoFrames));ar(this.B,this.D?ln(this.D):NaN);Zq(this.B,a.videoWidth||NaN,a.videoHeight||NaN);this.B.l="";this.T()&&(a=pt(this),a!=null&&br(this.B,a/1E3));b=this.Kb().find(function(e){return e.active});
a=this.Xb().find(function(e){return e.active});if(b){if(b.bandwidth){var c=this.M?this.M.h:1,d=c*b.bandwidth;a&&a.bandwidth&&(d+=c*a.bandwidth);this.B.B=d}b.width&&b.height&&Zq(this.B,b.width||NaN,b.height||NaN);b=b.codecs;a&&(b+=","+(a.codecs||a.mimeType));b&&(this.B.l=b)}this.m!=zu||this.qa()||(this.i&&(this.B.I=this.i.periodCount,this.B.G=this.i.gapCount,this.i.presentationTimeline&&cr(this.B,this.i.presentationTimeline.h)),a=this.o.getBandwidthEstimate(),this.B.u=a);this.m==su&&dr(this.B,NaN);
return er(this.B)};
p.sh=function(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=this,k,l,m,n,q,r,u,v,w,x,y,z;return D(function(A){switch(A.h){case 1:if(h.m!=zu&&h.m!=su)throw new V(1,7,7004);c!="subtitles"&&c!="captions"&&Qa("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){A.A(2);break}return A.g(bv(h,a),3);case 3:d=A.i;case 2:k=[];h.C&&(k=h.C.getCuePoints());if(h.m!=su){A.A(4);break}l=P();g&&l.va()==="WEBKIT"&&(c="forced");return A.g(cv(h,a,b,c,d,f||"",k),5);case 5:m=A.i;if(m.track)return ru(h),
qu(h),A.return(Of(m.track));throw new V(1,2,2012);case 4:n=Ec;q=h.Qa();r=q.end-q.start;h.i&&(r=h.i.presentationTimeline.getDuration());if(r==Infinity)throw new V(1,4,4033);if(!k.length){A.A(6);break}return A.g(dv(h,a),7);case 7:u=A.i,v=ev(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=vo(w),d="text/vtt";case 6:x={id:h.Gd++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:rj(0,r,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,
language:b,originalLanguage:b,label:f||null,type:n.Ma,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([Be(d||"",e||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};y=Be(x.mimeType,x.codecs);z=Qe(y);if(!z)throw new V(2,2,2014,d);h.i.textStreams.push(x);ru(h);qu(h);return A.return(Kf(x))}})};
p.uh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u,v,w,x,y,z,A;return D(function(F){switch(F.h){case 1:if(c.m!=zu&&c.m!=su)throw new V(1,7,7004);if(b){F.A(2);break}return F.g(bv(c,a),3);case 3:b=F.i;case 2:if(b!="text/vtt")throw new V(1,2,2017,a);d=Ec;e=c.Qa();f=e.end-e.start;c.i&&(f=c.i.presentationTimeline.getDuration());if(f==Infinity)throw new V(1,4,4045);return F.g(dv(c,a),4);case 4:g=F.i;h=Pe(b);if(!h)throw new V(2,2,2014,b);k=h();l={periodStart:0,segmentStart:0,segmentEnd:f,vttOffset:0};
m=S(g);n=k.parseMedia(m,l,a,[]);q=[];r=t(n);u=r.next();for(v={};!u.done;v={xe:void 0,Ac:void 0},u=r.next())v.Ac=u.value,v.xe=null,w=function(G){return function(){G.xe==null&&(G.xe=wc([a],[G.Ac.payload]));return G.xe||[]}}(v),x=new X(v.Ac.startTime,v.Ac.endTime,w,0,null,null,0,0,Infinity),v.Ac.payload.includes("#xywh")&&(y=v.Ac.payload.split("#xywh=")[1].split(","),y.length===4&&x.Zg({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],10)})),q.push(x);
z=b;if(!q.length){F.A(5);break}return F.g(bv(c,q[0].Ka()[0]),6);case 6:z=F.i;case 5:return A={id:c.Gd++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new pj(q),mimeType:z||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.qh,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([Be(z||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},c.m==su?c.Ed.push(A):c.i.imageStreams.push(A),ru(c),F.return(Lf(A))}})};
p.rh=function(a,b,c){var d=this,e,f,g,h,k,l,m,n,q,r,u,v,w,x,y;return D(function(z){switch(z.h){case 1:if(d.m!=zu&&d.m!=su)throw new V(1,7,7004);if(c){z.A(2);break}return z.g(bv(d,a),3);case 3:c=z.i;case 2:e=Ec;f=d.Qa();g=f.end-f.start;d.i&&(g=d.i.presentationTimeline.getDuration());if(g==Infinity)throw new V(1,4,4055);h=Pe(c);if(!h)throw new V(2,2,2014,c);return z.g(dv(d,a),4);case 4:k=z.i;l=h();m={periodStart:0,segmentStart:0,segmentEnd:g,vttOffset:0};n=S(k);q=l.parseMedia(n,m,a,[]);r=[];u=t(q);
v=u.next();for(w={};!v.done;w={Nd:void 0},v=u.next())w.Nd=v.value,x=new X(w.Nd.startTime,w.Nd.endTime,function(A){return function(){return[A.Nd.payload]}}(w),0,null,null,0,0,Infinity),r.push(x);y={id:d.Gd++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new pj(r),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:null,type:e.Ma,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([Be("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null};d.wb.push(y);ru(d);return z.return(Kf(y))}})};
function bv(a,b){var c;return D(function(d){switch(d.h){case 1:return d.m(2),d.g(ak(b,a.N,a.g.streaming.retryParameters),4);case 4:c=d.i;d.o(3);break;case 2:d.l();case 3:if(c)return d.return(c);throw new V(1,2,2011,b);}})}
function cv(a,b,c,d,e,f,g){var h,k,l,m;return D(function(n){if(n.h==1)return e!="text/vtt"||g.length?n.g(dv(a,b),3):n.A(2);n.h!=2&&(h=n.i,k=ev(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=vo(l),e="text/vtt");m=document.createElement("track");a:{var q=a.L,r=b;try{if(!q.g.enabled){var u=r;break a}var v=Cs(q);v.ot=it;v.su=!0;var w=Gs(v);u=Hs(r,w);break a}catch(x){Sa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x);u=r;break a}u=void 0}m.src=u;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);a.Be.push(m);return n.return(m)})}function dv(a,b){var c,d,e,f;return D(function(g){if(g.h==1){c=Li;d=a.g.streaming.retryParameters;e=Fi([b],d);e.method="GET";var h=a.L;try{h.g.enabled&&Ys(h,e,{ot:it,su:!0})}catch(k){Sa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",k)}return g.g(a.N.request(c,e).promise,2)}f=g.i;return g.return(f.data)})}
function ev(a,b,c,d){var e=Pe(c);if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=S(b),b=c.parseMedia(b,a,null,[]),os(b,d);throw new V(2,2,2014,c);}p.cj=function(a,b){this.ya.width=a;this.ya.height=b};p.tf=function(a){if(this.m==zu){var b=this.l;a=a===void 0?.1:a;if(b.l.g)b=!1;else if(b.D)b=!1;else{for(var c=t(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Fc||d.wa||d.Ua||(d.Fc=!1,lq(b,d,a));b=!0}}else b=!1;return b};
p.Re=function(){Qa("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};p.Vh=function(){return this.Oc};
p.Qh=function(){var a={video:null,audio:null,text:null};if(this.m!=zu)return a;var b=this.l.o,c=this.h.currentTime;b=t([b.video,b.audio,this.l.B]);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};d.type=="video"?(e.width=d.width,e.height=d.height,a.video=e):d.type=="audio"?a.audio=e:d.type==Cc&&(a.text=e)}return a};
function At(a){var b=ol();b.streaming.failureCallback=function(c){if(a.T()){var d=null;c.code==1001||c.code==1002?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):c.code==1003&&(d=.1);d!=null&&(c.severity=1,a.tf(d))}};b.textDisplayFactory=function(){if(a.wd){var c=a.h;c=c.webkitDisplayingFullscreen||c.webkitPresentationMode&&c.webkitPresentationMode!="inline"?!1:!0}else c=!1;return c?new es(a.h,a.wd):"track"in document.createElement("track")?new as(a):new ds};return b}p.ej=function(a){this.wd=a};
function fu(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,e.mimeType!="application/cea-608"&&e.mimeType!="application/cea-708"||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 sj,l=e.closedCaptions.get(g);h={id:a.Gd++,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:Cc,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([Be(h,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};
b.textStreams.push(h);c.add(g)}}
function Eu(a,b){var c,d,e,f,g;return D(function(h){if(h.h==1)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return D(function(r){if(r.h==1)return k?k.segmentIndex?r.A(2):r.g(k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.qb(l))?m.next().value:null;if(!n)return r.return(null);q=n.startTime;return r.return(q)})},h.g(e(c,b),2);if(h.h!=3)return f=h.i,h.g(e(d,b),3);g=h.i;return g!=null&&f!=null?h.return(Math.max(g,f)):g!=null?h.return(g):f!=null?h.return(f):h.return(b)})}
function Pt(a){var b=a.mg();if(a.B&&a.S&&a.F){if(a.g.streaming.rebufferingGoal==0){var c=a.M;c.j=!1;op(c)}else c=a.M,c.j=b,op(c);a.L&&(c=a.L,b||c.D||(c.D=!0),c.D&&b&&(c.I=!0,As(c,"ps",{sc:"r"})),c.K=b);ou(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.Id<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;
a.X&&(a.X=Math.min(a.X+ ++a.Id*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(It("buffering",b))}function pu(a){var b=a.h.playbackRate;b==0?(b=a.bb(),b!==0&&b!==1&&(b=It("ratechange"),a.dispatchEvent(b))):(a.M&&(a.M.set(b),a.m==zu&&a.o.playbackRateChanged(b),Uu(a,b)),b=It("ratechange"),a.dispatchEvent(b))}
function Uu(a,b){a.lc.Ya();a.lc.H(a.h,"timeupdate",function(){var c=a.h.currentTime,d=a.Qa(),e=a.T(),f=e?a.g.streaming.safeSeekOffset:0;b>0?e&&b>1&&Math.floor(c)>=Math.floor(d.end)&&a.ad():Math.floor(c)<=Math.floor(d.start+f)&&a.ad()})}
function ou(a){if(a.B&&a.S){var b=a.B.g,c="playing";a.S.g==Gn?c="buffering":a.jd()?c="ended":a.h.paused&&(c="paused");var d=c;if(b.g==null)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(It("statechanged",c)))}}
function Iu(a){var b=a.h.playbackRate,c=a.T();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.ag();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.sd(d,!1):e==1&&b!==a.M.Bc()&&a.ad()}if(c&&(c=a.Qa(),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,a.i.serviceDescription.targetLatency!=null?h=a.i.serviceDescription.targetLatency+d:a.i.serviceDescription.maxLatency!=null&&(h=a.i.serviceDescription.maxLatency),a.i.serviceDescription.targetLatency!=null?
k=Math.max(0,a.i.serviceDescription.targetLatency-d):a.i.serviceDescription.minLatency!=null&&(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.X||typeof g!=="number"||(a.X=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.jc&&a.X!==null&&typeof g==="number"&&a.Id<n&&Date.now()-a.jc>f*1E3&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,
a.X=Math.max(a.X-(g-f)/2,f+d),a.jc=Date.now());e&&a.X!==null&&(h=a.X+d,k=a.X-d);g=c.end-a.h.currentTime;d=0;a.m==su&&(e=a.h.buffered,e.length>0&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=a.g.streaming.liveSync.panicThreshold*1E3;f=Date.now()-a.S.i;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.sd(m,!1):h!=void 0&&l&&g-d>h?(b!=l&&a.sd(l,!1),a.jc=null):k!=void 0&&m&&g-d<k?(b!=m&&a.sd(m,!1),a.jc=null):b!==a.M.Bc()&&(a.ad(),a.jc=Date.now())}}
function fv(a,b,c){return(ro(b,c,.01)||c>b)&&a.Ae<b?(a.Ae=b,!0):!1}function Ju(a){if(a.h){var b=a.Qa();b=b.end-b.start;b=b>0?a.h.currentTime/b:0;if(!isNaN(b)){b*=100;if(fv(a,0,b))var c=It("started");else if(fv(a,25,b))c=It("firstquartile");else if(fv(a,50,b))c=It("midpoint");else if(fv(a,75,b))c=It("thirdquartile");else{if(fv(a,100,b)||b>100)c=It("complete");a.g&&a.g.playRangeEnd!=Infinity&&a.jd()&&a.h.pause()}c&&a.dispatchEvent(c)}}}
function vu(a){try{po(a.zd,a.i)}catch(c){return Nt(a,c),!1}var b=Rf(a.i.variants);b=a.K.create(b);a=a.o.setVariants(Array.from(b.values()));return typeof a=="boolean"?a:!0}
function Au(a,b){b=b===void 0?!1:b;if(vu(a)){if(!a.g.abr.enabled){var c=a.K;typeof c.getLastAdaptationSet!="function"&&(R("AdaptationSetCriteria w/o getLastAdaptationSet","Please use an AdaptationSetCriteria with getLastAdaptationSet."),c.getLastAdaptationSet=function(){return null});if(c=c.getLastAdaptationSet())if(c=Array.from(c.values()),c.length){var d=a.l.o;if(d&&d.video&&(c=c.find(function(e){return e.video==d.video})))return c}}return a.o.chooseVariant(b)}return null}
function Ft(a,b,c,d,e){b=b===void 0?!0:b;c=c===void 0?0:c;d=d===void 0?!1:d;e=e===void 0?!0:e;var f=Au(a);f&&xu(a,f,e,b,c,d)}
function xu(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a.l.o;if(b==g)d&&pq(a.l,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}));pq(a.l,b,d,e,f,c);d=null;g&&(d=Jf(g));g=Jf(b);g.active=!0;if(a.W&&(e=a.W,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.eg()){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=It("adaptation",c),gv(a,c)):hv(a,d,g);iv(a,d,g)}}function Zu(a,b){var c=Array.from(a.h.audioTracks).find(function(e){return e.enabled});b.enabled=!0;if(c){b.id!==c.id&&(c.enabled=!1);var d=Vu(a);c=Pf(c,d);b=Pf(b,d);hv(a,c,b);iv(a,c,b)}}function Vu(a){return a.h&&a.h.videoTracks?Array.from(a.h.videoTracks).find(function(b){return b.selected}):null}
function ru(a){var b=It("trackschanged");gv(a,b);jv(a)}function hv(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=It("variantchanged",b);gv(a,b)}function iv(a,b,c){var d=!1;b&&b.audioId==c.audioId&&b.audioGroupId==c.audioGroupId||(d=!0);d&&jv(a)}function jv(a){var b=It("audiotrackschanged");gv(a,b)}function qu(a){var b=It("textchanged");gv(a,b)}function Fu(a){var b=It("texttrackvisibility");gv(a,b)}
function Hu(a){a.g.abr.enabled||Et(a);var b=(new Map).set("newStatus",a.g.abr.enabled);gv(a,It("abrstatuschanged",b))}function Gu(a){var b=a.Xb().find(function(c){return c.active});b&&a.u&&a.u.setTextLanguage&&a.u.setTextLanguage(b.language)}function Et(a,b){b=b===void 0?!0:b;if(a.m==zu){a.Cd.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&vu(a)}}
p.disableStream=function(a,b){if(!this.g.abr.enabled||this.m===Jt||!navigator.onLine||b==0||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?a.type=="audio"?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.Cd.Aa(1);b=this.Vb().video.reduce(function(h,
k){return h+k.end-k.start},0);Ft(this,!1,b,!0,!1);return!0}return!1};
function Nt(a,b){var c,d,e,f,g;return D(function(h){switch(h.h){case 1:if(a.m==Jt)return h.return();b.severity===1&&a.B.M++;c=!0;if(!(a.Sa&&a.i&&a.l)||b.code!=3016&&b.code!=3014&&b.code!=3015&&b.code!=3024&&b.code!=3018){h.A(2);break}d=P();if(d.va()==="WEBKIT"&&b.code==3016)return h.return();h.m(3);return h.g(Fq(a.l),5);case 5:e=h.i;c=!e;e&&(f=It("mediasourcerecovered"),a.dispatchEvent(f));h.o(2);break;case 3:h.l(),c=!0;case 2:if(!c)return h.return();b.severity===2&&Et(a,!1);g=It("error",(new Map).set("detail",
b));a.dispatchEvent(g);g.defaultPrevented&&(b.handled=!0);h.j()}})}p.addFont=function(a,b){return pm(a,b)};function hu(a,b,c,d){d=d===void 0?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(It(b,a))}
function iu(a,b,c,d){d=d===void 0?!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(It(d?"audiotrackchanged":"mediaqualitychanged",b))}
function Mt(a,b){b=b===void 0?!0:b;if(!a.h.error)return b?new V(2,3,3016):null;var c=a.h.error.code;if(!b&&c==1)return null;if(b=a.h.error.msExtendedCode)b<0&&(b+=4294967296),b=b.toString(16);return new V(2,3,3016,c,b,a.h.error.message)}
function ju(a,b){if(a.l){var c=It("keystatuschanged");a.dispatchEvent(c);var d=Object.keys(b);d.length==1&&d[0]==""&&(d=["00"],b={"00":b[""]});var e=d.length==1&&d[0]=="00";c=!1;if(d.length){d=a.keySystem();for(var f=Nm(a.g.drm.clearKeys),g=function(u,v){u.allowedByKeySystem=!0;v=t(v);for(var w=v.next();!w.done;w=v.next())if(w=w.value,(w=b[e?"00":w])||a.D.G)u.allowedByKeySystem=u.allowedByKeySystem&&!!w&&!qo.includes(w)},h=t(a.i.variants),k=h.next();!k.done;k=h.next()){k=k.value;var l=Uf(k);l=t(l);
for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=k.allowedByKeySystem;if(m.keyIds.size)if(m.drmInfos.length&&!f.size&&a.i.type=="HLS")for(var q=t(m.drmInfos),r=q.next();!r.done;r=q.next())r=r.value,r.keySystem==d&&(r.keyIds.size?g(k,r.keyIds):g(k,m.keyIds));else g(k,m.keyIds);n!=k.allowedByKeySystem&&(c=!0)}}}c&&(ru(a),(c=a.l.o)&&!c.allowedByKeySystem?Ft(a):vu(a))}}function wu(a,b,c){b>0&&(a.T()||a.ah(b));b=a.getDuration();c<b&&(a.T()||a.Qb(c))}
function gv(a,b){D(function(c){if(c.h==1)return c.g(Promise.resolve(),2);a.m!=Jt&&a.dispatchEvent(b);c.j()})}function av(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(ff(c.language)):b.add("und");return b}
function $u(a){for(var b=new Map,c=new Map,d=0;d<a.length;d++){var e=a[d],f="und",g=[];e.language&&(f=ff(e.language));e.type=="variant"?g=e.audioRoles:g=e.roles;g&&g.length||(g=[""]);b.has(f)||b.set(f,new Set);g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,b.get(f).add(h),e.label&&(c.has(f)||c.set(f,new Map),c.get(f).set(h,e.label))}var k=[];b.forEach(function(l,m){l=t(l);for(var n=l.next();!n.done;n=l.next()){n=n.value;var q=null;c.has(m)&&c.get(m).has(n)&&(q=c.get(m).get(n));k.push({language:m,
role:n,label:q})}});return k}p.qa=function(){return this.h&&this.h.remote?this.h.remote.state!="disconnected":!1};p.jd=function(){return!this.h||this.h.ended?!0:this.Sa&&!this.T()&&this.h.currentTime>=this.Qa().end};E("shaka.Player",Z);Z.prototype.isEnded=Z.prototype.jd;Z.prototype.isRemotePlayback=Z.prototype.qa;Z.prototype.addFont=Z.prototype.addFont;Z.prototype.setVideoContainer=Z.prototype.ej;Z.prototype.getFetchedPlaybackInfo=Z.prototype.Qh;Z.prototype.getManifestParserFactory=Z.prototype.Vh;
Z.prototype.getManifest=Z.prototype.Re;Z.prototype.retryStreaming=Z.prototype.tf;Z.prototype.setMaxHardwareResolution=Z.prototype.cj;Z.prototype.addChaptersTrack=Z.prototype.rh;Z.prototype.addThumbnailsTrack=Z.prototype.uh;Z.prototype.addTextTrackAsync=Z.prototype.sh;Z.prototype.getStats=Z.prototype.getStats;Z.prototype.getBufferedInfo=Z.prototype.Vb;Z.prototype.getSegmentAvailabilityDuration=Z.prototype.Qd;Z.prototype.getPresentationStartTimeAsDate=Z.prototype.gg;
Z.prototype.getPlayheadTimeAsDate=Z.prototype.$h;Z.prototype.setTextTrackVisibility=Z.prototype.Yg;Z.prototype.getChaptersAsync=Z.prototype.Lh;Z.prototype.getChapters=Z.prototype.Kh;Z.prototype.getChaptersTracks=Z.prototype.Mh;Z.prototype.isTextTrackVisible=Z.prototype.Ye;Z.prototype.selectVariantsByLabel=Z.prototype.aj;Z.prototype.selectTextLanguage=Z.prototype.Pg;Z.prototype.selectAudioLanguage=Z.prototype.Og;Z.prototype.getTextLanguages=Z.prototype.ii;Z.prototype.getAudioLanguages=Z.prototype.Hh;
Z.prototype.getTextLanguagesAndRoles=Z.prototype.ji;Z.prototype.getAudioLanguagesAndRoles=Z.prototype.Ih;Z.prototype.getVideoTracks=Z.prototype.getVideoTracks;Z.prototype.selectVideoTrack=Z.prototype.bj;Z.prototype.getAudioTracks=Z.prototype.getAudioTracks;Z.prototype.selectAudioTrack=Z.prototype.$i;Z.prototype.selectVariantTrack=Z.prototype.oe;Z.prototype.selectTextTrack=Z.prototype.wf;Z.prototype.getThumbnails=Z.prototype.li;Z.prototype.getAllThumbnails=Z.prototype.Gh;
Z.prototype.getImageTracks=Z.prototype.Sh;Z.prototype.getTextTracks=Z.prototype.Xb;Z.prototype.getVariantTracks=Z.prototype.Kb;Z.prototype.cancelTrickPlay=Z.prototype.ad;Z.prototype.trickPlay=Z.prototype.sd;Z.prototype.useTrickPlayTrackIfAvailable=Z.prototype.Ef;Z.prototype.getPlaybackRate=Z.prototype.bb;Z.prototype.isBuffering=Z.prototype.mg;Z.prototype.getKeyStatuses=Z.prototype.Pd;Z.prototype.getActiveSessionsMetadata=Z.prototype.Oe;Z.prototype.getExpiration=Z.prototype.Pe;
Z.prototype.drmInfo=Z.prototype.drmInfo;Z.prototype.keySystem=Z.prototype.keySystem;Z.prototype.isFullyLoaded=Z.prototype.wi;Z.prototype.goToLive=Z.prototype.ri;Z.prototype.seekRange=Z.prototype.Qa;Z.prototype.isVideoOnly=Z.prototype.rg;Z.prototype.isAudioOnly=Z.prototype.ui;Z.prototype.isInProgress=Z.prototype.Hc;Z.prototype.isLive=Z.prototype.T;Z.prototype.getQueueManager=Z.prototype.di;Z.prototype.getAdManager=Z.prototype.Fh;Z.prototype.getAssetUri=Z.prototype.Od;
Z.prototype.getNetworkingEngine=Z.prototype.Yh;Z.prototype.getMediaElement=Z.prototype.Se;Z.prototype.getManifestType=Z.prototype.eg;Z.prototype.getLoadMode=Z.prototype.Qe;Z.prototype.resetConfiguration=Z.prototype.Yi;Z.prototype.getBufferFullness=Z.prototype.ag;Z.prototype.getNonDefaultConfiguration=Z.prototype.Zh;Z.prototype.getConfigurationForLowLatency=Z.prototype.Nh;Z.prototype.getConfiguration=Z.prototype.getConfiguration;Z.prototype.configurationForLowLatency=Z.prototype.Ch;
Z.prototype.configure=Z.prototype.configure;Z.prototype.releaseAllMutexes=Z.prototype.Wi;Z.prototype.destroyAllPreloads=Z.prototype.Vf;Z.prototype.preload=Z.prototype.preload;Z.prototype.detachAndSavePreload=Z.prototype.Wf;Z.prototype.unloadAndSavePreload=Z.prototype.ij;Z.prototype.load=Z.prototype.load;Z.prototype.updateStartTime=Z.prototype.mj;Z.prototype.unload=Z.prototype.td;Z.prototype.detach=Z.prototype.detach;Z.prototype.attachCanvas=Z.prototype.xh;Z.prototype.attach=Z.prototype.Eb;
Z.probeSupport=function(a){a=a===void 0?!0:a;var b,c,d,e,f,g,h;return D(function(k){switch(k.h){case 1:b={};if(!a){k.A(2);break}return k.g(Bn(),3);case 3:b=k.i;case 2:return c=Nc(),d=yo(),e=P(),k.g(e.Gb(),4);case 4:return f=k.i,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=kv,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})};
Z.isBrowserSupported=function(){window.Promise||Qa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))return!1;P();return Oc()?!0:Pc().canPlayType("application/x-mpegurl")!=""};Z.setQueueManagerFactory=function(a){Dt=a};Z.setAdManagerFactory=function(a){Ct=a};Z.registerSupportPlugin=function(a,b){kv.set(a,b)};Z.prototype.destroy=Z.prototype.destroy;var Jt=0,zt=1,zu=2,su=3;
Z.LoadMode={DESTROYED:Jt,NOT_LOADED:zt,MEDIA_SOURCE:zu,SRC_EQUALS:su};Z.version="v4.16.37";var lv=["4","16"];pb=new function(a){this.g=a;this.i=qb;this.h=rb}(new ob(Number(lv[0]),Number(lv[1])));var kv=new Map,Ct=null,Dt=null;function mv(){}function nv(a,b){a={priority:b||0,callback:a};for(b=0;b<ov.length;b++)if(ov[b].priority<a.priority){ov.splice(b,0,a);return}ov.push(a)}E("shaka.polyfill",mv);mv.register=nv;mv.installAll=function(){for(var a=t(ov),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Qa("Error installing polyfill!",c)}}};var ov=[];function pv(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}pv.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};pv.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function qv(a){if(Zb(a))return"cbcs";if(Xb(a)||Yb(a)||Wb(a)||a==="com.huawei.wiseplay")return"cenc";Qa("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function rv(a){if(!a)return!1;a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&a.encryptionScheme!==void 0?!0:!1}function sv(a,b){return!a||a==b||(a=="cbcs"||a=="cbcs-1-9")&&P().tc()?!0:!1};function tv(){}var uv;function vv(){P().qe()&&!uv&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(uv=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=wv,navigator.emeEncryptionSchemePolyfilled=!0)}
function wv(a,b){var c=this,d,e;return D(function(f){if(f.h==1)return f.g(uv.call(c,a,b),2);d=f.i;if(e=rv(d))return navigator.requestMediaKeySystemAccess=uv,f.return(d);navigator.requestMediaKeySystemAccess=xv;return f.return(xv.call(c,a,b))})}
function xv(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u;return D(function(v){if(v.h==1){d=qv(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=yv(h.videoCapabilities,d),l=yv(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 v.g(uv.call(c,a,e),2)}q=v.i;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 pv(q,r,u))})}function yv(a,b){return a?a.filter(function(c){return sv(c.encryptionScheme,b)}):a}mv.EmeEncryptionScheme=tv;tv.install=vv;nv(vv);function zv(){}var Av;function Bv(){P().qe()&&!Av&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(Av=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=Cv,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}
function Cv(a){var b=this,c,d,e;return D(function(f){switch(f.h){case 1:return f.g(Av.call(b,a),2);case 2:c=f.i;if(!c.supported||!a.keySystemConfiguration)return f.return(c);d=c.keySystemAccess;if(e=rv(d))return navigator.mediaCapabilities.decodingInfo=Av,f.return(c);navigator.mediaCapabilities.decodingInfo=Dv;if(d){f.A(3);break}return f.g(Ev(a),4);case 4:return c.keySystemAccess=f.i,f.return(c);case 3:return f.return(Dv.call(b,a))}})}
function Dv(a){var b=this,c,d,e,f,g,h,k;return D(function(l){switch(l.h){case 1:return d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=qv(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},sv(d,g)&&sv(c,g))?l.g(Av.call(b,a),2):l.return(h);case 2:k=l.i;if(k.keySystemAccess){k.keySystemAccess=new pv(k.keySystemAccess,c,d);l.A(3);break}if(!a.keySystemConfiguration){l.A(3);
break}return l.g(Ev(a),5);case 5:k.keySystemAccess=l.i;case 3:return l.return(k)}})}
function Ev(a){var b,c;return D(function(d){if(d.h==1){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 d.g(navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.i;return d.return(c)})}mv.MCapEncryptionScheme=zv;zv.install=Bv;nv(Bv,-2);function Fv(){}function Gv(){P().Bb()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Fv.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Hv)}
function Hv(a){var b,c,d,e,f,g,h,k,l,m,n;return D(function(q){switch(q.h){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};P();c=a.video;d=a.audio;if(a.type!="media-source"){if(a.type=="file"){if(c&&(e=c.contentType,f=Pc().canPlayType(e)!="",!f)||d&&(g=d.contentType,h=Pc().canPlayType(g)!="",!h))return q.return(b)}else return q.return(b);q.A(2);break}if(!Oc())return q.return(b);if(!c){q.A(3);break}return q.g(Iv(c),4);case 4:if(k=q.i,!k)return q.return(b);case 3:if(!d){q.A(2);
break}return q.g(Jv(d),6);case 6:if(l=q.i,!l)return q.return(b);case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return q.g(Kv(c,d,m),8);case 8:if(n=q.i)b.supported=!0,b.keySystemAccess=n;case 7:return q.return(b)}})}function Iv(a){var b,c,d;return D(function(e){return e.h==1?(b=P(),c=b.Ja(),c!=="CAST"?e.A(2):e.g(Lv(a),3)):e.h!=2?(d=e.i,e.return(d)):e.return(Uj(a.contentType))})}
function Jv(a){var b,c,d,e,f;return D(function(g){switch(g.h){case 1:b=P();c=b.Ja();d=a.contentType;if(c!=="CAST"||!a.spatialRendering){g.A(2);break}d+="; spatialRendering=true";if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType)){g.A(2);break}e=!1;f=Mv;if(f.has(d)){e=f.get(d);g.A(4);break}return g.g(cast.__platform__.canDisplayType(d),5);case 5:e=g.i,f.set(d,e);case 4:return g.return(e);case 2:return g.return(Uj(d))}})}
function Kv(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u;return D(function(v){switch(v.h){case 1:d=[];e=[];f=[];c.audio&&(g={robustness:c.audio.robustness||"",contentType:b.contentType},P().yg()&&b.contentType.includes('codecs="ac-3"')&&(g.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(g.encryptionScheme=c.audio.encryptionScheme,f.push(c.audio.encryptionScheme)),d.push(g));c.video&&(h={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(h.encryptionScheme=
c.video.encryptionScheme,f.push(c.video.encryptionScheme)),e.push(h));k={initDataTypes:[c.initDataType],distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(k.audioCapabilities=d);e.length&&(k.videoCapabilities=e);l=a?a.contentType:"";m=b?b.contentType:"";n=Je(l)+";"+Ie(l);q=Je(m)+";"+Ie(m);r=c.keySystem;u=null;v.m(2);var w=$b(n,q,r,f);if(bc.has(w)){w=$b(n,q,r,f);u=bc.get(w)||null;v.A(4);break}return v.g(navigator.requestMediaKeySystemAccess(c.keySystem,
[k]),5);case 5:w=u=v.i;var x=$b(n,q,r,f);bc.set(x,w);case 4:v.o(3);break;case 2:v.l();case 3:return v.return(u)}})}
function Lv(a){var b,c,d,e,f;return D(function(g){if(g.h==1){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return g.return(Uj(a.contentType));b=a.contentType;a.width&&a.height&&a.width>1280&&a.height>720&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(c=Math.round(a.framerate),c<24||c>30)&&(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=Mv;return f.has(b)?(e=f.get(b),g.A(2)):g.g(cast.__platform__.canDisplayType(b),3)}g.h!=2&&(e=g.i,f.set(b,e));return g.return(e)})}mv.MediaCapabilities=Fv;Fv.install=Gv;Fv.originalMcap=null;var Mv=new Map;nv(Gv,-1);function Nv(){}function Ov(){var a=P(),b=a.va()==="WEBKIT"?a.ma():null;(window.MediaSource||window.ManagedMediaSource)&&b&&window.MediaSource&&(b<=12?(Pv(),Qv()):b<=15&&Pv());a=t(a.Ig());for(b=a.next();!b.done;b=a.next())Rv(b.value);(window.MediaSource||window.ManagedMediaSource)&&Sv();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Tv()}
function Pv(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Aa.apply(0,arguments));b.abort=function(){};return b}}function Qv(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
function Sv(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return Fe(c)!="mp2t"&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return Fe(c)!="mp2t"&&b(c)}}}
function Rv(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return Ie(d)!=a&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return Ie(d)!=a&&c(d)}}}
function Tv(){var a=MediaSource.isTypeSupported;P().fh()&&(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(d<0)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});f>=0&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}mv.MediaSource=Nv;Nv.install=Ov;nv(Ov);function Uv(){}var Vv,Wv,Xv,Yv,Zv,$v;
function aw(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys&&window.shakaMediaKeysPolyfill!=bw){if(a===void 0?0:a)Vv=!0,Wv=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Xv=HTMLMediaElement.prototype.setMediaKeys,Yv=window.MediaKeys,Zv=window.MediaKeySystemAccess,$v=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=cw;window.MediaKeys=dw;window.MediaKeySystemAccess=
ew;navigator.requestMediaKeySystemAccess=fw;window.shakaMediaKeysPolyfill=bw;Bf.clear();bc.clear()}}function fw(a,b){try{var c=new ew(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function cw(a){var b=this.mediaKeys;b&&b!=a&&gw(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?gw(a,this):Promise.resolve()}
function hw(a){a=S(a.initData);if(Sb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=fc(a.subarray(4),!0);a=jc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ob(a);this.dispatchEvent(b)}mv.PatchedMediaKeysApple=Uv;
Uv.uninstall=function(){window.shakaMediaKeysPolyfill==bw&&Vv&&(Vv=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Wv),HTMLMediaElement.prototype.setMediaKeys=Xv,window.MediaKeys=Yv,window.MediaKeySystemAccess=Zv,navigator.requestMediaKeySystemAccess=$v,Wv=$v=Xv=Zv=Yv=null,window.shakaMediaKeysPolyfill="",Bf.clear(),bc.clear())};Uv.install=aw;
function ew(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(c.persistentState=="required")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;}
ew.prototype.createMediaKeys=function(){var a=new dw(this.keySystem);return Promise.resolve(a)};ew.prototype.getConfiguration=function(){return this.g};function dw(a){this.h=new WebKitMediaKeys(a);this.g=new eb}dw.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary")throw new TypeError("Session type "+a+" is unsupported on this platform.");return new iw(this.h,a)};dw.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function gw(a,b){a.g.Ya();if(!b)return Promise.resolve();a.g.H(b,"webkitneedkey",hw);try{return pp(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}dw.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function iw(a){xi.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new eb;this.sessionId="";this.expiration=NaN;this.closed=new oi;this.keyStatuses=new jw;this.onkeystatuseschange=null}
ma(iw,xi);p=iw.prototype;
p.generateRequest=function(a,b){var c=this;this.h=new oi;try{var d=this.l.createSession("video/mp4",S(b));this.i=d;this.sessionId=d.sessionId||"";this.j.H(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",c.keyStatuses.Jb()==void 0?"license-request":"license-renewal").set("message",Ob(e.message));e=new wi("message",e);c.dispatchEvent(e)});this.j.H(d,"webkitkeyadded",function(){c.g&&(kw(c,"usable"),c.g.resolve(),c.g=null)});this.j.H(d,"webkitkeyerror",
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(c.h!=null)c.h.reject(e),c.h=null;else if(c.g!=null)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:kw(c,"output-not-allowed");break;default:kw(c,"internal-error")}});kw(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
p.update=function(a){this.g=new oi;try{this.i.update(S(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ya()}catch(a){this.closed.reject(a)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};
function kw(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.g=b;b=new wi("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}function jw(){this.size=0;this.g=void 0}p=jw.prototype;p.Jb=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,ac.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=ac.value();return this.g&&Nb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var bw="apple";
nv(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||aw())});function lw(){}function mw(){if(window.MediaKeys){var a=P();MediaKeys.prototype.setServerCertificate&&a.rd()||(MediaKeys.prototype.setServerCertificate=nw)}}function nw(){return Promise.resolve(!1)}mv.PatchedMediaKeysCert=lw;lw.install=mw;nv(mw);function ow(){}
function pw(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)qw="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=rw;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=sw;window.MediaKeys=tw;window.MediaKeySystemAccess=uw;window.shakaMediaKeysPolyfill=vw}}
function ww(a){var b=qw;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function rw(a,b){try{var c=new uw(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function sw(a){var b=this.mediaKeys;b&&b!=a&&xw(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&xw(a,this);return Promise.resolve()}mv.PatchedMediaKeysWebkit=ow;ow.install=pw;
function uw(a,b){this.g=this.keySystem=a;var c=!1;a=="org.w3.clearkey"&&(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));f.persistentState=="required"&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if(a=="org.w3.clearkey"||a=="com.widevine.alpha")c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}uw.prototype.createMediaKeys=function(){var a=new tw(this.g);return Promise.resolve(a)};uw.prototype.getConfiguration=function(){return this.h};function tw(a){this.l=a;this.h=null;this.g=new eb;this.i=[];this.j=new Map}
function xw(a,b){a.h=b;a.g.Ya();var c=qw;b&&(a.g.H(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ob(d.initData);a.h.dispatchEvent(e)}),a.g.H(b,c+"keymessage",function(d){var e=yw(a,d.sessionId);e&&(d=(new Map).set("messageType",e.keyStatuses.Jb()==void 0?"licenserequest":"licenserenewal").set("message",d.message),d=new wi("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.H(b,c+"keyadded",function(d){(d=yw(a,d.sessionId))&&d.ready()}),
a.g.H(b,c+"keyerror",function(d){var e=yw(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?(d.systemCode==45&&(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?zw(e,"output-restricted"):f==1?zw(e,"expired"):zw(e,"internal-error"))}}))}
tw.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary"&&a!="persistent-license")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 Aw(b,this.l,a);this.i.push(a);return a};tw.prototype.setServerCertificate=function(){return Promise.resolve(!1)};tw.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
function yw(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 Aw(a,b,c){xi.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 oi;this.keyStatuses=new Bw;this.onkeystatuseschange=null}ma(Aw,xi);p=Aw.prototype;p.ready=function(){zw(this,"usable");this.g&&this.g.resolve();this.g=null};
function Cw(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if(a.l=="persistent-license")if(c)var d=S(jc("LOAD_SESSION|"+c));else{var e=jc("PERSISTENT|");d=uc(e,b)}else d=S(b)}catch(g){return Promise.reject(g)}a.h=new oi;var f=ww("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if(g.name!="InvalidStateError")return a.h=null,Promise.reject(g);(new W(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).ra(.01)}return a.h}
function Dw(a,b,c){if(a.g)a.g.then(function(){return Dw(a,b,c)}).catch(function(){return Dw(a,b,c)});else{a.g=b;if(a.i=="webkit-org.w3.clearkey"){var d=ec(c);var e=JSON.parse(d);e.keys[0].kty!="oct"&&(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=S(c),e=null;var f=ww("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
function zw(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.g=b;b=new wi("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}p.generateRequest=function(a,b){return Cw(this,b,null)};p.load=function(a){return this.l=="persistent-license"?Cw(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new oi;Dw(this,b,a);return b};
p.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=ww("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function Bw(){this.size=0;this.g=void 0}p=Bw.prototype;p.Jb=function(){return this.g};
p.forEach=function(a){this.g&&a(this.g,ac.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=ac.value();return this.g&&Nb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var qw="",vw="webkit";nv(pw);function Ew(){}function Fw(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Gw))}function Gw(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}mv.RandomUUID=Ew;Ew.install=Fw;nv(Fw);function Hw(){}function Iw(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Jw})}function Jw(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}mv.Symbol=Hw;Hw.install=Iw;nv(Iw);function Kw(){}function Lw(){for(var a=t([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),b=a.next();!b.done;b=a.next()){b=b.value;var c=void 0;(c=b.prototype).indexOf!=null||(c.indexOf=Array.prototype.indexOf);c=void 0;(c=b.prototype).lastIndexOf!=null||(c.lastIndexOf=Array.prototype.lastIndexOf);c=void 0;(c=b.prototype).includes!=null||(c.includes=Array.prototype.includes)}}mv.TypedArray=Kw;Kw.install=Lw;nv(Lw);function Mw(){}function Nw(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}mv.VideoPlayPromise=Mw;Mw.install=Nw;nv(Nw);function Ow(){}function Pw(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||typeof Pc().webkitDroppedFrameCount==="number")&&(a.getVideoPlaybackQuality=Qw)}}function Qw(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}mv.VideoPlaybackQuality=Ow;Ow.install=Pw;nv(Pw);function Rw(){}function Sw(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(b==3)a=Tw;else if(b==6)a=Uw;else{try{var c=!!Tw(1,2,"")}catch(d){c=!1}c&&(a=Tw)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Tw(a,b,c){return new window.TextTrackCue(a,b,c)}function Uw(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}mv.VTTCue=Rw;Rw.install=Sw;nv(Sw);function Vw(){this.g="UNKNOWN"}Vw.prototype.parseInit=function(){};Vw.prototype.setSequenceMode=function(){};Vw.prototype.setManifestType=function(a){this.g=a};
Vw.prototype.parseMedia=function(a,b,c,d){var e=ec(a);a=[];if(e=="")return a;var f=md(e,"tt",!0);if(!f)throw new V(2,2,2005,"Failed to parse TTML.");e=wd(f,"body")[0];if(!e)return[];var g=Cd(f,Ww,"frameRate"),h=Cd(f,Ww,"subFrameRate"),k=Cd(f,Ww,"frameRateMultiplier"),l=Cd(f,Ww,"tickRate"),m=Cd(f,Ww,"cellResolution"),n=f.attributes["xml:space"]||"default",q=Cd(f,Xw,"extent");if(n!="default"&&n!="preserve")throw new V(2,2,2005,"Invalid xml:space value: "+n);n=n=="default";g=new Yw(g,h,k,l);m=Zw(m);
h=wd(f,"metadata")[0];h=(h?h.children:[]).filter(function(v){return v!="\n"});k=wd(f,"style");f=wd(f,"region");l=[];for(var r=t(f),u=r.next();!u.done;u=r.next())(u=$w(this,u.value,k,q))&&l.push(u);if(td(e,"p").length)throw new V(2,2,2001,"<p> can only be inside <div> in TTML");q=t(td(e,"div"));for(r=q.next();!r.done;r=q.next())if(td(r.value,"span").length)throw new V(2,2,2001,"<span> can only be inside <p> in TTML");if(b=ax(this,e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor=
"transparent"),a.push(b);return a};
function ax(a,b,c,d,e,f,g,h,k,l,m,n,q,r){var u=m;if(rd(b)){if(!n)return null;var v={tagName:"span",children:[ud(b)],attributes:{},parent:null}}else v=b;for(var w=null,x=t(bx),y=x.next();!y.done&&!(w=cx(v,"backgroundImage",e,"#",y.value)[0]);y=x.next());x=null;y=Cd(v,bx,"backgroundImage");var z=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(y&&z.test(y)){x=parseInt(y.split(":").pop(),10)-1;if(x>=r.length)return null;x=r[x]}else q&&y&&!y.startsWith("#")&&(z=new tb(q),y=new tb(y),(y=z.resolve(y).toString())&&
(x=y));if(b.tagName=="p"||w||x)n=!0;b=n;y=(v.attributes["xml:space"]||(k?"default":"preserve"))=="default";z=v.children.every(rd);k=[];if(!z)for(var A=t(v.children),F=A.next();!F.done;F=A.next())(F=ax(a,F.value,c,d,e,f,g,h,y,l,v,n,q,r))&&k.push(F);e=m!=null;q=ud(v);q=v.children.length&&q&&/\S/.test(q);A=v.attributes.begin||v.attributes.end||v.attributes.dur;if(!(A||q||v.tagName=="br"||k.length!=0||e&&!y))return null;r=dx(v,d);q=r.start;for(r=r.end;u&&u.tagName&&u.tagName!="tt";)r=ex(u,d,q,r),q=r.start,
r=r.end,u=u.parent;q==null&&(q=0);q+=c.periodStart;r=r==null?Infinity:r+c.periodStart;a.g!=="HLS"&&(q=Math.max(q,c.segmentStart),r=Math.min(r,c.segmentEnd));if(!A&&k.length>0)for(q=Infinity,r=0,c=t(k),d=c.next();!d.done;d=c.next())d=d.value,q=Math.min(q,d.startTime),r=Math.max(r,d.endTime);if(v.tagName=="br")return a=new Td(q,r,""),a.lineBreak=!0,a;c="";z&&(c=nc(ud(v)||""),y&&(c=c.replace(/\s+/g," ")));c=new Td(q,r,c);c.nestedCues=k;n||(c.isContainer=!0);l&&(c.cellResolution=l);l=cx(v,"region",g,
"")[0];if(v.attributes.region&&l&&l.attributes["xml:id"]){var G=l.attributes["xml:id"];c.region=h.filter(function(B){return B.id==G})[0]}h=l;m&&e&&!v.attributes.region&&!v.attributes.style&&(h=cx(m,"region",g,"")[0]);fx(a,c,v,h,w,x,f,b,k.length==0);return c}
function $w(a,b,c,d){var e=new Zc,f=b.attributes["xml:id"];if(!f)return null;e.id=f;f=null;d&&(f=gx.exec(d)||hx.exec(d));d=f?Number(f[1]):null;f=f?Number(f[2]):null;var g,h=ix(a,b,c,"extent");if(h){var k=(g=gx.exec(h))||hx.exec(h);k!=null&&(e.width=Number(k[1]),e.height=Number(k[2]),g||(d!=null&&(e.width=e.width*100/d),f!=null&&(e.height=e.height*100/f)),e.widthUnits=g||d!=null?$c:0,e.heightUnits=g||f!=null?$c:0)}if(a=ix(a,b,c,"origin"))if(k=(g=gx.exec(a))||hx.exec(a),k!=null)e.viewportAnchorX=Number(k[1]),
e.viewportAnchorY=Number(k[2]),g?h||(e.width=100-e.viewportAnchorX,e.widthUnits=$c,e.height=100-e.viewportAnchorY,e.heightUnits=$c):(f!=null&&(e.viewportAnchorY=e.viewportAnchorY*100/f),d!=null&&(e.viewportAnchorX=e.viewportAnchorX*100/d)),e.viewportAnchorUnits=g||d!=null?$c:0;return e}function jx(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),b.length==4)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
function fx(a,b,c,d,e,f,g,h,k){h=h||k;kx(a,c,d,g,"direction",h)=="rtl"&&(b.direction="rtl");k=kx(a,c,d,g,"writingMode",h);k=="tb"||k=="tblr"?b.writingMode="vertical-lr":k=="tbrl"?b.writingMode="vertical-rl":k=="rltb"||k=="rl"?b.direction="rtl":k&&(b.direction=Wd);(k=kx(a,c,d,g,"textAlign",!0))?(b.positionAlign=lx.get(k),b.lineAlign=mx.get(k),b.textAlign=pe[k.toUpperCase()]):b.textAlign=Vd;if(k=kx(a,c,d,g,"displayAlign",!0))b.displayAlign=qe[k.toUpperCase()];if(k=kx(a,c,d,g,"color",h))b.color=jx(k);
if(k=kx(a,c,d,g,"backgroundColor",h))b.backgroundColor=jx(k);if(k=kx(a,c,d,g,"border",h))b.border=k;if(k=kx(a,c,d,g,"fontFamily",h))switch(k){case "monospaceSerif":b.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":b.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":b.fontFamily="sans-serif";break;case "monospaceSansSerif":b.fontFamily="Consolas,monospace";break;case "proportionalSerif":b.fontFamily="serif";break;default:b.fontFamily=
k.split(",").filter(function(l){return l!="default"}).join(",")}(k=kx(a,c,d,g,"fontWeight",h))&&k=="bold"&&(b.fontWeight=me);k=kx(a,c,d,g,"wrapOption",h);b.wrapLine=k&&k=="noWrap"?!1:!0;(k=kx(a,c,d,g,"lineHeight",h))&&k.match(nx)&&(b.lineHeight=k);(k=kx(a,c,d,g,"fontSize",h))&&(k.match(nx)||k.match(ox))&&(b.fontSize=k);if(k=kx(a,c,d,g,"fontStyle",h))b.fontStyle=se[k.toUpperCase()];e?(f=e.attributes.imageType||e.attributes.imagetype,k=e.attributes.encoding,e=ud(e).trim(),f=="PNG"&&k=="Base64"&&e&&
(b.backgroundImage="data:image/png;base64,"+e)):f&&(b.backgroundImage=f);if(e=kx(a,c,d,g,"textOutline",h))e=e.split(" "),e[0].match(nx)?b.textStrokeColor=b.color:(b.textStrokeColor=jx(e[0]),e.shift()),e[0]&&e[0].match(nx)?b.textStrokeWidth=e[0]:b.textStrokeColor="";(e=kx(a,c,d,g,"letterSpacing",h))&&e.match(nx)&&(b.letterSpacing=e);(e=kx(a,c,d,g,"linePadding",h))&&e.match(nx)&&(b.linePadding=e);if(e=kx(a,c,d,g,"opacity",h))b.opacity=parseFloat(e);(e=ix(a,d,g,"textDecoration"))&&px(b,e);(e=qx(a,c,
g,"textDecoration"))&&px(b,e);if(e=kx(a,c,d,g,"textCombine",h))b.textCombineUpright=e;switch(kx(a,c,d,g,"ruby",h)){case "container":b.rubyTag="ruby";break;case "text":b.rubyTag="rt"}}
function px(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes(oe)||a.textDecoration.push(oe);break;case "noUnderline":a.textDecoration.includes(oe)&&Xa(a.textDecoration,oe);break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Xa(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Xa(a.textDecoration,"overline")}}function kx(a,b,c,d,e,f){f=f===void 0?!0:f;return(b=qx(a,b,d,e))?b:f?ix(a,c,d,e):null}function ix(a,b,c,d){if(!b)return null;var e=Cd(b,Xw,d);return e?e:rx(a,b,c,d)}function qx(a,b,c,d){var e=Cd(b,Xw,d);return e?e:rx(a,b,c,d)}
function rx(a,b,c,d){b=cx(b,"style",c,"");for(var e=null,f=0;f<b.length;f++){var g=Bd(b[f],"urn:ebu:tt:style",d);g||(g=Cd(b[f],Xw,d));g||(g=qx(a,b[f],c,d));g&&(e=g)}return e}function cx(a,b,c,d,e){var f=[];if(!a||c.length<1)return f;var g=a;for(a=null;!a&&!(a=e?Bd(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 ex(a,b,c,d){a=dx(a,b);c==null?c=a.start:a.start!=null&&(c+=a.start);d==null?d=a.end:a.start!=null&&(d+=a.start);return{start:c,end:d}}function dx(a,b){var c=sx(a.attributes.begin,b),d=sx(a.attributes.end,b);a=sx(a.attributes.dur,b);d==null&&a!=null&&(d=c+a);return{start:c,end:d}}
function sx(a,b){var c=null;if(tx.test(a)){a=tx.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+d*60+c*3600}else if(ux.test(a))c=vx(ux,a);else if(wx.test(a))c=vx(wx,a);else if(xx.test(a))a=xx.exec(a),c=Number(a[1])/b.frameRate;else if(yx.test(a))a=yx.exec(a),c=Number(a[1])/b.g;else if(zx.test(a))c=vx(zx,a);else if(a)throw new V(2,2,2001,"Could not parse cue time range in TTML");return c}
function vx(a,b){a=a.exec(b);return a==null||a[0]==""?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+(Number(a[2])||0)*60+(Number(a[1])||0)*3600}function Zw(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}E("shaka.text.TtmlTextParser",Vw);Vw.prototype.parseMedia=Vw.prototype.parseMedia;Vw.prototype.setManifestType=Vw.prototype.setManifestType;Vw.prototype.setSequenceMode=Vw.prototype.setSequenceMode;Vw.prototype.parseInit=Vw.prototype.parseInit;
function Yw(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);this.g==0&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
var gx=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,ox=/^(\d{1,4}(?:\.\d+)?|100)%$/,nx=/^(\d+px|\d+em|\d*\.?\d+c)$/,hx=/^(\d+)px (\d+)px$/,tx=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ux=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,wx=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,xx=/^(\d*(?:\.\d*)?)f$/,yx=/^(\d*(?:\.\d*)?)t$/,zx=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),mx=(new Map).set("left",Zd).set("center","center").set("right",
"end").set("start",Zd).set("end","end"),lx=(new Map).set("left","line-left").set("center","center").set("right","line-right").set("start","line-left").set("end","line-right"),Ww=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Xw=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],bx=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Ne("application/ttml+xml",function(){return new Vw});function Ax(){this.g=new Vw}Ax.prototype.parseInit=function(a){var b=!1;(new ah).boxes(["moov","trak","mdia","minf","stbl"],fh).ba("stsd",hh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new V(2,2,2007);};Ax.prototype.setSequenceMode=function(a){this.g.setSequenceMode(a)};Ax.prototype.setManifestType=function(a){this.g.setManifestType(a)};
Ax.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new ah).boxes(["moof","traf"],fh).ba("tfhd",function(x){e=lh(x.reader,x.flags).ed}).ba("trun",function(x){x=oh(x.reader,x.version,x.flags);x=t(x.uf);for(var y=x.next();!y.done;y=x.next())h.push(y.value.sampleSize||e||0)}).ba("subs",function(x){for(var y=x.reader,z=y.P(),A=-1,F=0;F<z;F++){var G=y.P();A+=G;G=y.kb();for(var B=[],H=0;H<G;H++)x.version==1?B.push(y.P()):B.push(y.kb()),y.mb(),y.mb(),y.P();g.set(A,B)}}).box("mdat",
kh(function(x){f.push(x)},!1)).parse(a,!1);if(f.length==0)throw new V(2,2,2007);a=uc.apply(oc,C(f));for(var k=0,l=0;l<h.length;l++){var m=S(a,k,h[l]);k+=h[l];var n=g.get(l);if(n&&n.length){for(var q=S(m,0,n[0]),r=[],u=n[0],v=1;v<n.length;v++){var w=S(m,u,n[v]);w=pc(w);r.push("data:image/png;base64,"+w);u+=n[v]}d=d.concat(this.g.parseMedia(q,b,c,r))}else d=d.concat(this.g.parseMedia(m,b,c,[]))}return d};E("shaka.text.Mp4TtmlParser",Ax);Ax.prototype.parseMedia=Ax.prototype.parseMedia;
Ax.prototype.setManifestType=Ax.prototype.setManifestType;Ax.prototype.setSequenceMode=Ax.prototype.setSequenceMode;Ax.prototype.parseInit=Ax.prototype.parseInit;Ne('application/mp4; codecs="stpp"',function(){return new Ax});Ne('application/mp4; codecs="stpp.ttml"',function(){return new Ax});Ne('application/mp4; codecs="stpp.ttml.im1i"',function(){return new Ax});Ne('application/mp4; codecs="stpp.ttml.im1t"',function(){return new Ax});Ne('application/mp4; codecs="stpp.ttml.im2i"',function(){return new Ax});
Ne('application/mp4; codecs="stpp.ttml.im2t"',function(){return new Ax});Ne('application/mp4; codecs="stpp.ttml.etd1"',function(){return new Ax});Ne('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new Ax});Ne('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new Ax});Ne('application/mp4; codecs="stpp.TTML.im1t"',function(){return new Ax});function Bx(){this.g="UNKNOWN"}Bx.prototype.parseInit=function(){};Bx.prototype.setSequenceMode=function(){};Bx.prototype.setManifestType=function(a){this.g=a};
Bx.prototype.parseMedia=function(a,b){a=ec(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(this.g=="HLS"&&c[0].includes("X-TIMESTAMP-MAP")){a=c[0];var d=a.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);a=a.match(/MPEGTS:(\d+)/m);if(!d||!a)throw new V(2,2,2E3);d=(d=d[1])?fd(new bd(d)):null;if(d==null)throw new V(2,2,2E3);a=Number(a[1]);for(var e=b.segmentStart-b.periodStart;e>=95443.7176888889;)e-=
95443.7176888889,a+=8589934592;a=b.periodStart+a/9E4-d}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 bd(e);var f=new Zc;ed(e);cd(e);for(var g=ed(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");cd(e);g=ed(e)}b.push(f)}d=new Map;fe(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((f.length!=1||f[0])&&!Cx.test(f[0])&&f[0]=="STYLE"){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),g!=-1&&(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 Td(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var r=q[2].trim().replace(";","");switch(q[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(parseInt(r,10)>=700||r=="bold")m=
!0,l.fontWeight=me;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=be;break;case "italic":m=!0;l.fontStyle=ne;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=r!="noWrap"}}}m&&d.set(g,l)}}l=f;n=a;if(l.length==1&&!l[0]||Cx.test(l[0])||l[0]=="STYLE"||l[0]=="REGION")f=null;else if(f=null,m=
0,l[0].includes("--\x3e")||(f=l[0],m=1),h=new bd(l[m]),g=fd(h),q=dd(h,/[ \t]+--\x3e[ \t]+/g),k=fd(h),g==null||q==null||k==null)Qa("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=n;k+=n;g<0&&(g=0);n="";for(q=m+1;q<l.length;q++)q>m+1&&(n+="\n"),n+=l[q];n=n.trim();d.has("global")?(l=d.get("global").clone(),l.startTime=g,l.endTime=k,l.payload=n):l=new Td(g,k,n);cd(h);for(g=ed(h);g;)Dx(l,g,b),cd(h),g=ed(h);ee(l,d);f!=null&&(l.id=f);f=l}f&&e.push(f)}return e};
function Dx(a,b,c){var d;if(d=Ex.exec(b))b=d[1],b=="middle"?a.textAlign=Vd:a.textAlign=pe[b.toUpperCase()];else if(d=Fx.exec(b))a.writingMode=d[1]=="lr"?"vertical-lr":"vertical-rl";else if(d=Gx.exec(b))a.size=Number(d[1]);else if(d=Hx.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign=b=="line-left"||b=="start"?"line-left":b=="line-right"||b=="end"?"line-right":b=="center"||b=="middle"?"center":Ud);else if(d=Ix.exec(b)){if(b=Jx(c,d[1]))a.region=b}else if(c=Kx.exec(b))a.lineInterpretation=
1,a.line=Number(c[1]),c[2]&&(a.lineAlign=re[c[2].toUpperCase()]);else if(c=Lx.exec(b))a.lineInterpretation=Yd,a.line=Number(c[1]),c[2]&&(a.lineAlign=re[c[2].toUpperCase()])}function Jx(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}E("shaka.text.VttTextParser",Bx);Bx.prototype.parseMedia=Bx.prototype.parseMedia;Bx.prototype.setManifestType=Bx.prototype.setManifestType;Bx.prototype.setSequenceMode=Bx.prototype.setSequenceMode;Bx.prototype.parseInit=Bx.prototype.parseInit;
var Cx=/^NOTE($|[ \t])/,Ex=/^align:(start|middle|center|end|left|right)$/,Fx=/^vertical:(lr|rl)$/,Gx=/^size:([\d.]+)%$/,Hx=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/,Ix=/^region:(.*)$/,Kx=/^line:([\d.]+)%(?:,(start|end|center))?$/,Lx=/^line:(-?\d+)(?:,(start|end|center))?$/;Ne("text/vtt",function(){return new Bx});Ne('text/vtt; codecs="vtt"',function(){return new Bx});Ne('text/vtt; codecs="wvtt"',function(){return new Bx});function Mx(){this.g=null}Mx.prototype.parseInit=function(a){var b=this,c=!1;(new ah).boxes(["moov","trak","mdia","minf","stbl"],fh).ba("mdhd",function(d){d=nh(d.reader,d.version);b.g=d.timescale}).ba("stsd",hh).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new V(2,2,2008);if(!c)throw new V(2,2,2008);};Mx.prototype.setSequenceMode=function(){};Mx.prototype.setManifestType=function(){};
Mx.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 ah).boxes(["moof","traf"],fh).ba("tfdt",function(z){g=!0;c=mh(z.reader,z.version).baseMediaDecodeTime}).ba("tfhd",function(z){l=lh(z.reader,z.flags).dd}).ba("trun",function(z){h=!0;d=oh(z.reader,z.version,z.flags).uf}).box("mdat",kh(function(z){k=!0;e=z},!1)).parse(a,!1);if(!k&&!g&&!h)throw new V(2,2,2008);a=c;for(var m=new Sg(e,0),n=t(d),q=n.next();!q.done;q=
n.next()){q=q.value;var r=q.vf||l,u=q.ke?c+q.ke:a;a=u+(r||0);var v=0;do{var w=m.P();v+=w;var x=m.P(),y=null;eh(x)=="vttc"?w>8&&(y=m.Yb(w-8,!1)):m.skip(w-8);r&&y&&(w=Nx(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(bf)};function Nx(a,b,c){var d,e,f;(new ah).box("payl",kh(function(g){d=ec(g)},!1)).box("iden",kh(function(g){e=ec(g)},!1)).box("sttg",kh(function(g){f=ec(g)},!1)).parse(a);return d?Ox(d,e,f,b,c):null}
function Ox(a,b,c,d,e){a=new Td(d,e,a);ee(a);b&&(a.id=b);if(c)for(b=new bd(c),c=ed(b);c;)Dx(a,c,[]),cd(b),c=ed(b);return a}E("shaka.text.Mp4VttParser",Mx);Mx.prototype.parseMedia=Mx.prototype.parseMedia;Mx.prototype.setManifestType=Mx.prototype.setManifestType;Mx.prototype.setSequenceMode=Mx.prototype.setSequenceMode;Mx.prototype.parseInit=Mx.prototype.parseInit;Ne('application/mp4; codecs="wvtt"',function(){return new Mx});Object.freeze({pg:0,ng:0,ig:0,Sf:0,Uf:2,qg:0});Object.freeze({pg:0,ng:0,ig:0,Sf:0,Uf:2,qg:0});Object.freeze({pg:0,ng:0,ig:0,Sf:0,Uf:1,qg:1});function Px(){}ma(Px,Rk);E("shaka.util.FairPlayUtils",Px);}).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.dash.map