shaka-player
Version:
DASH/EME video player library
142 lines (141 loc) • 542 kB
JavaScript
/*
@license
Shaka Player
Copyright 2016 Google LLC
SPDX-License-Identifier: Apache-2.0
*/
(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global,module){/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
var q,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 da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=da(this);function fa(a,b){if(b)a:{var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&b!=null&&ba(c,a,{configurable:!0,writable:!0,value:b})}}var ha;
if(typeof Object.setPrototypeOf=="function")ha=Object.setPrototypeOf;else{var ia;a:{var ja={a:!0},ka={};try{ka.__proto__=ja;ia=ka.a;break a}catch(a){}ia=!1}ha=ia?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var la=ha;
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.Mj=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.H=!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.H)throw new TypeError("Generator is already running");a.H=!0}pa.prototype.L=function(a){this.i=a};function ra(a,b){a.u={fg:b,vg:!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.T=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.T;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.J=function(a){this.D=0;this.B=a||0};pa.prototype.setFinallyBlock=pa.prototype.J;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.fg;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.vg?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 ua(a){this.g=new pa;this.h=a}function wa(a,b){qa(a.g);var c=a.g.C;if(c)return xa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return ya(a)}
function xa(a,b,c,d){try{var e=b.call(a.g.C,c);oa(e);if(!e.done)return a.g.H=!1,e;var f=e.value}catch(g){return a.g.C=null,ra(a.g,g),ya(a)}a.g.C=null;d.call(a.g,f);return ya(a)}function ya(a){for(;a.g.h;)try{var b=a.h(a.g);if(b)return a.g.H=!1,{value:b.value,done:!1}}catch(c){a.g.i=void 0,ra(a.g,c)}a.g.H=!1;if(a.g.u){b=a.g.u;a.g.u=null;if(b.vg)throw b.fg;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
function za(a){this.next=function(b){qa(a.g);a.g.C?b=xa(a,a.g.C.next,b,a.g.L):(a.g.L(b),b=ya(a));return b};this.throw=function(b){qa(a.g);a.g.C?b=xa(a,a.g.C["throw"],b,a.g.L):(ra(a.g,b),b=ya(a));return b};this.return=function(b){return wa(a,b)};this[Symbol.iterator]=function(){return this}}function Aa(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 E(a){return Aa(new za(new ua(a)))}function Da(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;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});
fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");ba(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return Ea(na(this))}});return a});function Ea(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(this.g==null){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ea.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.H(g);else{a:switch(typeof g){case "object":var h=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.J(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=ea.console;typeof h!=="undefined"&&h.error(g.i)}},1)};b.prototype.C=
function(){if(this.o)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.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=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.B=function(){if(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.H=function(g){var h=this.j();g.Pd(h.resolve,h.reject)};b.prototype.J=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,r){return typeof p=="function"?function(v){try{l(p(v))}catch(u){m(u)}}:r}var l,m,n=new b(function(p,r){l=p;m=r});this.Pd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Pd=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).Pd(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(u){p[v]=u;r--;r==0&&l(p)}}var p=[],r=0;do p.push(void 0),r++,d(k.value).Pd(n(p.length-1),m),k=h.next();
while(!k.done)})};return b});function Fa(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return l==="object"&&k!==null||l==="function"}function e(k){if(!Fa(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(!Fa(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Fa(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Fa(k,
g)&&Fa(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Fa(k,g)&&Fa(k[g],this.g)?delete k[g][this.g]:!1};return b});
fa("Map",function(a){function b(){var h={};return h.Sb=h.next=h.head=h}function c(h,k){var l=h[1];return Ea(function(){if(l){for(;l.head!=h[1];)l=l.Sb;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&&Fa(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],Sb:this[1].Sb,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].Sb.next=l.entry,this[1].Sb=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.Sb.next=
h.entry.next,h.entry.next.Sb=h.entry.Sb,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].Sb=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});
fa("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||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 Ga(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{pg:e,v:f}}return{pg:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ga(this,b,c).pg}});
function Ha(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.values",function(a){return a?a:function(){return Ha(this,function(b,c){return c})}});
fa("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}});fa("Array.prototype.keys",function(a){return a?a:function(){return Ha(this,function(b){return b})}});
function Ia(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+""}fa("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Ia(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});
fa("Object.is",function(a){return a?a:function(b,c){return b===c?b!==0||1/b===1/c:b!==b&&c!==c}});fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(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}});fa("String.prototype.includes",function(a){return a?a:function(b,c){return Ia(this,b,"includes").indexOf(b,c||0)!==-1}});
fa("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(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}});
fa("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b});
fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ga(this,b,c).v}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Fa(b,d)&&c.push([d,b[d]]);return c}});var Ja=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)Fa(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||Ja});
fa("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}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Fa(b,d)&&c.push(b[d]);return c}});
fa("Promise.withResolvers",function(a){return a?a:function(){var b,c;return{promise:new Promise(function(d,e){b=d;c=e}),resolve:b,reject:c}}});fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});fa("Number.isFinite",function(a){return a?a:function(b){return typeof b!=="number"?!1:!isNaN(b)&&b!==Infinity&&b!==-Infinity}});
fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});fa("Number.EPSILON",function(){return 2.220446049250313E-16});fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});fa("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Ia(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}});
fa("Array.prototype.entries",function(a){return a?a:function(){return Ha(this,function(b,c){return[b,c]})}});fa("Number.isNaN",function(a){return a?a:function(b){return typeof b==="number"&&isNaN(b)}});fa("String.prototype.trimLeft",function(a){function b(){return this.replace(/^[\s\xa0]+/,"")}return a||b});fa("String.prototype.trimStart",function(a){return a||String.prototype.trimLeft});
fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Ia(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}});var La=this||self;function F(a,b){a=a.split(".");var c=La;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 Ma(a){this.i=Math.log(.5);this.g=Math.exp(this.i/a);this.j=this.h=0}Ma.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 Na(a){return a.h/(1-Math.pow(a.g,a.j))};function Oa(){this.h=new Ma(2);this.j=new Ma(5);this.g=0;this.i=128E3;this.l=16E3}Oa.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)};Oa.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)}};Oa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Na(this.h),Na(this.j))};function Pa(){}function Qa(){}function Ra(){}function Ta(a){var b=Da.apply(1,arguments);Ua.has(a)||(Ua.add(a),Ra.apply(Pa,C(b)))}function Va(){}function Wa(){}var Ua=new Set;
window.console&&((new Map).set(1,function(){return console.error.apply(console,C(Da.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,C(Da.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,C(Da.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,C(Da.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,C(Da.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,C(Da.apply(0,arguments)))}),
Ra=function(){return console.warn.apply(console,C(Da.apply(0,arguments)))},Qa=function(){console.error.apply(console,C(Da.apply(0,arguments)))});function Xa(a,b){return typeof a==="number"&&typeof b==="number"&&isNaN(a)&&isNaN(b)?!0:a===b}function Ya(a,b){b=a.indexOf(b);b>-1&&a.splice(b,1)}function Za(a,b){var c;c||(c=Xa);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={Ag:void 0},d=a.next()){e.Ag=d.value;d=b.findIndex(function(f){return function(g){return c(f.Ag,g)}}(e));if(d==-1)return!1;b[d]=b[b.length-1];b.pop()}return b.length==0}
function $a(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 ab(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 bb(a,b,c){if(a===b)return!0;if(!a||!b)return a==b;c||(c=Xa);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}q=db.prototype;q.push=function(a,b){this.g.getOrInsertComputed(a,function(){return[]}).push(b)};q.get=function(a){return this.g.has(a)?this.g.get(a).slice():null};q.remove=function(a,b){if(this.g.has(a)){var c=this.g.get(a).filter(function(d){return d!=b});this.g.set(a,c);c.length||this.g.delete(a)}};q.forEach=function(a){this.g.forEach(function(b,c){a(c,b)})};q.size=function(){return this.g.size};q.keys=function(){return Array.from(this.g.keys())};function eb(){this.g=new db}q=eb.prototype;q.release=function(){this.Ka();this.g=null};q.I=function(a,b,c,d){this.g&&(a=new fb(a,b,c,d),this.g.push(b,a))};q.Fa=function(a,b,c,d){function e(g){f.Xa(a,b,e);c(g)}var f=this;this.I(a,b,e,d)};q.Fb=function(a,b,c,d){if(this.g){b=t(b);for(var e=b.next();!e.done;e=b.next())this.I(a,e.value,c,d)}};
q.Ki=function(a,b,c,d){var e=this;if(this.g)for(var f=!1,g=function(l){if(!f){f=!0;for(var m=t(b),n=m.next();!n.done;n=m.next())e.Xa(a,n.value,g);c(l)}},h=t(b),k=h.next();!k.done;k=h.next())this.I(a,k.value,g,d)};q.Xa=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.Xa(),this.g.remove(b,e))}};
q.Ka=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.Xa();this.g.g.clear()}};F("shaka.util.EventManager",eb);eb.prototype.removeAll=eb.prototype.Ka;eb.prototype.unlisten=eb.prototype.Xa;eb.prototype.listenOnceMulti=eb.prototype.Ki;eb.prototype.listenMulti=eb.prototype.Fb;eb.prototype.listenOnce=eb.prototype.Fa;eb.prototype.listen=eb.prototype.I;eb.prototype.release=eb.prototype.release;
function fb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=hb(a,d);this.target.addEventListener(b,c,this.g)}fb.prototype.Xa=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function hb(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 ib(a)?b:b.capture||!1}
function ib(a){var b=kb;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}kb=b}return b||!1}var kb=void 0;function lb(a){this.h=a;this.g=void 0}lb.prototype.value=function(){this.g===void 0&&(this.g=this.h());return this.g};/*
@license
Shaka Player
Copyright 2025 Google LLC
SPDX-License-Identifier: Apache-2.0
*/
function Q(){return mb.value()}var nb=null,ob=null,mb=new lb(function(){var a=void 0;nb&&(a=nb());!a&&ob&&(a=ob());return a});/*
@license
Copyright 2008 The Closure Library Authors
SPDX-License-Identifier: Apache-2.0
*/
var pb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
@license
Copyright 2006 The Closure Library Authors
SPDX-License-Identifier: Apache-2.0
*/
function qb(a){var b;a instanceof qb?(rb(this,a.Jb),this.Bc=a.Bc,sb(this,a.ob),tb(this,a.Uc),this.Hb=a.Hb,ub(this,a.g.clone()),this.fc=a.fc):a&&(b=String(a).match(pb))?(rb(this,b[1]||"",!0),this.Bc=vb(b[2]||""),sb(this,b[3]||"",!0),tb(this,b[4]),this.Hb=vb(b[5]||"",!0),ub(this,b[6]||"",!0),this.fc=vb(b[7]||"")):this.g=new wb(null)}q=qb.prototype;q.Jb="";q.Bc="";q.ob="";q.Uc=null;q.Hb="";q.fc="";
q.toString=function(){var a=[],b=this.Jb;b&&a.push(yb(b,Ab,!0),":");if(b=this.ob){a.push("//");var c=this.Bc;c&&a.push(yb(c,Ab,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Uc;b!=null&&a.push(":",String(b))}if(b=this.Hb)this.ob&&b.charAt(0)!="/"&&a.push("/"),a.push(yb(b,b.charAt(0)=="/"?Bb:Cb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.fc)&&a.push("#",yb(b,Db));return a.join("")};
q.resolve=function(a){var b=this.clone();b.Jb==="data"&&(b=new qb);var c=!!a.Jb;c?rb(b,a.Jb):c=!!a.Bc;c?b.Bc=a.Bc:c=!!a.ob;c?sb(b,a.ob):c=a.Uc!=null;var d=a.Hb;if(c)tb(b,a.Uc);else if(c=!!a.Hb){if(d.charAt(0)!="/")if(this.ob&&!this.Hb)d="/"+d;else{var e=b.Hb.lastIndexOf("/");e!=-1&&(d=b.Hb.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.Hb=d:c=a.g.toString()!=="";c?ub(b,a.g.clone()):c=!!a.fc;c&&(b.fc=a.fc);return b};q.clone=function(){return new qb(this)};function rb(a,b,c){a.Jb=c?vb(b,!0):b;a.Jb&&(a.Jb=a.Jb.replace(/:$/,""))}function sb(a,b,c){a.ob=c?vb(b,!0):b}function tb(a,b){if(b){b=Number(b);if(isNaN(b)||b<0)throw Error("Bad port number "+b);a.Uc=b}else a.Uc=null}
function ub(a,b,c){b instanceof wb?a.g=b:(c||(b=yb(b,Eb)),a.g=new wb(b))}function vb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function yb(a,b,c){return a!=null?(a=encodeURI(a).replace(b,Fb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Fb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ab=/[#\/\?@]/g,Cb=/[#\?:]/g,Bb=/[#\?]/g,Eb=/[#\?@]/g,Db=/#/g;function wb(a){this.g=a||null}
function Gb(a){if(!a.Ra&&(a.Ra=new Map,a.kd=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))}}q=wb.prototype;q.Ra=null;q.kd=null;q.add=function(a,b){Gb(this);this.g=null;var c=this.Ra.has(a)?this.Ra.get(a):null;c||this.Ra.set(a,c=[]);c.push(b);this.kd++;return this};
q.set=function(a,b){Gb(this);this.g=null;this.Ra.has(a)?this.Ra.set(a,[b]):this.add(a,b);return this};q.get=function(a){Gb(this);return this.Ra.get(a)||[]};q.toString=function(){if(this.g)return this.g;if(!this.Ra||!this.Ra.size)return"";for(var a=[],b=t(this.Ra.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=encodeURIComponent(d);d=this.Ra.get(d);for(var e=0;e<d.length;e++){var f=c;d[e]!==""&&(f+="="+encodeURIComponent(d[e]));a.push(f)}}return this.g=a.join("&")};
q.clone=function(){var a=new wb;a.g=this.g;if(this.Ra){for(var b=new Map,c=t(this.Ra),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.Ra=b;a.kd=this.kd}return a};function Hb(){}function Ib(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=R(a);b=R(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Lb(a){return ArrayBuffer.isView(a)?a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}
function R(a,b,c){c=c===void 0?Infinity:c;return Mb(a,b===void 0?0:b,c,Uint8Array)}function Nb(a,b,c){c=c===void 0?Infinity:c;return Mb(a,b===void 0?0:b,c,Uint16Array)}function Ob(a,b,c){c=c===void 0?Infinity:c;return Mb(a,b===void 0?0:b,c,DataView)}
function Mb(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)}F("shaka.util.BufferUtils",Hb);Hb.toDataView=Ob;Hb.toUint16=Nb;Hb.toUint8=R;Hb.toArrayBuffer=Lb;Hb.equal=Ib;function Pb(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(Qb(c))return!0;for(var d=t(b),e=d.next();!e.done;e=d.next())if(e=e.value,c.keySystem===e.keySystem||Qb(e))return!0}return!1}
function Rb(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 Qb(d)?c.push(d):Qb(f)&&c.push(f)}return c}
function Sb(a){return a?a.keySystem:""}function Tb(a){return a==="org.w3.clearkey"}function Ub(a){return a?!!a.match(/^com\.widevine\.alpha/):!1}function Vb(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Wb(a){return a?!!a.match(/^com\.apple\.fps/):!1}function Qb(a){return(a=a.licenseServerUri)?a.startsWith("data:application/json;base64,"):!1}function Xb(a,b,c,d){d=[].concat(C(new Set(d))).sort().join("#");return a+"#"+b+"#"+c+"#"+d}
function Yb(){var a=!1,b=!0;a=a===void 0?!1:a;b=b===void 0?!1:b;var c={"1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"};if(!a&&!b)return c;
var d={},e;for(e in c){var f=c[e],g=e;b?g="urn:uuid:"+e:a&&(g=e.replace(/-/g,""));d[g]=f}return d}var Zb=new lb(function(){return Lb(new Uint8Array([0]))}),$b=new Map;function U(a,b,c){var d=Da.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(ac)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}U.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};function bc(a){var b=a.code,c=a.msExtendedCode;c&&(c<0&&(c+=4294967296),c=c.toString(16));return{code:b,Oh:c,message:a.message}}F("shaka.util.Error",U);var ac=!0;
U.Severity={RECOVERABLE:1,CRITICAL:2};U.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
U.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,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,BUFFER_WRITE_OUT_OF_BOUNDS:3025,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,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,WEBTRANSPORT_NOT_AVAILABLE:4056,WEBTRANSPORT_INITIALIZATION_FAILED:4057,MSF_VOD_CONTENT_NOT_SUPPORTED:4058,MSF_CATALOG_TIMEOUT:4058,HLS_INVALID_KEY_IV_FOR_GCM:4059,HLS_INVALID_GCM_SEGMENT:4060,DASH_INVALID_JSON:4061,MSF_NO_CATALOG:4062,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,SS_IMA_SDK_MISSING:10002,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,VAST_INVALID_XML:10007,CS_AD_CONTAINER_MISSING:10008,SS_AD_CONTAINER_MISSING:10009,
MEDIATAILOR_REQUEST_FAILED:10010};function cc(){}
function dc(a){if(!a)return"";a=R(a);a[0]==239&&a[1]==187&&a[2]==191&&(a=a.subarray(3));if(window.TextDecoder&&!Q().Gf())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Qa('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 ec(a,b,c){if(!a)return"";if(!c&&a.byteLength%2!=0)throw new U(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Ob(a);for(var e=0;e<c;e++)d[e]=a.getUint16(e*2,b);return fc.value()(d)}
function hc(a){function b(d){return c.byteLength<=d||c[d]>=9&&c[d]<=126}if(!a)return"";var c=R(a);if(c[0]==239&&c[1]==187&&c[2]==191)return dc(c);if(c[0]==254&&c[1]==255)return ec(c.subarray(2),!1);if(c[0]==255&&c[1]==254)return ec(c.subarray(2),!0);if(c[0]==0&&c[2]==0)return ec(a,!1);if(c[1]==0&&c[3]==0)return ec(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return dc(a);throw new U(2,2,2003);}
function ic(a){if(window.TextEncoder&&!Q().Gf()){var b=new TextEncoder;return Lb(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 Lb(b)}function jc(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 kc(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\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||""}F("shaka.util.StringUtils",cc);cc.resetFromCharCode=function(){fc.g=void 0};
cc.toUTF16=jc;cc.toUTF8=ic;cc.fromBytesAutoDetect=hc;cc.fromUTF16=ec;cc.fromUTF8=dc;var fc=new lb(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={cc:65536};b.cc>0;b={cc:b.cc},b.cc/=2)if(a(b.cc))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.cc)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.cc));return e}}(b);return null});function lc(){}function mc(a){a=R(a);return Uint8Array.prototype.toBase64?a.toBase64({alphabet:"base64",omitPadding:!1}):(a=fc.value()(a),btoa(a))}function nc(a,b){b=b==void 0?!0:b;return Uint8Array.prototype.toBase64?R(a).toBase64({alphabet:"base64url",omitPadding:!b}):(a=mc(a).replace(/\+/g,"-").replace(/\//g,"_"),b?a:a.replace(/[=]*$/,""))}
function oc(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 pc(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 sc(a){var b=R(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 tc(){var a=Da.apply(0,arguments);return uc(a,0,a.length)}
function uc(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(R(f),e);e+=f.byteLength}return d}F("shaka.util.Uint8ArrayUtils",lc);lc.concat=tc;lc.toHex=sc;lc.fromHex=pc;lc.fromBase64=oc;lc.toBase64=nc;lc.toStandardBase64=mc;function vc(a,b,c){c=c===void 0?"":c;if(b.length==0)return a;if(a.length==1&&b.length==1){var d=new qb(a[0]);b=new qb(b[0]);b=d.resolve(b);c&&ub(b,c);return[b.toString()]}b=b.map(function(h){return new qb(h)});d=[];a=t(a);for(var e=a.next();!e.done;e=a.next()){e=new qb(e.value);for(var f=t(b),g=f.next();!g.done;g=f.next())g=e.resolve(g.value),c&&ub(g,c),d.push(g.toString())}return d}
function wc(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&&Wb(a)&&b.initData.push({initDataType:"sinf",initData:new Uint8Array(0),keyId:null});return b}
function xc(a){var b=b===void 0?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;k.length!=22&&(k=nc(pc(h),!1));var l=g;l.length!=22&&(l=nc(pc(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:R(ic(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function yc(a,b){if(b.length==1)return b[0];a=zc(a,b);if(a!=null)return a;throw new U(2,4,4025,b);}function zc(a,b){var c=Ac.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==Bc?"":null}
function Cc(a,b){var c=[];a=Ac.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 Bc="text",Dc={qa:"video",V:"audio",Ma:Bc,Ah:"image",uj:"application",xh:"chapter"},Ec=1/15,Ac=(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 Fc(a,b,c,d){this.g=null;this.l=a;this.i=b;this.m=c;this.j=d;typeof libDPIModule==="undefined"&&Ra("Could not find LCEVC Library dependencies on this page");typeof LCEVCdec!=="undefined"?(this.h=LCEVCdec,typeof this.h.SupportObject==="undefined"?(Ra("Could not find LCEVC Library on this page"),a=!1):(this.h.SupportObject.SupportStatus||Ra(this.h.SupportObject.SupportError),a=typeof this.h!=="undefined"&&typeof libDPIModule!=="undefined"&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)):
(Ra("Could not find LCEVC Library on this page"),a=!1);a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=new this.h.LCEVCdec(this.l,this.i,this.m))}function Gc(a,b,c,d){d.type!=="video"||a.j&&!Hc(d)||a.g&&a.g.appendBuffer(b,"video",d.id,-c,!a.j)}function Ic(a){a.g&&a.i.classList.add("shaka-hidden")}Fc.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Hc(a){return a&&typeof LCEVCdec!=="undefined"?a.codecs=="lvc1":!1}
F("shaka.lcevc.Dec",Fc);Fc.prototype.release=Fc.prototype.release;function Jc(){}function Kc(a,b){Lc.set(a,b)}function Mc(){var a={};Q();if(Nc())for(var b=t(Lc.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"]);for(c=b.next();!c.done;c=b.next())c=c.value,a[c]=Nc()?Lc.has(c):Oc().canPlayType(c)!="";return a}function Pc(a,b){if(b){var c=Lc.get(b);if(c)return c}throw new U(2,4,4E3,a,b);}F("shaka.media.ManifestParser",Jc);Jc.unregisterParserByMime=function(a){Lc.delete(a)};
Jc.registerParserByMime=Kc;Jc.AccessibilityPurpose={Ej:"visually impaired",wj:"hard of hearing",Cj:"spoken subtitles"};var Lc=new Map;function Qc(){}q=Qc.prototype;q.extract=function(){};q.extractRaw608=function(){};q.decode=function(){return[]};q.clear=function(){};q.getStreams=function(){return[]};function Rc(){}Rc.prototype.init=function(){};Rc.prototype.parse=function(){return[]};function Sc(a){this.h=new Map;this.i=0;this.j=new Rc;if(a=Tc(a.toLowerCase()))this.j=a();this.g=new Qc;if(a=Uc)this.g=a(),this.h.set(this.i,this.g)}Sc.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=Uc)this.g=d();this.h.set(b,this.g)}}else b||this.g.clear();this.j.init(a);c!=-1&&(this.i=c)};
function Vc(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=R(c.packet);if(d.length>0)switch(c.format){case Wc:a.g.extract(d,c.pts);break;case Xc:a.g.extractRaw608(d,c.pts)}}return a.g.decode()}Sc.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 Yc(a,b){Zc.set(a,b)}function Tc(a){return Zc.get(a)}
F("shaka.media.ClosedCaptionParser",Sc);Sc.findDecoder=function(){return Uc};Sc.unregisterDecoder=function(){Uc=null};Sc.registerDecoder=function(a){Uc=a};Sc.findParser=Tc;Sc.unregisterParser=function(a){Zc.delete(a)};Sc.registerParser=Yc;var Zc=new Map,Uc=null,Wc="sei",Xc="raw608";function $c(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=ad;this.scroll=bd}
$c.prototype.clone=function(){var a=new $c;a.id=this.id;a.viewportAnchorX=this.viewportAnchorX;a.viewportAnchorY=this.viewportAnchorY;a.regionAnchorX=this.regionAnchorX;a.regionAnchorY=this.regionAnchorY;a.width=this.width;a.height=this.height;a.heightUnits=this.heightUnits;a.widthUnits=this.widthUnits;a.viewportAnchorUnits=this.viewportAnchorUnits;a.scroll=this.scroll;return a};F("shaka.text.CueRegion",$c);$c.prototype.clone=$c.prototype.clone;var ad=1;$c.units={PX:0,PERCENTAGE:ad,LINES:2};
var bd="";$c.scrollMode={NONE:bd,UP:"up"};function cd(a){this.h=a||"";this.g=0}function dd(a){ed(a,/[ \t]+/gm)}function ed(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 fd(a){return a.g==a.h.length?null:(a=ed(a,/[^ \t\n]*/gm))?a[0]:null}
function gd(a){a=ed(a,hd);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 hd=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function id(){}function jd(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 kd(a){var b={},c;for(c in a)b[c]=a[c];return b}
function ld(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=ld(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=ld(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a}F("shaka.util.ObjectUtils",id);id.alphabeticalKeyOrderStringify=ld;
id.shallowCloneObject=kd;id.cloneObject=jd;/*
@license
tXml
Copyright 2015 Tobias Nickel
SPDX-License-Identifier: MIT
*/
function md(a,b){var c=c===void 0?!1:c;a=hc(a);return nd(a,b,c)}function nd(a,b,c){a=od(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 pd(a){return qd.has(a)?qd.get(a):""}
function od(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("