/* @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;function aa(a){var b=0;return function(){return b>>0)+"_",e=0;return b}); fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;cc&&(c=Math.max(c+e,0));ce||1114111=e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}}); function Ra(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e=f}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)La(b,d)&&c.push([d,b[d]]);return c}}); var Sa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;cb||1342177279>>=1)c+=c;return d}});fa("Number.EPSILON",function(){return Math.pow(2,-52)}); fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});fa("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)La(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}}); fa("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Qa(this,b,"endsWith");void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0=e}});fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});function Ta(a){a=Math.trunc(a)||0;0>a&&(a+=this.length);if(!(0>a||a>=this.length))return this[a]} fa("Array.prototype.at",function(a){return a?a:Ta});function Va(a){return a?a:Ta}fa("Int8Array.prototype.at",Va);fa("Uint8Array.prototype.at",Va);fa("Uint8ClampedArray.prototype.at",Va);fa("Int16Array.prototype.at",Va);fa("Uint16Array.prototype.at",Va);fa("Int32Array.prototype.at",Va);fa("Uint32Array.prototype.at",Va);fa("Float32Array.prototype.at",Va);fa("Float64Array.prototype.at",Va);fa("String.prototype.at",function(a){return a?a:Ta});var Wa=this||self; function S(a,b){a=a.split(".");var c=Wa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/* @license Shaka Player Copyright 2016 Google LLC SPDX-License-Identifier: Apache-2.0 */ function U(a,b){if(b)if(b instanceof Map)for(var c=u(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1} function Xa(a){var b=new U(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}U.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};U.prototype.stopImmediatePropagation=function(){this.g=!0};U.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",U); var Ya={vm:"abrstatuschanged",wm:"adaptation",xm:"audiotrackchanged",ym:"audiotrackschanged",zm:"boundarycrossed",Am:"buffering",Bm:"canupdatestarttime",Cm:"complete",Dm:"currentitemchanged",Em:"downloadcompleted",Fm:"downloadfailed",Gm:"downloadheadersreceived",Hm:"drmsessionupdate",Jm:"emsg",Pm:"itemsinserted",Qm:"itemsremoved",hn:"prft",Error:"error",Km:"expirationupdated",Lm:"firstquartile",Mm:"gapjumped",Rm:"keystatuschanged",Vm:"loaded",Wm:"loading",Ym:"manifestparsed",Zm:"manifestupdated", $m:"mediaqualitychanged",an:"mediasourcerecovered",cn:"metadataadded",Metadata:"metadata",dn:"midpoint",fn:"nospatialvideoinfo",gn:"onstatechange",jn:"ratechange",nn:"segmentappended",on:"sessiondata",pn:"spatialvideoinfo",qn:"stalldetected",rn:"started",sn:"statechanged",tn:"streaming",un:"textchanged",vn:"texttrackvisibility",wn:"thirdquartile",xn:"timelineregionadded",yn:"timelineregionenter",zn:"timelineregionexit",An:"trackschanged",Cn:"unloading",En:"variantchanged"};function Za(){}function $a(){}function ab(){}function bb(a){var b=Ja.apply(1,arguments);cb.has(a)||(cb.add(a),ab.apply(Za,x(b)))}function db(){}function gb(){}function hb(){}var cb=new Set; window.console&&((new Map).set(1,function(){return console.error.apply(console,x(Ja.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,x(Ja.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,x(Ja.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,x(Ja.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,x(Ja.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,x(Ja.apply(0,arguments)))}), ab=function(){return console.warn.apply(console,x(Ja.apply(0,arguments)))},$a=function(){console.error.apply(console,x(Ja.apply(0,arguments)))});function ib(){this.g=new Map}p=ib.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 jb(){this.gb=new ib;this.Pe=this}jb.prototype.addEventListener=function(a,b){this.gb&&this.gb.push(a,b)};jb.prototype.removeEventListener=function(a,b){this.gb&&this.gb.remove(a,b)};jb.prototype.dispatchEvent=function(a){if(!this.gb)return!0;var b=this.gb.get(a.type)||[],c=this.gb.get("All");c&&(b=b.concat(c));b=u(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Pe;a.currentTarget=this.Pe;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented}; jb.prototype.release=function(){this.gb=null};function kb(a,b){var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function lb(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function nb(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function ob(a,b){var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/* @license Copyright 2008 The Closure Library Authors SPDX-License-Identifier: Apache-2.0 */ var 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.hc),this.nd=a.nd,tb(this,a.Fb),ub(this,a.Gd),this.ub=a.ub,vb(this,a.g.clone()),this.Sc=a.Sc):a&&(b=String(a).match(pb))?(rb(this,b[1]||"",!0),this.nd=wb(b[2]||""),tb(this,b[3]||"",!0),ub(this,b[4]),this.ub=wb(b[5]||"",!0),vb(this,b[6]||"",!0),this.Sc=wb(b[7]||"")):this.g=new yb(null)}p=qb.prototype;p.hc="";p.nd="";p.Fb="";p.Gd=null;p.ub="";p.Sc=""; p.toString=function(){var a=[],b=this.hc;b&&a.push(zb(b,Ab,!0),":");if(b=this.Fb){a.push("//");var c=this.nd;c&&a.push(zb(c,Ab,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Gd;null!=b&&a.push(":",String(b))}if(b=this.ub)this.Fb&&"/"!=b.charAt(0)&&a.push("/"),a.push(zb(b,"/"==b.charAt(0)?Bb:Cb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Sc)&&a.push("#",zb(b,Db));return a.join("")}; p.resolve=function(a){var b=this.clone();"data"===b.hc&&(b=new qb);var c=!!a.hc;c?rb(b,a.hc):c=!!a.nd;c?b.nd=a.nd:c=!!a.Fb;c?tb(b,a.Fb):c=null!=a.Gd;var d=a.ub;if(c)ub(b,a.Gd);else if(c=!!a.ub){if("/"!=d.charAt(0))if(this.Fb&&!this.ub)d="/"+d;else{var e=b.ub.lastIndexOf("/");-1!=e&&(d=b.ub.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;gb)throw Error("Bad port number "+b);a.Gd=b}else a.Gd=null} function vb(a,b,c){b instanceof yb?a.g=b:(c||(b=zb(b,Eb)),a.g=new yb(b))}function wb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function zb(a,b,c){return null!=a?(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 yb(a){this.g=a||null} function Gb(a){if(!a.mb&&(a.mb=new Map,a.Xd=0,a.g))for(var b=a.g.split("&"),c=0;c=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&& 128==(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b} function Xb(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new V(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Ob(a);for(var e=0;e=c[d]}if(!a)return"";var c=Kb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Wb(c);if(254==c[0]&&255==c[1])return Xb(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Xb(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Xb(a,!1);if(0==c[1]&&0==c[3])return Xb(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Wb(a);throw new V(2,2,2003);} function $b(a){if(window.TextEncoder&&!Rb().Zh()){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",""":'"',"'":"'"," ":"\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="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10),0<=e&&1114111>=e?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",Vb);Vb.resetFromCharCode=function(){bc.g=void 0}; Vb.toUTF16=ac;Vb.toUTF8=$b;Vb.fromBytesAutoDetect=Zb;Vb.fromUTF16=Xb;Vb.fromUTF8=Wb;var bc=new Qb(function(){function a(c){try{var d=new Uint8Array(c);return 0",e);g=a.substring(g,e);var k=g.indexOf(f);if(-1==k){var l=f.indexOf(".");0",e+1);-1===e&&(e=a.length)}else if(91===a.charCodeAt(e+2)&&91===a.charCodeAt(e+8)&&"cdata"===a.substr(e+3,5).toLowerCase()){k=a.indexOf("]]\x3e",e);-1==k?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];62!==a.charCodeAt(e)&&a[e];){var q=a.charCodeAt(e);if(64q||96q){q=d();for(var r=a.charCodeAt(e);r&&39!==r&&34!==r&&!(64r||96 r)&&62!==r;)e++,r=a.charCodeAt(e);var t=e+1;e=a.indexOf(a[e],t);t=a.slice(t,e);if(39===r||34===r){if(-1===e){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m/= ".indexOf(a[e])&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")} function Md(a){return"string"===typeof a}function Nd(a){var b=[];if(!a.children)return[];a=u(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"!==typeof c&&b.push(c);return b}function Od(a,b){var c=[];if(!a.children)return[];a=u(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function Pd(a){if("string"===typeof a)return cc(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:cc(a)} function Qd(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=Pd(a))&&(a=a.trim());return a}function Rd(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=u(a.children);for(var d=a.next();!d.done;d=a.next())Rd(d.value,b,c)}return c}function Sd(a,b){a=Od(a,b);return 1!=a.length?null:a[0]}function Td(a,b,c){a=Ud(a,b,c);return 1!=a.length?null:a[0]} function Vd(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function Wd(a,b,c){b=Jd(b);return a.attributes[b+":"+c]||null}function Ud(a,b,c){var d=Jd(b);b=[];if(a.children)for(c=d?d+":"+c:c,a=u(a.children),d=a.next();!d.done;d=a.next())(d=d.value)&&d.tagName===c&&b.push(d);return b}function Xd(a,b,c){b=u(b);for(var d=b.next();!d.done;d=b.next())if(d=Wd(a,d.value,c))return d;return null} function Yd(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 Zd(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 $d(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 ae(a){a=Number(a);return 0===a%1?a:null}function be(a){a=Number(a);return 0===a%1&&0Math.abs(a.startTime-b.startTime)&&.001>Math.abs(a.endTime-b.endTime)))return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!ud(a.nestedCues,b.nestedCues,Ae))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!ud(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0} function De(a,b){b=void 0===b?new Map:b;var c=a.payload;if(c.includes("<")){0===b.size&&Ee(b);var d=c;c=[];for(var e=-1,f=0;f"===d[f]&&0",'
'),d+="
";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h",h);if(-1===k){c=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&& (l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0","<"+g+">"),c=c.replace("",""),d||(c+="")}c=Ge(c);a.payload="";try{var m=Hd(""+c+"","span")}catch(n){}if(m)if(m=m.children,1!= m.length||m[0].tagName)for(m=u(m),c=m.next();!c.done;c=m.next())He(c.value,a,b);else a.payload=cc(c);else a.payload=cc(c)}else a.payload=cc(c)}function Ee(a){for(var b=u(Object.entries(Ie)),c=b.next();!c.done;c=b.next()){var d=u(c.value);c=d.next().value;d=d.next().value;var e=new ne(0,0,"");e.color=d;a.set("."+c,e)}b=u(Object.entries(Je));for(c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,e=new ne(0,0,""),e.backgroundColor=d,a.set("."+c,e)} function Ge(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""} function He(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new od;d.position=null;d.size=0;d.textAlign=pe;if(a.tagName)for(var e=u(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=Ke(g.backgroundColor,h.backgroundColor),h.color=Ke(g.color,h.color),h.fontFamily=Ke(g.fontFamily,h.fontFamily), h.fontSize=Ke(g.fontSize,h.fontSize),h.textShadow=Ke(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=ye(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=Le;break;case "i":d.fontStyle=Me;break;case "u":d.textDecoration.push(Ne);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break; if(f=Cd(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(Md(a)||1==e.length&&Md(e[0]))for(c=Pd(a).split("\n"),a=!0,c=u(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=ye(d.startTime,d.endTime),b.nestedCues.push(a)),0=a.l&&r.startTime=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&bc.g&&b>=c.h&&(c.h=a));H(d)})};function tf(a,b,c){a.l=b;a.m=c}function uf(a,b,c){a.D=b;if(b=a.s.get(b))for(var d=u(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)} function vf(a,b,c){b.startTime+=c;b.endTime+=c;b=u(b.nestedCues);for(var d=b.next();!d.done;d=b.next())vf(a,d.value,c)} function wf(a,b,c,d,e){var f=c+" "+d,g=new Map;b=u(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);vf(a,k,e);k.startTime>=a.l&&k.startTimey?(y=B,A=[D.ng]):B==y&&A.push(D.ng);m.push.apply(m,x(A))});h=m}c=new Set;b=new Set;h=u(h);for(e=h.next();!e.done;e=h.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);h=Array.from(c).sort(function(y,z){return y.bandwidth-z.bandwidth});var n=[];c=new Map;h=u(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=g(e);l=c.get(k)||[];if(l.length){var q=l[l.length-1],r=ff(q.codecs),t=ff(e.codecs);r!=t||e.bandwidth&&q.bandwidth&&!(e.bandwidth>q.bandwidth)||(l.push(e),n.push(e.id))}else l.push(e), n.push(e.id);c.set(k,l)}var w={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};h=Array.from(b).sort(function(y,z){if(!y.bandwidth||!z.bandwidth||y.bandwidth==z.bandwidth){if(y.codecs&&z.codecs&&y.codecs!=z.codecs&&y.width==z.width){var A=ff(y.codecs),B=ff(z.codecs);if(A!=B)return(w[A]||1)-(w[B]||1)}return y.width-z.width}return y.bandwidth-z.bandwidth});b=dd();var v=[];c=new Map;h=u(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=f(e); l=c.get(k)||[];if(l.length){q=l[l.length-1];if(!b&&(r=ff(q.codecs),t=ff(e.codecs),r!==t))continue;r=ff(q.codecs);t=ff(e.codecs);r!=t||e.bandwidth&&q.bandwidth&&!(e.bandwidth>q.bandwidth)||(l.push(e),v.push(e.id))}else l.push(e),v.push(e.id);c.set(k,l)}a.variants=a.variants.filter(function(y){var z=y.audio;y=y.video;return z&&!n.includes(z.id)||y&&!v.includes(y.id)?!1:!0})} function Ff(a,b,c){b=u(b);for(var d=b.next(),e={};!d.done;e={videoCodec:void 0},d=b.next())if(e.videoCodec=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.videoCodec)}}(e)),d.length){a=d;break}c=u(c);b=c.next();for(d={};!b.done;d={audioCodec:void 0},b=c.next())if(d.audioCodec=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.audioCodec)}}(d)),b.length){a=b;break}return a} function Gf(a,b,c){a.variants=a.variants.filter(function(d){return Hf(d,b,c)})} function Hf(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=u([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)|| !d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}function If(a,b,c,d){c=void 0===c?[]:c;d=void 0===d?{}:d;return Q(function(e){if(1==e.g)return F(e,Jf(a,b,0=a&&e.width>=b){a=e.height;b=e.width;break}c=ng(this,this.g.restrictions,d,a,b)}a=this.getBandwidthEstimate();d.length&& !c.length&&(c=ng(this,null,d,Infinity,Infinity),c=[c[0]]);b=c[0]||null;for(d=0;d=g&&a<=f&&(b.bandwidth!=e.bandwidth||b.bandwidth==e.bandwidth&&b.video&&e.video&&(b.video.width=b.i))return;a.I=!0;a.u-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.u<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.G(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))} function ng(a,b,c,d,e){if(a.D){var f=a.D.Pi();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Hf(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function og(a){var b=[];a=u(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}S("shaka.abr.SimpleAbrManager",mg);mg.prototype.configure=mg.prototype.configure; mg.prototype.setCmsdManager=mg.prototype.setCmsdManager;mg.prototype.setMediaElement=mg.prototype.setMediaElement;mg.prototype.playbackRateChanged=mg.prototype.playbackRateChanged;mg.prototype.setVariants=mg.prototype.setVariants;mg.prototype.getBandwidthEstimate=mg.prototype.getBandwidthEstimate;mg.prototype.trySuggestStreams=mg.prototype.trySuggestStreams;mg.prototype.segmentDownloaded=mg.prototype.segmentDownloaded;mg.prototype.disable=mg.prototype.disable;mg.prototype.enable=mg.prototype.enable; mg.prototype.chooseVariant=mg.prototype.chooseVariant;mg.prototype.init=mg.prototype.init;mg.prototype.release=mg.prototype.release;mg.prototype.stop=mg.prototype.stop;var qg=1;S("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function rg(a,b){if(a===b||!a.length||!b.length)return!0;a=u(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(sg(c))return!0;for(var d=u(b),e=d.next();!e.done;e=d.next())if(e=e.value,c.keySystem===e.keySystem||sg(e))return!0}return!1} function vg(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=u(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=u((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(x(d.keyIds),x(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 sg(d)?c.push(d):sg(f)&&c.push(f)}return c} function wg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function xg(a){return a?!!a.match(/^com\.apple\.fps/):!1}function sg(a){return(a=a.licenseServerUri)?a.startsWith("data:application/json;base64,"):!1}var yg=new Qb(function(){return Lb(new Uint8Array([0]))}),zg=new Map;function Eg(a,b){var c=Fg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1} function Gg(a){var b,c;return Q(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new V(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.s);return F(d,new Promise(function(e){(new yf(e)).X(c/1E3)}),2)}a.h*=a.m;H(d)})}function Fg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Hg(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Hg.prototype.resolve=function(){};Hg.prototype.reject=function(){};function Ig(a,b){this.promise=a;this.i=b;this.g=null}function Jg(a){return new Ig(Promise.reject(a),function(){return Promise.resolve()})}function Kg(){var a=Promise.reject(new V(2,7,7001));a.catch(function(){});return new Ig(a,function(){return Promise.resolve()})}function Lg(a){return new Ig(Promise.resolve(a),function(){return Promise.resolve()})}function Mg(a){return new Ig(a,function(){return a.catch(function(){})})}Ig.prototype.abort=function(){this.g||(this.g=this.i());return this.g}; function Ng(a){return new Ig(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ig.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this}; Ig.prototype.bb=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Og(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Hg;f.catch(function(){});var g=new V(2,7,7001);this.promise.then(c(!0),c(!1));return new Ig(f,function(){return d()})}; function Og(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}ea.Object.defineProperties(Ig.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}});S("shaka.util.AbortableOperation",Ig);Ig.prototype.chain=Ig.prototype.bb;Ig.prototype["finally"]=Ig.prototype.finally; Ig.all=Ng;Ig.prototype.abort=Ig.prototype.abort;Ig.notAbortable=Mg;Ig.completed=Lg;Ig.aborted=Kg;Ig.failed=Jg;function Pg(){this.g=[]}function Qg(a,b){a.g.push(b.finally(function(){sd(a.g,b)}))}Pg.prototype.destroy=function(){for(var a=[],b=u(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 Rg(a,b,c,d,e,f,g){jb.call(this);this.i=null;this.j=!1;this.u=new Pg;this.g=new Set;this.h=new Set;this.s=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}pa(Rg,jb);p=Rg.prototype;p.configure=function(a){this.i=a};function Sg(a,b,c,d){d=void 0===d?!1:d;c=c||Tg;var e=Ug.get(a);(!e||c>=e.priority)&&Ug.set(a,{priority:c,Of:b,Ol:d})} function Vg(a,b){for(var c=u(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=u(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}p.Rl=function(a){this.g.add(a)};p.om=function(a){this.g.delete(a)};p.gk=function(){this.g.clear()};p.Sl=function(a){this.h.add(a)};p.pm=function(a){this.h.delete(a)};p.hk=function(){this.h.clear()};p.Ei=function(){this.l.clear()}; function Wg(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}p.destroy=function(){this.j=!0;this.g.clear();this.h.clear();this.l.clear();jb.prototype.release.call(this);return this.u.destroy()}; p.request=function(a,b,c){var d=this,e=new Xg;if(this.j){var f=Promise.reject(new V(2,7,7001));f.catch(function(){});return new Yg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Dd(b.retryParameters):Fg();b.uris=Dd(b.uris);f=Zg(this,a,b,c);var g=f.bb(function(){return $g(d,a,b,c,new Eg(b.retryParameters,!1),0,null,e)}),h=g.bb(function(q){return ah(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.bb(function(q){var r=Date.now()-m,t=q.response;t.timeMs+=l;t.timeMs+=r;q.ol||!d.s||t.fromCache||"HEAD"==b.method||a!=bh||d.s(t.timeMs,t.data.byteLength,ch(c),b,c);d.F&&d.F(a,t,c);return t},function(q){q&&(q.severity=2);throw q;});f=new Yg(n.promise,function(){return n.abort()},e);Qg(this.u,f);return f}; function Zg(a,b,c,d){function e(h){f=f.bb(function(){c.body&&(c.body=Lb(c.body));return h(b,c,d)})}var f=Lg(void 0);a.D&&e(a.D);a=u(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.bb(void 0,function(h){if(h instanceof V&&7001==h.code)throw h;throw new V(2,1,1006,h);})} function $g(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://"));0this.h.byteLength)throw jh();var b=Kb(this.h,this.g,a);this.g+=a;return b}; p.skip=function(a){if(this.g+a>this.h.byteLength)throw jh();this.g+=a};p.uj=function(a){if(this.ga||a>this.h.byteLength)throw jh();this.g=a};p.ed=function(){for(var a=this.g;this.Oa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Kb(this.h,a,this.g-a);this.g+=1;return Wb(a)};function jh(){return new V(2,3,3E3)}S("shaka.util.DataViewReader",hh);hh.prototype.readTerminatedString=hh.prototype.ed;hh.prototype.seek=hh.prototype.seek;hh.prototype.rewind=hh.prototype.uj; hh.prototype.skip=hh.prototype.skip;hh.prototype.readBytes=hh.prototype.Xb;hh.prototype.readUint64=hh.prototype.Jd;hh.prototype.readInt32=hh.prototype.Ih;hh.prototype.readUint32=hh.prototype.W;hh.prototype.readUint16=hh.prototype.Fa;hh.prototype.readUint8=hh.prototype.aa;hh.prototype.getLength=hh.prototype.getLength;hh.prototype.getPosition=hh.prototype.Ua;hh.prototype.hasMoreData=hh.prototype.Oa;var ih=1;hh.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:ih};function kh(){this.i=new Map;this.h=new Map;this.g=!1}p=kh.prototype;p.box=function(a,b){a=lh(a);this.i.set(a,mh);this.h.set(a,b);return this};p.V=function(a,b){a=lh(a);this.i.set(a,nh);this.h.set(a,b);return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new hh(a,0);for(this.g=!1;a.Oa()&&!this.g;)this.Ed(0,a,b,c)}; p.Ed=function(a,b,c,d){var e=b.Ua();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.W(),g=b.W(),h=oh(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Ua()+8>b.getLength()){this.g=!0;return}f=b.Jd();k=!0}var l=this.h.get(g);if(l){var m=null,n=null;if(this.i.get(g)==nh){if(d&&b.Ua()+4>b.getLength()){this.g=!0;return}n=b.W();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.Ua(),b=0>24&255,a>>16&255,a>>8&255,a&255)} function qh(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",kh);kh.headerSize=qh;kh.typeToString=oh;kh.allData=uh;kh.audioSampleEntry=th;kh.visualSampleEntry=sh;kh.sampleDescription=rh;kh.children=ph;kh.prototype.parseNext=kh.prototype.Ed;kh.prototype.parse=kh.prototype.parse;kh.prototype.stop=kh.prototype.stop;kh.prototype.fullBox=kh.prototype.V;kh.prototype.box=kh.prototype.box;var mh=0,nh=1;function vh(a){var b=this;this.g=[];this.h=[];this.data=[];(new kh).box("moov",ph).box("moof",ph).V("pssh",function(c){if(!(1d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.u(new V(2,6,6006,f.message,f,h))}})}function ei(a){return Q(function(b){return 1==b.g?a.J?F(b,a.m,3):b.A(0):F(b,Promise.all(a.P.map(function(c){return c.promise})),0)})} function Oh(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w;Q(function(v){switch(v.g){case 1:c=b.target;a.g.logLicenseExchange&&gc(b.message);d=a.i.get(c);e=a.h.licenseServerUri;f=a.g.advanced[a.h.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=Wg([e],a.g.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.h;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]= f.headers[h];if("org.w3.clearkey"===a.h.keySystem){var y=g,z=a.h;try{var A=Zb(y.body);if(A){var B=JSON.parse(A);B.type||(B.type=z.sessionType,y.body=$b(JSON.stringify(B)))}}catch(D){}}if(wg(a.h.keySystem))if(y=Xb(g.body,!0,!0),y.includes("PlayReadyKeyMessage")){y=Hd(y,"PlayReadyKeyMessage");z=Rd(y,"HttpHeader");z=u(z);for(A=z.next();!A.done;A=z.next())B=A.value,A=Rd(B,"name")[0],B=Rd(B,"value")[0],g.headers[Pd(A)]=Pd(B);y=Rd(y,"Challenge")[0];g.body=hc(Pd(y))}else g.headers["Content-Type"]="text/xml; charset=utf-8"; k=Date.now();ta(v,2);m=a.D.uc.request(2,g,{isPreload:a.O()});a.P.push(m);return F(v,m.promise,4);case 4:l=v.h;sd(a.P,m);wa(v,3);break;case 2:n=xa(v);if(a.l.g)return v.return();q=new V(2,6,6007,n);1==a.i.size?(a.u(q),d&&d.Mb&&d.Mb.reject(q)):(d&&d.Mb&&d.Mb.reject(q),a.i.delete(c),Uh(a)&&(a.m.resolve(),a.K.X(.1)));return v.return();case 3:if(a.l.g)return v.return();a.H+=(Date.now()-k)/1E3;a.g.logLicenseExchange&&gc(l.data);ta(v,5);return F(v,c.update(l.data),7);case 7:wa(v,6);break;case 5:return r= xa(v),t=new V(2,6,6008,r.message),a.u(t),d&&d.Mb&&d.Mb.reject(t),v.return();case 6:if(a.l.g)return v.return();w=new U("drmsessionupdate");a.D.onEvent(w);d&&(d.Mb&&d.Mb.resolve(),bi(a,d));H(v)}})} function di(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}h=Rb();if(wg(a.h.keySystem)&&16==g.byteLength&&h.Oh()){h=Ob(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=jc(g).slice(0,32);a.U.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Mb&&(a.i.delete(b),fi(b));Uh(a)&&(a.m.resolve(), a.K.X(ji))}function yh(a){var b=a.U,c=a.$;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.u(new V(2,6,6014));a.D.Kf(gh(c))} function ki(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N,P,R,T;return Q(function(ca){if(1==ca.g){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=u(a);for(d=c.next();!d.done;d=c.next())e=d.value,b[e]=null;return ca.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","cbcs-1-9"];r=new Map;t=Rb();w=function(Y,Ma){var Na,Ea,va,Ka,Pa,za,ia,Aa,eb,fb,mb,xb,sb;return Q(function(Ua){switch(Ua.g){case 1:return ta(Ua,2),F(Ua,Ma.createMediaKeys(),5);case 5:Na=Ua.h;case 4:wa(Ua,3);break;case 2:return xa(Ua),Ua.return();case 3:va= (Ea=Ma.getConfiguration().sessionTypes)?Ea.includes("persistent-license"):!1;t.fj()&&(va=!1);Ka=Ma.getConfiguration().videoCapabilities;Pa=Ma.getConfiguration().audioCapabilities;za={persistentState:va,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};r.has(Y)&&r.get(Y)?za=r.get(Y):r.set(Y,za);(ia=Ka[0].encryptionScheme)&&!za.encryptionSchemes.includes(ia)&&za.encryptionSchemes.push(ia);(Aa=Ka[0].robustness)&&!za.videoRobustnessLevels.includes(Aa)&&za.videoRobustnessLevels.push(Aa); (eb=Pa[0].robustness)&&!za.audioRobustnessLevels.includes(eb)&&za.audioRobustnessLevels.push(eb);if("getStatusForPolicy"in Na){fb=[];mb=u(f);xb=mb.next();for(sb={};!xb.done;sb={ge:void 0},xb=mb.next())sb.ge=xb.value,za.minHdcpVersions.includes(sb.ge)||fb.push(Na.getStatusForPolicy({minHdcpVersion:sb.ge}).then(function(re){return function(tc){"usable"!=tc||za.minHdcpVersions.includes(re.ge)||za.minHdcpVersions.push(re.ge)}}(sb)));return F(Ua,Promise.all(fb),0)}Ua.A(0)}})};v=function(Y,Ma,Na,Ea){var va, Ka,Pa,za,ia,Aa,eb,fb,mb,xb,sb;return Q(function(Ua){switch(Ua.g){case 1:ta(Ua,2);va=Dd(n);Ka=u(va.videoCapabilities);for(Pa=Ka.next();!Pa.done;Pa=Ka.next())za=Pa.value,za.encryptionScheme=Ma,za.robustness=Na;ia=u(va.audioCapabilities);for(Aa=ia.next();!Aa.done;Aa=ia.next())eb=Aa.value,eb.encryptionScheme=Ma,eb.robustness=Ea;fb=Dd(va);fb.persistentState="required";fb.sessionTypes=["persistent-license"];mb=[fb,va];sb=Rb();return"MOBILE"==sb.Ia()?F(Ua,Cf(5,navigator.requestMediaKeySystemAccess(Y,mb)), 7):F(Ua,navigator.requestMediaKeySystemAccess(Y,mb),6);case 6:xb=Ua.h;Ua.A(5);break;case 7:xb=Ua.h;case 5:return F(Ua,w(Y,xb),8);case 8:wa(Ua,0);break;case 2:xa(Ua),H(Ua)}})};y=function(Y,Ma,Na,Ea){var va,Ka,Pa,za;return Q(function(ia){switch(ia.g){case 1:return ta(ia,2),va={type:"media-source",video:{contentType:l[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:m[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:Y,video:{encryptionScheme:Ma, robustness:Na},audio:{encryptionScheme:Ma,robustness:Ea}}},Pa=Rb(),"MOBILE"==Pa.Ia()?F(ia,Cf(5,navigator.mediaCapabilities.decodingInfo(va)),7):F(ia,navigator.mediaCapabilities.decodingInfo(va),6);case 6:Ka=ia.h;ia.A(5);break;case 7:Ka=ia.h;case 5:return za=Ka.keySystemAccess,F(ia,w(Y,za),8);case 8:wa(ia,0);break;case 2:xa(ia),H(ia)}})};z=u(a);for(A=z.next();!A.done;A=z.next())B=A.value,r.set(B,null);D=function(Y){return"WEBKIT"===Rb().Na()&&"org.w3.clearkey"===Y?!1:!0};G=[];C=u(q);for(E=C.next();!E.done;E= C.next())for(I=E.value,K=u(a),J=K.next();!J.done;J=K.next())L=J.value,D(L)&&(G.push(v(L,I,"","")),G.push(y(L,I,"","")));M=u(a);for(O=M.next();!O.done;O=M.next())for(N=O.value,P=u(k[N]||[]),R=P.next();!R.done;R=P.next())T=R.value,D(N)&&(G.push(v(N,null,T,"")),G.push(v(N,null,"",T)),G.push(y(N,null,T,"")),G.push(y(N,null,"",T)));return F(ca,Promise.all(G),2)}return ca.return(gh(r))})} function fi(a){return Q(function(b){if(1==b.g)return ta(b,2),F(b,Cf(li,Promise.all([a.close().catch(function(){}),a.closed])),4);if(2!=b.g)return wa(b,0);xa(b);H(b)})} function Bh(a){var b;return Q(function(c){b=Array.from(a.i.entries());a.i.clear();return F(c,Promise.all(b.map(function(d){d=u(d);var e=d.next().value,f=d.next().value;return Q(function(g){if(1==g.g)return ta(g,2),a.ea||a.C.has(e.sessionId)||"persistent-license"!==f.type||a.g.persistentSessionOnlinePlayback?F(g,fi(e),5):F(g,e.remove(),5);if(2!=g.g)return wa(g,0);xa(g);H(g)})})),0)})}function Jh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])} function zh(a){a.i.forEach(function(b,c){var d=b.Dh,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Dh=e)})}function Uh(a){a=a.i.values();return lb(a,function(b){return b.loaded})}function Th(a){for(var b=u(a.h&&a.h.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.U.get(c.value))return!1;return!0} function Ih(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=u(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 $h(a,b,c,d,e,f,g,h){var k=[];a=u(a);for(var l=a.next(),m={};!l.done;m={Qa:void 0},l=a.next()){m.Qa=l.value;b.includes(m.Qa.encryptionScheme)||b.push(m.Qa.encryptionScheme);"org.w3.clearkey"==m.Qa.keySystem&&m.Qa.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Qa.licenseServerUri)||k.push(m.Qa.licenseServerUri):c.includes(m.Qa.licenseServerUri)||c.push(m.Qa.licenseServerUri);e.includes(m.Qa.serverCertificateUri)||e.push(m.Qa.serverCertificateUri);m.Qa.serverCertificate&& (d.some(function(r){return function(t){return Jb(t,r.Qa.serverCertificate)}}(m))||d.push(m.Qa.serverCertificate));if(m.Qa.initData){l=u(m.Qa.initData);for(var n=l.next(),q={};!n.done;q={rh:void 0},n=l.next())q.rh=n.value,f.some(function(r){return function(t){var w=r.rh;return t.keyId&&t.keyId==w.keyId?!0:t.initDataType==w.initDataType&&Jb(t.initData,w.initData)}}(q))||f.push(q.rh)}if(m.Qa.keyIds)for(l=u(m.Qa.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Qa.keySystemUris&&h)for(m=u(m.Qa.keySystemUris), l=m.next();!l.done;l=m.next())h.add(l.value)}if(1==k.length)c.push(k[0]);else if(0>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}} function Ki(a,b,c){var d=a.W(),e=[],f=null;c&1&&(f=a.Ih());c&4&&a.skip(4);for(var g=0;ga?"0":"")+a};function Qi(a){if(!Ri){Ri=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Si=Ti("ftyp",b,d,b,c);b=Ti("dref",Ui);Vi=Ti("dinf",b)}this.g=a} function Wi(a){for(var b=[],c=u(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Ti;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Xi+1));m=Math.floor(m%(Xi+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Yi(h,4)),[0,0,0,0],x(Yi(n,4)),x(Yi(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(Yi(k,2)),[0,0],x(Yi(l, 2)),[0,0]));h=Ti("tkhd",h);k=Ti;n=g.duration*g.timescale;l=Math.floor(n/(Xi+1));n=Math.floor(n%(Xi+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Yi(g.timescale,4)),x(Yi(l,4)),x(Yi(n,4)),x(Yi(m,2)),[0,0]));l=Ti("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Zi;break;case "audio":m=$i}n=Ti("hdlr",m);a:{switch(g.type){case "video":g=Ti("minf",Ti("vmhd",aj),Vi,bj(g));break a; case "audio":g=Ti("minf",Ti("smhd",cj),Vi,bj(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=kc.apply(dc,x(b));f=a.g[0];c=Ti;d=f.duration*f.timescale;e=Math.floor(d/(Xi+1));d=Math.floor(d%(Xi+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Yi(f.timescale,4)),x(Yi(e,4)),x(Yi(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, 255]));e=Ti("mvhd",e);d=[];a=u(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(Yi(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Ti("trex",k),h.call(g,k);a=kc.apply(dc,x(d));a=Ti("mvex",a);d=[];if(f.encrypted){f=u(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=u(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=kc.apply(dc,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Si.byteLength+ a.byteLength);b.set(Si);b.set(a,Si.byteLength);return b} function bj(a){var b=Ti,c="aac";a.codecs.includes("mp3")?c="mp3":a.codecs.includes("ac-3")?c=Rb().we()?"ec-3":"ac-3":a.codecs.includes("ec-3")?c="ec-3":a.codecs.includes("opus")&&(c="opus");var d=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;d=a.stream.height||0;if(0>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Yi(c,2)),x(Yi(d,2)),[0,72,0,0,0,72, 0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=ej(a);g=new Uint8Array([]);a.encrypted&&(g=fj(0,a.stream,a.codecs),d="encv");d=Ti(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=fj(0,a.stream,a.codecs),d="enca");a=Ti(d,gj(a),c,e)}d=a}a=Ti("stsd",hj,d);return b("stbl",a,Ti("stts",ij),Ti("stsc",jj),Ti("stsz",kj),Ti("stco",lj))}function ej(a){if(!a.cb&&!a.fb)return new Uint8Array([]);var b=a.fb;a=new Uint8Array([].concat(x(Yi(a.cb,4)),x(Yi(b,4))));return Ti("pasp",a)} function gj(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x(Yi(a.stream.audioSamplingRate||44100,2)),[0,0]))} function fj(a,b,c){a=Ti;c=new Uint8Array([].concat(x(Yi(mj(c.split(".")[0]),4))));c=Ti("frma",c);var d="cenc";var e=b.drmInfos[0];e&&e.encryptionScheme&&(d=e.encryptionScheme);d=new Uint8Array([0,0,0,0].concat(x(Yi(mj(d),4)),[0,1,0,0]));d=Ti("schm",d);e=Ti;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);b=u(b.drmInfos);for(var g=b.next();!g.done;g=b.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=u(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=dj(h.value)}b=new Uint8Array([0,0,0,0,0, 0,1,8]);b=Ti("tenc",b,f);return a("sinf",c,d,e("schi",b))} function nj(a){var b=[];a=u(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Ti;var g=new Uint8Array([0,0,0,0].concat(x(Yi(c.data?c.data.Yb:0,4))));g=Ti("mfhd",g);var h;var k=c.data?c.data.Bb:[];var l=new Uint8Array(4+k.length);for(h=0;h>8*b&255);return c}function dj(a){for(var b=new Uint8Array(a.length/2),c=0;c>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>8*m&255);a.set(new Uint8Array(l),h);a.set(k,h+4);h=u(g);for(k=h.next();!k.done;k=h.next())k=k.value,vj(a,k.start,k.size+4)}}return a} function sj(a,b,c,d,e,f){var g=fj(new Qi([]),a,d.name),h=b.subarray(d.start,d.start+d.size);a=new Uint8Array(d.size+g.byteLength);a.set(h,0);Ob(a).setUint32(4,f);a.set(g,d.size);vj(a,0,a.byteLength);f=new Uint8Array(b.byteLength+a.byteLength);d=Rb().wf()?d.start:d.start+d.size;g=b.subarray(d);f.set(b.subarray(0,d));f.set(a,d);f.set(g,d+a.byteLength);b=u(e);for(e=b.next();!e.done;e=b.next())e=e.value,vj(f,e.start,e.size+a.byteLength);a=Ob(f,c.start);c=qh(c);b=a.getUint32(c);a.setUint32(c,b+1);return f} function vj(a,b,c){a=Ob(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))} function wj(a){function b(e){d.push({start:e.start,size:e.size});ph(e)}var c=Kb(a),d=[];(new kh).box("moov",b).box("trak",b).box("mdia",b).box("minf",b).box("stbl",b).box("stsd",function(e){d.push({start:e.start,size:e.size});for(var f=Ob(c,e.start),g=0;ga.end(0)-a.start(0)}function Ej(a){return!a||Dj(a)?null:a.length?a.end(a.length-1):null}function Fj(a,b){return!a||!a.length||Dj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Gj(a,b){if(!a||!a.length||Dj(a))return 0;var c=0;a=u(Hj(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 Ij(a,b,c){if(!a||!a.length||Dj(a))return null;a=Hj(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Hj(a){if(!a)return[];for(var b=[],c=0;ca[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Uj(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Vj(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 Wj(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=Wb(Kb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=Wb(Kb(a.data,3+c,f)),h;"--\x3e"===d?h=Wb(Kb(a.data,4+c+f)):h=Lb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null; d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Wb(Kb(a.data,1,d));a=Wb(Kb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Wb(Kb(a.data,1,d));a=Wb(Kb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=Wb(Kb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"== c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Lb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Wb(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Wb(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Lb(a.data),b):null} function Xj(a){for(var b=0,c=[];Tj(a,b);){var d=Vj(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10>6&1&&(d+=10),d+=10,d+=Vj(a,b+6),Uj(a,b+10)&&(d+=10),b+=d;return 0>>32-c;a.g-=c;0>>b))return a.h<<=b,a.g-=b,b;bk(a);return b+ek(a)}function fk(a){ck(a,1+ek(a))}function gk(a){var b=ek(a);return dk(a,b+1)-1}function hk(a){a=gk(a);return 1&a?1+a>>>1:-1*(a>>>1)}function ik(a){return 1===dk(a,1)}function jk(a){return dk(a,8)} function kk(a,b){for(var c=8,d=8,e=0;ea.length)return this;for(var b=Math.max(0,nk(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,uf:-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(0b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.u&&(a.u=e);c.pts=pk(e,a.u);a.u=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.s&&(a.s=d),c.dts=pk(d, a.s));a.s=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}p.Nl=function(a){Uc("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Fh(a,{qe:null,state:null})}; p.Fh=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;"hvc"==this.m&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0;-1==f&&(l=0,m="hvc"==this.m?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=n?0:1}0<=l&&0<=f&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.qe&&(c=k.length?k[k.length-1]:b.qe)&&(c.data=kc(c.data,a),c.fullData=kc(c.fullData,a));b.state=f;return k}; p.getMetadata=function(){for(var a=[],b=u(this.l),c=b.next();!c.done;c=b.next())c=kc.apply(dc,x(c.value)),(c=ok(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Xj(c.data),dts:c.dts,pts:c.pts});return a}; p.yb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=u(this.i),c=b.next();!c.done;c=b.next()){var d=kc.apply(dc,x(c.value)),e=ok(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=kc(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h}; p.Wc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=u(this.j),d=c.next();!d.done;d=c.next()){var e=kc.apply(dc,x(d.value)),f=ok(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=kc(d.data,e),this.g.push(d))}if(a){c={qe:null,state:null};d=[];e=u(this.g);for(f=e.next();!f.done;f=e.next())f=f.value, f.nalus=this.Fh(f,c),f.nalus.length&&(d.push(f),c.qe=f.nalus[f.nalus.length-1]);this.g=d}b&&(this.g=this.g.sort(function(g,h){var k=(g.pts||0)-(h.pts||0);return(g.dts||0)-(h.dts||0)||k}))}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if("audio"==a){a=null;var b=this.yb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Wc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.ae=function(){return{audio:this.B,video:this.m}}; p.tf=function(){for(var a=[],b=u(this.Wc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};p.kl=function(){Uc("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.mh();return{height:a.height,width:a.width}};p.mh=function(){return"hvc"==this.m?qk(this):rk(this)};function sk(a){var b=a.Wc();return 1h?kk(c,16):kk(c,64))}}fk(c);g=gk(c);if(0===g)gk(c);else if(1===g)for(ck(c,1),fk(c),fk(c),g=gk(c),h=0;hy;y++)dk(d,2);for(y=0;yC;C++)G|=(D>>C&1)<<31-C;return G>>>0}(k);g=1==g?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+t;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=sk(a);return b}function pk(a,b){var c=1;for(a>b&&(c=-1);4294967296nk(a)?!1:!0}function nk(a){for(var b=Math.min(1E3,a.length-564),c=0;ca.start(0)?0:a.length?a.start(0):null):a=null;return a}function Kk(a,b){return a.l.size?b==rc?a.h.h:Ej(Jk(a,b)):null}function Lk(a,b,c){if(b==rc)return a=a.h,null==a.h||a.hb?F(g,Ok(e,a,function(){return Uk(e,a,b,c)},null),5):g.A(0)):e.m?F(g,Ok(e,f.ba,function(){return Uk(e,f.ba,b,c)},null),0):g.A(0)})}; function Vk(a,b){var c;return Q(function(d){return 1==d.g?(c=uc,b==c.Xa?a.h?F(d,a.h.remove(0,Infinity),0):d.return():F(d,Ok(a,b,function(){return Uk(a,b,0,a.i.duration)},null),4)):a.m?F(d,Ok(a,c.ba,function(){return Uk(a,c.ba,0,a.i.duration)},null),0):d.A(0)})}p.flush=function(a){var b=this,c;return Q(function(d){return 1==d.g?(c=uc,a==c.Xa?d.return():F(d,Ok(b,a,function(){b.g.currentTime-=.001;Gk(b,a)},null),2)):b.m?F(d,Ok(b,c.ba,function(){var e=c.ba;b.g.currentTime-=.001;Gk(b,e)},null),0):d.A(0)})}; function Wk(a,b,c,d,e,f,g,h,k){var l,m,n;return Q(function(q){if(1==q.g){l=uc;if(b==l.Xa)return f||(a.h.u=c),tf(a.h,d,e),q.return();m=[];return F(q,Xk(a,b,g,h,k),2)}n=q.h;n||(m.push(Ok(a,b,function(){return Pk(a,b)},null)),a.m&&m.push(Ok(a,l.ba,function(){return Pk(a,l.ba)},null)));f||(m.push(Ok(a,b,function(){return Qk(a,b,c)},null)),a.m&&m.push(Ok(a,l.ba,function(){return Qk(a,l.ba,c)},null)));if(0!=d||Infinity!=e)m.push(Ok(a,b,function(){var r=a.l.get(b);r.appendWindowStart=0;r.appendWindowEnd= e;r.appendWindowStart=d;Gk(a,b)},null)),a.m&&m.push(Ok(a,l.ba,function(){var r=l.ba,t=a.l.get(r);t.appendWindowStart=0;t.appendWindowEnd=e;t.appendWindowStart=d;Gk(a,r)},null));return m.length?F(q,Promise.all(m),0):q.A(0)})} function Yk(a,b,c){var d,e;return Q(function(f){if(1==f.g){d=uc;if(b==d.Xa)return f.return();b==d.Ea&&(a.Ma=new Hg);if(!a.F||(e=Kk(a,b))&&.1>Math.abs(e-c))return f.return();Ok(a,b,function(){return Pk(a,b)},null);a.m&&Ok(a,d.ba,function(){return Pk(a,d.ba)},null);return F(f,Ok(a,b,function(){return Qk(a,b,c)},null),2)}return a.m?F(f,Ok(a,d.ba,function(){return Qk(a,d.ba,c)},null),0):f.A(0)})} p.endOfStream=function(a){var b=this;return Q(function(c){return F(c,Zk(b,function(){Bk(b)||Ck(b)||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};p.vb=function(a){var b=this;return Q(function(c){return F(c,Zk(b,function(){if(b.u.durationReductionEmitsUpdateEnd&&ac&&(c+=.001);var d=!0;"HLS"==a.P&&(d=Kk(a,b),d=!d||.15=b.s&&d&&!b.i)b.j&&b.j(b.g,e),b.i=!0,b.g=c.g.currentTime;b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Ij(c,b,a.h.gapDetectionThreshold),null==d||0==d&&!a.B||(e=c.start(d), (f=a.h.gapPadding)&&(e=Math.ceil(100*(e+f))/100),e>=a.C.Ib()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.j&&(a.j=e),a.D++,a.u(new U("gapjumped")))))}}} function sl(a){if(!a.h.stallEnabled)return null;var b=a.h.stallThreshold,c=a.h.stallSkip;return new vl(new wl(a.g),b,function(){var d;return Q(function(e){if(1==e.g)return d=Hj(a.g.buffered),d.length?c?(a.g.currentTime+=c,e.A(2)):F(e,a.g.play(),3):e.return();if(2!=e.g){if(!a.g)return e.return();a.g.pause();a.g.play()}a.G++;a.u(new U("stalldetected"));H(e)})})}function vl(a,b,c){this.h=a;this.m=ul(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.i=!1;this.s=b;this.j=c} vl.prototype.release=function(){this.h&&this.h.release();this.j=this.h=null};function wl(a){var b=this;this.g=a;this.h=new Oc;this.i=!1;this.h.o(this.g,"audiofocuspaused",function(){b.i=!0});this.h.o(this.g,"audiofocusgranted",function(){b.i=!1});this.h.o(this.g,"audiofocuslost",function(){b.i=!0})} function ul(a){if(a.g.paused||0==a.g.playbackRate||a.i||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=u(Hj(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(bc.end-.5)){b=!0;break a}b=!1}return b}wl.prototype.release=function(){this.h&&this.h.release();this.h=null};function xl(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=yl.value().get(b),c.qa(a,b,d))}var yl=new Qb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function zl(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.s=!1;this.h=new Oc;this.i=new Al(a);xl(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Bl(e,e.j())})}zl.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Cl(a){return a.s?a.g.currentTime:a.j()} function Dl(a,b){0Math.abs(a.g.currentTime-b)?Fl(a):(a.h.qa(a.g,"seeking",function(){Fl(a)}),El(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Fl(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)} function Al(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new yf(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}Al.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function El(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.ya(.1)};function Gl(a){this.g=a;this.i=!1;this.h=null;this.j=new Oc}p=Gl.prototype;p.ready=function(){function a(){if(null==b.h||0==b.h&&Infinity!=b.g.duration)b.i=!0;else{var c=b.g.currentTime,d=null;if("number"===typeof b.h)d=b.h;else if(b.h instanceof Date){var e=Hl(b);null!==e&&(d=b.h.getTime()/1E3-e,d=Il(b,d))}null==d?b.i=!0:(0>d&&(d=Math.max(0,c+d)),c!=d?(b.j.qa(b.g,"seeking",function(){b.i=!0}),b.g.currentTime=d):b.i=!0)}}var b=this;xl(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.rg=function(a){this.h=this.i?this.h:a};p.Te=function(){var a=this.i?this.g.currentTime:this.h;a instanceof Date&&(a=a.getTime()/1E3-(Hl(this)||0),a=Il(this,a));return a||0};p.ri=function(){return 0};p.pi=function(){return 0};p.ij=function(){};p.Wi=function(){var a=Ej(this.g.buffered);return null!=a&&a>=this.g.duration-1};function Hl(a){return a.g.getStartDate&&(a=a.g.getStartDate().getTime(),!isNaN(a))?a/1E3:null} function Il(a,b){a=a.g.seekable;0l-k&&(k=l-3);ha.g.getDuration()?a.g.bc():a.g.Ib():b instanceof Date?b=b.getTime()/1E3-(a.g.m||a.g.i):0>b&&(b=a.g.Ib()+b);return Nl(a,Ml(a,b))}p.ij=function(){this.j.Lf()};p.Wi=function(){if(this.g.T()){var a=this.g.Cc(),b=Ej(this.h.buffered);if(null!=b&&b>=a)return!0}return!1}; function Nl(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Kl(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.bc(),f=a.g.Ib(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.ce(c),k=a.g.ce(d);c=a.g.ce(c+d);return b>=g?Nl(a,b):b>f?f-a.l.safeSeekEndOffset:b=h||Fj(a.h.buffered,b)?b:c}function Ml(a,b){var c=a.g.bc();if(ba?a:b};function Ol(a){this.g=a;this.m=null;this.i=0;this.s=!1}p=Ol.prototype;p.getNumReferences=function(){return this.g.length};p.getNumEvicted=function(){return this.i};p.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.Hl=function(){this.s=!0};p.Gb=function(a){for(var b=u(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function bg(a){return a.g[0]||null} p.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c=d.startTime&&aa||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.s)for(var b=u(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)}; p.Ff=function(a){if(!this.s&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Ff(a);this.hb(b)};p.hb=function(a){if(!this.s){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}}; p.vd=function(a,b,c){c=void 0===c?!1:c;if(!this.s){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new zj(a.startTime,b,a.D,a.startByte,a.endByte,a.ha,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.C,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}}; p.hg=function(a,b){var c=this;this.s||(this.m&&this.m.stop(),this.m=new yf(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.ya(a))};Ol.prototype[Symbol.iterator]=function(){return this.ac(0)}; Ol.prototype.ac=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0=h.startTime&&a=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0=this.g);)this.g--,b=a.g[this.g]}; S("shaka.media.SegmentIterator",Pl);Pl.prototype.resetToLastIndependent=Pl.prototype.Mh;Pl.prototype.next=Pl.prototype.next;Pl.prototype.current=Pl.prototype.current;Pl.prototype.currentPosition=Pl.prototype.kk;Pl.prototype.setReverse=Pl.prototype.Od;function Rl(){Ol.call(this,[]);this.h=[]}pa(Rl,Ol);p=Rl.prototype;p.clone=function(){var a=new Rl;a.h=this.h.slice();a.i=this.i;return a};p.release=function(){for(var a=u(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]}; p.Gb=function(a){for(var b=u(this.h),c=b.next();!c.done;c=b.next())c.value.Gb(a)};function Sl(a,b){a=u(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=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};function Tl(a,b){a=u(a.h);for(var c=a.next();!c.done;c=a.next())if(c=c.value,null!=c.find(b))return c.hf();return-1} p.get=function(a){for(var b=this.i,c=u(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.Ff=function(){};p.hb=function(a){for(var b=u(this.h),c=b.next();!c.done;c=b.next())c.value.hb(a);for(;1=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)} Yl.prototype.j=function(a){for(var b=u(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.Lg;a:{var e=c.ve;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.Cd;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&&!ud(d.roles,e.roles);(g||h||d)&&bm(this,a,e.contentType)&&(c.Lg=e,d=new U("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&bm(this,a,e.contentType)&&(c.Lg=e,JSON.stringify(e),c=new U("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}}; function bm(a,b,c){return(a=a.h()[c])&&0=a[0].start&&b=d?!1:!0})}else b.ve=[]} function cm(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};"video"==a.type&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);"audio"==a.type&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language= a.language);return b};function dm(a){jb.call(this);this.h=new Map;this.i=a;this.g=null}pa(dm,jb);dm.prototype.release=function(){this.h.clear();this.g&&(this.g.stop(),this.g=null);jb.prototype.release.call(this)};function em(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 U("regionadd",new Map([["region",b]])),a.dispatchEvent(b),fm(a))} function fm(a){a.g||(a.g=(new yf(function(){for(var b=a.i(),c=u(a.h),d=c.next();!d.done;d=c.next()){var e=u(d.value);d=e.next().value;e=e.next().value;e.endTimed.endTime&&om(this,d);b&&mm(this)}; gm.prototype.Od=function(a){this.s=a;this.g&&this.g.Od(a)};function mm(a){for(var b=Array.from(a.h.keys()),c=u(a.j.keys()),d=c.next(),e={};!d.done;e={sh:void 0},d=c.next())e.sh=d.value,b.some(function(f){return function(g){return yj(g.ha,f.sh)}}(e))||om(a,e.sh)}function qm(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&om(a,d)}mm(a)}function rm(a,b){b&&b!==a.i&&(pm(a),a.i=b)}function om(a,b){var c=a.h;b instanceof xj&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()} function km(a){this.g=a;this.se=this.bi=null}function lm(a,b,c){var d=new Uint8Array(0);a.se=a.g(b,c,function(e){return Q(function(f){if(1==f.g)return 0>3,31===K&&C.Oa()&&(K=32+((I&7)<<3)+((C.aa()&224)>>5)),E+="."+K));g.push(E);k=!0}).box("ac-3",e).box("ec-3",e).box("ac-4",e).box("Opus",e).box("fLaC",e).box("avc1",d).box("avc3",d).box("hev1",d).box("hvc1",d).box("dva1",d).box("dvav",d).box("dvh1",d).box("dvhe",d).box("vp09", d).box("av01",d).box("avcC",function(C){var E=y||"";switch(y){case "dvav":E="avc3";break;case "dva1":E="avc1"}C=C.reader;C.skip(1);C=E+"."+Oi(C.aa())+Oi(C.aa())+Oi(C.aa());h.push(C);l=!0}).box("hvcC",function(C){var E=y||"";switch(y){case "dvh1":E="hvc1";break;case "dvhe":E="hev1"}var I=C.reader;I.skip(1);C=I.aa();var K=["","A","B","C"][C>>6],J=C&31,L=I.W(),M=(C&32)>>5?"H":"L";C=[I.aa(),I.aa(),I.aa(),I.aa(),I.aa(),I.aa()];I=I.aa();for(var O=0,N=0;32>N;N++){O|=L&1;if(31==N)break;O<<=1;L>>=1}E=E+("."+ K+J)+("."+Oi(O,!0));E+="."+M+I;K="";for(J=C.length;J--;)if((M=C[J])||K)K="."+M.toString(16).toUpperCase()+K;E+=K;h.push(E);l=!0}).box("dvcC",function(C){var E=y||"";switch(y){case "hvc1":E="dvh1";break;case "hev1":E="dvhe";break;case "avc1":E="dva1";break;case "avc3":E="dvav";break;case "av01":E="dav1"}var I=C.reader;I.skip(2);C=I.aa();I=I.aa();h.push(E+"."+Pi(C>>1&127)+"."+Pi(C<<5&32|I>>3&31));l=!0}).box("dvvC",function(C){var E=y||"";switch(y){case "hvc1":E="dvh1";break;case "hev1":E="dvhe";break; case "avc1":E="dva1";break;case "avc3":E="dvav";break;case "av01":E="dav1"}var I=C.reader;I.skip(2);C=I.aa();I=I.aa();h.push(E+"."+Pi(C>>1&127)+"."+Pi(C<<5&32|I>>3&31));l=!0}).V("vpcC",function(C){var E=y||"",I=C.reader;C=I.aa();var K=I.aa();I=I.aa()>>4&15;h.push(E+"."+Pi(C)+"."+Pi(K)+"."+Pi(I));l=!0}).box("av1C",function(C){var E=y||"";switch(y){case "dav1":E="av01"}var I=C.reader;I.skip(1);C=I.aa();I=I.aa();var K=C>>>5,J=(I&64)>>6;h.push(E+"."+K+"."+Pi(C&31)+(I>>>7?"H":"M")+"."+Pi(2===K&&J?(I&32)>> 5?12:10:J?10:8)+"."+((I&16)>>4)+"."+((I&8)>>3)+((I&4)>>2)+(I&3)+"."+Pi(1)+"."+Pi(1)+"."+Pi(1)+".0");l=!0}).box("enca",th).box("encv",sh).box("sinf",ph).box("frma",function(C){C=Mi(C.reader).codec;f(C)}).box("colr",function(C){h=h.map(function(K){if(K.startsWith("av01.")){var J=C.reader,L=J.Ua(),M=J.Xb(4);var O=String.fromCharCode(M[0]);O+=String.fromCharCode(M[1]);O+=String.fromCharCode(M[2]);O+=String.fromCharCode(M[3]);if("nclx"===O){M=J.Fa();O=J.Fa();var N=J.Fa(),P=J.aa()>>7,R=K.split(".");10== R.length&&(R[6]=Pi(M),R[7]=Pi(O),R[8]=Pi(N),R[9]=String(P),K=R.join("."))}J.seek(L)}return K});var E=Ni(C.reader),I=E.colorGamut;w=E.Fe;v=I}).parse(a||b,!0);if(!g.length&&!h.length)return null;var z=k&&!l,A=new Map;if(l&&!c){c=new id("video/mp4");a&&c.init(a);try{c.Nf(b);for(var B=u(c.qg()),D=B.next();!D.done;D=B.next()){var G=D.value;A.set(G,G)}}catch(C){}c.Rd()}return{type:z?"audio":"video",mimeType:z?"audio/mp4":"video/mp4",codecs:um(g.concat(h)).join(", "),language:m,height:n,width:q,channelCount:r, sampleRate:t,closedCaptions:A,Fe:w,colorGamut:v,frameRate:null}}function um(a){var b=new Set,c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=hf(d);b.has(e)||(c.push(d),b.add(e))}b=sc("audio",c);d=sc("video",c);a=sc(rc,c);d=vm(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b} function vm(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?bd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a} function wm(a){var b=null;(new kh).box("moov",ph).box("trak",ph).box("mdia",ph).box("minf",ph).box("stbl",ph).V("stsd",rh).box("encv",sh).box("enca",th).box("sinf",ph).box("schi",ph).V("tenc",function(c){c=c.reader;c.aa();c.aa();c.aa();c.aa();b=jc(c.Xb(16))}).parse(a,!0);return b} function xm(a,b,c){var d,e,f,g,h;return Q(function(k){if(1==k.g)return d=b,d.cryptoKey?k.A(2):F(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Kb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function ym(a,b,c,d,e){a=Wg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function zm(a,b){var c=this;this.g=b;this.j=a;this.h=null;this.J=new Map;this.D=1;this.B=this.l=null;this.O=0;this.i=new Map;this.I=!1;this.P=null;this.C=!1;this.m=new dh(function(){return Am(c)});this.L=Date.now()/1E3;this.s=new Map;this.N={projection:null,hfov:null};this.U=0;this.R=Infinity;this.F=null;this.K=[];this.u=new yf(function(){if(c.j&&c.g)if(c.j.presentationTimeline.T()){var d=c.j.presentationTimeline.bc(),e=c.j.presentationTimeline.Ib();1a.g.Ya(),d=u(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.Aa&&e.Aa.Od(c),e.ka&&e.ka.Od(c);d=u(a.s.values());for(e=d.next();!e.done;e=d.next())e.value.Od(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Jc&&(Mm(a,b,!1,0,!1),c.Jc=d);else if(b=c.Jc)c.Jc=null,Mm(a,b,!0,0,!1)} function Nm(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.I&&(b.video&&Mm(a,b.video,c,d,e,f),b.audio&&Mm(a,b.audio,c,d,e,f))}function Om(a,b){Q(function(c){if(1==c.g)return a.F=null,a.B=b,a.I?b.segmentIndex?c.A(2):F(c,b.createSegmentIndex(),2):c.return();Mm(a,b,!0,0,!1);H(c)})}function Pm(a,b){for(var c=u(a.J.entries()),d=c.next();!d.done;d=c.next()){var e=u(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.J.delete(d))}} function Mm(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=rc?g&&(g.Jc&&(b.trickModeVideo?(g.Jc=b,b=b.trickModeVideo):g.Jc=null),g.stream!=b||e)&&(a.s.has(b)?g.ka=a.s.get(b):g.ka&&rm(g.ka,b),b.type==rc&&(e=af(b.mimeType,b.codecs),Ek(a.g.ia,e,a.j.sequenceMode,b.external)),!a.s.has(g.stream)&&g.stream.closeSegmentIndex&&(g.$a?(e="("+g.type+":"+g.stream.id+")",a.J.has(e)||a.J.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,g.stream= b,g.Aa=null,g.yg=!!f,b.dependencyStream?g.$d=Im(a,b.dependencyStream):g.$d=null,e?Qm(a,!0,!1):(c?g.Pc?g.og=!0:g.$a?(g.Oc=!0,g.gf=d,g.og=!0):(Bm(g),Rm(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.$a||g.Cb||Jm(a,g,0),Sm(a,g).catch(function(h){if(a.g)a.g.onError(h)}))):Hm(a,b)} function Sm(a,b){var c,d;return Q(function(e){if(1==e.g){if(!b.Lb)return e.return();c=b.stream;d=b.Lb;return c.segmentIndex?e.A(2):F(e,c.createSegmentIndex(),2)}if(b.Lb!=d||b.stream!=c)return e.return();var f=a.g.Vc();var g=Kk(a.g.ia,b.type),h=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.endByte?k.endByte-k.startByte:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ha)&&(h+=(k.endByte?k.endByte-k.startByte:null)|| 0),k=a.g.getBandwidthEstimate(),f=8*h/k<(g||0)-f-a.h.rebufferingGoal||b.Lb.h.g>h?!0:!1):f=!1;f&&b.Lb.abort();H(e)})} p.hd=function(){if(this.g){for(var a=this.g.Vc(),b=u(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.ia;d==rc?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&aa.g.Ya()):null} function Em(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=u(a.j.variants),e=d.next(),f={};!e.done;f={Ob:void 0},e=d.next())if(f.Ob=e.value,f.Ob.audio)if(a.s.has(f.Ob.audio)){if(e=a.s.get(f.Ob.audio),qm(e,b),!(0=b||!c.some(function(h){return function(k){return xc(h.Ob.audio.language,k)}}(f))||!(e=Dm(a,f.Ob.audio))|| (f.Ob.audio.segmentIndex||f.Ob.audio.createSegmentIndex(),a.s.set(f.Ob.audio,e))}p.updateDuration=function(){var a=ed(),b=this.j.presentationTimeline.getDuration();Infinity>b?(a&&(this.u&&this.u.stop(),al(this.g.ia)),this.g.ia.vb(b)):a?(this.u&&this.u.ya(.5),this.g.ia.vb(Infinity)):this.g.ia.vb(Math.pow(2,32))}; function Wm(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:eh(a.m);if(b.$a||null==b.Cb||b.Pc)return k.return();b.Cb=null;if(!b.Oc){k.A(2);break}return F(k,Rm(a,b,b.og,b.gf),3);case 3:return k.return();case 2:Pm(a,b);if(b.stream.segmentIndex){k.A(4);break}c=b.stream;ta(k,5);return F(k,b.stream.createSegmentIndex(),7);case 7:wa(k,6);break;case 5:return d=xa(k),F(k,Xm(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.$a||b.Cb|| Jm(a,b,0),k.return();case 4:ta(k,9);e=Ym(a,b);null!=e&&(Jm(a,b,e),b.fe=!1);wa(k,10);break;case 9:return f=xa(k),F(k,Xm(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.I||!g.every(function(l){return l.endOfStream})){k.A(0);break}return F(k,a.g.ia.endOfStream(),13);case 13:eh(a.m),h=a.g.ia.getDuration(),0!=h&&hh&&k)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(rc))&&Zm(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(g>=f)return c/2;h=!b.Aa;k=$m(a,b,d,k);if(!k)return c;g=!1;h&&b.yg&&(g=!0,b.yg=!1);h=Infinity;var l=Array.from(a.i.values());l=u(l);for(var m=l.next();!m.done;m=l.next())m=m.value,Zm(m)||m.Aa&&!m.Aa.current()||(h=Math.min(h,m.Ra?m.Ra.endTime:d));if(e>=h+a.j.presentationTimeline.h)return c;if("keep"!==a.h.crossBoundaryStrategy&&an(a,b,k))return null;b.ka&&b.Aa&& !a.s.has(b.stream)&&(b.ka.hb(k.startTime+.001),im(b.ka,k.startTime).catch(function(){}));bn(a,b,d,k,g).catch(function(){});b.$d&&cn(a,b.$d,d,f);return null} function $m(a,b,c,d){if(b.Aa)return(c=b.Aa.current())&&b.Ra&&.001>Math.abs(b.Ra.startTime-c.startTime)&&(c=b.Aa.next().value),c;if(b.Ra||d)return c=b.Ra?b.Ra.endTime:d,a=0>a.g.Ya(),b.stream.segmentIndex&&(b.Aa=b.stream.segmentIndex.ac(c,!1,a)),b.Aa&&b.Aa.next().value;d=a.j.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Ya();var f=null;d&&(b.stream.segmentIndex&&(b.Aa=b.stream.segmentIndex.ac(e,!1,a)),f=b.Aa&&b.Aa.next().value);f||(b.stream.segmentIndex&&(b.Aa=b.stream.segmentIndex.ac(c, !1,a)),f=b.Aa&&b.Aa.next().value);return f} function bn(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G;return Q(function(C){switch(C.g){case 1:f=uc;g=b.stream;h=b.Aa;b.$a=!0;ta(C,2);if(2==d.Ec())throw new V(1,1,1011);return F(C,dn(a,b,d,e),4);case 4:eh(a.m);if(a.C)return C.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if((m=a.h.lowLatencyMode&&a.j.isLowLatency)&&l&&k&&("HLS"!=a.j.type||d.m))return r=new Uint8Array(0),w=t=!1,y=function(E){var I,K,J,L;return Q(function(M){switch(M.g){case 1:if(t)return M.return();w= !0;eh(a.m);if(a.C)return M.return();ta(M,2);r=en(r,E);I=!1;K=0;(new kh).box("mdat",function(O){K=O.size+O.start;I=!0}).parse(r,!1,!0);if(!I){M.A(4);break}J=r.subarray(0,K);r=r.subarray(K);return F(M,fn(a,b,c,g,d,J,!0,e),5);case 5:b.ka&&b.Aa&&im(b.ka,d.startTime,!0);case 4:wa(M,0);break;case 2:v=L=xa(M),H(M)}})},F(C,gn(a,b,d,y),9);n=gn(a,b,d);return F(C,n,7);case 7:q=C.h;eh(a.m);if(a.C)return C.return();eh(a.m);return b.Oc?(b.$a=!1,Jm(a,b,0),C.return()):F(C,fn(a,b,c,g,d,q,!1,e),6);case 9:z=C.h;if(v)throw v; if(w){C.A(10);break}t=!0;eh(a.m);return a.C?C.return():b.Oc?(b.$a=!1,Jm(a,b,0),C.return()):F(C,fn(a,b,c,g,d,z,!1,e),10);case 10:b.ka&&b.Aa&&im(b.ka,d.startTime,!0);case 6:eh(a.m);if(a.C)return C.return();b.Ra=d;h.next();b.$a=!1;b.Jh=!1;A=a.g.ia.Pb();B=A[b.type];gb(JSON.stringify(B));b.Oc||(D=null,b.type===f.Ea?D=a.i.get(f.ba):b.type===f.ba&&(D=a.i.get(f.Ea)),D&&D.type==f.ba?a.g.Lf(d,b.stream,D.stream.isAudioMuxedInVideo):a.g.Lf(d,b.stream,b.stream.codecs.includes(",")));Jm(a,b,0);wa(C,0);break;case 2:G= xa(C);eh(a.m,G);if(a.C)return C.return();b.$a=!1;if(7001==G.code)b.$a=!1,Bm(b),Jm(a,b,0),C.A(0);else if(b.type==f.Xa&&a.h.ignoreTextStreamFailures)a.i.delete(f.Xa),C.A(0);else{if(3017==G.code)return F(C,hn(a,b,G),0);b.fe=!0;1==G.category&&b.ka&&om(b.ka,d);G.severity=2;return F(C,Xm(a,b,G),0)}}})} function cn(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t;return Q(function(w){switch(w.g){case 1:e=b.stream;for(h=(g=(f=e.segmentIndex)&&f.ac(c))&&g.next().value;h&&a.K.includes(h.startTime);)h=g&&g.next().value;if(!h){w.A(0);break}k=h.ha;if(!k||yj(k,b.Tb)){w.A(3);break}b.Tb=k;ta(w,4);return F(w,gn(a,b,k),6);case 6:l=w.h;var v=a.g.ia;v.L&&Zc(v.L,l,0,e);a.K=[];wa(w,3);break;case 4:throw m=xa(w),b.Tb=null,m;case 3:if(b.Ra&&b.Ra==h){w.A(0);break}b.Ra=h;ta(w,8);return F(w,gn(a,b,h),10);case 10:n=w.h;v=a.g.ia;v.L&& Zc(v.L,n,0,e);a.K.push(h.startTime);wa(w,9);break;case 8:throw q=xa(w),b.Ra=null,q;case 9:r=Math.max.apply(Math,[0].concat(x(a.K)));t=a.g.Vc();if(t+d>r)return F(w,cn(a,b,h.startTime,d),0);w.A(0)}})}function en(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c} function hn(a,b,c){var d,e,f,g,h,k;return Q(function(l){if(1==l.g){d=Array.from(a.i.values());if(e=d.some(function(m){return m!=b&&m.Jh}))return l.A(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.disableStream(b.stream,f))return l.return();if(a.h.avoidEvictionOnQuotaExceededError)return Jm(a,b,4),l.return();h=Math.round(100*a.D);if(20k&&(n=Math.max(h-f,l-k-g));return n<=k?q.return():F(q,a.g.ia.remove(b.type,g,g+n,e), 2)}if(4!=q.g)return eh(a.m),a.F?F(q,jn(a,a.F,c),4):q.A(0);eh(a.m);H(q)})}function Zm(a){return a&&a.type==rc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)} function gn(a,b,c,d){var e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(e=c.cc())return l.return(e);f=null;if(b.ka){var m=b.ka,n=m.h;c instanceof xj&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.bi=d),f=m.se):f=null}f||(f=Vm(c,b.stream,d||null,a.h.retryParameters,a.g.uc));g=0;b.Aa&&(g=b.Aa.h);b.Lb=f;return F(l,f.promise,2);case 2:h=l.h;b.Lb=null;k=h.data;if(!c.aesKey){l.A(3);break}return F(l,xm(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})} function Vm(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a instanceof zj?a:void 0,h=g?1:0;a=ym(a.S(),a.startByte,a.endByte,d,c);a.contentType=b.type;return e.request(bh,a,{type:h,stream:b,segment:g,isPreload:f})} function Rm(a,b,c,d){var e,f;return Q(function(g){if(1==g.g)return b.Oc=!1,b.og=!1,b.gf=0,b.Pc=!0,b.Ra=null,b.Aa=null,b.ka&&!a.s.has(b.stream)&&pm(b.ka),d?(e=a.g.Vc(),f=a.g.ia.getDuration(),F(g,a.g.ia.remove(b.type,e+d,f),3)):F(g,Vk(a.g.ia,b.type),4);if(3!=g.g)return eh(a.m),c?F(g,a.g.ia.flush(b.type),3):g.A(3);eh(a.m);b.Pc=!1;b.endOfStream=!1;b.$a||b.Cb||Jm(a,b,0);H(g)})} function Jm(a,b,c){var d=b.type;if(d!=rc||a.i.has(d))b.Cb=(new xf(function(){var e;return Q(function(f){if(1==f.g)return ta(f,2),F(f,Wm(a,b),4);if(2!=f.g)return wa(f,0);e=xa(f);if(a.g)a.g.onError(e);H(f)})})).X(c)}function Bm(a){null!=a.Cb&&(a.Cb.stop(),a.Cb=null)}function Cm(a){return Q(function(b){return a.Lb?F(b,a.Lb.abort(),0):b.A(0)})} function Xm(a,b,c){var d;return Q(function(e){if(1==e.g)return 3024==c.code?(b.$a=!1,Bm(b),Jm(a,b,0),e.return()):F(e,Gg(a.P),2);eh(a.m);if(1===c.category&&1003!=c.code){if(b.Jc)return Lm(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);H(e)})} function Qm(a,b,c){b=void 0===b?!1:b;c=void 0===c?!0:c;var d,e,f,g,h,k;return Q(function(l){if(1==l.g){d=Date.now()/1E3;e=a.h.minTimeBetweenRecoveries;if(!b){if(!a.h.allowMediaSourceRecoveries||d-a.Lb||1e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function pn(a,b){return a&&b} function qn(a,b){function c(f){for(var g=u(Object.keys(f)),h=g.next();!h.done;h=g.next())if(h=h.value,!(f[h]instanceof HTMLElement))if(e(f[h])&&0===Object.keys(f[h]).length)delete f[h];else{var k=f[h];Array.isArray(k)&&0===k.length?delete f[h]:"function"==typeof f[h]?delete f[h]:e(f[h])&&(c(f[h]),0===Object.keys(f[h]).length&&delete f[h])}}function d(f,g){return Object.keys(f).reduce(function(h,k){var l=f[k];if(g.hasOwnProperty(k))if(l instanceof HTMLElement&&g[k]instanceof HTMLElement)l.isEqualNode(g[k])|| (h[k]=l);else if(e(l)&&e(g[k])){if(l=d(l,g[k]),0"===c.substr(0,5)&&""===c.substr(-6)&&(c=c.slice(5,-6),a=!0);if(!a)try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Lb(hc(c)))}};rn.muxFairPlayRequest=function(a,b){vn(a,b)}; rn.expressplayFairPlayRequest=function(a,b){if(2===a){var c=b.drmInfo;c&&xg(c.keySystem)&&vn(a,b)}};rn.conaxFairPlayRequest=function(a,b){vn(a,b)};rn.ezdrmFairPlayRequest=function(a,b){vn(a,b)};rn.verimatrixFairPlayRequest=function(a,b){2===a&&(a=b.drmInfo)&&xg(a.keySystem)&&(a=Kb(b.body),a=gc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=$b("spc="+a))};rn.muxInitDataTransform=function(a,b,c){return un(a,b,c)}; rn.expressplayInitDataTransform=function(a,b,c){return un(a,b,c)};rn.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Zb(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Nb(d);for(var e=0,f=c.length;eb?!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 An(a,b){if("AUTO"==b){var c=a.some(function(d){return d.video&&d.video.hdr&&"HLG"==d.video.hdr?!0:!1});b=Gn(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})} function zn(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function En(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function Fn(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function Hn(){} function In(){var a=Infinity,b=Rb();navigator.connection&&navigator.connection.saveData&&(a=360);var c={retryParameters:Fg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(h,k,l){"apple"===window.shakaMediaKeysPolyfill&&"skd"==k&&(k=l.serverCertificate,l=sn(h),h=tn(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",e=!1;dd()&&b.ld()&&(d="smooth",e=!0);e={retryParameters:Fg(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1, updatePeriod:-1,ignoreDrmInfo:!1,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready", "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:Jn,manifestPreprocessorTXml:Kn,sequenceMode:!1,multiTypeVariantsAllowed:e,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.kd(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:Jn,manifestPreprocessorTXml:Kn,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}}; var f={trackSelectionCallback:function(h){return Q(function(k){return k.return(h)})},downloadSizeCallback:function(h){var k;return Q(function(l){if(1==l.g)return navigator.storage&&navigator.storage.estimate?F(l,navigator.storage.estimate(),3):l.return(!0);k=l.h;return l.return(k.usage+h<.95*k.quota)})},progressCallback:function(h,k){return pn([h,k])},usePersistentLicense:!0,numberOfParallelDownloads:5},g={drm:c,manifest:e,streaming:{retryParameters:Fg(),failureCallback:function(h){return pn([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:!1,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 pn([h],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(h,k){return pn([h,k])},dispatchAllEmsgBoxes:!1, useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:f,abrFactory:function(){return new mg},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(wn,[null].concat(x(Ja.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:20,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!0},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"", preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,playRangeEnd:Infinity, textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,disableDASHInterstitial:!1, allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:30,repeatMode:0}};f.trackSelectionCallback=function(h){return Q(function(k){return k.return(Ln(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return b.ab(g)} function Mn(){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 Nn(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 nn(a,b,c||In(),d,"")} function Ln(a,b,c){var d=c;"AUTO"==d&&(c=a.some(function(h){return h.hdr&&"HLG"==h.hdr?!0:!1}),d=Gn(c));var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Gc(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return yc(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height- h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=u(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=rc&&"image"!=c.type||b.push(c);return b}function Jn(a){return pn([a],a)}function Kn(a){return pn([a],a)}S("shaka.util.PlayerConfiguration",Hn);Hn.mergeConfigObjects=Nn;Hn.createDefaultForLL=Mn;Hn.createDefault=In;function On(){this.g=null;this.h=[]}function Pn(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=u(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 Qn(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=u(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 Rn(){this.i=this.h=null;this.g=[]}function Sn(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 Tn(){this.C=this.U=NaN;this.l="";this.j=this.aj=this.u=this.B=this.J=this.D=this.s=this.m=this.I=this.F=this.i=this.P=this.R=this.L=this.N=this.O=NaN;this.K=0;this.G=this.H=NaN;this.g=new On;this.h=new Rn}function Un(a,b,c){a.O=b;a.N=c}function Vn(a,b,c){a.U=b;a.C=c}function Wn(a,b){a.i=isNaN(a.i)?b:Math.max(a.i,b)}function Xn(a,b){a.j=isNaN(a.j)?b:a.j+b} function Yn(a){var b=a.U,c=a.C,d=a.l,e=a.B,f=a.N,g=a.O,h=a.L,k=a.R,l=a.P,m=a.u,n=a.i,q=a.F,r=a.I,t=a.m,w=Pn(a.g,"playing"),v=Pn(a.g,"paused"),y=Pn(a.g,"buffering"),z=a.s,A=a.D,B=a.J,D=a.aj,G=a.j,C=a.K,E=a.H,I=a.G,K=Qn(a.g),J=[];a=u(a.h.g);for(var L=a.next();!L.done;L=a.next())L=L.value,J.push({timestamp:L.timestamp,id:L.id,type:L.type,fromAdaptation:L.fromAdaptation,bandwidth:L.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:t,playTime:w,pauseTime:v,bufferingTime:y,licenseTime:z,liveLatency:A,maxSegmentDuration:B,manifestSizeBytes:D,bytesDownloaded:G,nonFatalErrorCount:C,manifestPeriodCount:E,manifestGapCount:I,stateHistory:K,switchHistory:J}};function Zn(a,b,c,d){jb.call(this);this.N=a;this.U=b;this.Ka=d.networkingEngine;this.m=c;this.B=null;this.Ha=0;this.Za=d.sd;this.F=d.El;this.eb=d.Fl;this.g=d.config;this.l=this.G=this.h=null;this.oa=!1;this.H=d.Ql;this.ra=!1;this.i=null;this.ea=!1;this.j=this.D=null;this.Z=!1;this.L=new Map;this.sa=!1;this.Ma=d.Pl;this.Y=new Tn;this.na=new Hg;this.u=new Hg;this.O=null;this.s=!1;this.$=d.dk;this.R=this.J=null;this.Ta=d.ck;this.P=!1;this.K=[];this.I=[];this.C=!0}pa(Zn,jb); function $n(a,b,c){(a=b?a.I:a.K)?a.push(c):c()}function ao(a){if(a.I)for(var b=u(a.I),c=b.next();!c.done;c=b.next())c=c.value,c();a.I=null}function bo(a,b){a.O=b;a.P=!0;if(a.K){b=u(a.K);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.K=null}p=Zn.prototype;p.getStartTime=function(){return this.m};p.xd=function(){return this.N};p.hh=function(){return this.h};function co(a){a.Z=!0;return a.j}function eo(a){a.ra=!0;return a.H}p.getStats=function(){return this.Y}; function fo(a){a.ea=!0;return a.i}p.Tk=function(){return this.J?Zf(this.J):null};p.Sk=function(){return this.R?$f(this.R):null};function go(a){a.sa=!0;return a.L} p.start=function(){var a=this;(function(){var b;return Q(function(c){switch(c.g){case 1:return F(c,Promise.resolve(),2);case 2:return ta(c,3),F(c,ho(a),5);case 5:io(a);if("webkit"===window.shakaMediaKeysPolyfill){c.A(6);break}return F(c,jo(a),7);case 7:io(a);case 6:return F(c,ko(a),8);case 8:io(a);if(!a.$||!a.i){c.A(9);break}return F(c,ei(a.i),10);case 10:io(a);case 9:a.u.resolve();wa(c,0);break;case 3:b=xa(c),b instanceof V&&(7001==b.code||7003==b.code)||a.u.reject(b),H(c)}})})()}; p.dispatchEvent=function(a){return this.O?this.O.dispatchEvent(a):jb.prototype.dispatchEvent.call(this,a)};p.onError=function(a){2===a.severity&&(this.u.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function io(a){if(a.s)throw new V(2,7,7003);}function lo(a,b){a.dispatchEvent(new U("onstatechange",(new Map).set("state",b)))} function ho(a){var b,c,d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:lo(a,"manifest-parser");a.l||(a.G=Gi(a.N,a.U),a.l=a.G(),a.l.configure(a.g.manifest,function(){return a.C}));b=Date.now()/1E3;lo(a,"manifest");if(a.h){m.A(2);break}return F(m,a.l.start(a.N,a.eb),3);case 3:a.h=m.h;if(1!=a.h.variants.length){m.A(2);break}c=[];d=a.h.variants[0];e=u([d.video,d.audio]);for(f=e.next();!f.done;f=e.next())(g=f.value)&&!g.segmentIndex&&c.push(g.createSegmentIndex());if(!(0d.endTime?so:po;this.g.set(d,f);for(var g=u(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.pd==e&&h.od==f&&h.Yc(d,b)}}};function qo(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var ro=1,po=2,so=3;function to(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:var n=(new qb(a)).ub.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=uo.get(d))return m.return(e);f=0;g=Wg([a],c);ta(m,2);g.method="HEAD";return F(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];wa(m,3);break;case 2:k=xa(m);if(!k||1002!=k.code&&1001!=k.code){m.A(3);break}g.method="GET";return F(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e? e.toLowerCase().split(";").shift():"")}})} var uo=(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");/* @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 vo={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"},wo=u(Object.keys(vo)),xo=wo.next();!xo.done;xo=wo.next()){var yo=xo.value;vo[yo.toLowerCase()]=vo[yo]};function zo(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return zo(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=Le,e=a.fontStyle==Me,f=a.textDecoration.includes(Ne);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Ao(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Ao(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=u(h);h=k.next().value; k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+""},a.payload)} function Ao(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&& (c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c} function Eo(a,b){var c=Bo(b),d=[];b=a.cues?Array.from(a.cues):[];c=u(c);for(var e=c.next(),f={};!e.done;f={yd:void 0},e=c.next())f.yd=e.value,!b.some(function(g){return function(h){return h.startTime==g.yd.startTime&&h.endTime==g.yd.endTime&&h.text==g.yd.payload?!0:!1}}(f))&&f.yd.payload&&(e=Do(f.yd))&&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=u(b);for(c=b.next();!c.done;c=b.next())a.addCue(c.value)}function Fo(a,b){var c=!1;"disabled"===a.mode&&(c=!0,a.mode="hidden");for(var d=0;dd&&"hidden"=== g.track.mode&&(d=f)}e=u(b.i);for(f=e.next();!f.done;f=e.next())g=u(f.value),f=g.next().value,g=g.next().value,f!==d&&"disabled"!==g.track.mode&&(g.track.mode="disabled");b.g!==d&&(b.g=d,-1this.g)return!1;Fo(this.i.get(this.g).track,function(c){return c.startTimea});return!0}; p.append=function(a){!this.j||0>this.g||Eo(this.i.get(this.g).track,a)};p.destroy=function(){this.h&&(this.j&&this.C(),this.h=null);this.l&&(this.l.release(),this.l=null);return Promise.resolve()};p.isTextVisible=function(){return this.u}; p.setTextVisibility=function(a){this.u=a;if(-1a});return!0}; p.append=function(a){this.g&&Eo(this.g,a)};p.destroy=function(){this.g&&(Fo(this.g,function(){return!0}),this.g.mode="disabled");this.g=this.h=null;return Promise.resolve()};p.isTextVisible=function(){return this.g?"showing"==this.g.mode:!1};p.setTextVisibility=function(a){a&&!this.g&&Jo(this);this.g&&(this.g.mode=a?"showing":"hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){Jo(this)};function Jo(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")} S("shaka.text.SimpleTextDisplayer",Io);Io.prototype.enableTextDisplayer=Io.prototype.enableTextDisplayer;Io.prototype.setTextLanguage=Io.prototype.setTextLanguage;Io.prototype.setTextVisibility=Io.prototype.setTextVisibility;Io.prototype.isTextVisible=Io.prototype.isTextVisible;Io.prototype.destroy=Io.prototype.destroy;Io.prototype.append=Io.prototype.append;Io.prototype.remove=Io.prototype.remove;Io.prototype.configure=Io.prototype.configure;function Ko(){}p=Ko.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(){};S("shaka.text.StubTextDisplayer",Ko);Ko.prototype.enableTextDisplayer=Ko.prototype.enableTextDisplayer;Ko.prototype.setTextLanguage=Ko.prototype.setTextLanguage;Ko.prototype.setTextVisibility=Ko.prototype.setTextVisibility; Ko.prototype.isTextVisible=Ko.prototype.isTextVisible;Ko.prototype.destroy=Ko.prototype.destroy;Ko.prototype.append=Ko.prototype.append;Ko.prototype.remove=Ko.prototype.remove;Ko.prototype.configure=Ko.prototype.configure;function Lo(a,b){var c=this;this.m=!1;this.h=[];this.j=a;this.s=b;this.C=this.u=null;this.g=W("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.B=new yf(function(){c.j.paused||Mo(c)});No(this);this.l=new Map;this.i=new Oc;this.i.o(document,"fullscreenchange",function(){Mo(c,!0)});this.i.o(this.j,"seeking",function(){Mo(c,!0)}); this.i.o(this.j,"ratechange",function(){No(c)});this.i.o(this.j,"resize",function(){var d=c.j,e=d.videoWidth;d=d.videoHeight;e&&d?c.u=e/d:c.u=null});this.D=null;"ResizeObserver"in window&&(this.D=new ResizeObserver(function(){Mo(c,!0)}),this.D.observe(this.g));this.F=new Map}p=Lo.prototype;p.configure=function(a){this.C=a;No(this);Mo(this,!0)}; p.append=function(a){var b=[].concat(x(this.h));a=u(Co(a));for(var c=a.next(),d={};!c.done;d={Jg:void 0},c=a.next())d.Jg=c.value,b.some(function(e){return function(f){return Ae(f,e.Jg)}}(d))||this.h.push(d.Jg);this.h.length&&No(this);Mo(this)}; p.destroy=function(){if(!this.g)return Promise.resolve();this.g.parentElement&&this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.B&&(this.B.stop(),this.B=null);this.l.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=b});Mo(this,c>this.h.length);this.h.length||No(this);return!0}; p.isTextVisible=function(){return this.m};p.setTextVisibility=function(a){(this.m=a)?(this.g.parentElement||this.s.appendChild(this.g),Mo(this,!0)):this.g.parentElement&&this.s.removeChild(this.g)};p.setTextLanguage=function(a){a&&"und"!=a?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};p.enableTextDisplayer=function(){};function No(a){a.B&&(a.h.length?a.B.ya((a.C?a.C.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(a.j.playbackRate))):a.B.stop())} function Oo(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1} function Po(a,b,c,d,e){var f=!1,g=[],h=[];b=u(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.l.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Yj:null;l&&(g.push(l.Kg),l.gd&&g.push(l.gd),m||(f=!0,a.l.delete(k),l=null));m&&(h.push(k),l?Oo(a,n)||(f=!0):(Qo(a,k,e),l=a.l.get(k),n=l.Yj,f=!0));0a.u&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==se?(f.width="100%",c.lineAlign==ue?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==ue?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==ue?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%")))); f.lineHeight=c.lineHeight;a=So(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==se?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==se?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==se?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");f.textAlign= c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==se?f.width=c.size+"%":f.height=c.size+"%")} function To(a,b,c,d){d=void 0===d?1:d;var e=(e=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(e[1]),unit:e[2]}:null;if(!e)return a;a=e.unit;d*=e.value;switch(a){case "%":return d/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*d/b.cellResolution.rows+"px";default:return d+a}}function Uo(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",Lo);Lo.prototype.enableTextDisplayer=Lo.prototype.enableTextDisplayer; Lo.prototype.setTextLanguage=Lo.prototype.setTextLanguage;Lo.prototype.setTextVisibility=Lo.prototype.setTextVisibility;Lo.prototype.isTextVisible=Lo.prototype.isTextVisible;Lo.prototype.remove=Lo.prototype.remove;Lo.prototype.destroy=Lo.prototype.destroy;Lo.prototype.append=Lo.prototype.append;Lo.prototype.configure=Lo.prototype.configure;function Vo(a,b){function c(f){for(var g=f,h=u(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.startf?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Bo(a);a="WEBVTT\n\n";d=u(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 pe:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function Wo(a,b){this.h=a;this.g=b;this.i=void 0;this.u=!1;this.F=!0;this.l=this.C=!1;this.s=this.m=void 0;this.B=0;this.G=!1;this.D=new Oc;this.j=null}Wo.prototype.setMediaElement=function(a){this.j=a;Xo(this)};Wo.prototype.configure=function(a){this.g=a};function Yo(a){a.u=!1;a.F=!0;a.C=!1;a.l=!1;a.m=0;a.s=0;a.B=0;a.G=!1;a.j=null;a.D.Sa()}function Zo(a,b){a.l=b;a.l?a.i==$o?a.i=ap:a.i==bp&&(a.i=cp):a.i==ap?a.i=$o:a.i==cp&&(a.i=bp)} function dp(a,b){if(a.g&&a.g.enabled&&a.g.version==ep&&a.j&&a.j.autoplay){var c=a.j.play();c&&c.then(function(){a.B=b}).catch(function(){a.B=0})}} function fp(a,b,c){try{if(!a.g.enabled)return b;var d=gp(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=hp;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=ip;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=jp;break a}e=void 0}d.ot=e;d.su= !0;var f=kp(d);return lp(b,f)}catch(g){return bb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Xo(a){a.D.qa(a.j,"play",function(){a.m||(a.m=Date.now())});a.D.qa(a.j,"playing",function(){a.s||(a.s=Date.now())})}function gp(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.i,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}} function mp(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled)if(a=np(a,c),d)d=op(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var e=kp(a);e&&(b.uris=b.uris.map(function(f){return lp(f,e)}))}}function pp(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b} function qp(a){if(0===a.type)return rp;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?ip:sp;if("audio"==b)return hp;if("text"==b)return"application/mp4"===a.mimeType?tp:up}}function vp(a,b){b=a.h.Pb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN} function wp(a,b){b=a.h.Pb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function xp(a,b){var c=a.h.kb();if(!c.length)return NaN;a=c[0];c=u(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case sp:return a.videoBandwidth||NaN;case hp:return a.audioBandwidth||NaN;default:return a.bandwidth}} function np(a,b){b=void 0===b?{}:b;Object.assign(b,gp(a));b.pr=a.h.Ya();var c=b.ot===sp||b.ot===ip;a.C&&c&&(b.bs=!0,b.su=!0,a.C=!1);null==b.su&&(b.su=a.F);b.v===ep&&(a.h.T()&&(b.ltc=a.h.pf()),c=!a.G&&a.s&&a.m?a.s-(a.B||a.m):void 0,void 0!=c&&(b.msd=c,a.G=!0));return pp(a,b)} function kp(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=u(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"=== l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function op(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3};b=u(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a=c?a*(1-c)+b*c:a};function Rp(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",yp);yp.prototype.getBandwidthEstimate=yp.prototype.getBandwidthEstimate;yp.prototype.getRoundTripTime=yp.prototype.Wk;yp.prototype.getResponseDelay=yp.prototype.Vk;yp.prototype.getEstimatedThroughput=yp.prototype.Oi; yp.prototype.getMaxBitrate=yp.prototype.Pi;var Ap="etp",zp="mb",Bp="rd",Qp="rtt";function Sp(){this.g=null;this.h=[]}function Tp(a,b){return Q(function(c){if(1==c.g)return a.g?F(c,new Promise(function(d){return a.h.push(d)}),2):c.A(2);a.g=b;H(c)})}Sp.prototype.release=function(){0B.end&&(B.end=D.end)}return B};d.sa=new dm(q);d.sa.addEventListener("regionadd", function(A){qq(d,A.region,"metadataadded")});if(m)return F(z,k(function(){return Q(function(A){return F(A,rq(d,c),0)})},"initializeSrcEqualsDrmInner_"),23);d.Ta=new dm(q);return F(z,k(function(){return Q(function(A){if(1==A.g)return F(A,Promise.race([e.na,e.u]),2);d.vc=e.G;var B=e;B.oa=!0;d.G=B.l;d.i=e.hh();H(A)})},"waitForFinish"),15);case 15:if(d.I){z.A(16);break}return F(z,k(function(){return Q(function(A){return F(A,mq(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return d.i&&d.i.textStreams.length&& (d.s.enableTextDisplayer?d.s.enableTextDisplayer():Uc("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),F(z,k(function(){return Q(function(A){return F(A,e.u,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.Ke=e.F;d.G&&d.G.setMediaElement&&d.h&&d.G.setMediaElement(d.h);d.Ee=eo(e);d.De=e.Ma;if(r=e.B)d.N=r;l&&d.h&&"AUDIO"===d.h.nodeName&&(sq(d),d.configure("manifest.disableVideo",!0));if(e.i){z.A(19);break}return F(z,k(function(){return Q(function(A){return F(A, jo(e,d.h),0)})},"drmEngine_.init"),19);case 19:return d.D=fo(e),F(z,k(function(){return Q(function(A){return F(A,d.D.$b(d.h),0)})},"drmEngine_.attach"),21);case 21:return!(t=e.D)||d.Ma&&d.Ma==t||(d.u=co(e),d.Ma=e.D,"function"!=typeof d.u.setMediaElement&&(Uc("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.u.setMediaElement=function(){}),"function"!=typeof d.u.setCmsdManager&&(Uc("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."), d.u.setCmsdManager=function(){}),"function"!=typeof d.u.trySuggestStreams&&(Uc("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.u.trySuggestStreams=function(){})),w=go(e),v=e.J,F(z,k(function(){return Q(function(A){return F(A,tq(d,n,v,w),0)})},"loadInner_"),22);case 22:ao(e);d.tc&&Rb().dg()&&lf(d.tc)&&zk(d.I,d.U,d.tc);z.A(14);break;case 23:return F(z,k(function(){return Q(function(A){return F(A,uq(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(dq("loaded")); case 6:ya(z);if(!e){z.A(25);break}return F(z,e.destroy(),25);case 25:d.Ka=null;Ba(z,0);break;case 5:y=xa(z);if(!y||7E3==y.code){z.A(27);break}return F(z,d.kc(!1),27);case 27:throw y;}})};function sq(a){for(var b=u(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.nm=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return Q(function(e){return 1==e.g?F(e,vq(c),2):3!=e.g?(d=e.h,F(e,c.kc(a,b),3)):e.return(d)})};p.Ji=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return Q(function(e){return 1==e.g?F(e,vq(c,b),2):3!=e.g?(d=e.h,F(e,c.detach(a),3)):e.return(d)})}; function vq(a,b){b=void 0===b?!1:b;var c,d;return Q(function(e){if(1==e.g){c=null;if(!(a.i&&a.G&&a.vc&&a.U&&a.g))return e.A(2);d=a.h.currentTime;a.T()&&!b&&(d=null);return F(e,wq(a,a.U,d,a.tc,a.g,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.Oe.push(c);a.G&&a.G.setMediaElement&&a.G.setMediaElement(null);var f=c,g=a.G,h=a.vc;f.h=a.i;f.l=g;f.G=h;f=c;g=a.Ma;f.j=a.u;f.D=g;c.B=a.N;c.start();a.i=null;a.G=null;a.vc=null;a.u=null;a.Ma=null}return e.return(c)})} p.preload=function(a,b,c,d){b=void 0===b?null:b;var e=this,f,g;return Q(function(h){if(1==h.g)return f=Vp(e),Nn(f,d||e.g,Vp(e)),F(h,pq(e,a,b,c,!1,f),2);(g=h.h)?g.start():lq(e,new V(2,7,7005));return h.return(g)})};p.Ng=function(){var a=this,b,c,d,e;return Q(function(f){b=[];c=u(a.Oe);for(d=c.next();!d.done;d=c.next())e=d.value,e.s||b.push(e.destroy());a.Oe=[];return F(f,Promise.all(b),0)})}; function pq(a,b,c,d,e,f){e=void 0===e?!1:e;var g,h,k,l,m;return Q(function(n){if(1==n.g)return d?n.A(2):F(n,oq(a,b),3);2!=n.g&&(d=n.h);if(g=xq(a,d))return n.return(null);h=f||a.g;k=!1;l=!0;e&&(a.u&&a.Ma==h.abrFactory&&(l=!1),a.h&&"AUDIO"===a.h.nodeName&&(k=!0));m=wq(a,b,c,d||null,h,!e,k,l);m=e?m.then(function(q){q.C=!1;return q}):m.then(function(q){a.Oe.push(q);return q});return n.return(m)})} function wq(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,q,r,t,w,v,y,z,A,B,D,G;return Q(function(C){if(1==C.g){k=null;l=Dd(e);g&&(l.manifest.disableVideo=!0);m=function(){return k.P&&k.s?null:k};n=function(){return m()?m().getConfiguration():a.g};if(Infinity!=a.oa.width||Infinity!=a.oa.height||a.g.ignoreHardwareResolution)return C.A(2);q=Rb();return F(C,q.mc(),3)}2!=C.g&&(r=C.h,a.oa.width=r.width,a.oa.height=r.height);t=new ti(l,a.oa,null);w={networkingEngine:a.H, filter:function(E){var I,K;return Q(function(J){if(1==J.g)return F(J,ui(t,E),2);if(4!=J.g){I=J.h;if(!I)return J.A(0);K=dq("trackschanged");return F(J,Promise.resolve(),4)}k.dispatchEvent(K);H(J)})},makeTextStreamsForClosedCaptions:function(E){return yq(a,E)},onTimelineRegionAdded:function(E){em(k.H,E)},onEvent:function(E){return k.dispatchEvent(E)},onError:function(E){return k.onError(E)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},updateDuration:function(){a.l&&k.P&&a.l.updateDuration()}, newDrmInfo:function(E){var I=k.i,K=I?I.h:null;K&&I.B&&xi(t,K.keySystem,E)},onManifestUpdated:function(){var E=(new Map).set("isLive",a.T());k.dispatchEvent(dq("manifestupdated",E));$n(k,!1,function(){if(a.C)a.C.onManifestUpdated(a.T())})},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},onMetadata:function(E,I,K,J){var L=E;if("com.apple.hls.interstitial"==E&&(L="com.apple.quicktime.HLS",E={startTime:I,endTime:K,values:J},a.C))a.C.onHLSInterstitialMetadata(a,a.h,E);J=u(J);E=J.next(); for(var M={};!E.done;M={Hh:void 0},E=J.next())M.Hh=E.value,"ID"!=M.Hh.name&&$n(k,!1,function(O){return function(){zq(a,I,K,L,O.Hh)}}(M))},disableStream:function(E){return a.disableStream(E,a.g.streaming.maxDisabledTime)},addFont:function(E,I){return a.addFont(E,I)}};v=new dm(function(){return a.xa()});v.addEventListener("regionadd",function(E){var I=E.region;Aq(a,"timelineregionadded",I,k);$n(k,!1,function(){a.C&&(a.C.onDashTimedMetadata(I),a.C.onDASHInterstitialMetadata(a,a.h,I))})});y=null;l.streaming.observeQualityChanges&& (y=new Yl(function(){return a.Pb()}),y.addEventListener("qualitychange",function(E){Bq(a,E.quality,E.position)}),y.addEventListener("audiotrackchange",function(E){Bq(a,E.quality,E.position,!0)}));z=!0;A={uc:a.H,onError:function(E){return k.onError(E)},Kf:function(E){$n(k,!0,function(){if(a.D)a:{var I=E,K=dq("keystatuschanged");a.dispatchEvent(K);var J=Object.keys(I);1==J.length&&""==J[0]&&(J=["00"],I={"00":I[""]});K=1==J.length&&"00"==J[0];var L=!1;if(J.length){J=a.keySystem();for(var M=fh(a.g.drm.clearKeys), O=u(a.i.variants),N=O.next();!N.done;N=O.next()){N=N.value;var P=[];N.audio&&P.push(N.audio);N.video&&P.push(N.video);P=u(P);for(var R=P.next();!R.done;R=P.next()){var T=R.value;R=N.allowedByKeySystem;if(T.keyIds.size)if(T.drmInfos.length&&!M.size){T=u(T.drmInfos);for(var ca=T.next();!ca.done;ca=T.next())if(ca=ca.value,ca.keyIds.size&&ca.keySystem==J){N.allowedByKeySystem=!0;ca=u(ca.keyIds);for(var Y=ca.next();!Y.done;Y=ca.next())if(Y=Y.value,(Y=I[K?"00":Y])||a.D.F)N.allowedByKeySystem=N.allowedByKeySystem&& !!Y&&!zi.includes(Y)}}else for(N.allowedByKeySystem=!0,T=u(T.keyIds),ca=T.next();!ca.done;ca=T.next())if(ca=ca.value,(ca=I[K?"00":ca])||a.D.F)N.allowedByKeySystem=N.allowedByKeySystem&&!!ca&&!zi.includes(ca);R!=N.allowedByKeySystem&&(L=!0)}}}if(L&&(Cq(a),!Dq(a)))break a;(I=a.l.l)&&!I.allowedByKeySystem&&aq(a)}})},onExpirationUpdated:function(E,I){var K=dq("expirationupdated");k.dispatchEvent(K);if((K=k.l)&&K.onExpirationUpdated)K.onExpirationUpdated(E,I)},onEvent:function(E){k.dispatchEvent(E);"drmsessionupdate"== E.type&&z&&(z=!1,E=Date.now()/1E3-k.Ha,(a.B||k.getStats()).m=E,a.P&&$c(a.P))}};B=Xp(a,m);Vg(a.H,B);D=function(){return a.sd(A)};G={config:l,Fl:w,Ql:v,Pl:y,sd:D,El:t,networkingEngine:B,dk:f,ck:h};k=new Zn(b,d,c,G);return C.return(k)})}function oq(a,b){var c,d,e;return Q(function(f){if(1==f.g)return c=a.g.manifest.retryParameters,F(f,to(b,a.H,c),2);d=f.h;"application/x-mpegurl"==d&&(e=Rb(),"WEBKIT"===e.Na()&&(d="application/vnd.apple.mpegurl"));return f.return(d)})} function xq(a,b){if(!Ei(Rb()))return!0;if(b){if(""==(a.h||Fi()).canPlayType(b))return!1;if(!Ei(Rb())||!Ci.has(b))return!0;if(lf(b))return"WEBKIT"===Rb().Na()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls;if("application/dash+xml"===b||"video/vnd.mpeg.dash.mpd"===b)return a.g.streaming.preferNativeDash}return!1} function Eq(a){var b=a.g.textDisplayFactory;b!==a.Se&&(a.s=b(),a.s.configure?a.s.configure(a.g.textDisplayer):Uc("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Se=b,a.s.setTextVisibility(a.na))} function mq(a){var b,c,d;return Q(function(e){if(1==e.g)return Rb(),iq(a,"media-source"),a.g.mediaSource.useSourceElements&&Mj(a.h),Eq(a),b=Fq(a.h,a.s,{Ik:function(){return a.keySystem()},onMetadata:function(f,g,h){f=u(f);for(var k=f.next();!k.done;k=f.next())if(k=k.value,k.data&&"number"==typeof k.cueTime&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=u(k.frames),q=n.next();!q.done;q=n.next())zq(a,l,m,"org.id3",q.value);if(a.C)a.C.onHlsTimedMetadata(k,l)}},Kl:function(f){a.Ta&&em(a.Ta, {schemeIdUri:f.schemeIdUri,startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},Ml:function(){a.G&&a.G.update&&a.G.update()}},a.P,a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Ha=d,F(e,b.J,2);a.I=b;H(e)})} function Gq(a,b,c){function d(){return Hq(a)}a.j.o(b,"playing",d);a.j.o(b,"pause",d);a.j.o(b,"ended",d);a.j.o(b,"ratechange",function(){var f=a.h.playbackRate;0!=f&&(a.J&&(a.J.set(f),a.m==Iq&&a.u.playbackRateChanged(f),Jq(a,f)),f=dq("ratechange"),a.dispatchEvent(f))});b.remote&&(a.j.o(b.remote,"connect",function(){a.l&&"connected"==b.remote.state&&Kq(a);Cq(a)}),a.j.o(b.remote,"connecting",function(){return Cq(a)}),a.j.o(b.remote,"disconnect",function(){return Q(function(f){if(1==f.g)return a.l&&"disconnected"== b.remote.state?F(f,Qm(a.l),3):f.A(2);2!=f.g&&Kq(a);Cq(a);H(f)})}));b.audioTracks&&(a.j.o(b.audioTracks,"addtrack",function(){return Cq(a)}),a.j.o(b.audioTracks,"removetrack",function(){return Cq(a)}),a.j.o(b.audioTracks,"change",function(){return Cq(a)}));b.videoTracks&&(a.j.o(b.videoTracks,"addtrack",function(){return Cq(a)}),a.j.o(b.videoTracks,"removetrack",function(){return Cq(a)}),a.j.o(b.videoTracks,"change",function(){return Cq(a)}));if(b.textTracks){var e=function(){a.m===Lq&&a.s instanceof Go&&Kq(a);Cq(a)};a.j.o(b.textTracks,"addtrack",function(f){if(f.track)switch(f=f.track,f.kind){case "metadata":Mq(a,f);break;case "chapters":Nq(a,f);break;default:e()}});a.j.o(b.textTracks,"removetrack",e);a.j.o(b.textTracks,"change",e);"keep"!==a.g.streaming.crossBoundaryStrategy&&(a.j.o(b,"waiting",function(){a.l&&Um(a.l)}),a.j.o(b,"timeupdate",function(){a.l&&Um(a.l)}))}"none"!=b.preload&&a.j.qa(b,"loadedmetadata",function(){a.B.F=Date.now()/1E3-c})} function tq(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N;return Q(function(P){switch(P.g){case 1:iq(a,"load");e=a.h;a.J=new Ul({qf:function(){return e.playbackRate},Uc:function(){return e.defaultPlaybackRate},Wh:function(R){e.playbackRate=R},gj:function(R){e.currentTime+=R}});Gq(a,e,b);"onchange"in window.screen&&a.j.o(window.screen,"change",function(){if(a.N.getConfiguration){var R=a.N.getConfiguration();"AUTO"==R.Gc?Dq(a):"AUTO"==a.g.preferredVideoHdrLevel&&a.g.abr.enabled&& (R.Gc="AUTO",a.N.configure(R),Dq(a))}});f=!1;g=u(a.i.variants);for(h=g.next();!h.done;h=g.next())k=h.value,(l=k.video&&k.video.dependencyStream)&&(f=ad(l));cq(a,a.g,f);a.Id=a.g.preferredTextLanguage;a.Je=a.g.preferredTextRole;a.Ie=a.g.preferForcedSubs;Oq(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.u.init(function(R,T,ca){a.i&&a.l&&R!=a.l.l&&Pq(a,R,!0,void 0===T?!1:T,void 0===ca?0:ca)});a.u.setMediaElement(e);a.u.setCmsdManager(a.ea);a.l=Qq(a);a.l.configure(a.g.streaming);a.m=Iq; a.dispatchEvent(dq("streaming"));m=c;case 2:(q=a.l.l)||m||(m=Dq(a)?a.u.chooseVariant():null);r=[];n=q||m;t=u([n.video,n.audio]);for(w=t.next();!w.done;w=t.next())(v=w.value)&&!v.segmentIndex&&(r.push(v.createSegmentIndex()),v.dependencyStream&&r.push(v.dependencyStream.createSegmentIndex()));if(!(0E&&(B=E);return F(P,Uq(m,B),9);case 9:I=P.h,y(I);case 8:Pq(a,m,!0,!1,0);case 7:return a.F.ready(),K=a.qc().find(function(R){return R.active}), K||((J=ig(a.i.textStreams,a.Id,a.Je,a.Ie)[0]||null)&&Sn(a.B.h,J,!0),m&&(J?(lg(m.audio,J,a.g)&&(a.na=!0),a.na&&a.s.setTextVisibility(!0)):(a.na=!1,a.s.setTextVisibility(!1)),Vq(a)),J&&(a.g.streaming.alwaysStreamText||a.$c())&&(Om(a.l,J),Wq(a))),F(P,a.l.start(d),10);case 10:a.g.abr.enabled&&(a.u.enable(),Xq(a));Cq(a);Dq(a);a.i.variants.some(function(R){return R.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)M=function(){return Yq(a)},a.j.o(e,"timeupdate",M);L||(O=function(){return Zq(a)},a.j.o(e,"timeupdate",O),Zq(a),a.i.nextUrl&&(0, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'), l.resolve()),a.j.qa(d,"error",function(){l.reject(kq(a))}),F(w,Cf(a.g.streaming.loadTimeout,l),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 Yq(a)},a.j.o(d,"timeupdate",q);n||(r=function(){return Zq(a)},a.j.o(d,"timeupdate",r),Zq(a));a.C&&(a.C.onManifestUpdated(n),n&&(t=a.xa().end,a.j.o(d,"progress",function(){var v=a.xa().end;t!=v&&(a.C.onManifestUpdated(a.T()),t=v)}))); a.Y=!0;H(w)}})}function cr(a){var b=a.g.preferredAudioLanguage;""!=b&&a.xj(b,a.g.preferredVariantRole)}function er(a){var b=a.g.preferredTextLanguage;""!=b&&a.Rh(b,a.g.preferredTextRole,a.g.preferForcedSubs)} function Mq(a,b){if("metadata"==b.kind){b.mode="hidden";a.j.o(b,"cuechange",function(){if(b.activeCues)for(var d=u(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,zq(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value);if(b.cues){d=[];e=u(b.cues);for(var f=e.next(),g={};!f.done;g={Ac:void 0},f=e.next())g.Ac=f.value,"com.apple.quicktime.HLS"==g.Ac.type&&null!=g.Ac.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.Ac.startTime&&k.endTime==h.Ac.endTime}}(g)), f||(f={startTime:g.Ac.startTime,endTime:g.Ac.endTime,values:[]},d.push(f)),f.values.push(g.Ac.value));d=u(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.C&&(e.values.push({key:"CUE",description:"",data:0!=e.startTime||a.T()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.C.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new yf(function(){var d=fr(a);d=u(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ja().X(.5); a.He.push(function(){c.stop()})}}function qq(a,b,c){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(dq(c,b))}function zq(a,b,c,d,e){a.sa&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),em(a.sa,b))}function Nq(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new yf(function(){b.mode="hidden"})).Ja().X(.5);a.He.push(function(){c.stop()})}} p.Ul=function(){for(var a=this.Z;a.g;)a.release()};p.sd=function(a){return new xh(a)}; function Xp(a,b){function c(f){b()?b().dispatchEvent(f):a.dispatchEvent(f)}function d(f){b()?$n(b(),!0,f):f()}b||(b=function(){return null});var e=new Rg(function(f,g,h,k,l){var m=b()?b().j:a.u;m&&m.segmentDownloaded(f,g,h,k,l)},function(f,g,h){g=(new Map).set("headers",f).set("request",g).set("requestType",h);c(dq("downloadheadersreceived",g));d(function(){if(a.ea){var k=a.ea;if(k.h.enabled){var l=f["cmsd-static"];if(l)try{var m=new Map,n=l.split(",");for(l=0;lv);if(z){var A=z.next().value;if(A&&A!=q){if(n&&!ud(q.S(),A.S())){var B=A.S()[0],D=new URL(B),G=new URL(n);if(D.origin!==G.origin)var C=B;else{for(var E=D.pathname.split("/").slice(1),I=G.pathname.split("/").slice(1,-1);E[0]===I[0];)E.shift(),I.shift();for(;I.length;)I.shift(),E.unshift("..");C=E.join("/")}r.nor=C}if((A.startByte|| A.endByte)&&(q.startByte!=A.startByte||q.endByte!=A.endByte)){var K=A.startByte+"-";A.endByte&&(K+=A.endByte);r.nrr=K}}}var J=k.h.Ya()||1,L=wp(k,w.type)||500,M=w.bandwidth;var O=M?M*(q.endTime-q.startTime)/1E3/(L/J/1E3)*k.g.rtpSafetyFactor:NaN;isNaN(O)||(r.rtp=O)}}t&&r.ot!==tp&&(r.tb=xp(k,r.ot)/1E3);mp(k,g,r)}}catch(N){bb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:mp(k,g,{ot:"k"});break;case 4:mp(k,g,{ot:"o"})}})},function(f,g,h,k){(f=b()?b().l:a.G)&& f.banLocation&&f.banLocation(k)},function(f,g){if(g.data){g=g.data.byteLength;var h=b()?b().getStats():a.B;h&&(Xn(h,g),0===f&&(h.aj=g))}});e.configure(a.g.networking);return e}function Rq(a,b){return new Jl(a.h,a.i,a.g.streaming,b,function(){a.eb&&Xl(a.eb,!0);a.l&&a.l.hd();a.O&&gr(a)},function(c){return a.dispatchEvent(c)})} function Sq(a,b){var c=a.T()||"number"===typeof b&&0=e&&0=b)return 1;if(!(a<=this.h.currentTime)&&al(r,m))&&(q=r);q!=m&&(q?(m=Zf(q),k.Nd(m,!0,d||0)):aq(k))}var k=this;c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;f=void 0===f?!1:f;g=void 0===g?"":g;if(this.i&&this.F&&(h(),!this.Da()))return;(function(){if(k.h&&k.h.audioTracks){var l= ig(k.kb(),a,b||"",!1)[0];l&&k.Nd(l)}})()};p.Rh=function(a,b,c){function d(){e.Id=a;e.Je=b||"";e.Ie=c||!1;var f=ig(e.i.textStreams,e.Id,e.Je,e.Ie)[0]||null;f&&f!=e.l.B&&(Sn(e.B.h,f,!1),e.g.streaming.alwaysStreamText||e.$c())&&(Om(e.l,f),Kq(e),Wq(e))}var e=this;c=void 0===c?!1:c;if(this.i&&this.F&&(d(),!this.Da()))return;(function(){var f=ig(e.qc(),a,b||"",c||!1)[0];f&&e.Zf(f)})()}; p.cm=function(a,b,c){function d(){for(var f=null,g=u(e.i.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.audio.label==a){f=h;break}null!=f&&(e.N=e.g.adaptationSetCriteriaFactory(),e.N.configure({language:f.language,role:"",channelCount:0,Gc:"",spatialAudio:!1,videoLayout:"",Qd:"",qd:a,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Sd:"",We:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount}),aq(e,b,c))}var e= this;b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.F&&(d(),!this.Da()))return;(function(){if(e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks),g=null;f=u(f);for(var h=f.next();!h.done;h=f.next())h=h.value,h.label==a&&(g=h);g&&nr(e,g)}})()};p.$c=function(){var a=this.na;return this.s?this.s.isTextVisible():a};p.wk=function(){return this.Za.map(function(a){return $f(a)})}; p.vk=function(a){Uc("getChapters","Please use an getChaptersAsync.");if(!this.Za.length)return[];var b=yc(a);a=this.Za.filter(function(f){return yc(f.language)==b});if(!a.length)return[];var c=[],d=new Set;a=u(a);for(var e=a.next();!e.done;e=a.next())e=e.value,e.segmentIndex&&e.segmentIndex.Gb(function(f){var g=f.S()[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.eh=function(a){var b=this,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(!b.Za.length)return l.return([]);c=yc(a);d=b.Za.filter(function(m){return yc(m.language)==c});if(!d.length)return l.return([]);e=[];f=new Set;g=u(d);h=g.next();case 2:if(h.done){l.A(4);break}k=h.value;if(k.segmentIndex){l.A(5);break}return F(l,k.createSegmentIndex(),5);case 5:k.segmentIndex.Gb(function(m){var n=m.S()[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 ar(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function br(a){return Array.from(a.h.textTracks).find(function(b){return"Shaka Player TextTrack"==b.label})}function fr(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})} p.ze=function(a){a=!!a;this.na!=a&&(this.na=a,this.m==Iq?(this.s.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.l.B||(a=ig(this.i.textStreams,this.Id,this.Je,this.Ie),0=Math.floor(d.end)&&a.rd():Math.floor(c)<=Math.floor(d.start+e)&&a.rd()})} function Hq(a){if(a.B&&a.O){var b=a.B.g,c="playing";a.O.g==si?c="buffering":a.isEnded()?c="ended":a.h.paused&&(c="paused");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(dq("statechanged",c)))}} function Yq(a){var b=a.h.playbackRate,c=a.T();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Ni();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Nc(d,!1):1==e&&b!==a.J.Uc()&&a.rd()}if(c&&(c=a.xa(),Number.isFinite(c.end)&&!(a.h.currentTime1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency, a.R=Math.max(a.R-(g-f)/2,f+d),a.Kb=Date.now());e&&null!==a.R&&(h=a.R+d,k=a.R-d);g=c.end-a.h.currentTime;d=0;a.m==Lq&&(e=a.h.buffered,0h?(b!=l&&a.Nc(l,!1),a.Kb=null):void 0!=k&&m&&g-de)&&a.sgb&&(b+=Math.pow(2,32)),b=b.toString(16);return new V(2,3,3016,c,b,a.h.error.message)}function Oq(a,b,c){0=this.xa().end};S("shaka.Player",X);X.prototype.isEnded=X.prototype.isEnded;X.prototype.isRemotePlayback=X.prototype.Da;X.prototype.addFont=X.prototype.addFont;X.prototype.setVideoContainer=X.prototype.Yh;X.prototype.getFetchedPlaybackInfo=X.prototype.Fk;X.prototype.getManifestParserFactory=X.prototype.Nk; X.prototype.getManifest=X.prototype.hh;X.prototype.retryStreaming=X.prototype.Nh;X.prototype.setMaxHardwareResolution=X.prototype.im;X.prototype.addChaptersTrack=X.prototype.Xe;X.prototype.addThumbnailsTrack=X.prototype.Ye;X.prototype.addTextTrackAsync=X.prototype.Td;X.prototype.getStats=X.prototype.getStats;X.prototype.getBufferedInfo=X.prototype.Pb;X.prototype.getSegmentAvailabilityDuration=X.prototype.rf;X.prototype.getPresentationStartTimeAsDate=X.prototype.jh; X.prototype.getPlayheadTimeAsDate=X.prototype.Rk;X.prototype.setTextTrackVisibility=X.prototype.ze;X.prototype.getChaptersAsync=X.prototype.eh;X.prototype.getChapters=X.prototype.vk;X.prototype.getChaptersTracks=X.prototype.wk;X.prototype.isTextTrackVisible=X.prototype.$c;X.prototype.selectVariantsByLabel=X.prototype.cm;X.prototype.selectTextLanguage=X.prototype.Rh;X.prototype.selectAudioLanguage=X.prototype.xj;X.prototype.getTextLanguages=X.prototype.Yk;X.prototype.getAudioLanguages=X.prototype.pk; X.prototype.getTextLanguagesAndRoles=X.prototype.Zk;X.prototype.getAudioLanguagesAndRoles=X.prototype.qk;X.prototype.getVideoTracks=X.prototype.getVideoTracks;X.prototype.selectVideoTrack=X.prototype.zj;X.prototype.getAudioTracks=X.prototype.getAudioTracks;X.prototype.selectAudioTrack=X.prototype.yj;X.prototype.selectVariantTrack=X.prototype.Nd;X.prototype.selectTextTrack=X.prototype.Zf;X.prototype.getThumbnails=X.prototype.Ri;X.prototype.getAllThumbnails=X.prototype.nk; X.prototype.getImageTracks=X.prototype.gh;X.prototype.getTextTracks=X.prototype.qc;X.prototype.getVariantTracks=X.prototype.kb;X.prototype.cancelTrickPlay=X.prototype.rd;X.prototype.trickPlay=X.prototype.Nc;X.prototype.useTrickPlayTrackIfAvailable=X.prototype.oi;X.prototype.getPlaybackRate=X.prototype.Ya;X.prototype.isBuffering=X.prototype.xf;X.prototype.getKeyStatuses=X.prototype.nf;X.prototype.getActiveSessionsMetadata=X.prototype.dh;X.prototype.getExpiration=X.prototype.be; X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.isFullyLoaded=X.prototype.ul;X.prototype.goToLive=X.prototype.ll;X.prototype.seekRange=X.prototype.xa;X.prototype.isVideoOnly=X.prototype.wh;X.prototype.isAudioOnly=X.prototype.zd;X.prototype.isInProgress=X.prototype.Zc;X.prototype.isLive=X.prototype.T;X.prototype.getQueueManager=X.prototype.kh;X.prototype.getAdManager=X.prototype.mf;X.prototype.getAssetUri=X.prototype.xd; X.prototype.getNetworkingEngine=X.prototype.Hb;X.prototype.getMediaElement=X.prototype.Qk;X.prototype.getManifestType=X.prototype.ih;X.prototype.getLoadMode=X.prototype.Jk;X.prototype.resetConfiguration=X.prototype.sj;X.prototype.getBufferFullness=X.prototype.Ni;X.prototype.getNonDefaultConfiguration=X.prototype.Qi;X.prototype.getConfigurationForLowLatency=X.prototype.zk;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configurationForLowLatency=X.prototype.jk; X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.Ul;X.prototype.destroyAllPreloads=X.prototype.Ng;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.Ji;X.prototype.unloadAndSavePreload=X.prototype.nm;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.rm;X.prototype.unload=X.prototype.kc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.wi;X.prototype.attach=X.prototype.$b; X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:b={};if(!a){k.A(2);break}return F(k,ki(),3);case 3:b=k.h;case 2:return c=Di(),d=Ak(),e=Rb(),F(k,e.mc(),4);case 4:return f=k.h,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=gq,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})};X.isBrowserSupported=hq;X.setQueueManagerFactory=function(a){Zp=a};X.setAdManagerFactory=function(a){Yp=a};X.registerSupportPlugin=fq;X.prototype.destroy=X.prototype.destroy; var eq=0,Up=1,Iq=2,Lq=3;X.LoadMode={DESTROYED:eq,NOT_LOADED:Up,MEDIA_SOURCE:Iq,SRC_EQUALS:Lq};X.version="v4.15.0";var yr=["4","15"];Vc=new function(a){this.g=a;this.i=Wc;this.h=Xc}(new Tc(Number(yr[0]),Number(yr[1])));var gq=new Map,Yp=null,Zp=null;function zr(){this.g=[];this.i=this.m=this.l=this.j=this.h=0}function Ar(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function Br(a,b,c){var d=this;this.g=a;this.h=b;this.m=c;this.i=!1;this.j=this.h.getVolume();this.l=new Oc;this.l.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.l.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=Br.prototype;p.needsSkipUI=function(){return!1};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!0};p.isUsingAnotherMediaElement=function(){return!0};p.getDuration=function(){return this.g.getDuration()}; p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};p.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.h.getAdSkippableState()};p.skip=function(){return this.h.skip()};p.pause=function(){return this.h.pause()}; p.play=function(){return this.h.resume()};p.getVolume=function(){return this.h.getVolume()};p.setVolume=function(a){this.m.volume=a;return this.h.setVolume(a)};p.isMuted=function(){return 0==this.h.getVolume()};p.isLinear=function(){return this.g.isLinear()};p.resize=function(a,b){this.h.resize(a,b)};p.setMuted=function(a){(this.m.muted=a)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()}; p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.getAdId()}; p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return this.g.getMediaUrl()};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",Br);Br.prototype.release=Br.prototype.release;Br.prototype.getPodIndex=Br.prototype.getPodIndex; Br.prototype.getTimeOffset=Br.prototype.getTimeOffset;Br.prototype.getMediaUrl=Br.prototype.getMediaUrl;Br.prototype.getAdvertiserName=Br.prototype.getAdvertiserName;Br.prototype.getCreativeAdId=Br.prototype.getCreativeAdId;Br.prototype.getAdId=Br.prototype.getAdId;Br.prototype.getVastAdId=Br.prototype.getVastAdId;Br.prototype.getVastMediaWidth=Br.prototype.getVastMediaWidth;Br.prototype.getVastMediaHeight=Br.prototype.getVastMediaHeight;Br.prototype.getVastMediaBitrate=Br.prototype.getVastMediaBitrate; Br.prototype.getDescription=Br.prototype.getDescription;Br.prototype.getTitle=Br.prototype.getTitle;Br.prototype.getPositionInSequence=Br.prototype.getPositionInSequence;Br.prototype.getSequenceLength=Br.prototype.getSequenceLength;Br.prototype.setMuted=Br.prototype.setMuted;Br.prototype.resize=Br.prototype.resize;Br.prototype.isLinear=Br.prototype.isLinear;Br.prototype.isMuted=Br.prototype.isMuted;Br.prototype.setVolume=Br.prototype.setVolume;Br.prototype.getVolume=Br.prototype.getVolume; Br.prototype.play=Br.prototype.play;Br.prototype.pause=Br.prototype.pause;Br.prototype.skip=Br.prototype.skip;Br.prototype.canSkipNow=Br.prototype.canSkipNow;Br.prototype.getTimeUntilSkippable=Br.prototype.getTimeUntilSkippable;Br.prototype.isSkippable=Br.prototype.isSkippable;Br.prototype.isPaused=Br.prototype.isPaused;Br.prototype.getRemainingTime=Br.prototype.getRemainingTime;Br.prototype.getMinSuggestedDuration=Br.prototype.getMinSuggestedDuration;Br.prototype.getDuration=Br.prototype.getDuration; Br.prototype.isUsingAnotherMediaElement=Br.prototype.isUsingAnotherMediaElement;Br.prototype.hasCustomClick=Br.prototype.hasCustomClick;Br.prototype.isClientRendering=Br.prototype.isClientRendering;Br.prototype.needsSkipUI=Br.prototype.needsSkipUI;function Cr(){} function Dr(a,b){var c=[];a=u(Od(a,"Ad"));for(var d=a.next();!d.done;d=a.next())if(d=Sd(d.value,"InLine"))if(d=Sd(d,"Creatives")){d=u(Od(d,"Creative"));for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=Sd(e,"Linear");f&&Er(c,b,f);if(e=Sd(e,"NonLinearAds")){e=Od(e,"NonLinear");e=u(e);for(var g=e.next();!g.done;g=e.next())a:{f=c;var h=b,k=g.value,l=Sd(k,"StaticResource");if(l)g=l.attributes.creativeType;else{l=Sd(k,"HTMLResource");if(!l)break a;g="text/html"}if(l=Qd(l)){"text/html"===g&&(l="data:text/html;charset=UTF-8,"+ encodeURIComponent(l));var m=Vd(k,"width",ae)||Vd(k,"expandedWidth",ae),n=Vd(k,"height",ae)||Vd(k,"expandedHeight",ae);if(m||n){var q=null;(k=k.attributes.minSuggestedDuration)&&(q=Cd(k));k=0;null!=h&&(k=h);f.push({id:null,groupId:null,startTime:k,endTime:null,uri:l,mimeType:g,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:q,once:!0,pre:null==h,post:Infinity==h,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:m||0,y:n||0}},displayOnBackground:!1, currentVideo:null,background:null})}}}}}}return c} function Er(a,b,c){var d=0;null!=b&&(d=b);var e=null;c.attributes.skipoffset&&(e=Cd(c.attributes.skipoffset),isNaN(e)&&(e=null));if(c=Sd(c,"MediaFiles")){var f=Od(c,"MediaFile");c=f;f=f.filter(function(h){return"streaming"==h.attributes.delivery});f.length&&(c=f);c=c.sort(function(h,k){return(parseInt(k.attributes.height,10)||0)-(parseInt(h.attributes.height,10)||0)});c=u(c);for(f=c.next();!f.done;f=c.next())if(f=f.value,!f.attributes.apiFramework){var g=Qd(f);if(g){a.push({id:null,groupId:null,startTime:d, endTime:null,uri:g,mimeType:f.attributes.type||null,isSkippable:null!=e,skipOffset:e,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==b,post:Infinity==b,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});break}}}}S("shaka.ads.Utils",Cr);Cr.ADS_LOADED="ads-loaded";Cr.AD_STARTED="ad-started";Cr.AD_FIRST_QUARTILE="ad-first-quartile";Cr.AD_MIDPOINT="ad-midpoint";Cr.AD_THIRD_QUARTILE="ad-third-quartile";Cr.AD_COMPLETE="ad-complete"; Cr.AD_STOPPED="ad-stopped";Cr.AD_SKIPPED="ad-skipped";Cr.AD_VOLUME_CHANGED="ad-volume-changed";Cr.AD_MUTED="ad-muted";Cr.AD_PAUSED="ad-paused";Cr.AD_RESUMED="ad-resumed";Cr.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Cr.CUEPOINTS_CHANGED="ad-cue-points-changed";Cr.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Cr.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Cr.AD_CLICKED="ad-clicked";Cr.AD_PROGRESS="ad-progress";Cr.AD_BUFFERING="ad-buffering";Cr.AD_IMPRESSION="ad-impression"; Cr.AD_DURATION_CHANGED="ad-duration-changed";Cr.AD_CLOSED="ad-closed";Cr.AD_LOADED="ad-loaded";Cr.ALL_ADS_COMPLETED="all-ads-completed";Cr.AD_LINEAR_CHANGED="ad-linear-changed";Cr.AD_METADATA="ad-metadata";Cr.AD_RECOVERABLE_ERROR="ad-recoverable-error";Cr.AD_ERROR="ad-error";Cr.AD_BREAK_READY="ad-break-ready";Cr.AD_INTERACTION="ad-interaction";Cr.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Cr.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Cr.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Fr(a,b,c,d,e){var f=this;this.u=a;this.i=b;this.F=!1;this.B=this.s=null;this.G=NaN;this.l=e;this.j=null;this.h=new Oc;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.D=new google.ima.AdDisplayContainer(this.u,this.i);this.D.initialize();this.m=new google.ima.AdsLoader(this.D);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.15.0");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.m, google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Gr(f,g)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Hr(f,g)});this.h.o(this.i,"ended",function(){f.m.contentComplete()});this.h.qa(this.i,"play",function(){f.F=!0})}Fr.prototype.configure=function(a){this.s=a};Fr.prototype.stop=function(){this.g&&this.g.stop();this.u&&Oj(this.u)}; Fr.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.D.destroy()};function Hr(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new U("ad-error",b));Ir(a,null);a.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))} function Gr(a,b){a.l(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.C);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.C);a.l(new U("ima-ad-manager-loaded",(new Map).set("imaAdManager", a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=u(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Jr(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight),a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),"ResizeObserver"in window?(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth, a.i.offsetHeight)}),a.F||a.s.skipPlayDetection?a.g.start():a.h.qa(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){Ir(a,null)}} function Jr(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new U(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Hr(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Kr(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Kr(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE, function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Ir(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Ir(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")}); a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")}); a.h.o(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g, google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})} function Kr(a,b){var c=b.getAd();c?(a.j=new Br(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.s.supportsMultipleMediaElements||a.l(new U("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new U("ad-started",b)),a.j.isLinear()&&(a.u.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.j=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):ab("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")} function Ir(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.s.supportsMultipleMediaElements&&a.l(new U("ad-content-resume-requested"));a.l(new U("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.u.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function Lr(a,b,c,d,e,f){this.g=a;this.i=b;this.j=(this.h=b.isSkippable)?b.skipOffset||0:b.skipOffset;this.l=b.skipFor;this.B=c;this.s=d;this.m=e;this.u=f;this.C=b.overlay}p=Lr.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!1};p.isUsingAnotherMediaElement=function(){return this.u};p.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};p.getMinSuggestedDuration=function(){return this.getDuration()}; p.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};p.isPaused=function(){return this.g.paused};p.isSkippable=function(){return this.h&&null!=this.l?this.getDuration()-this.getRemainingTime()=r&&(!e.D.has(n)&&Rr(n)&&e.D.set(n,e.j.preload(n.uri,null,n.mimeType||void 0)),Sr(e,n));v.A(4);break}if(!e.D.has(n)){v.A(7);break}return F(v,e.D.get(n),8);case 8:(t=v.h)&&t.destroy(),e.D.delete(n);case 7:Tr(e,n),w=JSON.stringify(n),e.R.has(w)&&e.R.delete(w),e.H.delete(n),Ur(e),n.overlay||(g=!0);case 4:m=l.next();v.A(3);break;case 5:g&&Vr(e),H(v)}})})}p=Nr.prototype;p.configure=function(a){this.L=a;Wr(this)}; function Xr(a){if(!a.$&&a.H.size){a.I.o(a.g,"playing",a.U);a.I.o(a.g,"timeupdate",a.U);a.I.o(a.g,"seeked",a.ea);a.I.o(a.g,"ended",a.Y);if("requestVideoFrameCallback"in a.g&&!Yr()){var b=a.g,c=function(){-1!=a.O&&(a.Y(),-1!=a.O&&(a.O=b.requestVideoFrameCallback(c)))};a.O=b.requestVideoFrameCallback(c)}else a.P.ya(.025);a.N&&a.N.ya(1);a.$=!0}} function Ur(a){a.$&&!a.H.size&&(a.I.Ca(a.g,"playing",a.U),a.I.Ca(a.g,"timeupdate",a.U),a.I.Ca(a.g,"seeked",a.ea),a.I.Ca(a.g,"ended",a.Y),-1!=a.O&&(a.g.cancelVideoFrameCallback(a.O),a.O=-1),a.P&&a.P.stop(),a.N&&a.N.stop(),a.$=!1)} function Wr(a){if(a.B&&a.L&&!a.J){var b=a.L.supportsMultipleMediaElements,c=a.g;c.webkitSupportsFullscreen&&c.webkitDisplayingFullscreen&&(b=!1);a.C==b&&(a.C=!b,a.C?(a.h=a.g,a.F&&(a.F.parentElement&&a.B.removeChild(a.F),a.F=null)):(a.F||(b=document.createElement(a.g.tagName),b.autoplay=!0,b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.display="none",b.setAttribute("playsinline",""),a.F=b),a.h=a.F))}} p.stop=function(){this.l&&this.l.Sa();this.R.clear();this.H.clear();this.j.Ng();if(this.D.size){var a=Array.from(this.D.values());a=u(a);for(var b=a.next();!b.done;b=a.next())(b=b.value)&&b.then(function(c){c&&c.destroy()})}this.D.clear();if(this.K.size)for(a=Array.from(this.K.keys()),a=u(a),b=a.next();!b.done;b=a.next())Tr(this,b.value);this.K.clear();this.j.detach();this.J=!1;this.u=this.m=null;this.C=!0;this.h=this.g;this.F=null;Zr(this);Ur(this);this.B&&Oj(this.B);this.s&&(this.s.stop(),this.s= null)};p.release=function(){this.stop();this.I&&this.I.release();this.l&&this.l.release();this.P&&(this.P.stop(),this.P=null);this.N&&(this.N.stop(),this.N=null);this.j.destroy()};p.Rb=function(){return this.j};function $r(a,b){var c;Q(function(d){if(1==d.g)return Or(a),F(d,as(a,b),2);c=d.h;c.length?bs(a,c):ab("Unsupported HLS interstitial",b);H(d)})} function cs(a,b){var c=Sd(b.eventNode,"OverlayEvent"),d=c.attributes.uri,e=c.attributes.mimeType,f="true"==c.attributes.loop,g=Vd(c,"z",ae);if(d&&0!=g){var h=null,k=Sd(c,"Background");if(k){var l=k.attributes.uri;l?h="center / contain no-repeat url('"+l+"')":h=Qd(k)}k=1920;l=1080;var m=Sd(c,"Viewport");if(m){k=Vd(m,"x",ae);if(null==k)return;l=Vd(m,"y",ae);if(null==l)return}var n={viewport:{x:k,y:l},topLeft:{x:0,y:0},size:{x:k,y:l}},q=Sd(c,"Overlay");if(m&&q){var r=Sd(q,"TopLeft"),t=Sd(q,"Size");if(r&& t){q=Vd(r,"x",ae);if(null==q)return;r=Vd(r,"y",ae);if(null==r)return;var w=Vd(t,"x",ae);if(null==w)return;t=Vd(t,"y",ae);if(null==t)return;n.topLeft.x=q;n.topLeft.y=r;n.size.x=w;n.size.y=t}}q=null;c=Sd(c,"Squeeze");if(m&&c&&(t=Sd(c,"TopLeft"),c=Sd(c,"Size"),t&&c)){m=Vd(t,"x",ae);if(null==m)return;q=Vd(t,"y",ae);if(null==q)return;t=Vd(c,"x",ae);if(null==t)return;c=Vd(c,"y",ae);if(null==c)return;q={viewport:{x:k,y:l},topLeft:{x:m,y:q},size:{x:t,y:c}}}bs(a,[{id:b.id,groupId:null,startTime:b.startTime, endTime:b.endTime,uri:d,mimeType:e,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:f,overlay:n,displayOnBackground:-1==g,currentVideo:q,background:h}])}} p.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return c={type:12},F(n,ds(b,a,c),2);case 2:d=n.h;e=Gd(d,"VAST,vmap:VMAP");if(!e)throw new V(2,10,10007);f=[];if("VAST"==e.tagName){f=Dr(e,b.m);n.A(3);break}if("vmap:VMAP"!=e.tagName){n.A(3);break}for(var q=[],r=u(Od(e,"vmap:AdBreak")),t=r.next();!t.done;t=r.next()){var w=t.value,v=w.attributes.timeOffset;v&&(t=null,"start"==v?t=0:"end"==v?t=Infinity:t=Cd(v),(w=Sd(w,"vmap:AdSource"))&&(w=Sd(w,"vmap:AdTagURI"))&& (w=Pd(w))&&q.push({time:t,uri:w}))}g=u(q);h=g.next();case 5:if(h.done){n.A(3);break}k=h.value;return F(n,ds(b,k.uri,c),8);case 8:l=n.h;m=Gd(l,"VAST");if(!m)throw new V(2,10,10007);f.push.apply(f,x(Dr(m,k.time)));h=g.next();n.A(5);break;case 3:bs(b,f),H(n)}})}; function bs(a,b){var c,d,e,f,g,h,k,l;Q(function(m){switch(m.g){case 1:c=!1,d=u(b),e=d.next();case 2:if(e.done){m.A(4);break}f=e.value;if(!f.uri){ab("Missing URL in interstitial",f);m.A(3);break}if(f.mimeType){m.A(5);break}ta(m,6);g=a.j.Hb();return F(m,to(f.uri,g,a.G.getConfiguration().streaming.retryParameters),8);case 8:f.mimeType=m.h;wa(m,5);break;case 6:xa(m);case 5:h=f.id||JSON.stringify(f);if(a.R.has(h)){m.A(3);break}f.loop&&!f.overlay&&ab("Loop is only supported in overlay interstitials",f); f.overlay||(c=!0);a.R.add(h);a.H.add(f);k=!1;f.pre&&null==a.m?k=!0:0!=f.startTime||f.canJump?null!=a.m&&(l=f.startTime-a.m,0=l&&(k=!0)):k=!0;k&&(!a.D.has(f)&&Rr(f)&&a.D.set(f,a.j.preload(f.uri,null,f.mimeType||void 0)),Sr(a,f));case 3:e=d.next();m.A(2);break;case 4:c&&Vr(a),Xr(a),H(m)}})} function Pr(a,b,c){b=void 0===b?!1:b;c=void 0===c?null:c;var d=0,e=null;if(a.H.size&&null!=a.m){var f=a.g.ended,g=Array.from(a.H).sort(function(n,q){return q.startTime-n.startTime}),h=g;h=b?g.filter(function(n){return n.pre}):f?g.filter(function(n){return n.post}):g.filter(function(n){return!n.pre&&!n.post});g=u(h);for(h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;if(b)k=h.pre;else if(f)k=h.post;else if(!h.pre&&!h.post){var l=a.m-Math.round(1E3*h.startTime)/1E3,m=1;a.L.allowStartInMiddleOfInterstitial&& h.endTime&&Infinity!=h.endTime&&(m=h.endTime-h.startTime);0=h.startTime?!1:!0)}k&&(!a.u||h.startTime>=a.u.startTime)&&(d==(c||0)?e=h:e&&!h.canJump&&.001Math.abs(g.startTime-b.startTime)}).length);b.once&&(f++,a.H.delete(b),Ur(a),b.overlay||Vr(a));b.mimeType&&(b.mimeType.startsWith("image/")||"text/html"===b.mimeType)?b.overlay?es(a,b,c,d,f):ab("Unsupported interstitial",b):a.C&&b.overlay?ab("Unsupported interstitial",b):fs(a,b,c,d,e,f)} function es(a,b,c,d,e){function f(){a.s&&(a.s.stop(),a.s=null);a.B.removeChild(k);Zr(a,b);a.i(new U("ad-stopped"));a.l.Sa();var q=Pr(a,b.pre,d-e);q?Qr(a,q,c,++d,Date.now(),e):a.J=!1}a.J=!0;var g=b.overlay,h="text/html"==b.mimeType?"iframe":"img",k=document.createElement(h);k.style.objectFit="contain";k.style.position="absolute";k.style.border="none";gs(a,b);a.i(new U("ad-started",(new Map).set("ad",new Mr(b,c,d))));"iframe"==h?k.src=b.uri:(k.src=b.uri,k.onerror=function(q){a.i(new U("ad-error",(new Map).set("originalEvent", q)));f()});var l=g.viewport,m=g.topLeft;g=g.size;0==l.x&&0==l.y?(k.width=b.overlay.size.x,k.height=b.overlay.size.y,k.style.bottom="10%",k.style.left="0",k.style.right="0",k.style.width="100%",b.overlay.size.y||"iframe"!=h||(k.style.height="auto")):(k.style.height=g.y/l.y*100+"%",k.style.left=m.x/l.x*100+"%",k.style.top=m.y/l.y*100+"%",k.style.width=g.x/l.x*100+"%");a.B.appendChild(k);var n=Date.now();a.s&&a.s.stop();a.s=new yf(function(){b.playoutLimit&&(Date.now()-n)/1E3>b.playoutLimit?(a.i(new U("ad-complete")), f()):b.endTime&&a.g.currentTime>b.endTime?(a.i(new U("ad-complete")),f()):a.g.currentTimeb.endTime)a.s&&a.s.stop(),a.i(new U("ad-skipped")),f()})} function fs(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I;Q(function(K){switch(K.g){case 1:g=Date.now();a.J=!0;if(!a.C||1!=d){K.A(2);break}a.i(new U("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new Hg;k=function(J){return Q(function(L){if(1==L.g)return"detach"!=J.state?L.A(0):Yr()?F(L,new Promise(function(M){return(new yf(M)).X(.1)}),3):L.A(3);h.resolve();a.l.Ca(a.G,"onstatechange",k);H(L)})};a.l.o(a.G,"onstatechange",k);return F(K,h,2);case 2:return gs(a,b),a.C|| (a.h.style.display="",b.overlay?(a.h.loop=b.loop,l=b.overlay.viewport,m=b.overlay.topLeft,n=b.overlay.size,a.h.style.height=n.y/l.y*100+"%",a.h.style.left=m.x/l.x*100+"%",a.h.style.top=m.y/l.y*100+"%",a.h.style.width=n.x/l.x*100+"%"):(a.g.pause(),null!=b.resumeOffset&&0!=b.resumeOffset&&(a.g.currentTime+=b.resumeOffset),a.h.loop=!1,a.h.style.height="100%",a.h.style.left="0",a.h.style.top="0",a.h.style.width="100%")),q=!1,r=function(){if(!a.C&&!b.overlay&&null==b.resumeOffset)if(b.timelineRange&&b.endTime&& Infinity!=b.endTime)a.g.currentTime!=b.endTime&&(a.g.currentTime=b.endTime);else{var J=Date.now();a.g.currentTime+=(J-e)/1E3;e=J}},t=function(J){var L,M;return Q(function(O){if(1==O.g){r();L=Pr(a,b.pre,d-f);if(J&&b.groupId)for(;L&&L.groupId==b.groupId;)d++,L=Pr(a,b.pre,d-f);a.s&&(!b.groupId||L&&L.groupId!=b.groupId)&&(a.s.stop(),a.s=null);Zr(a,b);if(L&&!L.overlay)return O.A(2);b.post&&(a.m=null,a.u=null);return a.C?F(O,a.j.detach(),4):F(O,a.j.kc(),4)}2!=O.g&&(a.C&&(M=b.resumeOffset,null==M&&(M=b.timelineRange&& b.endTime&&Infinity!=b.endTime?b.endTime-(a.m||0):(Date.now()-e)/1E3),a.i(new U("ad-content-resume-requested",(new Map).set("offset",M)))),a.i(new U("ad-stopped")),a.l.Sa(),a.J=!1,a.C?Vr(a):(a.h.style.display="none",r(),a.g.ended||a.g.play()));Wr(a);L&&(a.i(new U("ad-stopped")),a.l.Sa(),Qr(a,L,c,++d,e,f));H(O)})},w=function(J){return Q(function(L){if(q)return L.return();q=!0;a.i(new U("ad-error",(new Map).set("originalEvent",J)));return F(L,t(!1),0)})},v=function(){return Q(function(J){if(1==J.g){if(q)return J.return(); q=!0;return F(J,t(!1),2)}a.i(new U("ad-complete"));H(J)})},a.Z=function(){return Q(function(J){if(q)return J.return();q=!0;a.i(new U("ad-skipped"));return F(J,t(!0),0)})},y=new Lr(a.h,b,a.Z,c,d,!a.C),a.C||(y.setMuted(a.g.muted),y.setVolume(a.g.volume)),a.i(new U("ad-started",(new Map).set("ad",y))),(z=y.canSkipNow())&&a.i(new U("ad-skip-state-changed")),a.l.qa(a.j,"error",w),a.l.o(a.h,"timeupdate",function(){if(a.h.duration){var J=y.canSkipNow();z!=J&&0=J.playRangeEnd?v():a.i(new U("ad-paused"))}),a.l.o(a.h,"volumechange",function(){a.h.muted?a.i(new U("ad-muted")):a.i(new U("ad-volume-changed"))}), ta(K,4),Or(a),b.startTime&&b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(A=b.endTime-b.startTime,0b.endTime)&&a.Z()}));wa(K,0);break;case 4:I=xa(K);if(!a.J)return K.return();w(I);H(K)}})} function gs(a,b){b.displayOnBackground&&(a.g.style.zIndex="1");if(null!=b.currentVideo){var c=b.currentVideo;a.g.style.transformOrigin="top left";var d=!0,e=[],f=c.topLeft.x/c.viewport.x*100;0=f&&(e.push("translateX("+f+"%)"),d=!1);f=c.topLeft.y/c.viewport.y*100;0=f&&(e.push("translateY("+f+"%)"),d=!1);f=c.size.x/c.viewport.x;1>f&&e.push("scaleX("+f+")");c=c.size.y/c.viewport.y;1>f&&e.push("scaleY("+c+")");e.length&&(a.g.style.transform=e.join(" "));d&&(a.g.style.transition="transform 250ms")}a.B&& (a.B.style.pointerEvents="none",b.background&&(a.B.style.background=b.background));a.F&&(a.F.style.background=b.overlay?"":"rgb(0, 0, 0)")}function Zr(a,b){if(!b||b.displayOnBackground)a.g.style.zIndex="";b&&null==b.currentVideo||(a.g.style.transformOrigin="",a.g.style.transition="",a.g.style.transform="");a.B&&(a.B.style.pointerEvents="",!b||b.background)&&(a.B.style.background="");a.F&&(a.F.style.background="")} function as(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N,P,R,T,ca,Y,Ma,Na,Ea,va,Ka,Pa,za;return Q(function(ia){switch(ia.g){case 1:c=[];if(!b)return ia.return(c);d=b.values.find(function(Aa){return"X-ASSET-URI"==Aa.key});e=b.values.find(function(Aa){return"X-ASSET-LIST"==Aa.key});if(!d&&!e)return ia.return(c);f=null;if(g=b.values.find(function(Aa){return"ID"==Aa.key}))f=g.data;h=null==f?Math.floor(10*b.startTime)/10:b.startTime;(k=b.endTime)&&Infinity!=b.endTime&&"number"== typeof b.endTime&&(k=null==f?Math.floor(10*b.endTime)/10:b.endTime);l=b.values.find(function(Aa){return"X-RESTRICT"==Aa.key});n=m=!0;l&&l.data&&(q=l.data,m=!q.includes("SKIP"),n=!q.includes("JUMP"));r=m?0:null;if(t=b.values.find(function(Aa){return"X-ENABLE-SKIP-AFTER"==Aa.key}))w=t.data,r=parseFloat(w),isNaN(r)&&(r=m?0:null);v=null;if(y=b.values.find(function(Aa){return"X-ENABLE-SKIP-FOR"==Aa.key}))z=y.data,v=parseFloat(z),isNaN(r)&&(v=null);A=null;if(B=b.values.find(function(Aa){return"X-RESUME-OFFSET"== Aa.key}))D=B.data,A=parseFloat(D),isNaN(A)&&(A=null);G=null;if(C=b.values.find(function(Aa){return"X-PLAYOUT-LIMIT"==Aa.key}))E=C.data,G=parseFloat(E),isNaN(G)&&(G=null);J=K=I=!1;if(L=b.values.find(function(Aa){return"CUE"==Aa.key}))M=L.data,I=M.includes("ONCE"),K=M.includes("PRE"),J=M.includes("POST");O=!1;(N=b.values.find(function(Aa){return"X-TIMELINE-OCCUPIES"==Aa.key}))?(P=N.data,O=P.includes("RANGE")):!B&&a.G.T()&&(O=!K&&!J);if(d){R=d.data;if(!R)return ia.return(c);c.push({id:f,groupId:null, startTime:h,endTime:k,uri:R,mimeType:null,isSkippable:m,skipOffset:r,skipFor:v,canJump:n,resumeOffset:A,playoutLimit:G,once:I,pre:K,post:J,timelineRange:O,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});ia.A(2);break}if(!e){ia.A(2);break}T=e.data;if(!T)return ia.return(c);ta(ia,4);ca={type:11};return F(ia,ds(a,T,ca),6);case 6:Y=ia.h;Ma=Wb(Y);Na=JSON.parse(Ma);if(Ea=Na["SKIP-CONTROL"])va=Ea["ENABLE-SKIP-AFTER"],"number"==typeof va&&(r=parseFloat(va),isNaN(va)&&(r=m? 0:null)),Ka=Ea["ENABLE-SKIP-FOR"],"number"==typeof Ka&&(v=parseFloat(Ka),isNaN(Ka)&&(v=null));for(Pa=0;Pad.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.L.includes(d.adId)&&(a.B=b,a.h.currentTime=c.startTimeInSeconds)}} function ps(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.D,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.u.includes("firstQuartile")?(a.u.push("firstQuartile"),rs(a,"firstQuartile")):b>=e&&!a.u.includes("midpoint")?(a.u.push("midpoint"),rs(a,"midpoint")):b>=f&&!a.u.includes("thirdQuartile")&&(a.u.push("thirdQuartile"),rs(a,"thirdQuartile"));d=a.g.getRemainingTime(); e=a.g.getDuration();a.g.canSkipNow()&&0=d||d>e)&&js(a)}if(!a.g||!a.g.isLinear()){a:for(d=u(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;fb){if(a.L.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}js(a);a.K=e;a.g=new hs(g,f+1,e.ads.length,!0,a.h);a.D=g;0===f&&rs(a,"breakStart");ss(a);break}}}if(!a.g)for(d= u(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;fb&&(a.h.currentTime=a.B),a.B=null)}}} function js(a){if(a.g){for(;a.C.lastChild;)a.C.removeChild(a.C.firstChild);a.I||a.L.push(a.D.adId);var b=a.g.m;(void 0===b?0:b)?rs(a,"skip"):rs(a,"complete");b=u(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.s.Ca(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&rs(a,"breakEnd");a.g=null;a.D=null;a.K=null}} function ss(a){var b=!1;a.h.paused?b=!0:(rs(a,"impression"),rs(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&rs(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||rs(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(rs(a,"impression"),rs(a,"start"),b=!1):rs(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){rs(a,"pause")}});for(var c=u(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.s.o(d.target, d.type,d.listener)} function rs(a,b){var c=a.D.trackingEvents.find(function(f){return f.eventType==b});c||(c=a.K.adBreakTrackingEvents.find(function(f){return f.eventType==b}));if(c){var d={type:10};c=u(c.beaconUrls);for(var e=c.next();!e.done;e=c.next())(e=e.value)&&""!=e&&(e=Wg([e],Fg()),e.method="POST",a.J.request(7,e,d))}switch(b){case "impression":a.i(new U("ad-impression"));break;case "start":a.i(new U("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new U("ad-muted"));break;case "unmute":a.i(new U("ad-volume-changed"));break; case "resume":a.i(new U("ad-resumed"));break;case "pause":a.i(new U("ad-paused"));break;case "firstQuartile":a.i(new U("ad-first-quartile"));break;case "midpoint":a.i(new U("ad-midpoint"));break;case "thirdQuartile":a.i(new U("ad-third-quartile"));break;case "complete":a.i(new U("ad-complete"));a.i(new U("ad-stopped"));break;case "skip":a.i(new U("ad-skipped"));a.i(new U("ad-stopped"));break;case "breakStart":a.C.setAttribute("ad-active","true");break;case "breakEnd":a.C.removeAttribute("ad-active"); break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function ts(a,b){this.g=a;this.i=null;this.h=b}p=ts.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!1};p.hasCustomClick=function(){return!0};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return this.i?this.i.duration:-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};p.isPaused=function(){return this.h.paused};p.isSkippable=function(){return this.g.isSkippable()}; p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};p.skip=function(){this.h.currentTime+=this.getRemainingTime()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.play()};p.getVolume=function(){return this.h.volume};p.setVolume=function(a){this.h.volume=a};p.isMuted=function(){return this.h.muted};p.isLinear=function(){return!0};p.resize=function(){}; p.setMuted=function(a){this.h.muted=a};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()}; p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.getAdId()};p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",ts); ts.prototype.release=ts.prototype.release;ts.prototype.getPodIndex=ts.prototype.getPodIndex;ts.prototype.getTimeOffset=ts.prototype.getTimeOffset;ts.prototype.getMediaUrl=ts.prototype.getMediaUrl;ts.prototype.getAdvertiserName=ts.prototype.getAdvertiserName;ts.prototype.getCreativeAdId=ts.prototype.getCreativeAdId;ts.prototype.getAdId=ts.prototype.getAdId;ts.prototype.getVastAdId=ts.prototype.getVastAdId;ts.prototype.getVastMediaWidth=ts.prototype.getVastMediaWidth; ts.prototype.getVastMediaHeight=ts.prototype.getVastMediaHeight;ts.prototype.getVastMediaBitrate=ts.prototype.getVastMediaBitrate;ts.prototype.getDescription=ts.prototype.getDescription;ts.prototype.getTitle=ts.prototype.getTitle;ts.prototype.getPositionInSequence=ts.prototype.getPositionInSequence;ts.prototype.getSequenceLength=ts.prototype.getSequenceLength;ts.prototype.setMuted=ts.prototype.setMuted;ts.prototype.resize=ts.prototype.resize;ts.prototype.isLinear=ts.prototype.isLinear; ts.prototype.isMuted=ts.prototype.isMuted;ts.prototype.setVolume=ts.prototype.setVolume;ts.prototype.getVolume=ts.prototype.getVolume;ts.prototype.play=ts.prototype.play;ts.prototype.pause=ts.prototype.pause;ts.prototype.skip=ts.prototype.skip;ts.prototype.canSkipNow=ts.prototype.canSkipNow;ts.prototype.getTimeUntilSkippable=ts.prototype.getTimeUntilSkippable;ts.prototype.isSkippable=ts.prototype.isSkippable;ts.prototype.isPaused=ts.prototype.isPaused;ts.prototype.getRemainingTime=ts.prototype.getRemainingTime; ts.prototype.getMinSuggestedDuration=ts.prototype.getMinSuggestedDuration;ts.prototype.getDuration=ts.prototype.getDuration;ts.prototype.isUsingAnotherMediaElement=ts.prototype.isUsingAnotherMediaElement;ts.prototype.hasCustomClick=ts.prototype.hasCustomClick;ts.prototype.isClientRendering=ts.prototype.isClientRendering;ts.prototype.needsSkipUI=ts.prototype.needsSkipUI;function us(a,b,c,d){var e=this;this.u=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.B=this.m=this.s=null;this.C="";this.D=[];this.h=new Oc;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.u,a);this.i(new U("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){vs(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.C.length? e.j.resolve(e.C):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new ts(f,e.l);e.B&&(e.m.i=e.B);e.i(new U("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active"); var f=e.l.currentTime;e.s&&e.s>f&&(e.l.currentTime=e.s,e.s=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.B=f.getStreamData().adProgressData;e.m&&(e.m.i=e.B)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new U("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new U("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new U("ad-third-quartile"))}); this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new U("ad-complete"));e.i(new U("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new U("ad-skipped"));e.i(new U("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=u(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.D= f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}p=us.prototype;p.configure=function(){};p.stop=function(){this.C="";this.s=null;this.D=[]};p.release=function(){this.stop();this.h&&this.h.release()};p.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};p.getCuePoints=function(){return this.D}; function vs(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.s=c,a.l.currentTime=d.start)}})};function ws(){jb.call(this);this.h=this.i=this.j=this.g=null;this.m=new zr;this.s=navigator.language;this.l=null}pa(ws,jb);p=ws.prototype;p.setLocale=function(a){this.s=a};p.configure=function(a){this.l=a;this.g&&this.g.configure(this.l);this.j&&this.j.configure(this.l);this.h&&this.h.configure(this.l)};p.initInterstitial=function(a,b,c){var d=this;this.g&&this.g.release();this.g=new Nr(a,b,c,function(e){return xs(d,e)});this.g.configure(this.l)}; p.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new V(2,10,1E4);this.j&&this.j.release();this.j=new Fr(a,b,this.s,c,function(e){return xs(d,e)});this.j.configure(this.l)};p.release=function(){this.g&&(this.g.release(),this.g=null);this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);jb.prototype.release.call(this)}; p.onAssetUnload=function(){this.g&&this.g.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.dispatchEvent(new U("ad-stopped"));this.dispatchEvent(new U("ad-content-attach-requested"));this.m=new zr};p.requestClientSideAds=function(a){if(!this.j)throw new V(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.G=Date.now()/1E3;b.m.requestAds(a)}; p.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new V(1,10,10001);var b=this.j;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new is(a,b,c,function(e){return xs(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new V(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new V(1,10,10004)):(d.l=new Hg,ls(d,a,b),d.H=c||"",d.O=Date.now()/1E3,a=d.l);return a}; p.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new V(1,10,10005);var b=this.i;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new V(2,10,10002);this.h&&this.h.release();this.h=new us(a,b,this.s,function(d){return xs(c,d)});this.h.configure(this.l)}; p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.h)throw new V(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.15.0";c=this.h;c.j?a=Promise.reject(new V(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&& (c.G=!0),c.j=new Hg,c.g.requestStream(a),c.C=b||"",c.F=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.h)throw new V(1,10,10003);(a.mpt||a.mpv)&&ab('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.');a.mpt="Shaka Player";a.mpv="v4.15.0";this.h.g.replaceAdTagParameters(a)}; p.getServerSideCuePoints=function(){Uc("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};p.getCuePoints=function(){var a=[];this.h&&(a=a.concat(this.h.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};p.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:Ar(a),started:a.h,overlayAds:a.j,playedCompletely:a.l,skipped:a.m,errors:a.i}};p.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)}; p.onDashTimedMetadata=function(a){this.h&&"urn:google:dai:2018"==a.schemeIdUri&&this.h.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};p.onHlsTimedMetadata=function(a,b){this.h&&this.h.g.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.h)this.h.onCueMetadataChange(a)};p.onHLSInterstitialMetadata=function(a,b,c){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,a,b),this.g&&$r(this.g,c))}; p.onDASHInterstitialMetadata=function(a,b,c){if(!this.l||!this.l.disableDASHInterstitial){var d=c.schemeIdUri;if("urn:mpeg:dash:event:alternativeMPD:insert:2025"==d||"urn:mpeg:dash:event:alternativeMPD:replace:2025"==d){if(this.g||this.initInterstitial(null,a,b),this.g&&(a=this.g,b="urn:mpeg:dash:event:alternativeMPD:replace:2025"==c.schemeIdUri,d="urn:mpeg:dash:event:alternativeMPD:insert:2025"==c.schemeIdUri,b||d)){for(var e=c.startTime,f=c.endTime,g=null,h=0,k,l=u(c.eventNode.children),m=l.next();!m.done;m= l.next())if(m=m.value,"AlternativeMPD"==m.tagName){if(m=m.attributes.uri){k=m;break}}else if("InsertPresentation"==m.tagName||"ReplacePresentation"==m.tagName){var n=m.attributes.url;if(n){k=n;(l=Vd(m,"maxDuration",ae))&&(g=l/c.timescale);(l=Vd(m,"returnOffset",ae))&&(h=l/c.timescale);b&&h&&(f=e+h);break}}k&&bs(a,[{id:c.id,groupId:null,startTime:e,endTime:f,uri:k,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:d?h:null,playoutLimit:g,once:!1,pre:!1,post:!1,timelineRange:b&& !d,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}])}}else("urn:mpeg:dash:event:2012"==d||"urn:scte:dash:scte214-events"==d)&&c.eventNode&&Sd(c.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,a,b),this.g&&cs(this.g,c))}};p.addCustomInterstitial=function(a){if(!this.g)throw new V(1,10,10006);bs(this.g,[a])};p.addAdUrlInterstitial=function(a){if(!this.g)throw new V(1,10,10006);return this.g.addAdUrlInterstitial(a)}; p.getInterstitialPlayer=function(){if(!this.g)throw new V(1,10,10006);return this.g.Rb()};function xs(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;var c=b.ad;c&&!c.isLinear()&&a.m.j++;break;case "ad-complete":a.m.l++;break;case "ad-skipped":a.m.m++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}S("shaka.ads.AdManager",ws);ws.prototype.getInterstitialPlayer=ws.prototype.getInterstitialPlayer;ws.prototype.addAdUrlInterstitial=ws.prototype.addAdUrlInterstitial; ws.prototype.addCustomInterstitial=ws.prototype.addCustomInterstitial;ws.prototype.onDASHInterstitialMetadata=ws.prototype.onDASHInterstitialMetadata;ws.prototype.onHLSInterstitialMetadata=ws.prototype.onHLSInterstitialMetadata;ws.prototype.onCueMetadataChange=ws.prototype.onCueMetadataChange;ws.prototype.onHlsTimedMetadata=ws.prototype.onHlsTimedMetadata;ws.prototype.onDashTimedMetadata=ws.prototype.onDashTimedMetadata;ws.prototype.onManifestUpdated=ws.prototype.onManifestUpdated; ws.prototype.getStats=ws.prototype.getStats;ws.prototype.getCuePoints=ws.prototype.getCuePoints;ws.prototype.getServerSideCuePoints=ws.prototype.getServerSideCuePoints;ws.prototype.replaceServerSideAdTagParameters=ws.prototype.replaceServerSideAdTagParameters;ws.prototype.requestServerSideStream=ws.prototype.requestServerSideStream;ws.prototype.initServerSide=ws.prototype.initServerSide;ws.prototype.addMediaTailorTrackingUrl=ws.prototype.addMediaTailorTrackingUrl; ws.prototype.requestMediaTailorStream=ws.prototype.requestMediaTailorStream;ws.prototype.initMediaTailor=ws.prototype.initMediaTailor;ws.prototype.updateClientSideAdsRenderingSettings=ws.prototype.updateClientSideAdsRenderingSettings;ws.prototype.requestClientSideAds=ws.prototype.requestClientSideAds;ws.prototype.onAssetUnload=ws.prototype.onAssetUnload;ws.prototype.release=ws.prototype.release;ws.prototype.initClientSide=ws.prototype.initClientSide;ws.prototype.initInterstitial=ws.prototype.initInterstitial; ws.prototype.configure=ws.prototype.configure;ws.prototype.setLocale=ws.prototype.setLocale;ws.ADS_LOADED="ads-loaded";ws.AD_STARTED="ad-started";ws.AD_FIRST_QUARTILE="ad-first-quartile";ws.AD_MIDPOINT="ad-midpoint";ws.AD_THIRD_QUARTILE="ad-third-quartile";ws.AD_COMPLETE="ad-complete";ws.AD_STOPPED="ad-stopped";ws.AD_SKIPPED="ad-skipped";ws.AD_VOLUME_CHANGED="ad-volume-changed";ws.AD_MUTED="ad-muted";ws.AD_PAUSED="ad-paused";ws.AD_RESUMED="ad-resumed";ws.AD_SKIP_STATE_CHANGED="ad-skip-state-changed"; ws.CUEPOINTS_CHANGED="ad-cue-points-changed";ws.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";ws.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";ws.AD_CLICKED="ad-clicked";ws.AD_PROGRESS="ad-progress";ws.AD_BUFFERING="ad-buffering";ws.AD_IMPRESSION="ad-impression";ws.AD_DURATION_CHANGED="ad-duration-changed";ws.AD_CLOSED="ad-closed";ws.AD_LOADED="ad-loaded";ws.ALL_ADS_COMPLETED="all-ads-completed";ws.AD_LINEAR_CHANGED="ad-linear-changed";ws.AD_METADATA="ad-metadata"; ws.AD_RECOVERABLE_ERROR="ad-recoverable-error";ws.AD_ERROR="ad-error";ws.AD_BREAK_READY="ad-break-ready";ws.AD_INTERACTION="ad-interaction";ws.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";ws.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";ws.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";Yp=function(){return new ws};function ys(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof U){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);d=u(Object.getOwnPropertyNames(c));for(b=d.next();!b.done;b=d.next())e.add(b.value);d={};e=u(e);for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=c[b];c={__type__:"Error",contents:d}}else if(c instanceof TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=u(Hj(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=ArrayBuffer.isView(c)&&1===c.BYTES_PER_ELEMENT?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})} function zs(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=As(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})} function As(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}} var Bs="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Cs="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Ds=["loop","playbackRate"],Es=["pause","play"],Fs=(new Map).set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages", 4).set("getTextLanguagesAndRoles",4).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("isVideoOnly",10).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1),Gs=(new Map).set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("getStats",5).set("getAudioTracks",2).set("getChaptersTracks",2).set("getImageTracks",2).set("getVideoTracks",2).set("getTextTracks", 2).set("getVariantTracks",2),Hs=(new Map).set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),Is=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],Js=[["isTextTrackVisible","setTextTrackVisibility"]],Ks="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "), Ls="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function Ms(a,b,c,d,e,f,g){var h=this;this.G=a;this.J=g;this.l=new yf(b);this.K=c;this.u=!1;this.B=d;this.F=e;this.L=f;this.i=this.m=!1;this.I="";this.s=null;this.C=function(){return Ns(h)};this.D=function(k,l){k=zs(l);switch(k.type){case "event":var m=k.targetName,n=Xa(k.event);h.B(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.u&&(h.K(),h.u=!1);break;case "asyncComplete":if(q=k.id,n=k.error,l=k.res,k=h.h.get(q),h.h.delete(q),k)if(n){q=new V(n.severity, n.category,n.code);for(m in n)q[m]=n[m];k.reject(q)}else k.resolve(l)}};this.g={video:{},player:{}};this.H=0;this.h=new Map;this.j=null;Os.add(this)}p=Ms.prototype;p.destroy=function(){Os.delete(this);Ps(this);Qs&&Rs(this);this.l&&(this.l.stop(),this.l=null);this.F=this.B=null;this.i=this.m=!1;this.D=this.C=this.j=this.h=this.g=this.s=null;return Promise.resolve()};p.Pa=function(){return this.i};p.Sf=function(){return this.I}; p.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Ja();var a=new chrome.cast.SessionRequest(this.G,[],null,this.J,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=u(Os),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Hg;d.u=!0;Ss(d,e)}},function(b){for(var c=u(Os),d=c.next();!d.done;d=c.next())d=d.value,Ts="available"==b,d.l.Ja()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Ts&&this.l.X(Us);(a=Qs)&& a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Hg,this.u=!0,Ss(this,a)):Qs=null}else window.__onGCastApiAvailable!==Vs&&(Ws=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Vs)};p.Sh=function(a){this.s=a;this.i&&Xs(this,{type:"appData",appData:this.s})}; p.cast=function(){var a=this;return Q(function(b){if(!a.m)throw new V(1,8,8E3);if(!Ts)throw new V(1,8,8001);if(a.i)throw new V(1,8,8002);a.j=new Hg;chrome.cast.requestSession(function(c){return Ss(a,c)},function(c){return Ys(a,c)});return F(b,a.j,0)})};function Zs(a){a.i&&chrome.cast.requestSession(function(b){return Ss(a,b)},function(b){return Ys(a,b)})}p.wd=function(){if(this.i){Ps(this);if(Qs){Rs(this);try{Qs.stop(function(){},function(){})}catch(a){}Qs=null}Ns(this)}}; p.get=function(a,b){var c=this;if("video"==a){if(Es.includes(b))return function(){return c.pj.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))}}else if("player"==a){if(Hs.has(b)&&!this.get("player","isLive")())return function(){};if(Ks.includes(b))return function(){return c.pj.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))};if(Ls.includes(b))return function(){return c.Vl.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))};if(Fs.has(b)||Gs.has(b))return function(){return c.g[a][b]}}return this.g[a][b]}; p.set=function(a,b,c){this.g[a][b]=c;Xs(this,{type:"set",targetName:a,property:b,value:c})};function Ss(a,b){var c=a.L();Qs=b;b.addUpdateListener(a.C);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);Ns(a);Xs(a,{type:"init",initState:c,appData:a.s});a.j.resolve()}function Ys(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new V(2,8,c,b))} p.pj=function(a,b){Xs(this,{type:"call",targetName:a,methodName:b,args:Ja.apply(2,arguments)})};p.Vl=function(a,b){var c=Ja.apply(2,arguments),d=new Hg,e=this.H.toString();this.H++;this.h.set(e,d);try{Xs(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Rs(a){var b=Qs;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)} function Ns(a){var b=Qs?"connected"==Qs.status:!1;if(a.i&&!b){a.F();for(var c in a.g)a.g[c]={};Ps(a)}a.i=b;a.I=b?Qs.receiver.friendlyName:"";a.l.Ja()}function Ps(a){if(a.h)for(var b=u(a.h.keys()),c=b.next();!c.done;c=b.next()){c=c.value;var d=a.h.get(c);a.h.delete(c);d.reject(new V(1,7,7E3))}} function Xs(a,b){b=ys(b);var c=Qs;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},db)}catch(d){throw b=new V(2,8,8005,d),c=new U("error",(new Map).set("detail",b)),a.B("player",c),a.wd(),b;}}var Us=.02,Ts=!1,Qs=null,Ws=null,Os=new Set;function Vs(a){Ws?window.__onGCastApiAvailable=Ws:delete window.__onGCastApiAvailable;Ws=null;if(a)for(var b=u(Os),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function $s(a,b,c,d){d=void 0===d?!1:d;jb.call(this);var e=this;this.i=a;this.h=b;this.l=this.s=this.m=this.u=this.j=null;this.H=c;this.G=d;this.D=[];this.C=[];this.B=[];this.F=new Map;this.g=null;window.chrome?(this.g=new Ms(c,function(){return at(e)},function(){return bt(e)},function(f,g){return ct(e,f,g)},function(){return dt(e)},function(){return et(e)},d),ft(this)):(this.j=this.i,this.u=this.h)}pa($s,jb);p=$s.prototype; p.destroy=function(a){this.g&&(void 0===a?0:a)&&this.g.wd();this.l&&(this.l.release(),this.l=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.j=this.i=null;jb.prototype.release.call(this);return Promise.all(a)};p.Fc=function(){return this.j};p.Rb=function(){return this.u};p.Cg=function(){return this.g?this.g.m&&Ts:!1};p.Pa=function(){return this.g?this.g.Pa():!1};p.Sf=function(){return this.g?this.g.Sf():""}; p.cast=function(){var a=this;return Q(function(b){return 1==b.g?a.g?F(b,a.g.cast(),2):b.return():a.h?F(b,a.h.kc(),0):b.return()})};p.Sh=function(a){this.g&&this.g.Sh(a)};p.Nj=function(){this.g&&Zs(this.g)};p.wd=function(){this.g&&this.g.wd()}; p.Di=function(a,b){b=void 0===b?!1:b;var c=this;return Q(function(d){if(1==d.g){if(a==c.H&&b==c.G)return d.return();c.H=a;c.G=b;if(!c.g)return d.return();c.g.wd();return F(d,c.g.destroy(),2)}c.g=null;c.g=new Ms(a,function(){return at(c)},function(){return bt(c)},function(e,f){return ct(c,e,f)},function(){return dt(c)},function(){return et(c)},b);c.g.init();H(d)})}; function ft(a){a.g.init();a.l=new Oc;for(var b=u(Bs),c=b.next();!c.done;c=b.next())a.l.o(a.i,c.value,function(f){a.g.Pa()||(f=Xa(f),a.m.dispatchEvent(f))});for(var d in Ya)a.l.o(a.h,Ya[d],function(f){a.g.Pa()||a.s.dispatchEvent(f)});a.j={};b={};for(var e in a.i)b={me:b.me},b.me=e,Object.defineProperty(a.j,b.me,{configurable:!1,enumerable:!0,get:function(f){return function(){return gt(a,f.me)}}(b),set:function(f){return function(g){var h=f.me;a.g.Pa()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.u={};ht(a, function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return it(a,f)}})});jt(a);a.m=new jb;a.m.Pe=a.j;a.s=new jb;a.s.Pe=a.u;a.l.o(a.h,"unloading",function(){a.g&&a.g.Pa()||kt(a)})}function jt(a){var b=new Map;ht(a,function(c,d){b.has(d)?(d=b.get(d),c.length=e)return null;for(var f=-1,g=-1,h=0;hc||127c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;eb;b++)a.i.push(bu())}function bu(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function cu(a,b){du(a)&&(a.i[a.h][a.g]=new It(b,a.D,a.B,a.u,a.C),a.g++)}function du(a){var b=a.gc;c++,b++)a.i[b]=a.i[c];for(c=0;1>c;c++,b++)a.i[b]=bu()} function fu(a,b,c){var d=new ne(a.j,b,"");d.textAlign=0===a.F?"left":1===a.F?"right":pe;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.L;e.height=a.s;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.K;e.viewportAnchorUnits=a.J?pd: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=Ft(d,"svc"+c,a.i,a.j,b))a.j=b;return c}$t.prototype.display=function(){this.l=!0};function gu(){this.i=[];this.h=null;this.g=0}function hu(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0this.h.length)throw new V(2,2,3E3);this.g+=a}; iu.prototype.uj=function(a){if(0>this.g-a)throw new V(2,2,3E3);this.g-=a};function ku(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null} function lu(a,b,c,d){if(!a.g)return[];if(24==c)return c=ju(b).value,d=ju(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),cu(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!du(b)||0>=b.g&&0>=b.h||(0>=b.g?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=fu(b,d,a.i));b.h+1>=b.s?eu(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=fu(b,d,a.i));b.i[b.h]=bu();b.g=0;break;case 12:b.isVisible()&& (e=fu(b,d,a.i)),au(b),b.h=0,b.g=0}return e?[e]:[]} function mu(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=ju(b).value;b=[];c=u(nu(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=fu(e,d,a.i);f&&b.push(f)}au(e)}return b}if(137===c)for(b=ju(b).value,b=u(nu(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(138===c){c=ju(b).value;b=null;c=u(nu(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=fu(e,d,a.i)),e.l=!1;return b? [b]:[]}if(139===c){c=ju(b).value;b=null;c=u(nu(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=fu(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(140===c)return b=ju(b).value,ou(a,b,d);if(143===c)return d=ou(a,255,d),pu(a),d;if(144===c)b.skip(1),d=ju(b).value,a.g&&(a.g.B=0<(d&128),a.g.D=0<(d&64));else if(145===c)d=ju(b).value,c=ju(b).value,b.skip(1),a.g&&(b=qu((c&48)>>4,(c&12)>>2,c&3),a.g.C=qu((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(146===c)d=ju(b).value,b=ju(b).value,a.g&&(a= a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),b.skip(1),d=ju(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];e||(f=new $t(c,a.i),f.j=d,a.h[c]=f);d=ju(b).value;f=ju(b).value;var g=ju(b).value,h=ju(b).value,k=ju(b).value;b=ju(b).value;e&&0===(b&7)||(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=0<(d&32);b.K=f&127;b.H=g;b.G=(h&240)>>4;b.J=0<(f&128);b.s=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]} function nu(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function ou(a,b,c){var d=[];b=u(nu(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=fu(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function pu(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function qu(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return ru[a<<2|b<<1|c]} var su=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"]]),ru="black blue green cyan red magenta yellow white".split(" ");function tu(){this.h=[];this.g=[];this.i=new gu;this.l=0;this.m=new Map([["CC1",new Ut(0,0)],["CC2",new Ut(0,1)],["CC3",new Ut(1,0)],["CC4",new Ut(1,1)]]);this.u=this.s=0;this.j=new Map;this.C=!0;this.B=new Set;uu(this)}tu.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;uu(this);a=u(this.j.values());for(var b=a.next();!b.done;b=a.next())pu(b.value)}; function uu(a){a.s=0;a.u=0;for(var b=u(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,Kt(c.i),Kt(c.j),Kt(c.s);a.C=!0} tu.prototype.extract=function(a,b){if(this.C){for(var c=u(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.C=!1}a=new hh(a,0);if(!(8>a.getLength())&&181===a.aa()&&49===a.Fa()&&1195456820===a.W()&&3===a.aa()&&(c=a.aa(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d>2,g=a.aa(),h=a.aa();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Eb:g,lc: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})))}}; tu.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=u(this.h),d=c.next();!d.done;d=c.next())(d=vu(this,d.value))&&b.push(d);c=u(this.g);for(d=c.next();!d.done;d=c.next())hu(this.i,d.value);c=u(this.i.i);for(d=c.next();!d.done;d=c.next())d=wu(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b}; function vu(a,b){var c=b.type;if(16===(b.Eb&112)){var d=b.Eb>>3&1;0===c?a.s=d:a.u=d}d="CC"+((c<<1|(c?a.u:a.s))+1);c=a.m.get(d);if(255===b.Eb&&255===b.lc||!b.Eb&&!b.lc||!xu(b.Eb)||!xu(b.lc))return 45<=++a.l&&uu(a),null;a.l=0;b.Eb&=127;b.lc&=127;var e=b.Eb;if(1<=e&&15>=e||!b.Eb&&!b.lc)return null;e=null;if(16===(b.Eb&112))a:{a.B.add(d),d=b.Eb;a=b.lc;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];d="white";e=!1;var f= null;var g=95=g?d=Zt[Math.floor(g/2)]:15>=g?e=!0:f=Math.floor((g-16)/2);a=1===(a&1);4!==c.h&&(g=c.g,3===c.h&&b!==g.g&&(c=1+b-g.h,Tt(g,c,1+g.g-g.h,g.h),Nt(g,0,c-1),Nt(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.u=f,g.s="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Ot(c.g,0,32),d=!1,b=Zt[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Yt[(a& 14)>>1]),c.g.s=b;else if(17===(d&247)&&48===(a&240))Ot(c.g,1,a);else if(18===(d&246)&&32===(a&224))Ot(c.g,d&1?3:2,a);else{if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.lc){case 32:Wt(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Vt(c,2,a);break;case 38:d=Vt(c,3,a);break;case 39:d=Vt(c,4,a);break;case 40:Ot(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Kt(c.s);Xt(c);break;case 43:Xt(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=Lt(b,c.l,a));Nt(b,0,15);break;case 45:b= c.g;3!==c.h?d=null:(d=Lt(b,c.l,a),e=b.g-b.h+1,Tt(b,e-1,e,b.h),Nt(b,0,e-1),Nt(b,b.g,15-b.g),c.l=a);break;case 46:Nt(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=Lt(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Wt(c),c.l=a,d=b}e=d;break a}(23==d||31==d)&&33<=a&&35>=a&&(c.g.B=a-32)}e=null}else a=b.lc,Ot(c.g,0,b.Eb),Ot(c.g,0,a);return e} function wu(a,b){var c=[];try{for(;b.Oa();){var d=ju(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=ju(b).value&63);if(0!=e){a.B.add("svc"+e);a.j.has(e)||a.j.set(e,new ku(e));for(var g=a.j.get(e),h=b.Ua();b.Ua()-h=m)var r=lu(e,k,m,n);else if(128<=m&&159>=m)r=mu(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m& 255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&(127===k?cu(e.g,"\u266a"):cu(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&cu(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(su.has(k)){var t=su.get(k);cu(e.g,t)}else cu(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?cu(e.g,"_"):cu(e.g,"[CC]"));r=[]}c.push.apply(c,x(r))}}}}catch(w){if(w instanceof V&&3E3===w.code)bb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data."); else throw w;}return c}function xu(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}tu.prototype.getStreams=function(){return Array.from(this.B)};S("shaka.cea.CeaDecoder",tu);kd=function(){return new tu};function yu(a){for(var b=[],c=a,d=a=0;d>1&63;r=39==r||40==r;break;case Fu:h=2;b.skip(1);r=q>>1&63;r=23==r||24==r;break;default:return}if(r)for(q=0,lc.byteLength){c=[];break a}var f=Kb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Iu(a){a=hc(Pd(a));a=Hu(a).filter(function(b){return b.type===Ju})[0];if(!a)return null;a=Xb(a.value,!0);return(a=Hd(a,"WRMHEADER"))?a:null} function Ku(a){try{var b=Iu(a);if(b)a:{for(var c=u(Rd(b,"DATA")),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.children)for(var f=u(e.children),g=f.next();!g.done;g=f.next()){var h=g.value;if("LA_URL"==h.tagName){var k=Pd(h);break a}}}k=""}else k="";return k}catch(l){return""}}var Ju=1;function Lu(a,b,c){var d=Mu(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1"+a+"");return Ku(a)}return""} function Ou(a,b,c,d,e){var f=[];c=u(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Ld];if(h){var k;if((k=Td(g.node,"urn:microsoft:playready","pro"))&&Pd(k)){k=Pd(k);k=hc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:wh(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Ld){l=g;var m=e;if(0==m.size)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2, 172,227,60,30,82,226,251,75]),q=new Uint8Array([]);l=[{initData:wh(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=mc(h,b,g.init||a||k||l);if(h=Ru.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Mu(a){var b=[];a=u(a);for(var c=a.next();!c.done;c=a.next())(c=Su(c.value))&&b.push(c);return b} function Su(a){var b=a.attributes.schemeIdUri,c=Wd(a,"urn:mpeg:cenc:2013","default_KID"),d=Ud(a,"urn:mpeg:cenc:2013","pssh").map(Qd),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new V(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:hc(g),keyId:null}})}catch(g){throw new V(2,4,4007);}return{node:a,Ld:b,keyId:c,init:0v)if(r){r=Vd(r,"t",ce);if(null== r)break;else if(t>=r)break;v=Math.ceil((r-t)/w)-1}else{if(Infinity==a)break;else if(t/f>=a)break;v=Math.ceil((a*f-t)/w)-1}0>>31;q&=2147483647;var t=g.reader.W();g.reader.skip(4);if(1==r)throw new V(2,3,3006);h.push(new zj(l/k+c,(l+t)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=t;a+=q}g.parser.stop();return h};function bv(a){this.h=Ob(a);this.g=new hh(this.h,0)}bv.prototype.Oa=function(){return this.g.Oa()}; function cv(a){var b=dv(a);if(7=c&&(c=v.timeline+1)}-1==k&&(k=c);r=new Dv(n,a.M.originalId,a.bandwidth,a.M.jb,a.Nb,t,w,m,g,a.M.Yf,k)}n.timeline&&"image"!==a.ua.contentType&&"text"!==a.ua.contentType&&a.presentationTimeline.kj(r.h?r.h.timeline:[],t);d&&a.pc&&(d.segmentIndex=r);d=(d=(d=n.timeline)&&d[d.length-1])?d.end+n.fc:-1;l=-1;r instanceof Dv&&(l=r.hf());return{endTime:d,timeline:l,Tc:function(){r instanceof Dv&&0==r.getNumReferences()&&Cv(r,n,t,w,m);return Promise.resolve(r)}, timescale:n.timescale}}function xv(a){return a.Kc}function zv(a){var b=Uu(a,xv),c=Vu(a,xv,"media"),d=Vu(a,xv,"index"),e=Vu(a,xv,"k"),f=0;e&&(f=parseInt(e,10));return{gg:b.gg,ob:b.ob,timescale:b.timescale,Ae:b.Ae,fc:b.fc,mi:b.mi,timeline:b.timeline,Ic:c&&cc(c),je:d,mimeType:a.M.mimeType,codecs:a.M.codecs,bandwidth:a.bandwidth,Jl:f}} function Av(a){var b=a.je?1:0;b+=a.timeline?1:0;b+=a.ob?1:0;if(0==b)throw new V(2,4,4002);1!=b&&(a.je&&(a.timeline=null),a.gg=null,a.ob=null);if(!a.je&&!a.Ic)throw new V(2,4,4002);} function Bv(a,b,c,d,e,f,g,h){function k(L){var M=L-v,O=M*w,N=b.gg,P=M*N;"BigInt"in window&&P>Number.MAX_SAFE_INTEGER&&(P=BigInt(M)*BigInt(N));O+=q;M=O+w;N=Math.min(M,m());var R=[],T=b.Jl;if(T)for(var ca=(N-O)/T,Y={},Ma=0;Mam()&&!O.length?null:O})}return Promise.resolve(K)} function yv(a,b){var c=a.M.vf;c||(c=Vu(a,xv,"initialization"));if(!c)return null;c=cc(c);var d=a.M.originalId,e=a.bandwidth||null,f=a.M.jb,g=a.Nb;b=new xj(function(){var h=Tu(c,d,null,null,e,null);return lc(f(),[h],g())},0,null,kv(a),null,null,b,a.ua.encrypted);b.codecs=a.M.codecs;b.mimeType=a.M.mimeType;a.va&&(b.g=a.va.start+a.va.duration);return b} function Dv(a,b,c,d,e,f,g,h,k,l,m){Ol.call(this,[]);this.h=a;this.F=b;this.C=c;this.D=d;this.H=e;this.j=f;this.l=g;this.u=h;this.B=k;this.G=l;this.I=m;Ev(this)}pa(Dv,Ol);p=Dv.prototype;p.getNumReferences=function(){return this.h?this.h.timeline.length:0};p.release=function(){Ol.prototype.release.call(this);this.h=null}; p.hb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}}; function Cv(a,b,c,d,e){Fv(a,e);if(a.h){c=a.h.timeline;a.h.Ic!==b.Ic&&(a.h.Ic=b.Ic);if(c.length){var f=c[c.length-1];b=b.timeline.filter(function(g){return g.end>f.end})}else b=b.timeline.slice();0=a.l||0>=d.end||b.push(d);a.h.timeline=b;a.hb(a.j)}} p.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a=this.l)return null;for(var c=b.length-1,d=0;d=f&&aa||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.bm,f=d.ni+this.h.mi;c=this.j-this.h.fc;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=.1h&&a.j.delete(f);d=d.filter(function(k){for(var l=u(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new qb(k.location)).Fb))return!1;return!0});d.length&&(a.C=d[0].Gh);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=u(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=u(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:lc(a.i,d)};function Nv(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.u=this.s=!1;this.m=new Set}p=Nv.prototype;p.release=function(){for(var a=u(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.u=this.s=!1;this.m.clear()};p.il=function(){return this.l};p.lh=function(){return this.j.slice()};p.Gk=function(){return this.i}; p.Ii=function(a,b){if(a){if("audio"==a.type)for(var c=u(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=u(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==rc)for(c=u(this.j),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("image"==a.type)for(c=u(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 Ov(a,b){var c=[],d=[],e=[],f=[];a=u(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Pv(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Qv(n),n]})),l=new Map(h.textStreams.map(function(n){return[Rv(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Sv(n),n]}));if(b){var m=Tv(rc);l.set(Rv(m),m);m=Tv("image");h.set(Sv(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{xi:c,Wj:d,Rj:e,Vi:f}} p.Gg=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N,P,R,T,ca;return Q(function(Y){if(1==Y.g){e=uc;if(!b&&1==a.length)return f=Ov(a,!1),g=f.xi,h=f.Wj,k=f.Rj,l=f.Vi,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()),Y.A(2);m=c?d.m.size:0;n=-1;for(q=0;q=d?h.push(new Set(c[k].values())):h.push(new Set);l=u(b);m=l.next();case 2:if(m.done){J.A(4);break}n=m.value;return F(J,aw(a,n,c,d,f,h,g),5);case 5:q=J.h;if(!q)throw new V(2,4,4037);m=l.next();J.A(2);break;case 4:r=u(h);for(t=r.next();!t.done;t=r.next())for(w=t.value,v=u(w),y=v.next();!y.done;y=v.next())z=y.value,(A=bw(a,z,c,e,f,h))&&b.push(A);B=u(h);for(D=B.next();!D.done;D= B.next())for(G=D.value,C=u(G),E=C.next(),I={};!E.done;I={$h:void 0},E=C.next())if(I.$h=E.value,!cw(I.$h)&&(K=b.some(function(L){return function(M){return dw(a,L.$h,M)}}(I))))throw new V(2,4,4037);return J.return(b)}})}function aw(a,b,c,d,e,f,g){return Q(function(h){if(1==h.g)return ew(a,c,b,0d)return!0;if(ed.length)return!0;if(e.lengthd)return!0;if(ed.length)return!0;if(e.lengtha){if(c<=a||c-ab-a)return sw}else{if(c>a)return sw;if(a-ca-b)return sw}return uw}function tw(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return av&&w>t&&a.L++;null==w&&(w=t);if(!(null!==a.N&&null!==r&&null!==q&&q< a.N)||a.F.includes(r)||l+1==d.length){null!==q&&(null===a.N||q>a.N)&&(a.N=q);k=Uw(a,b,c,{start:q,duration:w,node:m,Yi:null==w||!n});h.push(k);b.za.id&&w&&a.oa.set(b.za.id,w);if(null==w){k=null;break}k=q+w}}if(e)for(b=u(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.F.includes(c)||a.F.push(c);else a.F=h.map(function(y){return y.id});return null!=f?{periods:h,duration:f+g,Ki:!1}:{periods:h,duration:k,Ki:!0}} function Nw(a){var b=Array.from(a.D.keys()).filter(function(h){return!a.F.includes(h)});b=u(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=!0,e=u(a.D.get(c)),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.s.get(f);g&&(g.segmentIndex&&0!=g.segmentIndex.getNumReferences()?d=!1:(a.m&&a.m.Ii(g,c),a.s.delete(f)))}d&&a.D.delete(c)}}function Ow(a,b){b=new Set(b.map(function(e){return e.id}));for(var c=u(a.C.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.has(d)||a.C.delete(d)} function Uw(a,b,c,d){b.za=Vw(a,d.node,null,c);b.va=d;b.za.wb=b.wb;b.za.id||(b.za.id="__shaka_period_"+d.start);var e=Od(d.node,"EventStream");c=b.presentationTimeline.Jb();e=u(e);for(var f=e.next();!f.done;f=e.next())Ww(a,d.start,d.duration,f.value,c);c=Od(d.node,"SupplementalProperty");c=u(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri&&(e=Xw(a,e)))b.Nb=e;c=Od(d.node,"AdaptationSet").map(function(r,t){return Yw(a,b,t,r)}).filter(Bf);if(b.pc){e= [];f=u(c);for(var g=f.next();!g.done;g=f.next()){g=u(g.value.Xl);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=u(c);for(g=f.next();!g.done;g=f.next())for(g=u(g.value.lk),h=g.next();!h.done;h=g.next()){var k=u(h.value);h=k.next().value;k=k.next().value;e.set(h,k)}if(e.size)for(f=null,g=u(c),h=g.next();!h.done;h=g.next()){h=h.value;k=[];for(var l=u(h.streams),m=l.next(),n={};!m.done;n={ai:void 0},m=l.next())if(n.ai=m.value,e.has(n.ai.originalId)){f|| (f=Od(d.node,"AdaptationSet").map(function(r,t){return Yw(a,b,t,r)}).filter(Bf));m=u(f);for(var q=m.next();!q.done;q=m.next())if(q=q.value.streams.find(function(r){return function(t){return t.originalId==r.ai.originalId}}(n)))q.dependencyStream=e.get(q.originalId),q.originalId+=q.dependencyStream.originalId,k.push(q)}k.length&&h.streams.push.apply(h.streams,x(k))}d=c.filter(function(r){return!r.li});c=c.filter(function(r){return r.li});if(!a.g.disableIFrames)for(c=u(c),e=c.next();!e.done;e=c.next())for(e= e.value,f=e.li.split(" "),g=u(d),h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id))for(h=u(h.streams),k=h.next();!k.done;k=h.next())kg(k.value,e.streams);c=Zw(a.g.disableAudio,d,"audio");e=Zw(a.g.disableVideo,d,"video");f=Zw(a.g.disableText,d,rc);d=Zw(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new V(2,4,4004);return{id:b.za.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}} function Zw(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])} function Yw(a,b,c,d){function e(L){var M=L.attributes["dvb:fontFamily"];L=L.attributes["dvb:url"];M&&L&&(L=lc(b.ua.jb(),[L],b.Nb()),a.j.addFont(M,L[0]))}function f(L){switch(L){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(L){switch(L){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ua=Vw(a,d,b.za,null);b.ua.position=c;var h=!1;c=Od(d,"Role");var k=c.map(function(L){return L.attributes.value}).filter(Bf), l=void 0,m=b.ua.contentType==rc;m&&(l="subtitle");c=u(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var q=n.attributes.schemeIdUri;if(null==q||"urn:mpeg:dash:role:2011"==q)switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=Od(d,"EssentialProperty");c=null;var t=!1;n=null;q=!1;r=u(r);for(var w=r.next();!w.done;w=r.next()){w=w.value;var v=w.attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==v)c=w.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"== v)var y=g(parseInt(w.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==v)var z=f(parseInt(w.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=v&&("urn:mpeg:dash:ssr:2023"==v&&a.g.dash.enableFastSwitching?t=!0:"urn:dvb:dash:fontdownload:2014"==v?e(w):"urn:mpeg:dash:urlparam:2014"==v?(n=Xw(a,w))||(q=!0):q=!0)}if(q)return null;var A=null;q=Od(d,"SupplementalProperty");q=u(q);for(r=q.next();!r.done;r=q.next())r=r.value,w=r.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"== w?A=parseInt(r.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?y=g(parseInt(r.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?z=f(parseInt(r.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==w?e(r):"urn:mpeg:dash:urlparam:2014"==w&&(n=Xw(a,r));n&&(b.Nb=n);n=Od(d,"Accessibility");var B=new Map,D;n=u(n);for(q=n.next();!q.done;q=n.next())if(r=q.value,q=r.attributes.schemeIdUri,r=r.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=q||a.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!= q||a.g.disableText)"urn:mpeg:dash:role:2011"==q?null!=r&&(k.push(r),"captions"==r&&(l="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==q&&("1"==r?D="visually impaired":"2"==r?D="hard of hearing":"9"==r&&(D="spoken subtitles"));else if(q=1,null!=r)for(r=u(r.split(";")),w=r.next();!w.done;w=r.next()){v=w.value;var G=w=void 0;v.includes("=")?(v=v.split("="),w="svc"+v[0],G=v[1].split(",")[0].split(":").pop()):(w="svc"+q,q++,G=v);B.set(w,yc(G))}else B.set("svc1","und");else if(q=1,null!=r)for(r= r.split(";"),w=u(r),v=w.next();!v.done;v=w.next()){G=v.value;var C=v=void 0;G.includes("=")?(G=G.split("="),v=G[0].startsWith("CC")?G[0]:"CC"+G[0],C=G[1]||"und"):(v="CC"+q,2==r.length?q+=2:q++,C=G);B.set(v,yc(C))}else B.set("CC1","und");n=Od(d,"ContentProtection");var E=Lu(n,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);b.ua.encrypted=0a.J)){var c=a.J;0<=a.g.updatePeriod&&(c=a.g.updatePeriod);a.K.X(Math.max(c-b,Mc(a.ra)))}} function Vw(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Jf:null,audioSamplingRate:null,wb:0,Yf:0,encrypted:!1};d=d||c.jb;var e=b.attributes.id,f=b.attributes.supplementalId,g=Od(b,"BaseURL"),h,k=!1;if(a.h)for(var l=u(g),m=l.next();!m.done;m=l.next()){var n=m.value;m=n.attributes.serviceLocation;n=Qd(n);m&&n&&(Lv(a.h,e,m,n),k=!0)}k&&a.h||(h=g.map(Qd));l=b.attributes.contentType||c.contentType;m=b.attributes.mimeType||c.mimeType;n= um([b.attributes.codecs||c.codecs]).join(",");var q=Vd(b,"frameRate",ge)||c.frameRate,r=b.attributes.sar||c.pixelAspectRatio,t=ex(Od(b,"InbandEventStream"),c.emsgSchemeIdUris),w=Od(b,"AudioChannelConfiguration");w=fx(w)||c.Jf;var v=Vd(b,"audioSamplingRate",ce)||c.audioSamplingRate;l||(l=ax(m,n));var y=Sd(b,"SegmentBase"),z=Sd(b,"SegmentTemplate"),A=y?Vd(y,"availabilityTimeOffset",ee)||0:0,B=z?Vd(z,"availabilityTimeOffset",ee)||0:0,D=g&&g.length?Vd(g[0],"availabilityTimeOffset",ee)||0:0;A=c.wb+D+A+ B;B=null;(D=Sd(b,"SegmentSequenceProperties"))&&(D=Sd(D,"SAP"))&&(B=Vd(D,"cadence",ae));D=b.attributes.label;var G=Od(b,"Label");G&&G.length&&(G=G[0],Pd(G)&&(D=Pd(G)));return{jb:function(){return lc(d(),g.length?a.h&&k?Mv(a.h,e):h?h:[]:[])},Md:y||c.Md,xc:Sd(b,"SegmentList")||c.xc,Kc:z||c.Kc,Qf:Sd(b,"ProducerReferenceTime")||c.Qf,width:Vd(b,"width",ce)||c.width,height:Vd(b,"height",ce)||c.height,contentType:l,mimeType:m,codecs:n,frameRate:q,pixelAspectRatio:r,emsgSchemeIdUris:t,id:f||e,originalId:e, language:b.attributes.lang,Jf:w,audioSamplingRate:v,wb:A,vf:null,Yf:B||c.Yf,label:D||null,encrypted:!1}}function ex(a,b){b=b.slice();a=u(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 fx(a){a=u(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;ec}).map(Qd).filter(Bf);return d.length?lc(a.B,d):[]}S("shaka.dash.DashParser",zw);Bi("application/dash+xml",function(){return new zw});Bi("video/vnd.mpeg.dash.mpd",function(){return new zw});function hx(){}S("shaka.dependencies",hx);hx.has=function(a){return ix.has(a)};hx.add=function(a,b){if(!jx[a])throw Error(a+" is not supported");a==kx?Uc("mux.js","mux.js is no longer used in Shaka Player."):ix.set(a,function(){return b})};var kx="muxjs",jx={Hn:kx,ISOBoxer:"ISOBoxer"};hx.Allowed=jx;var ix=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function lx(){this.j=new Qb(function(){return navigator.userAgent.match(/Smart( ?|_)TV/i)||navigator.userAgent.match(/Android ?TV/i)?"TV":navigator.userAgentData?navigator.userAgentData.mobile?"MOBILE":"DESKTOP":/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)?"MOBILE":navigator.userAgentData&&navigator.userAgentData.platform?"android"==navigator.userAgentData.platform.toLowerCase()?"MOBILE":"DESKTOP":navigator.userAgent.includes("Android")?"MOBILE":"DESKTOP"});this.l=new Qb(function(){return navigator.vendor.includes("Apple")&& (navigator.userAgent.includes("Version/")||navigator.userAgent.includes("OS/"))?"WEBKIT":navigator.userAgent.includes("Edge/")?"EDGE":navigator.userAgent.includes("Chrome/")?"CHROMIUM":navigator.userAgent.includes("Firefox/")?"GECKO":"UNKNOWN"})}function Ei(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}p=lx.prototype;p.ic=function(){return!!navigator.mediaCapabilities};p.Ia=function(){return this.j.value()};p.Na=function(){return this.l.value()};p.xe=function(){return!1}; p.qj=function(){return!1};p.wf=function(){return!1};p.rj=function(){return!1};p.we=function(){return!1};p.kd=function(){return!0};p.ld=function(){return!0};p.Be=function(){return!0};p.wj=function(){return 0};p.mc=function(){return Promise.resolve({width:Infinity,height:Infinity})};p.Ij=function(){return!1};p.Zh=function(){return!1}; p.ab=function(a){var b=this.Ia();if("TV"===b||"CONSOLE"===b||"CAST"===b)a.ads.customPlayheadTracker=!0,a.ads.skipPlayDetection=!0,a.ads.supportsMultipleMediaElements=!1;return a};p.di=function(){return!!window.indexedDB};p.oj=function(){return[]};function Gn(a){Rb();return void 0!==window.matchMedia&&window.matchMedia("(color-gamut: p3)").matches?a?"HLG":"PQ":"SDR"}p.dg=function(){return!1};p.ej=function(){return!1};p.Oh=function(){return!1};p.ci=function(){return!0};p.fj=function(){return!1}; p.Qj=function(){return!0};p.toString=function(){return"Device: "+this.Qb()+" v"+this.Ga()+"; Type: "+this.Ia()};function mx(){lx.call(this);this.g=new Qb(function(){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});this.h=new Qb(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1this.g&&a.push("opus");return a};p.ej=function(){return!0};p.fj=function(){return 3===this.Ga()};navigator.userAgent.includes("Tizen")&&(Tb=function(){return new vx});function wx(){lx.apply(this,arguments)}pa(wx,lx);wx.prototype.Ga=function(){return null};wx.prototype.Qb=function(){return"Vizio"};wx.prototype.Ia=function(){return"TV"};wx.prototype.ic=function(){return!1};navigator.userAgent.includes("VIZIO SmartCast")&&(Tb=function(){return new wx});function xx(){lx.call(this);this.h=new Qb(function(){return navigator.userAgent.includes("DT_STB_BCM")});this.g=new Qb(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})}pa(xx,lx);p=xx.prototype;p.Ga=function(){return this.g.value()};p.Qb=function(){return"WebKit STB"};p.Ia=function(){return"TV"};p.Na=function(){return"WEBKIT"}; p.ic=function(){return!1};p.kd=function(){var a=this.g.value();return null!==a?15<=a:!0};p.mc=function(){return Promise.resolve({width:window.screen.width*window.devicePixelRatio,height:window.screen.height*window.devicePixelRatio})};p.ci=function(){return!this.h.value()}; if(navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("DT_STB_BCM")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1b.length||"data"!=b[0])throw new V(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new V(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1",gc(b),""].join("\n")))d.licenseServerUri=Ku(b);d=Promise.resolve(d)}else d=Promise.resolve(null);return d}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(b){var c=Hx(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";"SAMPLE-AES"==c&&(d="cbcs");c=Hx(b,"URI");c=Yx(c.split("?")[0]);c=Kb(c.data);d=mc("com.huawei.wiseplay",d,[{initDataType:"cenc",initData:c}]);(b=Gx(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2)); b=Promise.resolve(d)}else b=Promise.resolve(null);return b});this.Za=new Set;this.i=new Map;this.l=null;this.D="";this.Ka=new Rx;this.J=-1;this.Z=Infinity;this.Y=this.vc=this.Ta=!1;this.C=new yf(function(){if(a.R&&!a.g.continueLoadingWhenPaused&&(a.P.Ca(a.R,"timeupdate"),a.R.paused)){a.P.qa(a.R,"timeupdate",function(){return ay(a)});return}ay(a)});this.sa=by;this.m=null;this.Ma=0;this.s=Infinity;this.gb=this.Ha=this.O=0;this.U=new Pg;this.G=new Map;this.H=new Map;this.ra=new Map;this.ea=new Map;this.K= new Map;this.na=new Map;this.oa=new Map;this.tc=this.$=!1;this.eb=new Lc(5);this.j=null;this.N=!0;this.P=new Oc;this.u=this.R=null;this.Kb=function(){return!1}}p=Zx.prototype;p.configure=function(a,b){var c=this.h&&a.updatePeriod!=this.g.updatePeriod&&0<=a.updatePeriod;this.g=a;b&&(this.Kb=b);this.j&&this.j.configure(this.g);c&&this.m&&this.m.presentationTimeline.T()&&this.C.Ja()}; p.start=function(a,b){var c=this,d;return Q(function(e){return 1==e.g?(c.h=b,c.$=b.isLowLatencyMode(),F(e,cy(c,[a]).promise,2)):3!=e.g?(d=e.h,c.D=d.uri,F(e,dy(c,d.data),3)):e.return(c.m)})}; p.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.U&&(a.push(this.U.destroy()),this.U=null);this.g=this.h=null;this.Za.clear();this.m=null;this.i.clear();this.I.clear();this.H.clear();this.B.clear();this.ra.clear();this.ea.clear();this.K.clear();this.na.clear();this.oa.clear();this.j&&this.j.destroy();this.P&&(this.P.release(),this.P=null);return Promise.all(a)}; p.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,q;return Q(function(r){if(1==r.g){if(!ey(a))return r.return();b=[];c=Array.from(a.i.values());a.s=Infinity;a.m.gapCount=0;d=c.filter(function(t){return t.stream.segmentIndex});e=u(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(fy(a,g));return F(r,Promise.all(b),2)}gy(a,d.map(function(t){return t.stream}));h=d.some(function(t){return 0==t.ee});d.length&&!h&&(k=hy,iy(a,k.$j),l=d.map(function(t){return t.rc}),a.l.vb(Math.min.apply(Math,x(l))), a.h.updateDuration());h&&jy(a);m=u(d);for(n=m.next();!n.done;n=m.next())q=n.value,q.stream.isAudioMuxedInVideo||!q.stream.segmentIndex||bg(q.stream.segmentIndex)||a.h.disableStream(q.stream);H(r)})};function ky(a,b){return ey(a)?a.L.get(b.type):b.Ef} function fy(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N,P,R,T,ca,Y,Ma,Na;return Q(function(Ea){switch(Ea.g){case 1:if(b.stream.isAudioMuxedInVideo)return Ea.return();c=[];d=u(b.S());for(e=d.next();!e.done;e=d.next())f=e.value,g=new qb(f),h=g.g,b.df&&(0<=b.Vb&&h.add("_HLS_msn",String(b.Vb)),0<=b.Wb&&h.add("_HLS_part",String(b.Wb))),b.ef&&h.add("_HLS_skip","YES"),Hb(h)&&vb(g,wb(h.toString())),c.push(g.toString());ta(Ea,2);return F(Ea,cy(a,c,!0).promise,4);case 4:k=Ea.h;wa(Ea, 3);break;case 2:throw l=xa(Ea),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return Ea.return();m=Sx(a.Ka,k.data);if(1!=m.type)throw new V(2,4,4017);n=k.uri;n==k.originalUri||b.S().includes(n)||b.Tf.push(n);q=Kx(m.ma,"EXT-X-DEFINE");r=ly(a,q,n);t=b.stream;w=ky(a,b);return F(Ea,my(a,m,t.mimeType,b.S,r),5);case 5:v=Ea.h;y=v.keyIds;z=v.drmInfos;A=v.encrypted;B=v.ti;t.encrypted||!A||B||(t.encrypted=!0);D=function(va,Ka){return va.size===Ka.size&&[].concat(x(va)).every(function(Pa){return Ka.has(Pa)})}; D(t.keyIds,y)||(t.keyIds=y,t.drmInfos=z,a.h.newDrmInfo(t));G=ny(a,m,w,r,b.S,b.type);C=G.segments;if(E=G.bandwidth)t.bandwidth=E;I=cm(t);K=u(C);for(J=K.next();!J.done;J=K.next())L=J.value,L.ha&&(L.ha.Cd=I);t.segmentIndex.pe(C,a.l.Jb());C.length&&(M=Nx(m.ma,"EXT-X-MEDIA-SEQUENCE",0),N=(O=Mx(m.ma,"EXT-X-SKIP"))?Number(Gx(O,"SKIPPED-SEGMENTS")):0,P=oy(M,C),R=P.Vb,T=P.Wb,b.Vb=R+N,b.Wb=T,ca=w.get(M),t.segmentIndex.hb(ca));if(Y=bg(t.segmentIndex))b.dd=Y.startTime,Ma=C[C.length-1],b.rc=Ma.endTime;if(Na=Mx(m.ma, "EXT-X-ENDLIST"))b.ee=!0;py(a,m);qy(a,m.ma,t.type,r,b.S);H(Ea)}})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.banLocation(a)};p.setMediaElement=function(a){this.R=a}; function ry(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.J,e=u(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=ky(a,f);if(g=bg(g)){h=u(h);for(var k=h.next();!k.done;k=h.next()){k=u(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.J=Math.max(a.J,l));f.Og=l;break}}}}if(!(0>a.J))for(b=u(b),d=b.next();!d.done;d=b.next())if(d=d.value,sy(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.J-d.Og,0Math.abs(c))){b.dd+=c;b.rc+=c;a=ky(a,b);for(var d=u(a),e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.S()}} function dy(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N,P,R,T,ca,Y,Ma,Na,Ea,va,Ka,Pa,za,ia;return Q(function(Aa){switch(Aa.g){case 1:c=uc;d=Sx(a.Ka,b);e=Kx(d.ma,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new ql(null,0);a.l.jd(!0);k=function(){return[a.D]};l=null;m=new Map;if(1==d.type)return a.N=!1,R=Kx(d.ma,"EXT-X-DEFINE"),m=ly(a,R,a.D),l=c.Ea,T="",ca=new Map,F(Aa,vy(a,a.F++,m,d,k,"",l,T,!0,"Media Playlist",null,ca,null,!1,null,!1),7);wy(a,e);n=Kx(d.ma,"EXT-X-MEDIA");q=Kx(d.ma,"EXT-X-STREAM-INF"); r=Kx(d.ma,"EXT-X-IMAGE-STREAM-INF");t=Kx(d.ma,"EXT-X-I-FRAME-STREAM-INF");w=Kx(d.ma,"EXT-X-SESSION-KEY");v=Kx(d.ma,"EXT-X-SESSION-DATA");y=Kx(d.ma,"EXT-X-CONTENT-STEERING");xy(a,v);return F(Aa,yy(a,y),4);case 4:if(!a.g.ignoreSupplementalCodecs){z=[];A=u(q);B=A.next();for(D={};!B.done;D={Oj:void 0},B=A.next())if(G=B.value,C=Gx(G,"SUPPLEMENTAL-CODECS"))D.Oj=C.split(/\s*,\s*/).map(function(eb){return eb.split("/")[0]}),E=G.attributes.map(function(eb){return function(fb){var mb=fb.name,xb=fb.value;"CODECS"== mb&&(xb=eb.Oj.join(","),fb=fb.value.split(","),1d-2&&(e=Math.max(1,d-2));for(e=d-e;ea.u&&(c=Math.min(-a.u,c),a.u+=c);a.l.Fj(0);a.l.Th(c);a.l.jd(!1)} function xz(a,b,c,d,e){var f=Mx(c,"EXT-X-MAP");if(!f)return null;var g=Hx(f,"URI"),h=Ox(d(),g,e);g=[h.toString(),Gx(f,"BYTERANGE","")].join("-");if(!a.ra.has(g)){var k=void 0,l=null,m=!1;c=u(c);for(var n=c.next();!n.done;n=c.next())n=n.value,"EXT-X-KEY"==n.name?(m=Hx(n,"METHOD"),Xy(m)&&n.idJ?1:0}),c=0;cm))continue}if(null==m){var r=Gx(g,"DURATION")||Gx(g,"PLANNED-DURATION");if(r){var t= parseFloat(r);isNaN(t)||(m=l+t);if(0>k-f+t)continue}}var w=Gx(g,"CLASS")||"com.apple.quicktime.HLS",v="YES"==Gx(g,"END-ON-NEXT");if(null==m&&v){for(var y=c+1;yk){m=Math.max(0,B-f);break}}}if(null==m)continue}y=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var D=[],G=u(g.attributes),C=G.next();!C.done;C=G.next()){var E=C.value;if(!y.includes(E.name)){var I= Qx(E.value,d);if("X-ASSET-URI"==E.name||"X-ASSET-LIST"==E.name)I=Ox(e(),E.value,d)[0];D.push({key:E.name,description:"",data:I,mimeType:null,pictureType:null})}}if(1C)if(E){E=Vd(E,"t",ce);if(null==E)break;else if(I>=E)break;C=Math.ceil((E-I)/K)-1}else{if(Infinity==z)break;else if(I/v>=z)break;C=Math.ceil((z*v-I)/K)-1}for(E=0;E<=C;++E)D=I+K,B.push({start:I/v,end:D/v,ni:I}),I=D}v=B;y=u(y);for(z=y.next();!z.done;z=y.next())(z=Pz(a,w,z.value,v,t,l))&&("audio"!=z.type||a.g.disableAudio?"video"!=z.type||a.g.disableVideo?z.type!=rc||a.g.disableText||m.push(z):n.push(z):r.push(z))}q=[];r=u(0>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3; b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Tz(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function Uz(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""} function Vz(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=u(e);for(var g=e.next(),h={};!g.done;h={eg:void 0},g=e.next())h.eg=g.value,d.push(new zj(h.eg.start,h.eg.end,function(k){return function(){return lc(a.l,[f.replace("{start time}",String(k.eg.ni))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",Mz); var Rz="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Qz=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");Bi("application/vnd.ms-sstr+xml",function(){return new Mz});function Wz(a,b,c,d,e,f,g){if(200<=c&&299>=c&&202!=c||304==c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"],originalRequest:f};f=null;try{f=Zb(b)}catch(h){}throw new V(401==c||403==c?2:1,1,1001,d,c,f,a,g,e||d);};function Xz(){} function Yz(a,b,c,d,e,f){var g=new Zz;fh(b.headers).forEach(function(m,n){g.append(n,m)});var h=new $z,k={Bi:!1,Tj:!1};a=aA(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 Ig(a,function(){k.Bi=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new yf(function(){k.Tj=!0;h.abort()});l.X(b/1E3);a.finally(function(){l.stop()})}return a} function aA(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,t,w,v,y,z,A,B,D,G,C;return Q(function(E){switch(E.g){case 1:return l=bA,m=cA,q=new ArrayBuffer(0),t=r=0,w={},v=Date.now(),ta(E,2),F(E,l(a,d),4);case 4:n=E.h;w=dA(n.headers);g(w);if("HEAD"==d.method){E.A(5);break}z=(y=n.headers.get("Content-Length"))?parseInt(y,10):0;if(!n.body)return F(E,n.arrayBuffer(),9);A=n.clone().body.getReader();B=function(I){function K(){var J,L,M,O;return Q(function(N){switch(N.g){case 1:return ta(N,2),F(N,A.read(),4);case 4:J= N.h;wa(N,3);break;case 2:return xa(N),N.return();case 3:if(J.done){N.A(5);break}r+=J.value.byteLength;if(!h){N.A(5);break}return F(N,h(J.value),5);case 5:L=Date.now();M=r-t;if(100=k||J.done)O=J.done?0:z-r,f(L-v,M,O),t=r,v=L;J.done?I.close():(I.enqueue(J.value),K());H(N)}})}K()};new m({start:B});return F(E,n.arrayBuffer(),8);case 8:q=E.h;E.A(5);break;case 9:q=E.h,D=Date.now(),f(D-v,q.byteLength,0);case 5:b.headers.Range&&(G=b.headers.Range.replace("bytes=","").split("-").filter(function(I){return I}).map(function(I){return parseInt(I, 10)}),2==G.length&&q.byteLength!=G[1]-G[0]+1&&ab("Payload length does not match range requested bytes",b,n));wa(E,3);break;case 2:C=xa(E);if(e.Bi)throw new V(1,1,7001,a,c);if(e.Tj)throw new V(1,1,1003,a,c);throw new V(1,1,1002,a,C,c);case 3:return E.return(Wz(w,q,n.status,a,n.url,b,c))}})}function dA(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b} function eA(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",Xz);Xz.isSupported=eA;Xz.parse=Yz;var bA=window.fetch,$z=window.AbortController,cA=window.ReadableStream,Zz=window.Headers;eA()&&(Sg("http",Yz,2,!0),Sg("https",Yz,2,!0),Sg("blob",Yz,2,!0));function fA(){} function gA(a,b,c,d,e,f){var g=new hA,h=Date.now(),k=0,l=new Promise(function(m,n){g.open(b.method,a,!0);g.responseType="arraybuffer";g.timeout=b.retryParameters.timeout;g.withCredentials=b.allowCrossSiteCredentials;g.onabort=function(){n(new V(1,1,7001,a,c))};var q=!1;g.onreadystatechange=function(){if(2==g.readyState&&!q){var t=iA(g);e(t);q=!0}};g.onload=function(t){var w=iA(g),v=g.response;try{d(Date.now()-h,t.loaded-k,0);var y=Wz(w,v,g.status,a,g.responseURL,b,c);m(y)}catch(z){n(z)}};g.onerror= function(t){n(new V(1,1,1002,a,t,c))};g.ontimeout=function(){n(new V(1,1,1003,a,c))};g.onprogress=function(t){var w=Date.now(),v=f.minBytesForProgressEvents||0,y=t.loaded-k;if(100=v||t.lengthComputable&&t.loaded==t.total)d(w-h,y,4==g.readyState?0:t.total-t.loaded),k=t.loaded,h=w};for(var r in b.headers)g.setRequestHeader(r.toLowerCase(),b.headers[r]);g.send(b.body)});return new Ig(l,function(){g.abort();return Promise.resolve()})} function iA(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",fA);fA.parse=gA;var hA=window.XMLHttpRequest;Sg("http",gA,1,!0);Sg("https",gA,1,!0);Sg("blob",gA,1,!0);function jA(a,b,c,d,e){this.g=a;this.i=b;this.groupId=c;this.h=d;this.j=e}function kA(a){var b=a.cc(!1);return b?gc(b):a.S().map(function(c){return"{"+encodeURI(c.split("#xywh=")[0])+"}"}).join("")+":"+a.startByte+":"+a.endByte}function lA(a,b){return ym(a.g.S(),a.g.startByte,a.g.endByte,b.streaming.retryParameters)};function mA(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function nA(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}mA.prototype.close=function(a,b){if(this.h.has(a)){var c=this.h.get(a);this.h.delete(a);this.j+=c;this.g+=b}};function oA(a){return 0==a.i?0:a.j/a.i};function pA(a){var b=this;this.u=a;this.i=new Map;this.h=new dh(function(){return qA(b).catch(function(){})});this.j=[];this.s=function(){};this.m=function(){};this.g=new mA;this.l=!1}pA.prototype.destroy=function(){return this.h.destroy()};function rA(a,b,c){a.s=b;a.m=c}function qA(a){a.l=!0;var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)} pA.prototype.queue=function(a,b,c,d,e){var f=this;eh(this.h);var g=(this.i.get(a)||Promise.resolve()).then(function(){var h,k,l,m,n,q,r;return Q(function(t){if(1==t.g)return F(t,sA(f,b),2);h=t.h;if(f.h.g)throw new V(2,9,7001);if(d)for(m in k=Kb(h),l=new vh(k),l.data)n=Number(m),q=l.data[n],r=l.g[n],f.m(q,r);f.g.close(c,h.byteLength);f.s(oA(f.g),f.g.g);return t.return(e(h))})});this.i.set(a,g);return g}; function tA(a,b,c,d,e,f){eh(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new V(2,9,7001);if(e){var h=Kb(c);h=new vh(h);for(var k in h.data){var l=Number(k);a.m(h.data[l],h.g[l])}}a.g.close(d,c.byteLength);a.s(oA(a.g),a.g.g);return f(c)});a.i.set(b,g)}function uA(a){return Q(function(b){return 1==b.g?F(b,Promise.all(a.i.values()),2):b.return(a.g.g)})} function sA(a,b){var c,d,e,f;return Q(function(g){if(1==g.g)return c=bh,d=a.u.request(c,b),e=function(){return d.abort()},a.j.push(e),F(g,d.promise,2);f=g.h;sd(a.j,e);return g.return(f.data)})};function vA(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Hg;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}vA.prototype.abort=function(){var a=this;return Q(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ta(b,2);return F(b,a.g,4)}if(2!=b.g)return wa(b,0);xa(b);H(b)})}; function wA(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return Q(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return F(g,b(f.key,f.value,f),2)}f.continue();H(g)})}})}vA.prototype.store=function(){return this.h};vA.prototype.promise=function(){return this.g};function xA(a){this.h=a;this.g=[]}xA.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function yA(a,b){return zA(a,b,"readwrite")}function zA(a,b,c){c=a.h.transaction([b],c);var d=new vA(c,b);a.g.push(d);d.promise().then(function(){sd(a.g,d)},function(){sd(a.g,d)});return d};function AA(a,b,c){this.h=new xA(a);this.i=b;this.g=c}p=AA.prototype;p.destroy=function(){return this.h.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return BA(this.i)};p.removeSegments=function(a,b){return CA(this,this.i,a,b)};p.getSegments=function(a){var b=this,c;return Q(function(d){if(1==d.g)return F(d,DA(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Gi(e)}))})};p.addManifests=function(){return BA(this.g)}; p.updateManifest=function(){return Promise.reject(new V(2,9,9016,"Cannot modify values in "+this.g))};function EA(a,b,c){a=yA(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}p.updateManifestExpiration=function(a,b){var c=yA(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};p.removeManifests=function(a,b){return CA(this,this.g,a,b)}; p.getManifests=function(a){var b=this,c;return Q(function(d){if(1==d.g)return F(d,DA(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Wd(e)})))})};p.getAllManifests=function(){var a=this,b,c;return Q(function(d){return 1==d.g?(b=zA(a.h,a.g,"readonly"),c=new Map,F(d,wA(b,function(e,f){var g;return Q(function(h){if(1==h.g)return F(h,a.Wd(f),2);g=h.h;c.set(e,g);H(h)})}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};p.Gi=function(a){return a};p.Wd=function(a){return Promise.resolve(a)}; function BA(a){return Promise.reject(new V(2,9,9011,"Cannot add new value to "+a))}p.add=function(a,b){var c=this,d,e,f,g,h,k,l;return Q(function(m){if(1==m.g){d=yA(c.h,a);e=d.store();f=[];g=u(b);h=g.next();for(k={};!h.done;k={Lh:void 0},h=g.next())l=h.value,k.Lh=e.add(l),k.Lh.onsuccess=function(n){return function(){f.push(n.Lh.result)}}(k);return F(m,d.promise(),2)}return m.return(f)})}; function CA(a,b,c,d){a=yA(a.h,b);b=a.store();c=u(c);for(var e=c.next(),f={};!e.done;f={xh:void 0},e=c.next())f.xh=e.value,b.delete(f.xh).onsuccess=function(g){return function(){return d(g.xh)}}(f);return a.promise()} function DA(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){if(1==m.g){d=zA(a.h,b,"readonly");e=d.store();f={};g=[];h=u(c);k=h.next();for(l={};!k.done;l={Vf:void 0,zf:void 0},k=h.next())l.zf=k.value,l.Vf=e.get(l.zf),l.Vf.onsuccess=function(n){return function(){void 0==n.Vf.result&&g.push(n.zf);f[n.zf]=n.Vf.result}}(l);return F(m,d.promise(),2)}if(g.length)throw new V(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function FA(a){this.g=new xA(a)}FA.prototype.destroy=function(){return this.g.destroy()};FA.prototype.getAll=function(){var a=this,b,c;return Q(function(d){return 1==d.g?(b=zA(a.g,"session-ids","readonly"),c=[],F(d,wA(b,function(e,f){c.push(f)}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};FA.prototype.add=function(a){var b=yA(this.g,"session-ids"),c=b.store();a=u(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()}; FA.prototype.remove=function(a){var b=this,c;return Q(function(d){return 1==d.g?(c=yA(b.g,"session-ids"),F(d,wA(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):F(d,c.promise(),0)})};function GA(){this.g=new Map}GA.prototype.destroy=function(){for(var a=[],b=u(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};GA.prototype.init=function(){var a=this;HA.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=u(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)}; function IA(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ub:d,ib:f},ib:e})})});if(b)return b;throw new V(2,9,9013,"Could not find a cell that supports add-operations");}function JA(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ub:d,ib:f},e)})})} function KA(a,b,c){a=a.g.get(b);if(!a)throw new V(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new V(2,9,9013,"Could not find cell with name "+c);return b}function LA(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function MA(a){var b=Array.from(a.g.keys());if(!b.length)throw new V(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()} function NA(a){var b,c,d;return Q(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0b;if(!k||!l){m.A(3);break}return F(m,f.updateManifestExpiration(d.key(),b),3);case 3:return ya(m),F(m,e.destroy(),10);case 10:Ba(m,0);break;case 2:xa(m),m.A(3)}})}; p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};Bi("application/x-offline-manifest",function(){return new hB});function iB(){}function jB(a,b){var c=aB(a);c&&"manifest"==c.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:b},a=Lg(a)):a=c&&"segment"==c.g?kB(c.key(),c,b):Jg(new V(2,1,9004,a));return a} function kB(a,b,c){var d=new GA;return Lg(void 0).bb(function(){return d.init()}).bb(function(){return KA(d,b.Ub(),b.ib())}).bb(function(e){return e.getSegments([b.key()])}).bb(function(e){return{uri:b,data:e[0].data,headers:{},originalRequest:c}}).finally(function(){return d.destroy()})}S("shaka.offline.OfflineScheme",iB);iB.plugin=jB;Sg("offline",jB);function lB(a,b,c){var d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:d=[];for(var m=[],n=u(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var r=!1,t=u(m),w=t.next();!w.done;w=t.next())if(w=w.value,mB(w.info,q)){w.sessionIds.push(q.sessionId);r=!0;break}r||m.push({info:q,sessionIds:[q.sessionId]})}e=u(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=nB(a,b,g);return F(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l.return(d)}})} function nB(a,b,c){var d,e;return Q(function(f){switch(f.g){case 1:return d=new xh({uc:b,onError:function(){},Kf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),F(f,Fh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return xa(f),F(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],F(f,Promise.all(c.sessionIds.map(function(g){return Q(function(h){if(1== h.g)return ta(h,2),F(h,Rh(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);xa(h);H(h)})})),6);case 6:return F(f,d.destroy(),7);case 7:return f.return(e)}})}function mB(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&td(a.audioCapabilities,b.audioCapabilities,c)&&td(a.videoCapabilities,b.videoCapabilities,c)};function oB(a,b,c){var d=b.presentationTimeline.getDuration();b=pB(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function qB(a,b){var c=cB(new bB(a.Ub(),a.ib()),b),d=b.appMetadata||{};c=pB(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}} function pB(a){var b=[],c=hg(a.variants);c=u(c);for(var d=c.next();!d.done;d=c.next())b.push(Zf(d.value));a=u(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push($f(c.value));return b};function rB(){this.g=new Map}function sB(a,b){var c=b.audio,d=b.video;c&&!d&&a.g.set(c.id,c.bandwidth||b.bandwidth);!c&&d&&a.g.set(d.id,d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g.set(c.id,e);a.g.set(d.id,f)}}function tB(a,b){a.g.set(b.id,b.bandwidth||2048)}function uB(a,b){a=a.g.get(b);null==a&&(a=0);return a};function vB(a){var b=this;if(a&&a.constructor!=X)throw new V(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Hb()):(this.h=In(),this.g=new Rg,this.g.configure(this.h.networking));this.i=[];this.l=[];var c=!a;this.j=new dh(function(){var d,e,f,g,h;return Q(function(k){switch(k.g){case 1:return F(k,Promise.all(b.l.map(function(l){return qA(l)})),2);case 2:d=function(){};e=[];f=u(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return F(k,Promise.all(e),3);case 3:if(!c){k.A(4); break}return F(k,b.g.destroy(),4);case 4:b.h=null,b.g=null,H(k)}})});this.m=1E9}function wB(){if(Ei(Rb()))a:{var a=u(HA.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}p=vB.prototype;p.destroy=function(){return this.j.destroy()};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=on(a,b));return Nn(this.h,a)};p.getConfiguration=function(){var a=In();Nn(a,this.h,In());return a};p.Hb=function(){return this.g}; p.store=function(a,b,c,d,e){var f=this,g=this.getConfiguration(),h=new pA(this.g);this.l.push(h);b=xB(this,a,b||{},d||[],e||[],function(){var k;return Q(function(l){if(1==l.g)return c?l.A(2):F(l,to(a,f.g,g.manifest.retryParameters),3);2!=l.g&&(c=l.h);k=Gi(a,c||null);return l.return(k())})},g,h);b=new Ig(b,function(){return qA(h)});b.finally(function(){sd(f.l,h)});return yB(this,b)}; function xB(a,b,c,d,e,f,g,h){var k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N;return Q(function(P){switch(P.g){case 1:return zB(),l=k=null,m=new GA,r=q=n=null,ta(P,2,3),F(P,f(),5);case 5:return k=P.h,F(P,AB(a,b,k,g),6);case 6:t=P.h;BB(a);w=!t.presentationTimeline.T()&&!t.presentationTimeline.Zc();if(!w)throw new V(2,9,9005,b);v=u(d);y=v.next();case 7:if(y.done){P.A(9);break}z=y.value;return F(P,CB(a,z,t),10);case 10:A=P.h;t.imageStreams.push(A);BB(a);y=v.next();P.A(7);break;case 9:B=u(e),D=B.next(); case 11:if(D.done)return Hh(g.drm.clearKeys,t.variants),E=t.variants.some(function(R){if(R.audio)for(var T=u(R.audio.drmInfos),ca=T.next();!ca.done;ca=T.next())if(ca.value.licenseServerUri.startsWith("data:"))return!0;if(R.video)for(R=u(R.video.drmInfos),T=R.next();!T.done;T=R.next())if(T.value.licenseServerUri.startsWith("data:"))return!0;return!1}),I=g.offline.usePersistentLicense,E&&(I=!1),F(P,a.sd(t,function(R){r=r||R},g,I),15);G=D.value;return F(P,DB(a,t,G.uri,G.language,G.kind,G.mime,G.codecs), 14);case 14:C=P.h;t.textStreams.push(C);BB(a);D=B.next();P.A(11);break;case 15:l=P.h;BB(a);if(r)throw r;return F(P,EB(t,l,g,I),16);case 16:return F(P,m.init(),17);case 17:return BB(a),F(P,IA(m),18);case 18:return n=P.h,BB(a),K=FB(l,t,b,c,g,h,I),J=K.Dl,L=K.ji,F(P,n.ib.addManifests([J]),19);case 19:M=P.h;BB(a);q=M[0];BB(a);if(r)throw r;return F(P,GB(a,L,q,J,h,g,n.ib,t,l,I),20);case 20:return BB(a),HB(t,J,l,I),F(P,n.ib.updateManifest(q,J),21);case 21:return BB(a),O=new $A("manifest",n.path.Ub,n.path.ib, q),P.return(qB(O,J));case 3:return ya(P),F(P,m.destroy(),22);case 22:if(!k){P.A(23);break}return F(P,k.stop(),23);case 23:if(!l){P.A(25);break}return F(P,l.destroy(),25);case 25:Ba(P,0);break;case 2:N=xa(P);if(null==q){P.A(27);break}return F(P,IB(q),27);case 27:throw r||N;}})} function GB(a,b,c,d,e,f,g,h,k,l){var m,n,q,r,t,w,v,y,z,A,B;return Q(function(D){switch(D.g){case 1:m={};n=0;q=function(){if(a.j.g||e.l)throw new V(2,9,7001);};r=function(G,C){var E,I,K,J,L,M,O,N,P;return Q(function(R){if(1==R.g){E=u(G);I=E.next();for(K={};!I.done;K={nc:void 0},I=E.next())K.nc=I.value,q(),J=lA(K.nc,f),L=K.nc.i,M=K.nc.h,O=function(T){return function(ca){var Y,Ma,Na,Ea;return Q(function(va){switch(va.g){case 1:Y=T.nc.g;Ma=Y.cc(!1);if(!Y.aesKey||Ma){va.A(2);break}return F(va,xm(ca,Y.aesKey, T.nc.j),3);case 3:ca=va.h;case 2:return Na=kA(Y),F(va,g.addSegments([{data:ca}]),4);case 4:Ea=va.h,q(),m[Na]=Ea[0],n+=ca.byteLength,H(va)}})}}(K),N=K.nc.g,(P=N.cc(!1))?tA(e,K.nc.groupId,P,L,M,O):e.queue(K.nc.groupId,J,L,M,O);return F(R,uA(e),2)}q();if(!C||e.l)return R.A(0);HB(h,d,k,l);return F(R,g.updateManifest(c,d),0)})};t=!1;ta(D,2);if(!JB(h)||!t||KB(h)){D.A(4);break}return F(D,r(b.filter(function(G){return G.h}),!0),5);case 5:return q(),b=b.filter(function(G){return!G.h}),w=m,v=n,m={},n=0,F(D, LB(g,c,d,w,v,function(){return BB(a)}),6);case 6:q();case 4:if(t){D.A(7);break}return F(D,r(b,!1),8);case 8:return q(),y=m,z=n,m={},n=0,F(D,LB(g,c,d,y,z,function(){return q()}),9);case 9:q();case 7:wa(D,0);break;case 2:return A=xa(D),B=Object.values(m),F(D,g.removeSegments(B,function(){}),10);case 10:throw A;}})} function IB(a){var b,c,d,e;return Q(function(f){switch(f.g){case 1:return b=new GA,F(f,b.init(),2);case 2:return F(f,IA(b),3);case 3:return c=f.h,d=new $A("manifest",c.path.Ub,c.path.ib,a),F(f,b.destroy(),4);case 4:return e=new vB,F(f,e.remove(d.toString()),0)}})} function LB(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,t,w,v;return Q(function(y){switch(y.g){case 1:g=!1;ta(y,2);h=!0;k=u(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=u(m.segments),q=n.next();!q.done;q=n.next())r=q.value,t=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=t&&(r.dataKey=t,r.pendingSegmentRefId=void 0),t=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=t&&(r.initSegmentKey=t,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&& (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return F(y,a.updateManifest(b,c),4);case 4:g=!0;f();wa(y,0);break;case 2:return w=xa(y),F(y,IB(b),5);case 5:if(g){y.A(6);break}v=Object.values(d);return F(y,a.removeSegments(v,function(){}),6);case 6:throw w;}})} function EB(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A,B,D,G,C,E,I,K,J,L,M,O,N,P,R;return Q(function(T){switch(T.g){case 1:return e={width:Infinity,height:Infinity},Gf(a,c.restrictions,e),F(T,Jf(b,a,d,c.drm.preferredKeySystems,c.drm.keySystemsMapping),2);case 2:f=[];g=c.preferredDecodingAttributes;h=c.preferredVideoCodecs;k=c.preferredAudioCodecs;l=c.preferredTextFormats;Ef(a,h,k,g,l);m=u(a.variants);for(n=m.next();!n.done;n=m.next())q=n.value,f.push(Zf(q));r=u(a.textStreams);for(t=r.next();!t.done;t= r.next())w=t.value,f.push($f(w));v=u(a.imageStreams);for(y=v.next();!y.done;y=v.next())z=y.value,f.push(ag(z));return F(T,c.offline.trackSelectionCallback(f),3);case 3:A=T.h;B=a.presentationTimeline.getDuration();D=0;G=u(A);for(C=G.next();!C.done;C=G.next())E=C.value,I=E.bandwidth*B/8,D+=I;ta(T,4);return F(T,c.offline.downloadSizeCallback(D),6);case 6:K=T.h;if(!K)throw new V(2,9,9014);wa(T,5);break;case 4:J=xa(T);if(J instanceof V)throw J;throw new V(2,9,9015);case 5:L=new Set;M=new Set;O=new Set; N=u(A);for(P=N.next();!P.done;P=N.next())R=P.value,"variant"==R.type&&L.add(R.id),"text"==R.type&&M.add(R.id),"image"==R.type&&O.add(R.id);a.variants=a.variants.filter(function(ca){return L.has(ca.id)});a.textStreams=a.textStreams.filter(function(ca){return M.has(ca.id)});a.imageStreams=a.imageStreams.filter(function(ca){return O.has(ca.id)});MB(a);H(T)}})} function FB(a,b,c,d,e,f,g){var h=oB(c,b,d),k=e.offline.progressCallback;rA(f,function(t,w){h.size=w;k(h,t)},function(t,w){l&&g&&m==w&&Nh(a,"cenc",t)});var l=JB(b)&&!KB(b),m=null;l&&(m=NB.get(a.h.keySystem));for(var n=new rB,q=u(b.textStreams),r=q.next();!r.done;r=q.next())n.g.set(r.value.id,52);q=u(b.imageStreams);for(r=q.next();!r.done;r=q.next())tB(n,r.value);q=u(b.variants);for(r=q.next();!r.done;r=q.next())sB(n,r.value);f=OB(f,n,b,e);e=f.streams;f=f.ji;(n=a.h)&&g&&(n.initData=[]);return{Dl:{creationTime:Date.now(), originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.be(),streams:e,sessionIds:g?Wh(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},ji:f}}function JB(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})} function KB(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function HB(a,b,c,d){b.expiration=c.be();c=Wh(c);b.sessionIds=d?c:[];if(JB(a)&&d&&!c.length)throw new V(2,9,9007);}p.remove=function(a){return PB(this,QB(this,a))}; function QB(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:zB();c=aB(b);if(null==c||"manifest"!=c.g)throw new V(2,9,9004,b);d=c;e=new GA;ua(k,2);return F(k,e.init(),4);case 4:return F(k,KA(e,d.Ub(),d.ib()),5);case 5:return f=k.h,F(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],F(k,Promise.all([RB(a,h,e),SB(f,d,h)]),2);case 2:return ya(k),F(k,e.destroy(),8);case 8:Ba(k,0)}})} function TB(a,b){for(var c=[],d=u(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:af(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:af(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function RB(a,b,c){return Q(function(d){return F(d,UB(a.g,a.h.drm,c,b),0)})} function SB(a,b,c){function d(){}var e=VB(c);qB(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.Wl=function(){return PB(this,WB(this))}; function WB(a){var b,c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return zB(),b=a.g,c=a.h.drm,d=new GA,e=!1,ua(n,2),F(n,d.init(),4);case 4:f=[],LA(d,function(q){return f.push(q)}),g=u(f),h=g.next();case 5:if(h.done){n.A(2);break}k=h.value;return F(n,k.getAll(),8);case 8:return l=n.h,F(n,lB(c,b,l),9);case 9:return m=n.h,F(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.A(5);break;case 2:return ya(n),F(n,d.destroy(),11);case 11:Ba(n,3);break;case 3:return n.return(!e)}})} p.list=function(){return PB(this,XB())};function XB(){var a,b,c;return Q(function(d){switch(d.g){case 1:return zB(),a=[],b=new GA,ua(d,2),F(d,b.init(),4);case 4:return c=Promise.resolve(),JA(b,function(e,f){c=c.then(function(){var g;return Q(function(h){if(1==h.g)return F(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=qB(new $A("manifest",e.Ub,e.ib,l),k);a.push(k)});H(h)})})}),F(d,c,2);case 2:return ya(d),F(d,b.destroy(),6);case 6:Ba(d,3);break;case 3:return d.return(a)}})} function AB(a,b,c,d){var e,f,g,h,k;return Q(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){}, addFont:function(){}},c.configure(d.manifest),BB(a),F(l,c.start(b,g),2);if(3!=l.g)return h=l.h,BB(a),k=YB(h),F(l,Promise.all(kb(k,function(m){return m.createSegmentIndex()})),3);BB(a);if(e)throw e;return l.return(h)})} function CB(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,w,v,y;return Q(function(z){switch(z.g){case 1:return F(z,ZB(a,b),2);case 2:d=z.h;if("text/vtt"!=d)throw new V(1,2,2017,b);return F(z,$B(b,a.g,a.h.streaming.retryParameters),3);case 3:e=z.h;f=pf(d);if(!f)throw new V(2,2,2014,d);g=f();h={periodStart:0,segmentStart:0,segmentEnd:c.presentationTimeline.getDuration(),vttOffset:0};k=Kb(e);l=g.parseMedia(k,h,b,[]);m=[];n=u(l);q=n.next();for(r={};!q.done;r={lg:void 0,ud:void 0},q=n.next())r.ud=q.value,r.lg=null, t=function(A){return function(){null==A.lg&&(A.lg=lc([b],[A.ud.payload]));return A.lg||[]}}(r),w=new zj(r.ud.startTime,r.ud.endTime,t,0,null,null,0,0,Infinity),r.ud.payload.includes("#xywh")&&(v=r.ud.payload.split("#xywh=")[1].split(","),4===v.length&&w.cg({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)})),m.push(w);y=d;if(!m.length){z.A(4);break}return F(z,to(m[0].S()[0],a.g,a.h.manifest.retryParameters),5);case 5:y=z.h;case 4:return z.return({id:a.m++, originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ol(m),mimeType:y||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([af(y|| "","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})} function DB(a,b,c,d,e,f,g){var h,k,l;return Q(function(m){if(1==m.g)return f?m.A(2):F(m,ZB(a,c),3);2!=m.g&&(f=m.h);h={id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ql(0,b.presentationTimeline.getDuration(),[c]),mimeType:f||"",codecs:g||"",kind:e,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,originalLanguage:d,label:null,type:rc,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([af(f||"",g||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};k=af(h.mimeType,h.codecs);l=qf(k);if(!l)throw new V(2,2,2014,f);return m.return(h)})} function ZB(a,b){var c;return Q(function(d){switch(d.g){case 1:return ta(d,2),F(d,to(b,a.g,a.h.streaming.retryParameters),4);case 4:c=d.h;wa(d,3);break;case 2:xa(d);case 3:if(c)return d.return(c);throw new V(1,2,2011,b);}})}function $B(a,b,c){var d,e,f;return Q(function(g){if(1==g.g)return d=bh,e=Wg([a],c),e.method="GET",F(g,b.request(d,e).promise,2);f=g.h;return g.return(f.data)})} p.sd=function(a,b,c,d){var e=this,f;return Q(function(g){return 1==g.g?(f=new xh({uc:e.g,onError:b,Kf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),f.configure(c.drm),F(g,Ch(f,a.variants,d),2)):3!=g.g?F(g,Ph(f),3):g.return(f)})}; function OB(a,b,c,d){var e=new Map,f=YB(c),g=new Map;f=u(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=aC(a,b,c,h,d,e);g.set(h.id,k)}a=u(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),ji:Array.from(e.values())}} function aC(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount, audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,mssPrivateData:d.mssPrivateData,external:d.external,fastSwitching:d.fastSwitching,isAudioMuxedInVideo:d.isAudioMuxedInVideo},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;bC(d,c.presentationTimeline.Jb(),function(l,m){var n=kA(l),q=void 0;if(!f.has(n)){var r=l.endTime-l.startTime;r=uB(b,d.id)*r;r=nA(a.g,r);f.set(n,new jA(l,r,k,!1,m))}l.ha&&(q=kA(l.ha),f.has(q)||(r=.5* uB(b,d.id),r=nA(a.g,r),f.set(q,new jA(l.ha,r,k,!0,m))));g.segments.push({pendingInitSegmentRefId:q,initSegmentKey:q?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:n,dataKey:0,mimeType:l.mimeType,codecs:l.codecs,thumbnailSprite:l.thumbnailSprite});0!==h&&(k=(k+1)%h)});return g} function bC(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d,b),d=a.segmentIndex.get(++b)}function BB(a){if(a.j.g)throw new V(2,9,7001);}function zB(){if(!wB())throw new V(2,9,9E3);}function PB(a,b){return Q(function(c){if(1==c.g)return a.i.push(b),ua(c,2),F(c,b,4);if(2!=c.g)return c.return(c.h);ya(c);sd(a.i,b);return Ba(c,0)})}function yB(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){sd(a.i,c)})} function VB(a){var b=new Set;a=u(a.streams);for(var c=a.next();!c.done;c=a.next()){c=u(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)} function UB(a,b,c,d){var e,f,g;return Q(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=MA(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:TB(d,!1),videoCapabilities:TB(d,!0)}});return F(h,lB(b,a,f),2)}return 3!=h.g?(g=h.h,F(h,e.remove(g),3)):F(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})} function YB(a){for(var b=new Set,c=u(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=u(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=u(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b} function MB(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=u(b),d=c.next();!d.done;d=c.next()){d=u(b);for(var e=d.next();!e.done;e=d.next());}b=u(a);for(c=b.next();!c.done;c=b.next())for(c=u(a),d=c.next();!d.done;d=c.next());}S("shaka.offline.Storage",vB);vB.deleteAll=function(){var a;return Q(function(b){return 1==b.g?(a=new GA,ua(b,2),F(b,NA(a),2)):5!=b.g?(ya(b),F(b,a.destroy(),5)):Ba(b,0)})}; vB.prototype.list=vB.prototype.list;vB.prototype.removeEmeSessions=vB.prototype.Wl;vB.prototype.remove=vB.prototype.remove;vB.prototype.store=vB.prototype.store;vB.prototype.getNetworkingEngine=vB.prototype.Hb;vB.prototype.getConfiguration=vB.prototype.getConfiguration;vB.prototype.configure=vB.prototype.configure;vB.prototype.destroy=vB.prototype.destroy;vB.support=wB; var NB=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c"); fq("offline",wB);function cC(){}function dC(){for(var a=u(eC),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){ab("Error installing polyfill!",c)}}}function fC(a,b){a={priority:b||0,callback:a};for(b=0;b=b?(yC(),zC()):15>=b&&yC());a=u(a.oj());for(b=a.next();!b.done;b=a.next())AC(b.value);(window.MediaSource||window.ManagedMediaSource)&&BC();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&CC()} function yC(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ja.apply(0,arguments));b.abort=function(){};return b}}function zC(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}} function BC(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=ef(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=ef(c)&&b(c)}}} function AC(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return hf(d)!=a&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return hf(d)!=a&&c(d)}}} function CC(){var a=MediaSource.isTypeSupported;Rb().Qj()&&(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}cC.MediaSource=wC;wC.install=xC;fC(xC);function DC(){}function EC(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?FC():void 0!=window.orientation&&GC())}function FC(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})} function GC(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new HC;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new U("change");b.dispatchEvent(c)})}cC.Orientation=DC;DC.install=EC;function HC(){jb.call(this);this.type="";this.angle=0}pa(HC,jb); HC.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)}; HC.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};fC(EC);function IC(){}var JC,KC,LC,MC,NC,OC; function PC(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys&&window.shakaMediaKeysPolyfill!=QC){if(void 0===a?0:a)JC=!0,KC=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),LC=HTMLMediaElement.prototype.setMediaKeys,MC=window.MediaKeys,NC=window.MediaKeySystemAccess,OC=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=RC;window.MediaKeys=SC;window.MediaKeySystemAccess= TC;navigator.requestMediaKeySystemAccess=UC;window.shakaMediaKeysPolyfill=QC;Rf.clear();zg.clear()}}function UC(a,b){try{var c=new TC(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function RC(a){var b=this.mediaKeys;b&&b!=a&&VC(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?VC(a,this):Promise.resolve()} function WC(a){a=Kb(a.initData);if(Ob(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Xb(a.subarray(4),!0);a=$b(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Lb(a);this.dispatchEvent(b)}cC.PatchedMediaKeysApple=IC; IC.uninstall=function(){window.shakaMediaKeysPolyfill==QC&&JC&&(JC=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",KC),HTMLMediaElement.prototype.setMediaKeys=LC,window.MediaKeys=MC,window.MediaKeySystemAccess=NC,navigator.requestMediaKeySystemAccess=OC,KC=OC=LC=NC=MC=null,window.shakaMediaKeysPolyfill="",Rf.clear(),zg.clear())};IC.install=PC; function TC(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=u(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=u(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=u(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;} TC.prototype.createMediaKeys=function(){var a=new SC(this.keySystem);return Promise.resolve(a)};TC.prototype.getConfiguration=function(){return this.g};function SC(a){this.h=new WebKitMediaKeys(a);this.g=new Oc}SC.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new XC(this.h,a)};SC.prototype.setServerCertificate=function(){return Promise.resolve(!1)}; function VC(a,b){a.g.Sa();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",WC);try{return xl(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}SC.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function XC(a){jb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new Oc;this.sessionId="";this.expiration=NaN;this.closed=new Hg;this.keyStatuses=new YC}pa(XC,jb);p=XC.prototype; p.generateRequest=function(a,b){var c=this;this.h=new Hg;try{var d=this.l.createSession("video/mp4",Kb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Ec()?"license-request":"license-renewal").set("message",Lb(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(ZC(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror", function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:ZC(c,"output-not-allowed");break;default:ZC(c,"internal-error")}});ZC(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 Hg;try{this.i.update(Kb(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sa()}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 ZC(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)} function YC(){this.size=0;this.g=void 0}p=YC.prototype;p.Ec=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,yg.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=yg.value();return this.g&&Jb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var QC="apple";fC(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||PC())});function $C(){}function aD(){if(window.MediaKeys){var a=Rb();MediaKeys.prototype.setServerCertificate&&a.Be()||(MediaKeys.prototype.setServerCertificate=bD)}}function bD(){return Promise.resolve(!1)}cC.PatchedMediaKeysCert=$C;$C.install=aD;fC(aD);function cD(){} function dD(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)eD="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=fD;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=gD;window.MediaKeys=hD;window.MediaKeySystemAccess=iD;window.shakaMediaKeysPolyfill=jD}} function kD(a){var b=eD;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function fD(a,b){try{var c=new iD(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function gD(a){var b=this.mediaKeys;b&&b!=a&&lD(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&lD(a,this);return Promise.resolve()}cC.PatchedMediaKeysWebkit=cD;cD.install=dD; function iD(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=u(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=u(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=u(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]): d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}iD.prototype.createMediaKeys=function(){var a=new hD(this.g);return Promise.resolve(a)};iD.prototype.getConfiguration=function(){return this.h};function hD(a){this.l=a;this.h=null;this.g=new Oc;this.i=[];this.j=new Map} function lD(a,b){a.h=b;a.g.Sa();var c=eD;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Lb(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=mD(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Ec()?"licenserequest":"licenserenewal").set("message",d.message),d=new U("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){(d=mD(a,d.sessionId))&&d.ready()}), a.g.o(b,c+"keyerror",function(d){var e=mD(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?nD(e,"output-restricted"):1==f?nD(e,"expired"):nD(e,"internal-error"))}}))} hD.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new oD(b,this.l,a);this.i.push(a);return a};hD.prototype.setServerCertificate=function(){return Promise.resolve(!1)};hD.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")}; function mD(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 oD(a,b,c){jb.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 Hg;this.keyStatuses=new pD}pa(oD,jb);p=oD.prototype;p.ready=function(){nD(this,"usable");this.g&&this.g.resolve();this.g=null}; function qD(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Kb($b("LOAD_SESSION|"+c));else{var e=$b("PERSISTENT|");d=kc(e,b)}else d=Kb(b)}catch(g){return Promise.reject(g)}a.h=new Hg;var f=kD("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new yf(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).X(.01)}return a.h} function rD(a,b,c){if(a.g)a.g.then(function(){return rD(a,b,c)}).catch(function(){return rD(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Wb(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=hc(e.keys[0].k);e=hc(e.keys[0].kid)}else d=Kb(c),e=null;var f=kD("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}} function nD(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}p.generateRequest=function(a,b){return qD(this,b,null)};p.load=function(a){return"persistent-license"==this.l?qD(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new Hg;rD(this,b,a);return b}; p.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=kD("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function pD(){this.size=0;this.g=void 0}p=pD.prototype;p.Ec=function(){return this.g}; p.forEach=function(a){this.g&&a(this.g,yg.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=yg.value();return this.g&&Jb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var eD="",jD="webkit";fC(dD);function sD(){}function tD(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=uD,Object.defineProperty(a,"disablePictureInPicture",{get:vD,set:wD,enumerable:!0,configurable:!0}),document.exitPictureInPicture=xD,document.addEventListener("webkitpresentationmodechanged",yD,!0))}} function yD(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)} function uD(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function xD(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))} function vD(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function wD(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}cC.PiPWebkit=sD;sD.install=tD;fC(tD);function zD(){}function AD(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=BD))}function BD(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}cC.RandomUUID=zD;zD.install=AD;fC(AD);function CD(){}function DD(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:ED})}function ED(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}cC.Symbol=CD;CD.install=DD;fC(DD);function FD(){}function GD(){for(var a=u([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),b=a.next();!b.done;b=a.next())b=b.value,b.prototype.indexOf||(b.prototype.indexOf=HD),b.prototype.lastIndexOf||(b.prototype.lastIndexOf=ID),b.prototype.includes||(b.prototype.includes=JD)}function HD(a,b){return Array.prototype.indexOf.call(this,a,b)}function ID(a,b){return Array.prototype.lastIndexOf.call(this,a,b)} function JD(a,b){return-1!==this.indexOf(a,b)}cC.TypedArray=FD;FD.install=GD;fC(GD);function KD(){}function LD(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}cC.VideoPlayPromise=KD;KD.install=LD;fC(LD);function MD(){}function ND(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||"number"===typeof Fi().webkitDroppedFrameCount)&&(a.getVideoPlaybackQuality=OD)}}function OD(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}cC.VideoPlaybackQuality=MD;MD.install=ND;fC(ND);function PD(){}function QD(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=RD;else if(6==b)a=SD;else{try{var c=!!RD(1,2,"")}catch(d){c=!1}c&&(a=RD)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function RD(a,b,c){return new window.TextTrackCue(a,b,c)}function SD(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}cC.VTTCue=PD;PD.install=QD;fC(QD);function TD(a){jb.call(this);this.h=a;this.l=null;this.g=[];this.i=-1;this.j=null;this.m=new Oc}pa(TD,jb);p=TD.prototype;p.destroy=function(){var a=this;return Q(function(b){if(1==b.g)return F(b,a.removeAllItems(),2);a.h=null;a.m&&(a.m.release(),a.m=null);jb.prototype.release.call(a);H(b)})};p.configure=function(a){this.l=a};p.getConfiguration=function(){return this.l};p.getCurrentItem=function(){return this.g.length&&0<=this.i&&this.i=b.g.length)throw new V(2,7,7007);c=b.g[a];b.i!=a&&(b.i=a,b.dispatchEvent(new U("currentitemchanged")));d=b.h.h;e=b.l?b.l.preloadNextUrlWindow:0;0=b.g.length||f||b.h.T()||!d.duration)return D.return();y=b.h.xa().end-d.currentTime;if(isNaN(y)){D.A(0);break}if(!(y<=e)){D.A(0);break}z= b.l&&b.l.repeatMode;A=null;b.i+1 can only be inside
in TTML");q=u(Od(e,"div"));for(r=q.next();!r.done;r=q.next())if(Od(r.value,"span").length)throw new V(2,2,2001," can only be inside

in TTML");if(b=cE(e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor="transparent"), a.push(b);return a}; function cE(a,b,c,d,e,f,g,h,k,l,m,n,q){var r=l;if(Md(a)){if(!m)return null;var t={tagName:"span",children:[Pd(a)],attributes:{},parent:null}}else t=a;for(var w=null,v=u(dE),y=v.next();!y.done&&!(w=eE(t,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=null;y=Xd(t,dE,"backgroundImage");var z=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(y&&z.test(y)){v=parseInt(y.split(":").pop(),10)-1;if(v>=q.length)return null;v=q[v]}else n&&y&&!y.startsWith("#")&&(z=new qb(n),y=new qb(y),(y=z.resolve(y).toString())&& (v=y));if("p"==a.tagName||w||v)m=!0;a=m;y="default"==(t.attributes["xml:space"]||(h?"default":"preserve"));z=t.children.every(Md);h=[];if(!z)for(var A=u(t.children),B=A.next();!B.done;B=A.next())(B=cE(B.value,b,c,d,e,f,g,y,k,t,m,n,q))&&h.push(B);d=null!=l;n=Pd(t);n=t.children.length&&n&&/\S/.test(n);A=t.attributes.begin||t.attributes.end||t.attributes.dur;if(!(A||n||"br"==t.tagName||0!=h.length||d&&!y))return null;q=fE(t,c);n=q.start;for(q=q.end;r&&r.tagName&&"tt"!=r.tagName;)q=gE(r,c,n,q),n=q.start, q=q.end,r=r.parent;null==n&&(n=0);n+=b.periodStart;q=null==q?Infinity:q+b.periodStart;n=Math.max(n,b.segmentStart);q=Math.min(q,b.segmentEnd);if(!A&&0c.length)return f;var g=a;for(a=null;!a&&!(a=e?Wd(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=u(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=u(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 gE(a,b,c,d){a=fE(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function fE(a,b){var c=uE(a.attributes.begin,b),d=uE(a.attributes.end,b);a=uE(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}} function uE(a,b){var c=null;if(vE.test(a)){a=vE.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(wE.test(a))c=xE(wE,a);else if(yE.test(a))c=xE(yE,a);else if(zE.test(a))a=zE.exec(a),c=Number(a[1])/b.frameRate;else if(AE.test(a))a=AE.exec(a),c=Number(a[1])/b.g;else if(BE.test(a))c=xE(BE,a);else if(a)throw new V(2,2,2001,"Could not parse cue time range in TTML");return c} function xE(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}function aE(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{Qc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",XD);XD.prototype.parseMedia=XD.prototype.parseMedia;XD.prototype.setManifestType=XD.prototype.setManifestType;XD.prototype.setSequenceMode=XD.prototype.setSequenceMode;XD.prototype.parseInit=XD.prototype.parseInit; function $D(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))} var iE=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,qE=/^(\d{1,4}(?:\.\d+)?|100)%$/,pE=/^(\d+px|\d+em|\d*\.?\d+c)$/,jE=/^(\d+)px (\d+)px$/,vE=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,wE=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,yE=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,zE=/^(\d*(?:\.\d*)?)f$/,AE=/^(\d*(?:\.\d*)?)t$/,BE=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),oE=(new Map).set("left",ue).set("center","center").set("right", "end").set("start",ue).set("end","end"),nE=(new Map).set("left","line-left").set("center","center").set("right","line-right"),YD=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],ZD=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],dE=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];nf("application/ttml+xml",function(){return new XD});function CE(){this.g=new XD}CE.prototype.parseInit=function(a){var b=!1;(new kh).box("moov",ph).box("trak",ph).box("mdia",ph).box("minf",ph).box("stbl",ph).V("stsd",rh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new V(2,2,2007);};CE.prototype.setSequenceMode=function(){};CE.prototype.setManifestType=function(){}; CE.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new kh).box("moof",ph).box("traf",ph).V("tfhd",function(y){e=Hi(y.reader,y.flags).Zd}).V("trun",function(y){y=Ki(y.reader,y.version,y.flags);y=u(y.Ph);for(var z=y.next();!z.done;z=y.next())h.push(z.value.sampleSize||e||0)}).V("subs",function(y){for(var z=y.reader,A=z.W(),B=-1,D=0;D").replace(/{\/b}/g,"").replace(/{i}/g,"").replace(/{\/i}/g,"").replace(/{u}/g,"").replace(/{\/u}/g,"")+"\n\n";return b}S("shaka.text.SrtTextParser",KE);KE.srt2webvtt=LE;KE.prototype.parseMedia=KE.prototype.parseMedia; KE.prototype.setManifestType=KE.prototype.setManifestType;KE.prototype.setSequenceMode=KE.prototype.setSequenceMode;KE.prototype.parseInit=KE.prototype.parseInit;nf("text/srt",function(){return new KE});function ME(){}ME.prototype.parseInit=function(){};ME.prototype.setSequenceMode=function(){};ME.prototype.setManifestType=function(){}; ME.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=Wb(a).split(/\r?\n\s*\r?\n/);a=u(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=NE.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=u(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=OE.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(PE);else if("Style"==a){a=f.split(PE);f={};for(var g=0;g>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null} function QE(a){a=TE.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",ME);ME.prototype.parseMedia=ME.prototype.parseMedia;ME.prototype.setManifestType=ME.prototype.setManifestType;ME.prototype.setSequenceMode=ME.prototype.setSequenceMode;ME.prototype.parseInit=ME.prototype.parseInit;var NE=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,OE=/^\s*([^:]+):\s*(.*)/,PE=/\s*,\s*/,TE=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/; nf("text/x-ssa",function(){return new ME});function UE(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,codec:"mp4a.40."+e}} function WE(a,b){if(b+1=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344, 1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,La:a,wa:e}} function $E(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0>>24+h<>h;c=c?c<c)return!0}return!1};function aF(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=aF.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?bd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?Rb().we()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':b};p.getOriginalMimeType=function(){return this.j}; p.transmux=function(a,b,c,d){a=Kb(a);for(var e=Yj(a),f=e.length;fa.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new ak(a.subarray(b+2));ck(c,2);ck(c,3);var d=dk(c,11)+1<<1,e=dk(c,2);if(3==e){e=dk(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=dk(c,2);var g=dk(c,3),h=dk(c,1);c=dk(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,La:a,wa:d}};function cF(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=cF.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?bd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};p.getOriginalMimeType=function(){return this.j}; p.transmux=function(a,b,c,d){a=Kb(a);for(var e=Yj(a),f=e.length;fe?kk(c,16):kk(c,64))}fk(c);d=gk(c);if(0===d)gk(c);else if(1===d)for(ck(c,1),fk(c),fk(c),d=gk(c),e=0;e=q?(d=r[q-1],e=t[q-1]):255===q&&(d=dk(c,16),e=dk(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1, k[3],k[4],k[5],255,225].concat(k,[1],b));return{height:c,width:f,Wa:a,cb:d,fb:e}} function fF(a){function b(t){e={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:t.pts,dts:t.dts,nalus:[]}}function c(){if(e&&e.nalus.length&&e.frame){for(var t=[],w=u(e.nalus),v=w.next();!v.done;v=w.next()){v=v.value;var y=v.fullData.byteLength,z=new Uint8Array(4);z[0]=y>>24&255;z[1]=y>>16&255;z[2]=y>>8&255;z[3]=y&255;t.push(z);t.push(v.fullData)}e.data=kc.apply(dc,x(t));d.push(e)}}for(var d=[],e=null,f=!1,g=0;gG;G++)dk(a,2);for(G=0;GK;K++)for(var J=0;J<(3===K?2:6);J++)if(ik(a)){var L=Math.min(64,1<<4+(K<<1));1=L?(I=M[L-1],K=O[L-1]):255===L&&(I=dk(a,16),K=dk(a,16)));ik(a)&&ik(a);ik(a)&&(dk(a,3),ik(a),ik(a)&&(jk(a),jk(a),jk(a)));ik(a)&&(gk(a),gk(a));ik(a);ik(a);ik(a);if(L=ik(a))gk(a),gk(a),gk(a),gk(a);if(ik(a)&&(dk(a,32),dk(a,32),ik(a)&&gk(a),ik(a))){O=!1;L=ik(a);M=ik(a);if(L||M){if(O=ik(a))jk(a),dk(a, 5),ik(a),dk(a,5);dk(a,4);dk(a,4);O&&dk(a,4);dk(a,5);dk(a,5);dk(a,5)}for(N=0;N<=f;N++){var R=!0;P=1;ik(a)||(R=ik(a));var T=!1;R?gk(a):T=ik(a);T||(P=gk(a)+1);if(L){for(R=0;R>8;e[14]=d.Gf&255;e[15]=252|d.Eh&3;e[16]=252|d.Fg&3;e[17]=248|d.Bg&7;e[18]=248|d.Ag&7;e[19]=0;e[20]=0;e[21]=(d.Hg&3)<<6|(d.Ch&7)<<3|(d.gi?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength& 255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function lF(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*mF[14*(3===c?3-d:3===d?3:4)+e-1];f=nF[3*(3===c?0:2===c?1:2)+f];c=oF[c][d];var h=pF[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,wa:k,Zl:8*c*h}}return null} function qF(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function rF(a,b){if(b+1d;d++)this.usertype[d]!==wF[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}p=uF.prototype;p.destroy=function(){}; p.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return bd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return bd(b)||bd(a)};p.convertCodecs=function(a,b){return b.replace("mss/","")};p.getOriginalMimeType=function(){return this.h}; p.transmux=function(a,b,c){if(!c)return Promise.resolve(Kb(a));if(!b.mssPrivateData)return Promise.reject(new V(2,3,3020,c?c.S()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf"); m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var q=e.fetch("saio");if(null===q){q=this.g.createFullBox("saio",h);q.version=0;q.flags=0;q.entry_count=1;q.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d>24&255;Na[1]=Ma>>16&255;Na[2]=Ma>>8&255;Na[3]=Ma&255;N.push(Na);N.push(ca.fullData)}}var Ea=N.length?{data:kc.apply(dc,x(N)),isKeyframe:O}:null;if(Ea){null==E&&null!=L.dts&&(E=L.dts);var va=void 0;va=J+ 1>>24&255,xd.sampleRate>>>17&255,xd.sampleRate>>>8&255,xd.sampleRate>>>0&255,0,0].concat(x(fc)));for(var oz=xd.sampleRate,pz=u(k.yb()),Mp=pz.next();!Mp.done;Mp=pz.next()){var Np=Mp.value,Dg=Np.data;null==il&&null!==Np.pts&&(il=Np.pts);for(var hi=0;hia&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function fG(a,b){ZF.call(this,a,b);var c=this;this.g=Kj();this.g.classList.add("shaka-ad-info");this.g.disabled=!0;this.parent.appendChild(this.g);this.h=new yf(function(){if(c.ad.isLinear()){var d="",e=c.ad.getSequenceLength();1Date.now()){c.l.stop();c.s=Date.now();var e=parseInt(c.h.textContent,10);e=c.m?e-d:e+d;c.h.textContent=e.toString()+"s";c.g.style.opacity="1";c.l.X(.5)}})}pa(oG,ZF);S("shaka.ui.HiddenSeekButton",oG);function qG(a,b){oG.call(this,a,b);this.g.classList.add("shaka-fast-forward-container");this.i.textContent="fast_forward";this.m=!1}pa(qG,oG);S("shaka.ui.HiddenFastForwardButton",qG);function rG(a,b){oG.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.m=!0}pa(rG,oG);S("shaka.ui.HiddenRewindButton",rG);function sG(a,b,c,d){ZF.call(this,a,b);var e=this;this.container=W("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,x(c));this.i=!1;this.bar=document.createElement("input");this.F=new yf(function(){e.onChangeEnd();e.i=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,x(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.bar.disabled= !this.controls.Ba();this.container.appendChild(this.bar);this.parent.appendChild(this.container);this.K=new yf(function(){e.bar.disabled=!1});this.eventManager.o(this.controls,"showingui",function(){e.K.X(0)});this.eventManager.o(this.controls,"hidingui",function(){e.K.stop();e.bar.disabled=!0});this.eventManager.o(this.bar,"mousedown",function(f){e.bar.disabled||(e.i=!0,e.onChangeStart(),f.stopPropagation())});this.eventManager.o(this.bar,"touchstart",function(f){e.bar.disabled||(e.i=!0,tG(e,f), e.onChangeStart(),f.stopPropagation())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.i&&(tG(e,f),e.onChange(),f.stopPropagation())});this.eventManager.o(this.bar,"touchend",function(f){e.i&&(e.i=!1,tG(e,f),e.onChangeEnd(),f.stopPropagation())});this.eventManager.o(this.bar,"touchcancel",function(f){e.i&&(e.i=!1,tG(e,f),e.onChangeEnd(),f.stopPropagation())});this.eventManager.o(this.bar,"mouseup",function(f){e.i&&(e.i=!1,e.onChangeEnd(), f.stopPropagation())});this.eventManager.o(this.bar,"blur",function(){e.i&&(e.i=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}pa(sG,ZF);p=sG.prototype;p.release=function(){this.F&&(this.F.stop(),this.F=null);ZF.prototype.release.call(this)};p.setRange=function(a,b){this.bar.min=a;this.bar.max=b};p.onChangeStart=function(){};p.onChange=function(){};p.onChangeEnd=function(){}; p.changeTo=function(a){this.i||(this.i=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:ae&&(c=e);a.bar.value=c}S("shaka.ui.RangeElement",sG);sG.prototype.setValue=sG.prototype.setValue;sG.prototype.getValue=sG.prototype.getValue;sG.prototype.changeTo=sG.prototype.changeTo;sG.prototype.onChangeEnd=sG.prototype.onChangeEnd;sG.prototype.onChange=sG.prototype.onChange;sG.prototype.onChangeStart=sG.prototype.onChangeStart; sG.prototype.setRange=sG.prototype.setRange;function uG(a,b){sG.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.D=W("div");this.D.classList.add("shaka-ad-markers");this.container.insertBefore(this.D,this.container.childNodes[0]);this.H=this.controls.g;this.u=new yf(function(){var d=c.getValue();c.player.T()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.B=new yf(function(){vG(c)});this.L=!1;this.h=W("div");this.h.id="shaka-player-ui-thumbnail-container"; this.g=W("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.J=W("div");this.J.id="shaka-player-ui-thumbnail-time-container";this.G=W("div");this.G.id="shaka-player-ui-thumbnail-time";this.J.appendChild(this.G);this.h.appendChild(this.g);this.h.appendChild(this.J);this.container.appendChild(this.h);this.j=W("div");this.j.id="shaka-player-ui-time-container";this.container.appendChild(this.j);this.l=this.m=null;this.I=!1;this.s=new yf(function(){wG(c)});this.C=[];this.eventManager.o(this.localization, "locale-updated",function(){return xG(c)});this.eventManager.o(this.localization,"locale-changed",function(){return xG(c)});this.eventManager.o(this.adManager,"ad-started",function(){yG(c)||dG(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){yG(c)&&dG(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.C=d.cuepoints;zG(c)});this.eventManager.o(this.player,"unloading",function(){c.C=[];zG(c);c.l&&(c.l.abort(),c.l=null);c.m=null;wG(c); AG(c)});this.eventManager.o(this.bar,"mousemove",function(d){var e=c.bar.getBoundingClientRect(),f=parseFloat(c.bar.min),g=parseFloat(c.bar.max);d=Math.max(0,d.clientX-e.left);e=Math.min(g,Math.round(f+(g-f)/e.width*d));c.player.gh().length?(AG(c),BG(c,d,e)):(wG(c),CG(c,d,e))});this.eventManager.o(this.container,"mouseleave",function(){AG(c);c.s.stop();c.s.X(.25)});this.setValue(this.video.currentTime);this.update();xG(this);this.ad&&dG(this.container,!1)}pa(uG,sG);p=uG.prototype; p.release=function(){this.u&&(this.u.stop(),this.u=null,this.B.stop(),this.B=null);sG.prototype.release.call(this)};p.onChangeStart=function(){this.L=!this.video.paused;this.controls.Xh(!0);this.video.pause();this.s.stop();this.I=!0};p.onChange=function(){if(this.video.duration)if(this.update(),this.u.X(.125),this.player.gh().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());BG(this,(d-a)/((b-a)/c.width),d)}else wG(this)}; p.onChangeEnd=function(){this.u.Ja();this.controls.Xh(!1);this.L&&this.video.play();this.I&&(this.I=!1,this.s.stop(),this.s.X(.25))};p.isShowing=function(){return!this.container.classList.contains("shaka-hidden")}; p.update=function(){var a=this.H.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0;c=this.player.xa();var f=c.end-c.start;this.setRange(c.start,c.end);yG(this)?(dG(this.container,!0),d=(Math.max(d,c.start)-c.start)/f||0,e=(Math.min(e,c.end)-c.start)/f||0,b=(Math.min(Math.max(b,c.start),c.end)-c.start)/f||0,this.container.style.background="linear-gradient("+["to right",(this.H.showUnbufferedStart?a.base:a.played)+" "+ 100*d+"%",a.played+" "+100*d+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")"):dG(this.container,!1)}; function vG(a){if(a.C.length){for(var b=a.player.xa(),c=b.end-b.start,d=["to right"],e=[],f=a.H.seekBarColors.adBreaks,g=!1,h=u(a.C),k=h.next();!k.done;k=h.next())if(k=k.value,-1==k.start&&!k.end)g=!0;else if(!k.end&&k.start>=b.start||"number"==typeof k.end&&k.end>b.start){var l=(Math.max(k.start,b.start)-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}e=e.sort(function(n,q){return n.start-q.start});b=u(e);for(c=b.next();!c.done;c=b.next())c=c.value,d.push("transparent "+ 100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.D.style.background="linear-gradient("+d.join(",")+")"}else a.D.style.background="transparent",a.B.stop()}function zG(a){function b(){vG(a);var c=a.player.xa();c=c.end-c.start;a.player.T()&&5b||!isFinite(b))?!1:null==a.ad||!a.ad.isLinear()}function xG(a){a.bar.ariaLabel=a.localization.resolve("SEEK")} function CG(a,b,c){var d=a.j.clientWidth;a.j.style.width="auto";a.j.style.height="20px";a.j.style.top="-30px";a.j.style.left=Math.min(a.bar.offsetWidth-d,Math.max(0,b-d/2))+"px";a.j.style.right="";a.j.style.visibility="visible";b=a.player.xa();a.player.T()?(c=b.end-c,1>c?(a.j.textContent=a.localization.resolve("LIVE"),a.j.style.left="",a.j.style.right="0px"):a.j.textContent="-"+DG(c)):a.j.textContent=DG(c-b.start)} function BG(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,w,v,y,z,A;Q(function(B){switch(B.g){case 1:return 0>c&&(c=0),d=a.player.xa(),e=Math.max(Math.ceil(d.start),Math.min(Math.floor(d.end),c)),a.player.T()?(f=d.end-c,a.G.textContent=1>f?a.localization.resolve("LIVE"):"-"+DG(f)):a.G.textContent=DG(c),F(B,a.player.Ri(null,e),2);case 2:g=B.h;if(!g||!g.uris||!g.uris.length)return wG(a),CG(a,b,c),B.return();g.width';ta(B, 5);q=bh;r=ym(g.uris,g.startByte,g.endByte,a.player.getConfiguration().streaming.retryParameters);a.l=a.player.Hb().request(q,r,{type:1});return F(B,a.l.promise,7);case 7:t=B.h;a.l=null;"mjpg"==g.codecs?(w=(new kh).box("mdat",uh(function(D){n=URL.createObjectURL(new Blob([D],{type:"image/jpeg"}))})),w.parse(t.data,!1)):(v=g.mimeType||"image/jpeg",y=new Blob([t.data],{type:v}),n=URL.createObjectURL(y));wa(B,4);break;case 5:z=xa(B);if(7001==z.code)return B.return();throw z;case 4:try{a.h.removeChild(a.g)}catch(D){}a.g= W("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=n;a.g.onload=function(){n.startsWith("blob:")&&URL.revokeObjectURL(n)};a.h.insertBefore(a.g,a.h.firstChild);case 3:A=k/g.width,g.imageHeight?a.g.height=g.imageHeight:g.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain"),g.imageWidth?a.g.width=g.imageWidth:g.sprite||(a.g.style.width="100%",a.g.style.objectFit="contain"),a.g.style.left="-"+A*g.positionX+"px",a.g.style.top="-"+A*g.positionY+"px",a.g.style.transform= "scale("+A+")",a.g.style.transformOrigin="left top",l=Math.floor(k*g.height/g.width),a.h.style.height=l+"px",a.h.style.top=-(l-h)+"px",H(B)}})}function wG(a){a.h.style.visibility="hidden"}function AG(a){a.j.style.visibility="hidden"}function DG(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}S("shaka.ui.SeekBar",uG);function EG(){}EG.prototype.create=function(a,b){return new uG(a,b)}; uG.Factory=EG;function FG(a,b){ZF.call(this,a,b);var c=this;this.j=W("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=W("div");this.h.classList.add("shaka-skip-ad-counter");dG(this.h,!1);this.j.appendChild(this.h);this.g=Kj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;dG(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);GG(this);this.i=new yf(function(){if(c.ad.isSkippable()){var d=Math.round(c.ad.getTimeUntilSkippable()); 0h&&g>b?(b=2*Math.sqrt(1+g-h-b),a[3]=(f-l)/b,a[0]=.25*b,a[1]=(c+e)/b,a[2]=(k+d)/b):h>b?(b=2*Math.sqrt(1+h-g-b),a[3]=(k- d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=2*Math.sqrt(1+b-g-h),a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function NG(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c+c,g=d+d,h=e+e;c*=f;var k=d*f;d*=g;var l=e*f,m=e*g;e*=h;f*=b;g*=b;b*=h;a[0]=1-d-e;a[1]=k+b;a[2]=l-g;a[3]=0;a[4]=k-b;a[5]=1-c-e;a[6]=m+f;a[7]=0;a[8]=l+g;a[9]=m-f;a[10]=1-c-d;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1};function OG(){var a=new Float32Array(4);a[3]=1;return a}function PG(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;0=f;f++){var g=f*e/100,h=Math.sin(g);g=Math.cos(g);for(var k=0;100>=k;k++){var l=2*k*a/100;b.push(Math.sin(l)*h,g,Math.cos(l)*h);c.push(k/100,f/100)}}for(e=0;100>e;e++)for(a=0;100>a;a++)f=101*e+a,h=f+101,d.push(f,h,f+1),d.push(h,h+1,f+1);return{Vj:b,Sj:c,indices:d}};function RG(a,b,c,d,e){this.i=a;this.oa=b;this.s=c;this.g=d;this.u=new Oc;this.L=OG();this.h=OG();this.ea=this.na=this.$=this.l=null;this.D=JG();this.I=JG();this.N=JG();this.Y=JG();this.C=null;this.O=!1;this.J=this.B=null;this.ra=this.sa=0;this.Z=this.P=this.R=this.K=null;this.H=this.G=0;this.j=75;this.U=0;this.m=e;this.F=-1;SG(this)} RG.prototype.release=function(){-1!=this.F&&(this.i.cancelVideoFrameCallback(this.F),this.F=-1);this.u&&(this.u.release(),this.u=null);this.B&&(this.B.stop(),this.B=null);this.J&&(this.J.stop(),this.J=null)};RG.prototype.Pd=function(){(this.O=!this.O)||this.g.viewport(0,0,this.s.width,this.s.height);TG(this,!1)}; function SG(a){UG(a);VG(a);WG(a);XG(a);YG(a);xl(a.i,HTMLMediaElement.HAVE_CURRENT_DATA,a.u,function(){a.i.readyState>=HTMLMediaElement.HAVE_ENOUGH_DATA&&TG(a);if("requestVideoFrameCallback"in a.i){var b=function(){-1!=a.F&&(TG(a),-1!=a.F&&(a.F=a.i.requestVideoFrameCallback(b)))};a.F=a.i.requestVideoFrameCallback(b)}else{var c;a.u.o(a.i,"canplaythrough",function(){TG(a)});a.u.o(a.i,"playing",function(){a.B&&a.B.stop();if(!c){var d=a.oa.kb();d=u(d);for(var e=d.next();!e.done;e=d.next())(e=e.value.frameRate)&& (!c||cMath.abs(f-m)&&1E-6>Math.abs(g-e)&&1E-6>Math.abs(c-n))for(f=0;16>f;f++)b[f]=0==f%5?1:0;else{d=f-m;e=g-e;m=c-n;var q=1/Math.sqrt(d*d+e*e+m*m);d*=q;e*=q;m*=q;n=k*m-l*e;l=l*d-h*m;h=h*e-k*d;(q=Math.sqrt(n*n+l*l+h*h))?(q=1/q,n*=q,l*=q,h*=q):h=l=n=0;k=e*h-m*l;var r=m*n-d*h;var t=d*l-e*n;(q=Math.sqrt(k*k+r*r+t*t))?(q=1/q,k*=q,r*=q,t*=q):t=r=k=0;b[0]=n;b[1]=k;b[2]= d;b[3]=0;b[4]=l;b[5]=r;b[6]=e;b[7]=0;b[8]=h;b[9]=t;b[10]=m;b[11]=0;b[12]=-(n*f+l*g+h*c);b[13]=-(k*f+r*g+t*c);b[14]=-(d*f+e*g+m*c);b[15]=1}MG(a.L,a.D);a=b=a.Y;c=[4,4,4];f=c[0];g=c[1];c=c[2];b[0]=a[0]*f;b[1]=a[1]*f;b[2]=a[2]*f;b[3]=a[3]*f;b[4]=a[4]*g;b[5]=a[5]*g;b[6]=a[6]*g;b[7]=a[7]*g;b[8]=a[8]*c;b[9]=a[9]*c;b[10]=a[10]*c;b[11]=a[11]*c;b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15]} function VG(a){ZG(a);a.g.viewport(0,0,a.g.drawingBufferWidth,a.g.drawingBufferHeight);a.g.clearColor(0,0,0,1);a.g.enable(a.g.CULL_FACE);a.g.cullFace(a.g.FRONT);a.g.clear(a.g.COLOR_BUFFER_BIT)} function WG(a){var b=$G(a,a.g.VERTEX_SHADER),c=$G(a,a.g.FRAGMENT_SHADER);a.l=a.g.createProgram();a.g.attachShader(a.l,b);a.g.attachShader(a.l,c);a.g.linkProgram(a.l);"cubemap"==a.m?(a.R=a.g.getAttribLocation(a.l,"aVertexPosition"),a.P=a.g.getAttribLocation(a.l,"aTextureCoord")):(a.R=a.g.getAttribLocation(a.l,"a_vPosition"),a.g.enableVertexAttribArray(a.R),a.P=a.g.getAttribLocation(a.l,"a_TexCoordinate"),a.g.enableVertexAttribArray(a.P))} function $G(a,b){switch(b){case a.g.VERTEX_SHADER:var c="cubemap"==a.m?"attribute vec4 aVertexPosition;\nattribute vec2 aTextureCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvarying highp vec2 vTextureCoord;\nvarying highp vec3 vLighting;\nvoid main(void) {\n gl_Position = uProjectionMatrix * uModelViewMatrix * aVertexPosition;\n vTextureCoord = aTextureCoord;\n}":"attribute vec4 a_vPosition;\n// Per-vertex texture coordinate info\nattribute vec2 a_TexCoordinate;\nuniform mat4 u_VPMatrix;\n// Passed into the fragment shader.\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nvoid main()\n{\n gl_Position = u_VPMatrix * a_vPosition;\n // Pass through texture coord\n v_TexCoordinate = a_TexCoordinate;\n pass_position = a_vPosition.xyz;\n}"; break;case a.g.FRAGMENT_SHADER:c="cubemap"==a.m?"varying highp vec2 vTextureCoord;\nuniform sampler2D uSampler;\nvoid main(void) {\n highp vec4 texelColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = vec4(texelColor.rgb , texelColor.a);\n}":"precision highp float;\n#define PI 3.141592653589793238462643383279\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nuniform sampler2D uSampler;\nvoid main(void) {\nhighp float xValue =\n (PI + atan(pass_position.z, pass_position.x)) / (2.0 * PI);\n vec2 tc = vec2(xValue, v_TexCoordinate.t);\n tc = vec2(tc.x , tc.y);\nhighp vec4 texelColor =\n texture2D(uSampler, tc);\n gl_FragColor = vec4(texelColor.rgb, texelColor.a);\n}"; break;default:return null}b=a.g.createShader(b);a.g.shaderSource(b,c);a.g.compileShader(b);return b} function XG(a){a.K="cubemap"==a.m?{Vj:[-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1],Sj:[2/3,.5,1/3,.5,1/3,0,2/3,0,2/3,.5,2/3,0,1,0,1,.5,1,1,2/3,1,2/3,.5,1,.5,0,.5,0,0,1/3,0,1/3,.5,0,.5,1/3,.5,1/3,1,0,1,1/3,1,1/3,.5,2/3,.5,2/3,1],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}:"halfequirectangular"==a.m?QG(!0): QG();a.$=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.$);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.Vj),a.g.STATIC_DRAW);a.na=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.na);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.Sj),a.g.STATIC_DRAW);a.ea=a.g.createBuffer();a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ea);a.g.bufferData(a.g.ELEMENT_ARRAY_BUFFER,new Uint16Array(a.K.indices),a.g.STATIC_DRAW)} function YG(a){a.Z=a.g.createTexture();a.g.bindTexture(a.g.TEXTURE_2D,a.Z);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_S,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_T,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MIN_FILTER,a.g.NEAREST);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MAG_FILTER,a.g.NEAREST)} function TG(a,b){b=void 0===b?!0:b;var c=a.oa.m==Iq;if(!(!a.i||2>a.i.readyState||!c&&0==a.i.playbackRate)){KG(a.I,a.j*Math.PI/180,1.5625);"cubemap"==a.m?KG(a.I,a.j*Math.PI/180,2.5):KG(a.I,a.j*Math.PI/180,1.5625);a.g.useProgram(a.l);a.g.clear(a.g.COLOR_BUFFER_BIT);ZG(a);b&&(a.g.activeTexture(a.g.TEXTURE0),a.g.bindTexture(a.g.TEXTURE_2D,a.Z),a.g.pixelStorei(a.g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),a.g.texImage2D(a.g.TEXTURE_2D,0,a.g.RGBA,a.g.RGBA,a.g.UNSIGNED_BYTE,a.i));if("equirectangular"==a.m||"halfequirectangular"== a.m)LG(a.N,a.D,a.Y),LG(a.N,a.I,a.N);a.g.bindBuffer(a.g.ARRAY_BUFFER,a.$);a.g.vertexAttribPointer(a.R,3,a.g.FLOAT,!1,0,0);a.g.enableVertexAttribArray(a.R);a.g.bindBuffer(a.g.ARRAY_BUFFER,a.na);a.g.vertexAttribPointer(a.P,2,a.g.FLOAT,!1,0,0);a.g.enableVertexAttribArray(a.P);a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ea);"cubemap"==a.m?(a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"uProjectionMatrix"),!1,a.I),a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"uModelViewMatrix"),!1,a.N)):a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l, "u_VPMatrix"),!1,a.N);a.g.uniform1i(a.g.getUniformLocation(a.l,"uSampler"),0);a.O&&a.g.viewport(0,0,a.s.width/2,a.s.height);a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0);a.O&&(a.g.viewport(a.s.width/2,0,a.s.width/2,a.s.height),a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0))}} function ZG(a){var b=a.i.videoWidth;b||(b=a.s.scrollWidth);var c=a.i.videoHeight;c||(c=a.s.scrollHeight);if(a.sa!==b||a.ra!==c){a.s.width=b;a.s.height=c;a.sa=b;a.ra=c;var d=b/c,e=a.I,f=-d,g=1/(d-f);e[0]=0*g;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=0;e[6]=0;e[7]=0;e[8]=(d+f)*g;e[9]=0;e[10]=-1;e[11]=-1;e[12]=0;e[13]=0;e[14]=-0;e[15]=0;a.I=e;a.g.viewport(0,0,b,c)}} function aH(a,b,c,d){var e=Infinity,f=90*Math.PI/180;"halfequirectangular"==a.m&&(e=90*Math.PI/180,f/=2);var g="cubemap"==a.m?a.N:a.D;a.G+=b;a.H+=c;if(a.G-e){e=Math.sin(b);b=Math.cos(b);var h=g[0],k=g[1],l=g[2],m=g[3],n=g[8],q=g[9],r=g[10],t=g[11];g!==g&&(g[4]=g[4],g[5]=g[5],g[6]=g[6],g[7]=g[7],g[12]=g[12],g[13]=g[13],g[14]=g[14],g[15]=g[15]);g[0]=h*b-n*e;g[1]=k*b-q*e;g[2]=l*b-r*e;g[3]=m*b-t*e;g[8]=h*e+n*b;g[9]=k*e+q*b;g[10]=l*e+r*b;g[11]=m*e+t*b}else a.G-=b;a.H-f?(f=JG(),e=JG(),b= -1*c,c=Math.sin(b),b=Math.cos(b),h=e[4],k=e[5],l=e[6],m=e[7],n=e[8],q=e[9],r=e[10],t=e[11],e!==f&&(f[0]=e[0],f[1]=e[1],f[2]=e[2],f[3]=e[3],f[12]=e[12],f[13]=e[13],f[14]=e[14],f[15]=e[15]),f[4]=h*b+n*c,f[5]=k*b+q*c,f[6]=l*b+r*c,f[7]=m*b+t*c,f[8]=n*b-h*c,f[9]=q*b-k*c,f[10]=r*b-l*c,f[11]=t*b-m*c,LG(g,f,g)):a.H-=c;c=JG();f=JG();e=Math.sin(d);d=Math.cos(d);b=f[0];h=f[1];k=f[2];l=f[3];m=f[4];n=f[5];q=f[6];r=f[7];f!==c&&(c[8]=f[8],c[9]=f[9],c[10]=f[10],c[11]=f[11],c[12]=f[12],c[13]=f[13],c[14]=f[14],c[15]= f[15]);c[0]=b*d+m*e;c[1]=h*d+n*e;c[2]=k*d+q*e;c[3]=l*d+r*e;c[4]=m*d-b*e;c[5]=n*d-h*e;c[6]=q*d-k*e;c[7]=r*d-l*e;LG(g,c,g);TG(a,!1)} function bH(a,b){if(void 0===b||b)MG(a.h,a.D),a.U=0,a.C=OG(),a.C[0]=(a.h[0]-a.L[0])/20,a.C[1]=(a.h[1]-a.L[1])/20,a.C[2]=(a.h[2]-a.L[2])/20,a.C[3]=(a.h[3]-a.L[3])/20;a.h[0]-=a.C[0];a.h[1]-=a.C[1];a.h[2]-=a.C[2];a.h[3]-=a.C[3];b=JG();PG(a.h,a.h);NG(b,a.h);a.D=b;a.J&&(a.J.stop(),a.J=null);20>a.U?a.J=(new yf(function(){bH(a,!1);a.G=0;a.H=0;a.U++;TG(a,!1)})).X(.025):(NG(b,a.L),a.D=b)};function cH(a,b,c,d,e){jb.call(this);var f=this;this.i=a;this.j=b;this.F=c;this.J=d;this.u=e;this.s=new Oc;this.h=new Oc;this.B=dH(this.j);this.g=null;this.l=!1;this.I=this.H=this.G=this.D=this.C=0;this.m=null;this.s.o(d,"loading",function(){f.g&&bH(f.g);eH(f)});this.s.o(d,"spatialvideoinfo",function(g){g=g.detail;switch(g.projection){case "hequ":switch(g.hfov){case 360:f.m="equirectangular";break;case 180:f.m="halfequirectangular"}break;case "fish":f.m="equirectangular";break;default:f.m=null}eH(f)}); this.s.o(d,"nospatialvideoinfo",function(){f.m=null;eH(f)});this.s.o(d,"unloading",function(){f.m=null;eH(f)});eH(this)}pa(cH,jb);p=cH.prototype;p.release=function(){this.s&&(this.s.release(),this.s=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);jb.prototype.release.call(this)};p.configure=function(a){this.u=a;eH(this)};p.Dg=function(){return this.j?!!this.B:!!dH(document.createElement("canvas"))};p.Sb=function(){return!!this.g}; p.Pd=function(){this.g?this.g.Pd():ab("Not playing VR content")};p.ph=function(a){this.g?aH(this.g,a*fH,0,0):ab("Not playing VR content")};p.nh=function(a){this.g?aH(this.g,0,a*fH,0):ab("Not playing VR content")};p.oh=function(a){this.g?aH(this.g,0,0,a*fH):ab("Not playing VR content")}; function eH(a){if(a.u.displayInVrMode||a.m){a.j||(a.j=document.createElement("canvas"),a.j.classList.add("shaka-vr-canvas-container"),a.F.parentElement.insertBefore(a.j,a.F.nextElementSibling),a.B=dH(a.j));var b=a.m||a.u.defaultVrProjectionMode;a.g?a.g.m!=b&&(a.h.Sa(),a.g.release(),gH(a,b)):(a.j.style.display="",gH(a,b),a.dispatchEvent(new U("vrstatuschanged",(new Map).set("newStatus",a.Sb()))))}else!a.u.displayInVrMode&&!a.m&&a.j&&a.g&&(a.j.style.display="none",a.h.Sa(),a.g.release(),a.g=null,a.dispatchEvent(new U("vrstatuschanged", (new Map).set("newStatus",a.Sb()))))}function gH(a,b){a.B&&a.j&&(a.g=new RG(a.F,a.J,a.j,a.B,b),hH(a))}function dH(a){if(!a)return null;var b=Rb().Ia();if("TV"==b||"CONSOLE"==b||"CAST"==b)return null;b=u(["webgl2","webgl"]);for(var c=b.next();!c.done;c=b.next())if(c=a.getContext(c.value))return c;return null} function hH(a){a.h.o(a.i,"mousedown",function(d){if(!a.l){var e=d.clientX;d=d.clientY;a.l=!0;a.C=e;a.D=d}});0=e.j&&(e.j+=f);20>e.j?e.j=20:100\n \n \n \n \n \n \n \n ')} function BH(a){var b=W("div");b.classList.add("shaka-hidden-fast-forward-container");a.h.appendChild(b);a.Za=new qG(b,a);a.H.push(a.Za)}function CH(a){var b=W("div");b.classList.add("shaka-hidden-rewind-container");a.h.appendChild(b);a.eb=new rG(b,a);a.H.push(a.eb)} function DH(a){a.L=W("div");a.L.classList.add("shaka-bottom-controls");a.L.classList.add("shaka-no-propagation");a.h.appendChild(a.L);a.i.o(a.L,"click",function(e){e.target.closest(".shaka-overflow-button")||a.Xc()});LH(a);MH(a);a.G=W("div");a.G.classList.add("shaka-controls-button-panel");a.G.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.G.classList.add("shaka-tooltips-on");a.L.appendChild(a.G);for(var b=u(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())if(c=c.value, vH.get(c)){var d=vH.get(c).create(a.G,a);a.H.push(d);"time_and_duration"==c&&(c=new fG(a.G,a),a.H.push(c))}else ab("Unrecognized control panel element requested:",c)}function MH(a){if(a.g.addSeekBar)a.s=NH.create(a.L,a),a.H.push(a.s);else{for(var b=u(a.I),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a=a.G;a.classList.contains("shaka-tooltips-on")&&a.classList.add("shaka-tooltips-low-position")}} function xH(a){a.F=W("div");a.F.classList.add("shaka-client-side-ad-container");dG(a.F,!1);a.i.o(a.F,"click",function(){pG(a)});a.l.appendChild(a.F)} function pH(a){a.i.o(a.u,"buffering",function(){OH(a)});OH(a);a.i.o(window,"keydown",function(b){PH(a,b)});a.i.o(window,"click",function(){return a.Xc()});a.i.o(a,"submenuopen",function(){a.Xc()});a.i.o(a.B,"play",function(){kH(a)});a.i.o(a.B,"pause",function(){kH(a)});a.i.o(a.l,"mousemove",function(b){KH(a,b)});a.i.o(a.l,"touchmove",function(b){KH(a,b)},{passive:!0});a.i.o(a.l,"touchend",function(b){KH(a,b)},{passive:!0});a.i.o(a.l,"mouseleave",function(){a.O||a.J.Ja()});a.i.o(a.l,"wheel",function(b){KH(a, b)},{passive:!0});a.i.o(a.D,"caststatuschanged",function(){rH(a)});a.i.o(a.C,"vrstatuschanged",function(){a.dispatchEvent(new U("vrstatuschanged"))});a.i.o(a.l,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.h.contains(c)&&KH(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.s&&e&&!d&&0< c&&(b.preventDefault(),QH(a,a.s.getValue()-c));break;case "ArrowRight":a.s&&e&&!d&&0Math.abs(g-f)&&(g=Infinity);try{navigator.mediaSession.setPositionState({duration:Math.max(0,g),playbackRate:a.B.playbackRate,position:Math.max(0,f)})}catch(h){}}},d=function(){try{navigator.mediaSession.setPositionState()}catch(f){}}, e=function(f){var g=a.g.keyboardSeekDistance;switch(f.action){case "pause":mG(a);break;case "play":mG(a);break;case "seekbackward":if(f.seekOffset&&!isFinite(f.seekOffset))break;a.j&&a.j.isLinear()||QH(a,a.s.getValue()-(f.seekOffset||g));break;case "seekforward":if(f.seekOffset&&!isFinite(f.seekOffset))break;a.j&&a.j.isLinear()||QH(a,a.s.getValue()+(f.seekOffset||g));break;case "seekto":if(f.seekTime&&!isFinite(f.seekTime))break;a.j&&a.j.isLinear()||QH(a,a.u.xa().start+f.seekTime);break;case "stop":a.u.kc(); break;case "enterpictureinpicture":a.j&&a.j.isLinear()||a.md()}};b("pause",e);b("play",e);b("seekbackward",e);b("seekforward",e);b("seekto",e);b("stop",e);("documentPictureInPicture"in window||document.pictureInPictureEnabled)&&b("enterpictureinpicture",e);b=function(){a.u.T()||0!=a.u.xa().start?(c(),a.i.o(a.B,"timeupdate",c)):d()};a.u.Y&&b();a.i.o(a.u,"loaded",b);a.i.o(a.u,"unloading",function(){a.i.Ca(a.B,"timeupdate",c)});a.i.o(a.u,"metadata",function(f){if(f=f.payload){var g;"TIT2"==f.key&&f.data&& (g=f.data);var h;"APIC"==f.key&&"--\x3e"==f.mimeType&&(h=f.data);g&&(f={title:g,artwork:[]},navigator.mediaSession.metadata&&(f=navigator.mediaSession.metadata,f.title=g),navigator.mediaSession.metadata=new MediaMetadata(f));h&&(g=a.m,h!=g.poster&&(g.poster=h),g={title:"",artwork:[{src:h}]},navigator.mediaSession.metadata&&(g=navigator.mediaSession.metadata,g.artwork=[{src:h}]),navigator.mediaSession.metadata=new MediaMetadata(g))}})}} function tH(a){if(a.g.setupMediaSession&&navigator.mediaSession){try{navigator.mediaSession.setPositionState()}catch(b){}a=function(b){try{navigator.mediaSession.setActionHandler(b,null)}catch(c){}};a("pause");a("play");a("seekbackward");a("seekforward");a("seekto");a("stop");a("enterpictureinpicture")}} function RH(a){return Q(function(b){return a.B&&0!=a.B.readyState&&!a.D.Pa()&&a.g.enableFullscreenOnRotation&&a.ke()?screen.orientation.type.includes("landscape")&&!a.Hc()?F(b,GH(a),0):screen.orientation.type.includes("portrait")&&a.Hc()?F(b,HH(a),0):b.A(0):b.return()})} function KH(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),kH(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.O=Date.now():a.O+1E3.499995*g?(g=Math.PI/2,a=2*Math.atan2(c,a)):h<-.499995*g?(g=-Math.PI/2,a=2*Math.atan2(c,a)):(g=Math.asin(2*(a*d-b*c)),a=Math.atan2(2*(a*b+c*d),1-2*(e+f)));a=180*Math.acos(Math.cos(a)*Math.cos(g))/Math.PI}else ab("Not playing VR content"),a=null;return a};p.fl=function(){var a=this.C;a.g?a=a.g.j:(ab("Not playing VR content"),a=null);return a}; p.jm=function(a){var b=this.C;b.g?(0>a?(ab("Field of view should be greater than 0"),a=0):100=b.alpha&&(h="display");break;case "display":0>=--k&&(h="fadeOut");break;case "fadeOut":g=Math.max(0,g-l),0>=g&&(h="transition",f=d(),k=Math.round(60*b.displayDuration),h="fadeIn")}0b&&(c=u([c,b]),b=c.next().value,c=c.next().value);b/c>16/9&&(c=Math.round(9*b/16));a=a.controls.g.qualityMarks;return 8640<=c?c+"p":4320<=c?a["4320"]:2160<=c?a["2160"]:1440<=c?a["1440"]:1080<=c?a["1080"]:720<=c?a["720"]:""} function RJ(a){var b=$F(a.menu);Oj(a.menu);a.menu.appendChild(b);b=0;b=a.player.zd()?WJ(a):XJ(a);var c=Kj();c.classList.add("shaka-enable-abr-button");a.eventManager.o(c,"click",function(){a.player.configure({abr:{enabled:!0}});RJ(a)});a.j=W("span");a.j.textContent=a.localization.resolve("AUTO_QUALITY");c.appendChild(a.j);a.player.getConfiguration().abr.enabled&&(c.ariaSelected="true",c.appendChild(cG()),a.j.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY")); a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(c);bG(a.menu);a.controls.dispatchEvent(new U("resolutionselectionupdated"));QJ(a);dG(a.button,0f&&(e=u([e,f]),f=e.next().value,e=e.next().value);var g=e;f/e>16/9&&(g=Math.round(9*f/16));f=g+"p";e=new Set;g=u(c);for(var h=g.next();!h.done;h=g.next())h=h.value,h.frameRate&&e.add(Math.round(h.frameRate));1=e)&&(f+=Math.round(b.frameRate));if("PQ"==b.hdr||"HLG"==b.hdr)f+=" HDR";"CH-STEREO"== b.videoLayout&&(f+=" 3D");if(c.some(function(l){return d(b,l)})&&(c.some(function(l){return d(b,l)&&l.bandwidth==b.bandwidth})||(f+=" ("+Math.round(b.bandwidth/1E3)+" kbits/s)"),a.controls.g.showVideoCodec)){var k=function(l){var m="";l&&(l=ff(l),m=l.startsWith("dovi-")?"Dolby Vision":l.toUpperCase());return m?" "+m:m};c.some(function(l){return d(b,l)&&k(l.codecs)!=k(b.codecs)})&&(f+=k(b.codecs))}return f} function TJ(a,b,c){var d=Math.round(b.bandwidth/1E3)+" kbits/s";if(a.controls.g.showAudioCodec){var e=function(f){var g="";f&&(g=ff(f).toUpperCase());return g?" "+g:g};c.some(function(f){return e(f.codecs)!=e(b.codecs)})&&(d+=e(b.codecs))}return d} function QJ(a){var b=a.player.zd()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.j.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}S("shaka.ui.ResolutionSelection",PJ);function YJ(){} YJ.prototype.create=function(a,b){return new PJ(a,b)};ZH("quality",new YJ);uH("quality",new YJ);function ZJ(a,b){ZF.call(this,a,b);var c=this;this.g=Kj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);$J(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){$J(c)});this.eventManager.o(this.localization,"locale-changed",function(){$J(c)}); this.eventManager.o(this.g,"click",function(){if(c.controls.Ba()&&c.video.duration){var d=c.h.indexOf(c.player.Ya())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.video.paused&&c.video.play();c.player.Nc(d);c.g.setAttribute("shaka-status",d+"x")}});this.eventManager.o(this.player,"ratechange",function(){c.g.setAttribute("shaka-status",c.player.Ya()+"x")})}pa(ZJ,ZF);function $J(a){a.g.ariaLabel=a.localization.resolve("REWIND")}S("shaka.ui.RewindButton",ZJ);function aK(){} aK.prototype.create=function(a,b){return new ZJ(a,b)};uH("rewind",new aK);function bK(a,b){ZF.call(this,a,b);var c=this;this.l=this.controls.D;this.g=Kj();this.g.classList.add("shaka-save.video-frame-button");this.g.classList.add("shaka-tooltip");this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="download";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");this.i.textContent=this.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.appendChild(this.i); this.j=W("span");this.j.classList.add("shaka-current-selection-span");a.appendChild(this.j);this.g.appendChild(a);cK(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){cK(c)});this.eventManager.o(this.localization,"locale-changed",function(){cK(c)});this.eventManager.o(this.g,"click",function(){var d=document.createElement("canvas"),e=d.getContext("2d"),f=c.controls.m;d.width=f.videoWidth;d.height=f.videoHeight;e.drawImage(f,0,0,d.width,d.height); d=d.toDataURL("image/png");e=document.createElement("a");e.href=d;e.download="videoframe_"+f.currentTime.toFixed(3)+".png";e.click()});this.eventManager.o(this.controls.C,"vrstatuschanged",function(){dK(c)});this.eventManager.o(this.adManager,"ad-started",function(){dK(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){dK(c)});this.eventManager.o(this.player,"unloading",function(){dK(c)});this.eventManager.o(this.player,"loaded",function(){dK(c)});this.eventManager.o(this.video,"play", function(){dK(c)});this.eventManager.o(this.video,"pause",function(){dK(c)});this.eventManager.o(this.video,"seeking",function(){dK(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){dK(c)});dK(this)}pa(bK,ZF);function dK(a){var b=!0;a.controls.Sb()&&(b=!1);b&&a.l.Pa()&&(b=!1);b&&(a.player.drmInfo()||a.player.zd())&&(b=!1);b&&a.ad&&(b=!1);b&&a.video.remote&&"disconnected"!=a.video.remote.state&&(b=!1);dG(a.g,b)} function cK(a){a.g.ariaLabel=a.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.i.textContent=a.localization.resolve("DOWNLOAD_VIDEO_FRAME")}S("shaka.ui.SaveVideoFrameButton",bK);function eK(){}eK.prototype.create=function(a,b){return new bK(a,b)};ZH("save_video_frame",new eK);iG("save_video_frame",new eK);function fK(a,b){ZF.call(this,a,b);var c=this;if(this.h=this.player.kh())this.g=Kj(),this.g.classList.add("shaka-skip-next-button"),this.g.classList.add("material-icons-round"),this.g.classList.add("shaka-tooltip"),this.g.textContent="skip_next",this.parent.appendChild(this.g),gK(this),hK(this),this.eventManager.o(this.localization,"locale-updated",function(){gK(c)}),this.eventManager.o(this.localization,"locale-changed",function(){gK(c)}),this.eventManager.o(this.g,"click",function(){c.controls.Ba()&& c.h.playItem(c.h.getCurrentItemIndex()+1)}),this.eventManager.o(this.h,"currentitemchanged",function(){hK(c)}),this.eventManager.o(this.h,"itemsinserted",function(){hK(c)}),this.eventManager.o(this.h,"itemsremoved",function(){hK(c)}),this.eventManager.o(this.player,"loading",function(){hK(c)})}pa(fK,ZF);function gK(a){a.g.ariaLabel=a.localization.resolve("SKIP_NEXT")}function hK(a){var b=a.h.getItems().length;b=1