/* @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 ba(a){var b=0;return function(){return b>>0)+"_",e=0;return b}); ha("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;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 Sa(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e=f}});ha("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Pa(b,d)&&c.push([d,b[d]]);return c}}); var Ta="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;cb||1342177279>>=1)c+=c;return d}});ha("Number.EPSILON",function(){return Math.pow(2,-52)}); ha("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});ha("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});ha("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Pa(b,d)&&c.push(b[d]);return c}});ha("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}}); ha("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Ra(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}});ha("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}});var Ua=this||self; function T(a,b){a=a.split(".");var c=Ua;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 Va(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Va.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Wa(a){return a.h/(1-Math.pow(a.g,a.i))};function Xa(){this.h=new Va(2);this.j=new Va(5);this.g=0;this.i=128E3;this.l=16E3}Xa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Xa.prototype.sample=function(a,b){if(!(bb)throw Error("Bad port number "+b);a.rd=b}else a.rd=null} function Fb(a,b,c){b instanceof Hb?a.g=b:(c||(b=Ib(b,Nb)),a.g=new Hb(b))}function Gb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Ib(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Ob),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Ob(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Jb=/[#\/\?@]/g,Lb=/[#\?:]/g,Kb=/[#\?]/g,Nb=/[#\?@]/g,Mb=/#/g;function Hb(a){this.g=a||null} function Pb(a){if(!a.fb&&(a.fb=new Map,a.Hd=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 bc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new U(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Yb(a);for(var e=0;e=c[d]}if(!a)return"";var c=Tb(a);if(239==c[0]&&187==c[1]&&191==c[2])return ac(c);if(254==c[0]&&255==c[1])return bc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return bc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return bc(a,!1);if(0==c[1]&&0==c[3])return bc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return ac(a);throw new U(2,2,2003);} function ec(a){if(window.TextEncoder&&!qb().jh()){var b=new TextEncoder;return Ub(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||""}T("shaka.util.StringUtils",$b);$b.resetFromCharCode=function(){gc.g=void 0}; $b.toUTF16=fc;$b.toUTF8=ec;$b.fromBytesAutoDetect=dc;$b.fromUTF16=bc;$b.fromUTF8=ac;var gc=new pb(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 u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);if(39===r||34===r){if(-1===e){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m/= ".indexOf(a[e])&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")} function od(a){return"string"===typeof a}function pd(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"!==typeof c&&b.push(c);return b}function qd(a,b){var c=[];if(!a.children)return[];a=t(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function rd(a){if("string"===typeof a)return hc(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:hc(a)} function sd(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=rd(a))&&(a=a.trim());return a}function td(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())td(d.value,b,c)}return c}function ud(a,b){a=qd(a,b);return 1!=a.length?null:a[0]}function vd(a,b,c){a=wd(a,b,c);return 1!=a.length?null:a[0]} function xd(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 yd(a,b,c){b=ld(b);return a.attributes[b+":"+c]||null}function wd(a,b,c){var d=ld(b);b=[];if(a.children)for(c=d?d+":"+c:c,a=t(a.children),d=a.next();!d.done;d=a.next())(d=d.value)&&d.tagName===c&&b.push(d);return b}function zd(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=yd(a,d.value,c))return d;return null} function Ad(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 Bd(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 Cd(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 Dd(a){a=Number(a);return 0===a%1?a:null}function Ed(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(!Wc(a.nestedCues,b.nestedCues,ce))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(!Wc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0} function fe(a,b){b=void 0===b?new Map:b;var c=a.payload;if(c.includes("<")){0===b.size&&ge(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=ie(c);a.payload="";try{var m=jd(""+c+"","span")}catch(n){}if(m)if(m=m.children,1!= m.length||m[0].tagName)for(m=t(m),c=m.next();!c.done;c=m.next())je(c.value,a,b);else a.payload=hc(c);else a.payload=hc(c)}else a.payload=hc(c)}function ge(a){for(var b=t(Object.entries(ke)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Qd(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(le));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Qd(0,0,""),e.backgroundColor=d,a.set("."+c,e)} function ie(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 je(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Qc;d.position=null;d.size=0;d.textAlign=Sd;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=me(g.backgroundColor,h.backgroundColor),h.color=me(g.color,h.color),h.fontFamily=me(g.fontFamily,h.fontFamily), h.fontSize=me(g.fontSize,h.fontSize),h.textShadow=me(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=ae(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=ne;break;case "i":d.fontStyle=oe;break;case "u":d.textDecoration.push(pe);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break; if(f=dd(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(od(a)||1==e.length&&od(e[0]))for(c=rd(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=ae(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));G(d)})};function Ve(a,b,c){a.l=b;a.m=c}function We(a,b,c){a.C=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)} function Xe(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Xe(a,d.value,c)} function Ye(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Xe(a,k,e);k.startTime>=a.l&&k.startTimey?(y=B,A=[E.Lf]):B==y&&A.push(E.Lf);m.push.apply(m,x(A))});h=m}c=new Set;b=new Set;h=t(h);for(e=h.next();!e.done;e=h.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);h=Array.from(c).sort(function(y,z){return y.bandwidth-z.bandwidth});var n=[];c=new Map;h=t(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=g(e);l=c.get(k)||[];if(l.length){var q=l[l.length-1],r=Ie(q.codecs),u=Ie(e.codecs);r!=u||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=Ie(y.codecs),B=Ie(z.codecs);if(A!=B)return(w[A]||1)-(w[B]||1)}return y.width-z.width}return y.bandwidth-z.bandwidth});b=Gc();var v=[];c=new Map;h=t(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=f(e); l=c.get(k)||[];if(l.length){q=l[l.length-1];if(!b&&(r=Ie(q.codecs),u=Ie(e.codecs),r!==u))continue;r=Ie(q.codecs);u=Ie(e.codecs);r!=u||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 rf(a,b,c){b=t(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=t(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 sf(a,b,c){a.variants=a.variants.filter(function(d){return tf(d,b,c)})} function tf(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=t([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)|| !d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}function uf(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,vf(a,b,0=a&&e.width>=b){a=e.height;b=e.width;break}c=fg(this,this.g.restrictions,d,a,b)}a=this.getBandwidthEstimate();d.length&& !c.length&&(c=fg(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.s-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.s<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.G(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))} function fg(a,b,c,d,e){if(a.C){var f=a.C.Uh();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return tf(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function gg(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}T("shaka.abr.SimpleAbrManager",eg);eg.prototype.configure=eg.prototype.configure; eg.prototype.setCmsdManager=eg.prototype.setCmsdManager;eg.prototype.setMediaElement=eg.prototype.setMediaElement;eg.prototype.playbackRateChanged=eg.prototype.playbackRateChanged;eg.prototype.setVariants=eg.prototype.setVariants;eg.prototype.getBandwidthEstimate=eg.prototype.getBandwidthEstimate;eg.prototype.trySuggestStreams=eg.prototype.trySuggestStreams;eg.prototype.segmentDownloaded=eg.prototype.segmentDownloaded;eg.prototype.disable=eg.prototype.disable;eg.prototype.enable=eg.prototype.enable; eg.prototype.chooseVariant=eg.prototype.chooseVariant;eg.prototype.init=eg.prototype.init;eg.prototype.release=eg.prototype.release;eg.prototype.stop=eg.prototype.stop;var ig=1;T("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function jg(a,b){if(a===b||!a.length||!b.length)return!0;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(kg(c))return!0;for(var d=t(b),e=d.next();!e.done;e=d.next())if(e=e.value,c.keySystem===e.keySystem||kg(e))return!0}return!1} function lg(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(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 kg(d)?c.push(d):kg(f)&&c.push(f)}return c} function mg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function ng(a){return a?!!a.match(/^com\.apple\.fps/):!1}function kg(a){return(a=a.licenseServerUri)?a.startsWith("data:application/json;base64,"):!1}var og=new pb(function(){return Ub(new Uint8Array([0]))}),pg=new Map;function qg(a,b){var c=rg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=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 sg(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 U(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return F(d,new Promise(function(e){(new $e(e)).ha(c/1E3)}),2)}a.h*=a.m;G(d)})}function rg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function tg(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}tg.prototype.resolve=function(){};tg.prototype.reject=function(){};function ug(a,b){this.promise=a;this.i=b;this.g=null}function vg(a){return new ug(Promise.reject(a),function(){return Promise.resolve()})}function wg(){var a=Promise.reject(new U(2,7,7001));a.catch(function(){});return new ug(a,function(){return Promise.resolve()})}function xg(a){return new ug(Promise.resolve(a),function(){return Promise.resolve()})}function yg(a){return new ug(a,function(){return a.catch(function(){})})}ug.prototype.abort=function(){this.g||(this.g=this.i());return this.g}; function zg(a){return new ug(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}ug.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this}; ug.prototype.Va=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Ag(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new tg;f.catch(function(){});var g=new U(2,7,7001);this.promise.then(c(!0),c(!1));return new ug(f,function(){return d()})}; function Ag(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()}}}fa.Object.defineProperties(ug.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}});T("shaka.util.AbortableOperation",ug);ug.prototype.chain=ug.prototype.Va;ug.prototype["finally"]=ug.prototype.finally; ug.all=zg;ug.prototype.abort=ug.prototype.abort;ug.notAbortable=yg;ug.completed=xg;ug.aborted=wg;ug.failed=vg;function V(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1} function Bg(a){var b=new V(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}V.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};V.prototype.stopImmediatePropagation=function(){this.g=!0};V.prototype.stopPropagation=function(){};T("shaka.util.FakeEvent",V); var Cg={fl:"abrstatuschanged",hl:"adaptation",il:"audiotrackchanged",jl:"audiotrackschanged",kl:"boundarycrossed",ll:"buffering",ol:"canupdatestarttime",ql:"complete",rl:"currentitemchanged",ul:"downloadcompleted",vl:"downloadfailed",wl:"downloadheadersreceived",xl:"drmsessionupdate",zl:"emsg",Fl:"itemsinserted",Gl:"itemsremoved",Wl:"prft",Error:"error",Al:"expirationupdated",Bl:"firstquartile",Cl:"gapjumped",Hl:"keystatuschanged",Ll:"loaded",Ml:"loading",Ol:"manifestparsed",Pl:"manifestupdated", Ql:"mediaqualitychanged",Rl:"mediasourcerecovered",Sl:"metadataadded",Metadata:"metadata",Tl:"midpoint",Ul:"nospatialvideoinfo",Vl:"onstatechange",Xl:"ratechange",$l:"segmentappended",am:"sessiondata",bm:"spatialvideoinfo",cm:"stalldetected",dm:"started",em:"statechanged",fm:"streaming",gm:"textchanged",hm:"texttrackvisibility",im:"thirdquartile",jm:"timelineregionadded",lm:"timelineregionenter",mm:"timelineregionexit",nm:"trackschanged",pm:"unloading",rm:"variantchanged"};function Dg(){this.Ya=new ib;this.xe=this}Dg.prototype.addEventListener=function(a,b){this.Ya&&this.Ya.push(a,b)};Dg.prototype.removeEventListener=function(a,b){this.Ya&&this.Ya.remove(a,b)};Dg.prototype.dispatchEvent=function(a){if(!this.Ya)return!0;var b=this.Ya.get(a.type)||[],c=this.Ya.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.xe;a.currentTarget=this.xe;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented}; Dg.prototype.release=function(){this.Ya=null};function Eg(){this.g=[]}function Fg(a,b){a.g.push(b.finally(function(){Uc(a.g,b)}))}Eg.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Gg(a,b,c,d,e,f,g){Dg.call(this);this.i=null;this.j=!1;this.s=new Eg;this.g=new Set;this.h=new Set;this.o=a||null;this.m=b||null;this.A=c||null;this.B=d||null;this.C=e||null;this.G=f||null;this.F=g||null;this.l=new Map}pa(Gg,Dg);p=Gg.prototype;p.configure=function(a){this.i=a};function Hg(a,b,c,d){d=void 0===d?!1:d;c=c||Ig;var e=Jg.get(a);(!e||c>=e.priority)&&Jg.set(a,{priority:c,tf:b,xk:d})} function Kg(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}p.Ak=function(a){this.g.add(a)};p.Wk=function(a){this.g.delete(a)};p.hj=function(){this.g.clear()};p.Bk=function(a){this.h.add(a)};p.Xk=function(a){this.h.delete(a)};p.ij=function(){this.h.clear()};p.Ih=function(){this.l.clear()}; function Lg(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();Dg.prototype.release.call(this);return this.s.destroy()}; p.request=function(a,b,c){var d=this,e=new Mg;if(this.j){var f=Promise.reject(new U(2,7,7001));f.catch(function(){});return new Ng(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?ed(b.retryParameters):rg();b.uris=ed(b.uris);f=Og(this,a,b,c);var g=f.Va(function(){return Pg(d,a,b,c,new qg(b.retryParameters,!1),0,null,e)}),h=g.Va(function(q){return Qg(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.Va(function(q){var r=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=r;q.Xj||!d.o||u.fromCache||"HEAD"==b.method||a!=Rg||d.o(u.timeMs,u.data.byteLength,Sg(c),b,c);d.F&&d.F(a,u,c);return u},function(q){q&&(q.severity=2);throw q;});f=new Ng(n.promise,function(){return n.abort()},e);Fg(this.s,f);return f}; function Og(a,b,c,d){function e(h){f=f.Va(function(){c.body&&(c.body=Ub(c.body));return h(b,c,d)})}var f=xg(void 0);a.C&&e(a.C);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Va(void 0,function(h){if(h instanceof U&&7001==h.code)throw h;throw new U(2,1,1006,h);})} function Pg(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 ah();var b=Tb(this.h,this.g,a);this.g+=a;return b}; p.skip=function(a){if(this.g+a>this.h.byteLength)throw ah();this.g+=a};p.Bi=function(a){if(this.ga||a>this.h.byteLength)throw ah();this.g=a};p.Sc=function(){for(var a=this.g;this.Fa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Tb(this.h,a,this.g-a);this.g+=1;return ac(a)};function ah(){return new U(2,3,3E3)}T("shaka.util.DataViewReader",Zg);Zg.prototype.readTerminatedString=Zg.prototype.Sc;Zg.prototype.seek=Zg.prototype.seek;Zg.prototype.rewind=Zg.prototype.Bi; Zg.prototype.skip=Zg.prototype.skip;Zg.prototype.readBytes=Zg.prototype.Sb;Zg.prototype.readUint64=Zg.prototype.ud;Zg.prototype.readInt32=Zg.prototype.Sg;Zg.prototype.readUint32=Zg.prototype.T;Zg.prototype.readUint16=Zg.prototype.Aa;Zg.prototype.readUint8=Zg.prototype.X;Zg.prototype.getLength=Zg.prototype.getLength;Zg.prototype.getPosition=Zg.prototype.Ma;Zg.prototype.hasMoreData=Zg.prototype.Fa;var $g=1;Zg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:$g};function bh(){this.i=new Map;this.h=new Map;this.g=!1}p=bh.prototype;p.box=function(a,b){a=ch(a);this.i.set(a,dh);this.h.set(a,b);return this};p.R=function(a,b){a=ch(a);this.i.set(a,eh);this.h.set(a,b);return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new Zg(a,0);for(this.g=!1;a.Fa()&&!this.g;)this.pd(0,a,b,c)}; p.pd=function(a,b,c,d){var e=b.Ma();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.T(),g=b.T(),h=fh(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Ma()+8>b.getLength()){this.g=!0;return}f=b.ud();k=!0}var l=this.h.get(g);if(l){var m=null,n=null;if(this.i.get(g)==eh){if(d&&b.Ma()+4>b.getLength()){this.g=!0;return}n=b.T();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.Ma(),b=0>24&255,a>>16&255,a>>8&255,a&255)} function hh(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}T("shaka.util.Mp4Parser",bh);bh.headerSize=hh;bh.typeToString=fh;bh.allData=lh;bh.audioSampleEntry=kh;bh.visualSampleEntry=jh;bh.sampleDescription=ih;bh.children=gh;bh.prototype.parseNext=bh.prototype.pd;bh.prototype.parse=bh.prototype.parse;bh.prototype.stop=bh.prototype.stop;bh.prototype.fullBox=bh.prototype.R;bh.prototype.box=bh.prototype.box;var dh=0,eh=1;function mh(a){var b=this;this.g=[];this.h=[];this.data=[];(new bh).box("moov",gh).box("moof",gh).R("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.s(new U(2,6,6006,f.message,f,h))}})}function Zh(a){return Q(function(b){return 1==b.g?a.K?F(b,a.m,3):b.u(0):F(b,Promise.all(a.S.map(function(c){return c.promise})),0)})} function Ih(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w;Q(function(v){switch(v.g){case 1:c=b.target;a.g.logLicenseExchange&&lc(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=Lg([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=dc(y.body);if(A){var B=JSON.parse(A);B.type||(B.type=z.sessionType,y.body=ec(JSON.stringify(B)))}}catch(E){}}if(mg(a.h.keySystem))if(y=bc(g.body,!0,!0),y.includes("PlayReadyKeyMessage")){y=jd(y,"PlayReadyKeyMessage");z=td(y,"HttpHeader");z=t(z);for(A=z.next();!A.done;A=z.next())B=A.value,A=td(B,"name")[0],B=td(B,"value")[0],g.headers[rd(A)]=rd(B);y=td(y,"Challenge")[0];g.body=mc(rd(y))}else g.headers["Content-Type"]="text/xml; charset=utf-8"; k=Date.now();wa(v,2);m=a.C.lc.request(2,g,{isPreload:a.P()});a.S.push(m);return F(v,m.promise,4);case 4:l=v.h;Uc(a.S,m);za(v,3);break;case 2:n=Aa(v);if(a.l.g)return v.return();q=new U(2,6,6007,n);1==a.i.size?(a.s(q),d&&d.Ib&&d.Ib.reject(q)):(d&&d.Ib&&d.Ib.reject(q),a.i.delete(c),Oh(a)&&(a.m.resolve(),a.L.ha(.1)));return v.return();case 3:if(a.l.g)return v.return();a.H+=(Date.now()-k)/1E3;a.g.logLicenseExchange&&lc(l.data);wa(v,5);return F(v,c.update(l.data),7);case 7:za(v,6);break;case 5:return r= Aa(v),u=new U(2,6,6008,r.message),a.s(u),d&&d.Ib&&d.Ib.reject(u),v.return();case 6:if(a.l.g)return v.return();w=new V("drmsessionupdate");a.C.onEvent(w);d&&(d.Ib&&d.Ib.resolve(),Wh(a,d));G(v)}})} function Yh(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=qb();if(mg(a.h.keySystem)&&16==g.byteLength&&h.Zg()){h=Yb(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=oc(g).slice(0,32);a.W.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Ib&&(a.i.delete(b),$h(b));Oh(a)&&(a.m.resolve(), a.L.ha(ai))}function ph(a){var b=a.W,c=a.ka;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.s(new U(2,6,6014));a.C.nf(Yg(c))} function bi(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,E,H,C,D,I,L,K,J,M,O,N,P,R,S;return Q(function(aa){if(1==aa.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=t(a);for(d=c.next();!d.done;d=c.next())e=d.value,b[e]=null;return aa.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;u=qb();w=function(W,Fa){var Ga,xa,qa,Da,Ja,ra,da,sa,Za,$a,hb,rb,mb;return Q(function(Ma){switch(Ma.g){case 1:return wa(Ma,2),F(Ma,Fa.createMediaKeys(),5);case 5:Ga=Ma.h;case 4:za(Ma,3);break;case 2:return Aa(Ma),Ma.return();case 3:qa= (xa=Fa.getConfiguration().sessionTypes)?xa.includes("persistent-license"):!1;u.ji()&&(qa=!1);Da=Fa.getConfiguration().videoCapabilities;Ja=Fa.getConfiguration().audioCapabilities;ra={persistentState:qa,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};r.has(W)&&r.get(W)?ra=r.get(W):r.set(W,ra);(da=Da[0].encryptionScheme)&&!ra.encryptionSchemes.includes(da)&&ra.encryptionSchemes.push(da);(sa=Da[0].robustness)&&!ra.videoRobustnessLevels.includes(sa)&&ra.videoRobustnessLevels.push(sa); (Za=Ja[0].robustness)&&!ra.audioRobustnessLevels.includes(Za)&&ra.audioRobustnessLevels.push(Za);if("getStatusForPolicy"in Ga){$a=[];hb=t(f);rb=hb.next();for(mb={};!rb.done;mb={Qd:void 0},rb=hb.next())mb.Qd=rb.value,ra.minHdcpVersions.includes(mb.Qd)||$a.push(Ga.getStatusForPolicy({minHdcpVersion:mb.Qd}).then(function(Td){return function(ic){"usable"!=ic||ra.minHdcpVersions.includes(Td.Qd)||ra.minHdcpVersions.push(Td.Qd)}}(mb)));return F(Ma,Promise.all($a),0)}Ma.u(0)}})};v=function(W,Fa,Ga,xa){var qa, Da,Ja,ra,da,sa,Za,$a,hb,rb,mb;return Q(function(Ma){switch(Ma.g){case 1:wa(Ma,2);qa=ed(n);Da=t(qa.videoCapabilities);for(Ja=Da.next();!Ja.done;Ja=Da.next())ra=Ja.value,ra.encryptionScheme=Fa,ra.robustness=Ga;da=t(qa.audioCapabilities);for(sa=da.next();!sa.done;sa=da.next())Za=sa.value,Za.encryptionScheme=Fa,Za.robustness=xa;$a=ed(qa);$a.persistentState="required";$a.sessionTypes=["persistent-license"];hb=[$a,qa];mb=qb();return"MOBILE"==mb.La()?F(Ma,df(5,navigator.requestMediaKeySystemAccess(W,hb)), 7):F(Ma,navigator.requestMediaKeySystemAccess(W,hb),6);case 6:rb=Ma.h;Ma.u(5);break;case 7:rb=Ma.h;case 5:return F(Ma,w(W,rb),8);case 8:za(Ma,0);break;case 2:Aa(Ma),G(Ma)}})};y=function(W,Fa,Ga,xa){var qa,Da,Ja,ra;return Q(function(da){switch(da.g){case 1:return wa(da,2),qa={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:W,video:{encryptionScheme:Fa, robustness:Ga},audio:{encryptionScheme:Fa,robustness:xa}}},Ja=qb(),"MOBILE"==Ja.La()?F(da,df(5,navigator.mediaCapabilities.decodingInfo(qa)),7):F(da,navigator.mediaCapabilities.decodingInfo(qa),6);case 6:Da=da.h;da.u(5);break;case 7:Da=da.h;case 5:return ra=Da.keySystemAccess,F(da,w(W,ra),8);case 8:za(da,0);break;case 2:Aa(da),G(da)}})};z=t(a);for(A=z.next();!A.done;A=z.next())B=A.value,r.set(B,null);E=function(W){return"WEBKIT"===qb().Ea()&&"org.w3.clearkey"===W?!1:!0};H=[];C=t(q);for(D=C.next();!D.done;D= C.next())for(I=D.value,L=t(a),K=L.next();!K.done;K=L.next())J=K.value,E(J)&&(H.push(v(J,I,"","")),H.push(y(J,I,"","")));M=t(a);for(O=M.next();!O.done;O=M.next())for(N=O.value,P=t(k[N]||[]),R=P.next();!R.done;R=P.next())S=R.value,E(N)&&(H.push(v(N,null,S,"")),H.push(v(N,null,"",S)),H.push(y(N,null,S,"")),H.push(y(N,null,"",S)));return F(aa,Promise.all(H),2)}return aa.return(Yg(r))})} function $h(a){return Q(function(b){if(1==b.g)return wa(b,2),F(b,df(ci,Promise.all([a.close().catch(function(){}),a.closed])),4);if(2!=b.g)return za(b,0);Aa(b);G(b)})} function vh(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=t(d);var e=d.next().value,f=d.next().value;return Q(function(g){if(1==g.g)return wa(g,2),a.oa||a.B.has(e.sessionId)||"persistent-license"!==f.type||a.g.persistentSessionOnlinePlayback?F(g,$h(e),5):F(g,e.remove(),5);if(2!=g.g)return za(g,0);Aa(g);G(g)})})),0)})}function Dh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])} function qh(a){a.i.forEach(function(b,c){var d=b.Ng,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.Ng=e)})}function Oh(a){a=a.i.values();return Wg(a,function(b){return b.loaded})}function Nh(a){for(var b=t(a.h&&a.h.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.W.get(c.value))return!1;return!0} function Ch(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)} function Uh(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={Ha:void 0},l=a.next()){m.Ha=l.value;b.includes(m.Ha.encryptionScheme)||b.push(m.Ha.encryptionScheme);"org.w3.clearkey"==m.Ha.keySystem&&m.Ha.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Ha.licenseServerUri)||k.push(m.Ha.licenseServerUri):c.includes(m.Ha.licenseServerUri)||c.push(m.Ha.licenseServerUri);e.includes(m.Ha.serverCertificateUri)||e.push(m.Ha.serverCertificateUri);m.Ha.serverCertificate&& (d.some(function(r){return function(u){return Sb(u,r.Ha.serverCertificate)}}(m))||d.push(m.Ha.serverCertificate));if(m.Ha.initData){l=t(m.Ha.initData);for(var n=l.next(),q={};!n.done;q={Eg:void 0},n=l.next())q.Eg=n.value,f.some(function(r){return function(u){var w=r.Eg;return u.keyId&&u.keyId==w.keyId?!0:u.initDataType==w.initDataType&&Sb(u.initData,w.initData)}}(q))||f.push(q.Eg)}if(m.Ha.keyIds)for(l=t(m.Ha.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Ha.keySystemUris&&h)for(m=t(m.Ha.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 Bi(a,b,c){var d=a.T(),e=[],f=null;c&1&&(f=a.Sg());c&4&&a.skip(4);for(var g=0;ga?"0":"")+a};function Hi(a){if(!Ii){Ii=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Ji=Ki("ftyp",b,d,b,c);b=Ki("dref",Li);Mi=Ki("dinf",b)}this.g=a} function Ni(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Ki;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/(Oi+1));m=Math.floor(m%(Oi+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(Pi(h,4)),[0,0,0,0],x(Pi(n,4)),x(Pi(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(Pi(k,2)),[0,0],x(Pi(l, 2)),[0,0]));h=Ki("tkhd",h);k=Ki;n=g.duration*g.timescale;l=Math.floor(n/(Oi+1));n=Math.floor(n%(Oi+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(Pi(g.timescale,4)),x(Pi(l,4)),x(Pi(n,4)),x(Pi(m,2)),[0,0]));l=Ki("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Qi;break;case "audio":m=Ri}n=Ki("hdlr",m);a:{switch(g.type){case "video":g=Ki("minf",Ki("vmhd",Si),Mi,Ti(g));break a; case "audio":g=Ki("minf",Ki("smhd",Ui),Mi,Ti(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=pc.apply(jc,x(b));f=a.g[0];c=Ki;d=f.duration*f.timescale;e=Math.floor(d/(Oi+1));d=Math.floor(d%(Oi+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(Pi(f.timescale,4)),x(Pi(e,4)),x(Pi(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=Ki("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(Pi(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Ki("trex",k),h.call(g,k);a=pc.apply(jc,x(d));a=Ki("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=pc.apply(jc,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Ji.byteLength+ a.byteLength);b.set(Ji);b.set(a,Ji.byteLength);return b} function Ti(a){var b=Ki,c="aac";a.codecs.includes("mp3")?c="mp3":a.codecs.includes("ac-3")?c=qb().ae()?"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(Pi(c,2)),x(Pi(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=Wi(a);g=new Uint8Array([]);a.encrypted&&(g=Xi(0,a.stream,a.codecs),d="encv");d=Ki(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=Xi(0,a.stream,a.codecs),d="enca");a=Ki(d,Yi(a),c,e)}d=a}a=Ki("stsd",Zi,d);return b("stbl",a,Ki("stts",$i),Ki("stsc",aj),Ki("stsz",bj),Ki("stco",cj))}function Wi(a){if(!a.Wa&&!a.Xa)return new Uint8Array([]);var b=a.Xa;a=new Uint8Array([].concat(x(Pi(a.Wa,4)),x(Pi(b,4))));return Ki("pasp",a)} function Yi(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(Pi(a.stream.audioSamplingRate||44100,2)),[0,0]))} function Xi(a,b,c){a=Ki;c=new Uint8Array([].concat(x(Pi(dj(c.split(".")[0]),4))));c=Ki("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(Pi(dj(d),4)),[0,1,0,0]));d=Ki("schm",d);e=Ki;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);b=t(b.drmInfos);for(var g=b.next();!g.done;g=b.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Vi(h.value)}b=new Uint8Array([0,0,0,0,0, 0,1,8]);b=Ki("tenc",b,f);return a("sinf",c,d,e("schi",b))} function ej(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Ki;var g=new Uint8Array([0,0,0,0].concat(x(Pi(c.data?c.data.Tb:0,4))));g=Ki("mfhd",g);var h;var k=c.data?c.data.xb:[];var l=new Uint8Array(4+k.length);for(h=0;h>8*b&255);return c}function Vi(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=t(g);for(k=h.next();!k.done;k=h.next())k=k.value,mj(a,k.start,k.size+4)}}return a} function jj(a,b,c,d,e,f){var g=Xi(new Hi([]),a,d.name),h=b.subarray(d.start,d.start+d.size);a=new Uint8Array(d.size+g.byteLength);a.set(h,0);Yb(a).setUint32(4,f);a.set(g,d.size);mj(a,0,a.byteLength);f=new Uint8Array(b.byteLength+a.byteLength);d=qb().Ze()?d.start:d.start+d.size;g=b.subarray(d);f.set(b.subarray(0,d));f.set(a,d);f.set(g,d+a.byteLength);b=t(e);for(e=b.next();!e.done;e=b.next())e=e.value,mj(f,e.start,e.size+a.byteLength);a=Yb(f,c.start);c=hh(c);b=a.getUint32(c);a.setUint32(c,b+1);return f} function mj(a,b,c){a=Yb(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 nj(a){function b(e){d.push({start:e.start,size:e.size});gh(e)}var c=Tb(a),d=[];(new bh).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=Yb(c,e.start),g=0;ga.end(0)-a.start(0)}function vj(a){return!a||uj(a)?null:a.length?a.end(a.length-1):null}function wj(a,b){return!a||!a.length||uj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function xj(a,b){if(!a||!a.length||uj(a))return 0;var c=0;a=t(yj(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 zj(a,b,c){if(!a||!a.length||uj(a))return null;a=yj(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function yj(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 Jj(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 Kj(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 Lj(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=ac(Tb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=ac(Tb(a.data,3+c,f)),h;"--\x3e"===d?h=ac(Tb(a.data,4+c+f)):h=Ub(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=ac(Tb(a.data,1,d));a=ac(Tb(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=ac(Tb(a.data,1,d));a=ac(Tb(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=ac(Tb(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=Ub(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=ac(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=ac(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Ub(a.data),b):null} function Mj(a){for(var b=0,c=[];Ij(a,b);){var d=Kj(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+=Kj(a,b+6),Jj(a,b+10)&&(d+=10),b+=d;return 0>>32-c;a.g-=c;0>>b))return a.h<<=b,a.g-=b,b;Qj(a);return b+Tj(a)}function Uj(a){Rj(a,1+Tj(a))}function X(a){var b=Tj(a);return Sj(a,b+1)-1}function Vj(a){a=X(a);return 1&a?1+a>>>1:-1*(a>>>1)}function Wj(a){return 1===Sj(a,1)}function Xj(a){return Sj(a,8)} function Yj(a,b){for(var c=8,d=8,e=0;ea.length)return this;for(var b=Math.max(0,bk(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,Xe:-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.s&&(a.s=e);c.pts=dk(e,a.s);a.s=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.o&&(a.o=d),c.dts=dk(d, a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}p.wk=function(a){wb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Pg(a,{Wd:null,state:null})}; p.Pg=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.Wd&&(c=k.length?k[k.length-1]:b.Wd)&&(c.data=pc(c.data,a),c.fullData=pc(c.fullData,a));b.state=f;return k}; p.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=pc.apply(jc,x(c.value)),(c=ck(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Mj(c.data),dts:c.dts,pts:c.pts});return a}; p.rb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=pc.apply(jc,x(c.value)),e=ck(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=pc(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.Mc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=pc.apply(jc,x(d.value)),f=ck(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=pc(d.data,e),this.g.push(d))}if(a){c={Wd:null,state:null};d=[];e=t(this.g);for(f=e.next();!f.done;f=e.next())f=f.value, f.nalus=this.Pg(f,c),f.nalus.length&&(d.push(f),c.Wd=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.rb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Mc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.Ld=function(){return{audio:this.A,video:this.m}}; p.We=function(){for(var a=[],b=t(this.Mc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};p.Vj=function(){wb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Cg();return{height:a.height,width:a.width}};p.Cg=function(){return"hvc"==this.m?mk(this):nk(this)};function ok(a){var b=a.Mc();return 1h?Yj(c,16):Yj(c,64))}}Uj(c);g=X(c);if(0===g)X(c);else if(1===g)for(Rj(c,1),Uj(c),Uj(c),g=X(c),h=0;hy;y++)Sj(d,2);for(y=0;yC;C++)H|=(E>>C&1)<<31-C;return H>>>0}(k);g=1==g?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+u;r&&(f+="."+r.toString(16).toUpperCase());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=ok(a);return b}function dk(a,b){var c=1;for(a>b&&(c=-1);4294967296bk(a)?!1:!0}function bk(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 Gk(a,b){return a.l.size?b==wc?a.h.h:vj(Fk(a,b)):null}function Hk(a,b,c){if(b==wc)return a=a.h,null==a.h||a.hb?F(g,Kk(e,a,function(){return Qk(e,a,b,c)},null),5):g.u(0)):e.m?F(g,Kk(e,f.Y,function(){return Qk(e,f.Y,b,c)},null),0):g.u(0)})}; function Rk(a,b){var c;return Q(function(d){return 1==d.g?(c=yc,b==c.Oa?a.h?F(d,a.h.remove(0,Infinity),0):d.return():F(d,Kk(a,b,function(){return Qk(a,b,0,a.i.duration)},null),4)):a.m?F(d,Kk(a,c.Y,function(){return Qk(a,c.Y,0,a.i.duration)},null),0):d.u(0)})}p.flush=function(a){var b=this,c;return Q(function(d){return 1==d.g?(c=yc,a==c.Oa?d.return():F(d,Kk(b,a,function(){b.g.currentTime-=.001;Ck(b,a)},null),2)):b.m?F(d,Kk(b,c.Y,function(){var e=c.Y;b.g.currentTime-=.001;Ck(b,e)},null),0):d.u(0)})}; function Sk(a,b,c,d,e,f,g,h,k){var l,m,n;return Q(function(q){if(1==q.g){l=yc;if(b==l.Oa)return f||(a.h.s=c),Ve(a.h,d,e),q.return();m=[];return F(q,Tk(a,b,g,h,k),2)}n=q.h;n||(m.push(Kk(a,b,function(){return Lk(a,b)},null)),a.m&&m.push(Kk(a,l.Y,function(){return Lk(a,l.Y)},null)));f||(m.push(Kk(a,b,function(){return Mk(a,b,c)},null)),a.m&&m.push(Kk(a,l.Y,function(){return Mk(a,l.Y,c)},null)));if(0!=d||Infinity!=e)m.push(Kk(a,b,function(){var r=a.l.get(b);r.appendWindowStart=0;r.appendWindowEnd=e;r.appendWindowStart= d;Ck(a,b)},null)),a.m&&m.push(Kk(a,l.Y,function(){var r=l.Y,u=a.l.get(r);u.appendWindowStart=0;u.appendWindowEnd=e;u.appendWindowStart=d;Ck(a,r)},null));return m.length?F(q,Promise.all(m),0):q.u(0)})} function Uk(a,b,c){var d,e;return Q(function(f){if(1==f.g){d=yc;if(b==d.Oa)return f.return();b==d.wa&&(a.Ua=new tg);if(!a.F||(e=Gk(a,b))&&.1>Math.abs(e-c))return f.return();Kk(a,b,function(){return Lk(a,b)},null);a.m&&Kk(a,d.Y,function(){return Lk(a,d.Y)},null);return F(f,Kk(a,b,function(){return Mk(a,b,c)},null),2)}return a.m?F(f,Kk(a,d.Y,function(){return Mk(a,d.Y,c)},null),0):f.u(0)})} p.endOfStream=function(a){var b=this;return Q(function(c){return F(c,Vk(b,function(){xk(b)||yk(b)||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};p.ob=function(a){var b=this;return Q(function(c){return F(c,Vk(b,function(){if(b.s.durationReductionEmitsUpdateEnd&&ac&&(c+=.001);var d=!0;"HLS"==a.S&&(d=Gk(a,b),d=!d||.15=b.o&&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=zj(c,b,a.h.gapDetectionThreshold),null==d||0==d&&!a.A||(e=c.start(d), (f=a.h.gapPadding)&&(e=Math.ceil(100*(e+f))/100),e>=a.B.Db()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.j&&(a.j=e),a.C++,a.s(new V("gapjumped")))))}}} function gl(a){if(!a.h.stallEnabled)return null;var b=a.h.stallThreshold,c=a.h.stallSkip;return new jl(new kl(a.g),b,function(){var d;return Q(function(e){if(1==e.g)return d=yj(a.g.buffered),d.length?c?(a.g.currentTime+=c,e.u(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.s(new V("stalldetected"));G(e)})})}function jl(a,b,c){this.h=a;this.m=il(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.i=!1;this.o=b;this.j=c} jl.prototype.release=function(){this.h&&this.h.release();this.j=this.h=null};function kl(a){var b=this;this.g=a;this.h=new jb;this.i=!1;this.h.D(this.g,"audiofocuspaused",function(){b.i=!0});this.h.D(this.g,"audiofocusgranted",function(){b.i=!1});this.h.D(this.g,"audiofocuslost",function(){b.i=!0})} function il(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=t(yj(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}kl.prototype.release=function(){this.h&&this.h.release();this.h=null};function ll(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=ml.value().get(b),c.za(a,b,d))}var ml=new pb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function nl(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new jb;this.i=new ol(a);ll(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){pl(e,e.j())})}nl.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 ql(a){return a.o?a.g.currentTime:a.j()} function rl(a,b){0Math.abs(a.g.currentTime-b)?tl(a):(a.h.za(a.g,"seeking",function(){tl(a)}),sl(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function tl(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)} function ol(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new $e(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--)})}ol.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function sl(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Ga(.1)};function ul(a){this.g=a;this.i=!1;this.h=null;this.j=new jb}p=ul.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=vl(b);null!==e&&(d=b.h.getTime()/1E3-e,d=wl(b,d))}null==d?b.i=!0:(0>d&&(d=Math.max(0,c+d)),c!=d?(b.j.za(b.g,"seeking",function(){b.i=!0}),b.g.currentTime=d):b.i=!0)}}var b=this;ll(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.Pf=function(a){this.h=this.i?this.h:a};p.Be=function(){var a=this.i?this.g.currentTime:this.h;a instanceof Date&&(a=a.getTime()/1E3-(vl(this)||0),a=wl(this,a));return a||0};p.Bh=function(){return 0};p.Ah=function(){return 0};p.mi=function(){};p.Zh=function(){var a=vj(this.g.buffered);return null!=a&&a>=this.g.duration-1};function vl(a){return a.g.getStartDate&&(a=a.g.getStartDate().getTime(),!isNaN(a))?a/1E3:null} function wl(a,b){a=a.g.seekable;0l-k&&(k=l-3);ha.g.getDuration()?a.g.Vb():a.g.Db():b instanceof Date?b=b.getTime()/1E3-(a.g.m||a.g.i):0>b&&(b=a.g.Db()+b);return Bl(a,Al(a,b))}p.mi=function(){this.j.pf()};p.Zh=function(){if(this.g.V()){var a=this.g.vc(),b=vj(this.h.buffered);if(null!=b&&b>=a)return!0}return!1}; function Bl(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function yl(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.Vb(),f=a.g.Db(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Nd(c),k=a.g.Nd(d);c=a.g.Nd(c+d);return b>=g?Bl(a,b):b>f?f-a.l.safeSeekEndOffset:b=h||wj(a.h.buffered,b)?b:c}function Al(a,b){var c=a.g.Vb();if(ba?a:b};function Cl(a){this.g=a;this.m=null;this.i=0;this.o=!1}p=Cl.prototype;p.getNumReferences=function(){return this.g.length};p.getNumEvicted=function(){return this.i};p.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.nk=function(){this.o=!0};p.Cb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function Qf(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.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)}; p.hf=function(a){if(!this.o&&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.hf(a);this.$a(b)};p.$a=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}}; p.gd=function(a,b,c){c=void 0===c?!1:c;if(!this.o){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 qj(a.startTime,b,a.C,a.startByte,a.endByte,a.Z,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.B,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.Ff=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new $e(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Ga(a))};Cl.prototype[Symbol.iterator]=function(){return this.Ub(0)}; Cl.prototype.Ub=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]}; T("shaka.media.SegmentIterator",Dl);Dl.prototype.resetToLastIndependent=Dl.prototype.Xg;Dl.prototype.next=Dl.prototype.next;Dl.prototype.current=Dl.prototype.current;Dl.prototype.currentPosition=Dl.prototype.lj;Dl.prototype.setReverse=Dl.prototype.yd;function Fl(){Cl.call(this,[]);this.h=[]}pa(Fl,Cl);p=Fl.prototype;p.clone=function(){var a=new Fl;a.h=this.h.slice();a.i=this.i;return a};p.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]}; p.Cb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Cb(a)};function Gl(a,b){a=t(a.h);for(var c=a.next();!c.done;c=a.next())b(c.value)}p.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};function Hl(a,b){a=t(a.h);for(var c=a.next();!c.done;c=a.next())if(c=c.value,null!=c.find(b))return c.Oe();return-1} p.get=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};p.offset=function(){};p.hf=function(){};p.$a=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.$a(a);for(;1=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)} Ml.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.fg;a:{var e=c.$d;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.nd;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&&!Wc(d.roles,e.roles);(g||h||d)&&Ql(this,a,e.contentType)&&(c.fg=e,d=new V("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Ql(this,a,e.contentType)&&(c.fg=e,JSON.stringify(e),c=new V("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}}; function Ql(a,b,c){return(a=a.h()[c])&&0=a[0].start&&b=d?!1:!0})}else b.$d=[]} function Rl(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 Sl(a){Dg.call(this);this.h=new Map;this.i=a;this.g=null}pa(Sl,Dg);Sl.prototype.release=function(){this.h.clear();this.g&&(this.g.stop(),this.g=null);Dg.prototype.release.call(this)};function Tl(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 V("regionadd",new Map([["region",b]])),a.dispatchEvent(b),Ul(a))} function Ul(a){a.g||(a.g=(new $e(function(){for(var b=a.i(),c=t(a.h),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;e.endTimed.endTime&&cm(this,d);b&&am(this)}; Vl.prototype.yd=function(a){this.o=a;this.g&&this.g.yd(a)};function am(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={Fg:void 0},d=c.next())e.Fg=d.value,b.some(function(f){return function(g){return pj(g.Z,f.Fg)}}(e))||cm(a,e.Fg)}function em(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&cm(a,d)}am(a)}function fm(a,b){b&&b!==a.i&&(dm(a),a.i=b)}function cm(a,b){var c=a.h;b instanceof oj&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()} function Zl(a){this.g=a;this.Yd=this.mh=null}function $l(a,b,c){var d=new Uint8Array(0);a.Yd=a.g(b,c,function(e){return Q(function(f){if(1==f.g)return 0>3,31===L&&C.Fa()&&(L=32+((I&7)<<3)+((C.X()&224)>>5)),D+="."+L));g.push(D);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 D=y||"";switch(y){case "dvav":D="avc3";break;case "dva1":D="avc1"}C=C.reader;C.skip(1);C=D+"."+Fi(C.X())+Fi(C.X())+Fi(C.X());h.push(C);l=!0}).box("hvcC",function(C){var D=y||"";switch(y){case "dvh1":D="hvc1";break;case "dvhe":D="hev1"}var I=C.reader;I.skip(1);C=I.X();var L=["","A","B","C"][C>>6],K=C&31,J=I.T(),M=(C&32)>>5?"H":"L";C=[I.X(),I.X(),I.X(),I.X(),I.X(),I.X()];I=I.X();for(var O=0,N=0;32>N;N++){O|=J&1;if(31==N)break;O<<=1;J>>=1}D=D+("."+L+K)+("."+ Fi(O,!0));D+="."+M+I;L="";for(K=C.length;K--;)if((M=C[K])||L)L="."+M.toString(16).toUpperCase()+L;D+=L;h.push(D);l=!0}).box("dvcC",function(C){var D=y||"";switch(y){case "hvc1":D="dvh1";break;case "hev1":D="dvhe";break;case "avc1":D="dva1";break;case "avc3":D="dvav";break;case "av01":D="dav1"}var I=C.reader;I.skip(2);C=I.X();I=I.X();h.push(D+"."+Gi(C>>1&127)+"."+Gi(C<<5&32|I>>3&31));l=!0}).box("dvvC",function(C){var D=y||"";switch(y){case "hvc1":D="dvh1";break;case "hev1":D="dvhe";break;case "avc1":D= "dva1";break;case "avc3":D="dvav";break;case "av01":D="dav1"}var I=C.reader;I.skip(2);C=I.X();I=I.X();h.push(D+"."+Gi(C>>1&127)+"."+Gi(C<<5&32|I>>3&31));l=!0}).R("vpcC",function(C){var D=y||"",I=C.reader;C=I.X();var L=I.X();I=I.X()>>4&15;h.push(D+"."+Gi(C)+"."+Gi(L)+"."+Gi(I));l=!0}).box("av1C",function(C){var D=y||"";switch(y){case "dav1":D="av01"}var I=C.reader;I.skip(1);C=I.X();I=I.X();var L=C>>>5,K=(I&64)>>6;h.push(D+"."+L+"."+Gi(C&31)+(I>>>7?"H":"M")+"."+Gi(2===L&&K?(I&32)>>5?12:10:K?10:8)+"."+ ((I&16)>>4)+"."+((I&8)>>3)+((I&4)>>2)+(I&3)+"."+Gi(1)+"."+Gi(1)+"."+Gi(1)+".0");l=!0}).box("enca",kh).box("encv",jh).box("sinf",gh).box("frma",function(C){C=Di(C.reader).codec;f(C)}).box("colr",function(C){h=h.map(function(L){if(L.startsWith("av01.")){var K=C.reader,J=K.Ma(),M=K.Sb(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=K.Aa();O=K.Aa();var N=K.Aa(),P=K.X()>>7,R=L.split(".");10==R.length&&(R[6]=Gi(M), R[7]=Gi(O),R[8]=Gi(N),R[9]=String(P),L=R.join("."))}K.seek(J)}return L});var D=Ei(C.reader),I=D.colorGamut;w=D.le;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 Lc("video/mp4");a&&c.init(a);try{c.rf(b);for(var B=t(c.Of()),E=B.next();!E.done;E=B.next()){var H=E.value;A.set(H,H)}}catch(C){}c.Bd()}return{type:z?"audio":"video",mimeType:z?"audio/mp4":"video/mp4",codecs:im(g.concat(h)).join(", "),language:m,height:n,width:q,channelCount:r,sampleRate:u,closedCaptions:A, le:w,colorGamut:v,frameRate:null}}function im(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Ke(d);b.has(e)||(c.push(d),b.add(e))}b=xc("audio",c);d=xc("video",c);a=xc(wc,c);d=jm(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b} function jm(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?Ec('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a} function km(a){var b=null;(new bh).box("moov",gh).box("trak",gh).box("mdia",gh).box("minf",gh).box("stbl",gh).R("stsd",ih).box("encv",jh).box("enca",kh).box("sinf",gh).box("schi",gh).R("tenc",function(c){c=c.reader;c.X();c.X();c.X();c.X();b=oc(c.Sb(16))}).parse(a,!0);return b} function lm(a,b,c){var d,e,f,g,h;return Q(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):F(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Tb(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 mm(a,b,c,d,e){a=Lg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function nm(a,b){var c=this;this.g=b;this.j=a;this.h=null;this.K=new Map;this.C=1;this.A=this.l=null;this.P=0;this.i=new Map;this.I=!1;this.S=null;this.B=!1;this.m=new Tg(function(){return om(c)});this.M=Date.now()/1E3;this.o=new Map;this.N={projection:null,hfov:null};this.W=0;this.U=Infinity;this.F=null;this.L=[];this.s=new $e(function(){if(c.j&&c.g)if(c.j.presentationTimeline.V()){var d=c.j.presentationTimeline.Vb(),e=c.j.presentationTimeline.Db();1a.g.sb(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.sa&&e.sa.yd(c),e.ba&&e.ba.yd(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.yd(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Bc&&(Am(a,b,!1,0,!1),c.Bc=d);else if(b=c.Bc)c.Bc=null,Am(a,b,!0,0,!1)} function Bm(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&&Am(a,b.video,c,d,e,f),b.audio&&Am(a,b.audio,c,d,e,f))}function Cm(a,b){Q(function(c){if(1==c.g)return a.F=null,a.A=b,a.I?b.segmentIndex?c.u(2):F(c,b.createSegmentIndex(),2):c.return();Am(a,b,!0,0,!1);G(c)})}function Dm(a,b){for(var c=t(a.K.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.K.delete(d))}} function Am(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=wc?g&&(g.Bc&&(b.trickModeVideo?(g.Bc=b,b=b.trickModeVideo):g.Bc=null),g.stream!=b||e)&&(a.o.has(b)?g.ba=a.o.get(b):g.ba&&fm(g.ba,b),b.type==wc&&(e=De(b.mimeType,b.codecs),Ak(a.g.aa,e,a.j.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Qa?(e="("+g.type+":"+g.stream.id+")",a.K.has(e)||a.K.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,g.stream= b,g.sa=null,g.Vf=!!f,b.dependencyStream?g.Kd=wm(a,b.dependencyStream):g.Kd=null,e?Em(a,!0,!1):(c?g.Fc?g.Mf=!0:g.Qa?(g.Ec=!0,g.Ne=d,g.Mf=!0):(pm(g),Fm(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Qa||g.yb||xm(a,g,0),Gm(a,g).catch(function(h){if(a.g)a.g.onError(h)}))):vm(a,b)} function Gm(a,b){var c,d;return Q(function(e){if(1==e.g){if(!b.Gb)return e.return();c=b.stream;d=b.Gb;return c.segmentIndex?e.u(2):F(e,c.createSegmentIndex(),2)}if(b.Gb!=d||b.stream!=c)return e.return();var f=a.g.Lc();var g=Gk(a.g.aa,b.type),h=b.stream.segmentIndex.find(b.Ia?b.Ia.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.Z)&&(h+=(k.endByte?k.endByte-k.startByte:null)|| 0),k=a.g.getBandwidthEstimate(),f=8*h/k<(g||0)-f-a.h.rebufferingGoal||b.Gb.h.g>h?!0:!1):f=!1;f&&b.Gb.abort();G(e)})} p.Vc=function(){if(this.g){for(var a=this.g.Lc(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.aa;d==wc?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&aa.g.sb()):null} function sm(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.j.variants),e=d.next(),f={};!e.done;f={Kb:void 0},e=d.next())if(f.Kb=e.value,f.Kb.audio)if(a.o.has(f.Kb.audio)){if(e=a.o.get(f.Kb.audio),em(e,b),!(0=b||!c.some(function(h){return function(k){return ff(h.Kb.audio.language,k)}}(f))||!(e=rm(a,f.Kb.audio))|| (f.Kb.audio.segmentIndex||f.Kb.audio.createSegmentIndex(),a.o.set(f.Kb.audio,e))}p.updateDuration=function(){var a=Hc(),b=this.j.presentationTimeline.getDuration();Infinity>b?(a&&(this.s&&this.s.stop(),Xk(this.g.aa)),this.g.aa.ob(b)):a?(this.s&&this.s.Ga(.5),this.g.aa.ob(Infinity)):this.g.aa.ob(Math.pow(2,32))}; function Km(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:Ug(a.m);if(b.Qa||null==b.yb||b.Fc)return k.return();b.yb=null;if(!b.Ec){k.u(2);break}return F(k,Fm(a,b,b.Mf,b.Ne),3);case 3:return k.return();case 2:Dm(a,b);if(b.stream.segmentIndex){k.u(4);break}c=b.stream;wa(k,5);return F(k,b.stream.createSegmentIndex(),7);case 7:za(k,6);break;case 5:return d=Aa(k),F(k,Lm(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Qa||b.yb|| xm(a,b,0),k.return();case 4:wa(k,9);e=Mm(a,b);null!=e&&(xm(a,b,e),b.Pd=!1);za(k,10);break;case 9:return f=Aa(k),F(k,Lm(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.u(0);break}return F(k,a.g.aa.endOfStream(),13);case 13:Ug(a.m),h=a.g.aa.getDuration(),0!=h&&hh&&k)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(wc))&&Nm(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(g>=f)return c/2;h=!b.sa;k=Om(a,b,d,k);if(!k)return c;g=!1;h&&b.Vf&&(g=!0,b.Vf=!1);h=Infinity;var l=Array.from(a.i.values());l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,Nm(m)||m.sa&&!m.sa.current()||(h=Math.min(h,m.Ia?m.Ia.endTime:d));if(e>=h+a.j.presentationTimeline.h)return c;if("keep"!==a.h.crossBoundaryStrategy&&Pm(a,b,k))return null;b.ba&&b.sa&& !a.o.has(b.stream)&&(b.ba.$a(k.startTime+.001),Xl(b.ba,k.startTime).catch(function(){}));Qm(a,b,d,k,g).catch(function(){});b.Kd&&Rm(a,b.Kd,d,f);return null} function Om(a,b,c,d){if(b.sa)return(c=b.sa.current())&&b.Ia&&.001>Math.abs(b.Ia.startTime-c.startTime)&&(c=b.sa.next().value),c;if(b.Ia||d)return c=b.Ia?b.Ia.endTime:d,a=0>a.g.sb(),b.stream.segmentIndex&&(b.sa=b.stream.segmentIndex.Ub(c,!1,a)),b.sa&&b.sa.next().value;d=a.j.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.sb();var f=null;d&&(b.stream.segmentIndex&&(b.sa=b.stream.segmentIndex.Ub(e,!1,a)),f=b.sa&&b.sa.next().value);f||(b.stream.segmentIndex&&(b.sa=b.stream.segmentIndex.Ub(c, !1,a)),f=b.sa&&b.sa.next().value);return f} function Qm(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,E,H;return Q(function(C){switch(C.g){case 1:f=yc;g=b.stream;h=b.sa;b.Qa=!0;wa(C,2);if(2==d.xc())throw new U(1,1,1011);return F(C,Sm(a,b,d,e),4);case 4:Ug(a.m);if(a.B)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=u=!1,y=function(D){var I,L,K,J;return Q(function(M){switch(M.g){case 1:if(u)return M.return();w= !0;Ug(a.m);if(a.B)return M.return();wa(M,2);r=Tm(r,D);I=!1;L=0;(new bh).box("mdat",function(O){L=O.size+O.start;I=!0}).parse(r,!1,!0);if(!I){M.u(4);break}K=r.subarray(0,L);r=r.subarray(L);return F(M,Um(a,b,c,g,d,K,!0,e),5);case 5:b.ba&&b.sa&&Xl(b.ba,d.startTime,!0);case 4:za(M,0);break;case 2:v=J=Aa(M),G(M)}})},F(C,Vm(a,b,d,y),9);n=Vm(a,b,d);return F(C,n,7);case 7:q=C.h;Ug(a.m);if(a.B)return C.return();Ug(a.m);return b.Ec?(b.Qa=!1,xm(a,b,0),C.return()):F(C,Um(a,b,c,g,d,q,!1,e),6);case 9:z=C.h;if(v)throw v; if(w){C.u(10);break}u=!0;Ug(a.m);return a.B?C.return():b.Ec?(b.Qa=!1,xm(a,b,0),C.return()):F(C,Um(a,b,c,g,d,z,!1,e),10);case 10:b.ba&&b.sa&&Xl(b.ba,d.startTime,!0);case 6:Ug(a.m);if(a.B)return C.return();b.Ia=d;h.next();b.Qa=!1;b.Ug=!1;A=a.g.aa.Lb();B=A[b.type];fb(JSON.stringify(B));b.Ec||(E=null,b.type===f.wa?E=a.i.get(f.Y):b.type===f.Y&&(E=a.i.get(f.wa)),E&&E.type==f.Y?a.g.pf(d,b.stream,E.stream.isAudioMuxedInVideo):a.g.pf(d,b.stream,b.stream.codecs.includes(",")));xm(a,b,0);za(C,0);break;case 2:H= Aa(C);Ug(a.m,H);if(a.B)return C.return();b.Qa=!1;if(7001==H.code)b.Qa=!1,pm(b),xm(a,b,0),C.u(0);else if(b.type==f.Oa&&a.h.ignoreTextStreamFailures)a.i.delete(f.Oa),C.u(0);else{if(3017==H.code)return F(C,Wm(a,b,H),0);b.Pd=!0;1==H.category&&b.ba&&cm(b.ba,d);H.severity=2;return F(C,Lm(a,b,H),0)}}})} function Rm(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u;return Q(function(w){switch(w.g){case 1:e=b.stream;for(h=(g=(f=e.segmentIndex)&&f.Ub(c))&&g.next().value;h&&a.L.includes(h.startTime);)h=g&&g.next().value;if(!h){w.u(0);break}k=h.Z;if(!k||pj(k,b.Ob)){w.u(3);break}b.Ob=k;wa(w,4);return F(w,Vm(a,b,k),6);case 6:l=w.h;var v=a.g.aa;v.M&&Bc(v.M,l,0,e);a.L=[];za(w,3);break;case 4:throw m=Aa(w),b.Ob=null,m;case 3:if(b.Ia&&b.Ia==h){w.u(0);break}b.Ia=h;wa(w,8);return F(w,Vm(a,b,h),10);case 10:n=w.h;v=a.g.aa;v.M&& Bc(v.M,n,0,e);a.L.push(h.startTime);za(w,9);break;case 8:throw q=Aa(w),b.Ia=null,q;case 9:r=Math.max.apply(Math,[0].concat(x(a.L)));u=a.g.Lc();if(u+d>r)return F(w,Rm(a,b,h.startTime,d),0);w.u(0)}})}function Tm(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c} function Wm(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.Ug}))return l.u(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 xm(a,b,4),l.return();h=Math.round(100*a.C);if(20k&&(n=Math.max(h-f,l-k-g));return n<=k?q.return():F(q,a.g.aa.remove(b.type,g,g+n,e), 2)}if(4!=q.g)return Ug(a.m),a.F?F(q,Xm(a,a.F,c),4):q.u(0);Ug(a.m);G(q)})}function Nm(a){return a&&a.type==wc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)} function Vm(a,b,c,d){var e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(e=c.Wb())return l.return(e);f=null;if(b.ba){var m=b.ba,n=m.h;c instanceof oj&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.mh=d),f=m.Yd):f=null}f||(f=Jm(c,b.stream,d||null,a.h.retryParameters,a.g.lc));g=0;b.sa&&(g=b.sa.h);b.Gb=f;return F(l,f.promise,2);case 2:h=l.h;b.Gb=null;k=h.data;if(!c.aesKey){l.u(3);break}return F(l,lm(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})} function Jm(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a instanceof qj?a:void 0,h=g?1:0;a=mm(a.O(),a.startByte,a.endByte,d,c);a.contentType=b.type;return e.request(Rg,a,{type:h,stream:b,segment:g,isPreload:f})} function Fm(a,b,c,d){var e,f;return Q(function(g){if(1==g.g)return b.Ec=!1,b.Mf=!1,b.Ne=0,b.Fc=!0,b.Ia=null,b.sa=null,b.ba&&!a.o.has(b.stream)&&dm(b.ba),d?(e=a.g.Lc(),f=a.g.aa.getDuration(),F(g,a.g.aa.remove(b.type,e+d,f),3)):F(g,Rk(a.g.aa,b.type),4);if(3!=g.g)return Ug(a.m),c?F(g,a.g.aa.flush(b.type),3):g.u(3);Ug(a.m);b.Fc=!1;b.endOfStream=!1;b.Qa||b.yb||xm(a,b,0);G(g)})} function xm(a,b,c){var d=b.type;if(d!=wc||a.i.has(d))b.yb=(new Ze(function(){var e;return Q(function(f){if(1==f.g)return wa(f,2),F(f,Km(a,b),4);if(2!=f.g)return za(f,0);e=Aa(f);if(a.g)a.g.onError(e);G(f)})})).ha(c)}function pm(a){null!=a.yb&&(a.yb.stop(),a.yb=null)}function qm(a){return Q(function(b){return a.Gb?F(b,a.Gb.abort(),0):b.u(0)})} function Lm(a,b,c){var d;return Q(function(e){if(1==e.g)return 3024==c.code?(b.Qa=!1,pm(b),xm(a,b,0),e.return()):F(e,sg(a.S),2);Ug(a.m);if(1===c.category&&1003!=c.code){if(b.Bc)return zm(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);G(e)})} function Em(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.Mb||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 cn(a,b){return a&&b} function dn(a,b){function c(f){for(var g=t(Object.keys(f)),h=g.next();!h.done;h=g.next())if(h=h.value,!(f[h]instanceof HTMLElement))if(e(f[h])&&0===Object.keys(f[h]).length)delete f[h];else{var k=f[h];Array.isArray(k)&&0===k.length?delete f[h]:"function"==typeof f[h]?delete f[h]:e(f[h])&&(c(f[h]),0===Object.keys(f[h]).length&&delete f[h])}}function d(f,g){return Object.keys(f).reduce(function(h,k){var l=f[k];if(g.hasOwnProperty(k))if(l instanceof HTMLElement&&g[k]instanceof HTMLElement)l.isEqualNode(g[k])|| (h[k]=l);else if(e(l)&&e(g[k])){if(l=d(l,g[k]),0"===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=Ub(mc(c)))}};en.muxFairPlayRequest=function(a,b){jn(a,b)}; en.expressplayFairPlayRequest=function(a,b){if(2===a){var c=b.drmInfo;c&&ng(c.keySystem)&&jn(a,b)}};en.conaxFairPlayRequest=function(a,b){jn(a,b)};en.ezdrmFairPlayRequest=function(a,b){jn(a,b)};en.verimatrixFairPlayRequest=function(a,b){2===a&&(a=b.drmInfo)&&ng(a.keySystem)&&(a=Tb(b.body),a=lc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=ec("spc="+a))};en.muxInitDataTransform=function(a,b,c){return hn(a,b,c)}; en.expressplayInitDataTransform=function(a,b,c){return hn(a,b,c)};en.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=dc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Xb(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 on(a,b){if("AUTO"==b){var c=a.some(function(d){return d.video&&d.video.hdr&&"HLG"==d.video.hdr?!0:!1});b=un(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})} function nn(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function sn(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function tn(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function vn(){} function wn(){var a=Infinity,b=qb();navigator.connection&&navigator.connection.saveData&&(a=360);var c={retryParameters:rg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(h,k,l){"apple"===window.shakaMediaKeysPolyfill&&"skd"==k&&(k=l.serverCertificate,l=fn(h),h=gn(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;Gc()&&b.Yc()&&(d="smooth",e=!0);e={retryParameters:rg(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1, updatePeriod:-1,ignoreDrmInfo:!1,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready", "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:xn,manifestPreprocessorTXml:yn,sequenceMode:!1,multiTypeVariantsAllowed: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.Xc(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:xn,manifestPreprocessorTXml:yn,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}}; var 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 cn([h,k])},usePersistentLicense:!0,numberOfParallelDownloads:5},g={drm:c,manifest:e,streaming:{retryParameters:rg(),failureCallback:function(h){return cn([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 cn([h],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(h,k){return cn([h,k])},dispatchAllEmsgBoxes:!1, useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:f,abrFactory:function(){return new eg},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(kn,[null].concat(x(Oa.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(zn(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return b.Ta(g)} function An(){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 Bn(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 an(a,b,c||wn(),d,"")} function zn(a,b,c){var d=c;"AUTO"==d&&(c=a.some(function(h){return h.hdr&&"HLG"==h.hdr?!0:!1}),d=un(c));var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=of(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return gf(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height- h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=wc&&"image"!=c.type||b.push(c);return b}function xn(a){return cn([a],a)}function yn(a){return cn([a],a)}T("shaka.util.PlayerConfiguration",vn);vn.mergeConfigObjects=Bn;vn.createDefaultForLL=An;vn.createDefault=wn;function Cn(){this.g=null;this.h=[]}function Dn(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function En(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Fn(){this.i=this.h=null;this.g=[]}function Gn(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 Hn(){this.B=this.W=NaN;this.l="";this.j=this.ci=this.s=this.A=this.K=this.C=this.o=this.m=this.I=this.F=this.i=this.S=this.U=this.M=this.N=this.P=NaN;this.L=0;this.G=this.H=NaN;this.g=new Cn;this.h=new Fn}function In(a,b,c){a.P=b;a.N=c}function Jn(a,b,c){a.W=b;a.B=c}function Kn(a,b){a.i=isNaN(a.i)?b:Math.max(a.i,b)}function Ln(a,b){a.j=isNaN(a.j)?b:a.j+b} function Mn(a){var b=a.W,c=a.B,d=a.l,e=a.A,f=a.N,g=a.P,h=a.M,k=a.U,l=a.S,m=a.s,n=a.i,q=a.F,r=a.I,u=a.m,w=Dn(a.g,"playing"),v=Dn(a.g,"paused"),y=Dn(a.g,"buffering"),z=a.o,A=a.C,B=a.K,E=a.ci,H=a.j,C=a.L,D=a.H,I=a.G,L=En(a.g),K=[];a=t(a.h.g);for(var J=a.next();!J.done;J=a.next())J=J.value,K.push({timestamp:J.timestamp,id:J.id,type:J.type,fromAdaptation:J.fromAdaptation,bandwidth:J.bandwidth});return{width:b,height:c,currentCodecs:d,streamBandwidth:e,decodedFrames:f,droppedFrames:g,corruptedFrames:h, stallsDetected:k,gapsJumped:l,estimatedBandwidth:m,completionPercent:n,loadLatency:q,manifestTimeSeconds:r,drmTimeSeconds:u,playTime:w,pauseTime:v,bufferingTime:y,licenseTime:z,liveLatency:A,maxSegmentDuration:B,manifestSizeBytes:E,bytesDownloaded:H,nonFatalErrorCount:C,manifestPeriodCount:D,manifestGapCount:I,stateHistory:L,switchHistory:K}};function Nn(a,b,c,d){Dg.call(this);this.N=a;this.W=b;this.Pa=d.networkingEngine;this.m=c;this.A=null;this.Ka=0;this.ab=d.dd;this.F=d.jk;this.eb=d.kk;this.g=d.config;this.l=this.G=this.h=null;this.va=!1;this.H=d.zk;this.xa=!1;this.i=null;this.oa=!1;this.j=this.C=null;this.ia=!1;this.M=new Map;this.Ba=!1;this.Ua=d.yk;this.$=new Hn;this.ua=new tg;this.s=new tg;this.P=null;this.o=!1;this.ka=d.bj;this.U=this.K=null;this.Za=d.aj;this.S=!1;this.L=[];this.I=[];this.B=!0}pa(Nn,Dg); function On(a,b,c){(a=b?a.I:a.L)?a.push(c):c()}function Pn(a){if(a.I)for(var b=t(a.I),c=b.next();!c.done;c=b.next())c=c.value,c();a.I=null}function Qn(a,b){a.P=b;a.S=!0;if(a.L){b=t(a.L);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.L=null}p=Nn.prototype;p.getStartTime=function(){return this.m};p.jd=function(){return this.N};p.zg=function(){return this.h};function Rn(a){a.ia=!0;return a.j}function Sn(a){a.xa=!0;return a.H}p.getStats=function(){return this.$}; function Tn(a){a.oa=!0;return a.i}p.Jj=function(){return this.K?Lf(this.K):null};p.Ij=function(){return this.U?Of(this.U):null};function Un(a){a.Ba=!0;return a.M} 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 wa(c,3),F(c,Vn(a),5);case 5:Wn(a);if("webkit"===window.shakaMediaKeysPolyfill){c.u(6);break}return F(c,Xn(a),7);case 7:Wn(a);case 6:return F(c,Yn(a),8);case 8:Wn(a);if(!a.ka||!a.i){c.u(9);break}return F(c,Zh(a.i),10);case 10:Wn(a);case 9:a.s.resolve();za(c,0);break;case 3:b=Aa(c),b instanceof U&&(7001==b.code||7003==b.code)||a.s.reject(b),G(c)}})})()}; p.dispatchEvent=function(a){return this.P?this.P.dispatchEvent(a):Dg.prototype.dispatchEvent.call(this,a)};p.onError=function(a){2===a.severity&&(this.s.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new V("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Wn(a){if(a.o)throw new U(2,7,7003);}function no(a,b){a.dispatchEvent(new V("onstatechange",(new Map).set("state",b)))} function Vn(a){var b,c,d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:no(a,"manifest-parser");a.l||(a.G=xi(a.N,a.W),a.l=a.G(),a.l.configure(a.g.manifest,function(){return a.B}));b=Date.now()/1E3;no(a,"manifest");if(a.h){m.u(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.u(2);break}c=[];d=a.h.variants[0];e=t([d.video,d.audio]);for(f=e.next();!f.done;f=e.next())(g=f.value)&&!g.segmentIndex&&c.push(g.createSegmentIndex());if(!(0d.endTime?uo:ro;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.bd==e&&h.$c==f&&h.Nc(d,b)}}};function so(a,b,c,d){b=new V(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var to=1,ro=2,uo=3;function vo(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:var n=(new Bb(a)).mb.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=wo.get(d))return m.return(e);f=0;g=Lg([a],c);wa(m,2);g.method="HEAD";return F(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];za(m,3);break;case 2:k=Aa(m);if(!k||1002!=k.code&&1001!=k.code){m.u(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 wo=(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 xo={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"},yo=t(Object.keys(xo)),zo=yo.next();!zo.done;zo=yo.next()){var Ao=zo.value;xo[Ao.toLowerCase()]=xo[Ao]};function Bo(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Bo(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=ne,e=a.fontStyle==oe,f=a.textDecoration.includes(pe);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Co(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Co(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value; k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+""},a.payload)} function Co(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 Go(a,b){var c=Do(b),d=[];b=a.cues?Array.from(a.cues):[];c=t(c);for(var e=c.next(),f={};!e.done;f={ld:void 0},e=c.next())f.ld=e.value,!b.some(function(g){return function(h){return h.startTime==g.ld.startTime&&h.endTime==g.ld.endTime&&h.text==g.ld.payload?!0:!1}}(f))&&f.ld.payload&&(e=Fo(f.ld))&&d.push(e);b=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-d.indexOf(g):d.indexOf(g)- d.indexOf(h)});b=t(b);for(c=b.next();!c.done;c=b.next())a.addCue(c.value)}function Ho(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=t(b.i);for(f=e.next();!f.done;f=e.next())g=t(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;Ho(this.i.get(this.g).track,function(c){return c.startTimea});return!0};p.append=function(a){!this.j||0>this.g||Go(this.i.get(this.g).track,a)};p.destroy=function(){this.h&&(this.j&&this.B(),this.h=null);this.l&&(this.l.release(),this.l=null);return Promise.resolve()};p.isTextVisible=function(){return this.s}; p.setTextVisibility=function(a){this.s=a;if(-1a});return!0}; p.append=function(a){this.g&&Go(this.g,a)};p.destroy=function(){this.g&&(Ho(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&&Lo(this);this.g&&(this.g.mode=a?"showing":"hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){Lo(this)};function Lo(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")} T("shaka.text.SimpleTextDisplayer",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 Mo(){}p=Mo.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(){};T("shaka.text.StubTextDisplayer",Mo);Mo.prototype.enableTextDisplayer=Mo.prototype.enableTextDisplayer;Mo.prototype.setTextLanguage=Mo.prototype.setTextLanguage;Mo.prototype.setTextVisibility=Mo.prototype.setTextVisibility; Mo.prototype.isTextVisible=Mo.prototype.isTextVisible;Mo.prototype.destroy=Mo.prototype.destroy;Mo.prototype.append=Mo.prototype.append;Mo.prototype.remove=Mo.prototype.remove;Mo.prototype.configure=Mo.prototype.configure;function No(a,b){var c=this;this.m=!1;this.h=[];this.j=a;this.o=b;this.B=this.s=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.A=new $e(function(){c.j.paused||Oo(c)});Po(this);this.l=new Map;this.i=new jb;this.i.D(document,"fullscreenchange",function(){Oo(c,!0)});this.i.D(this.j,"seeking", function(){Oo(c,!0)});this.i.D(this.j,"ratechange",function(){Po(c)});this.i.D(this.j,"resize",function(){var d=c.j,e=d.videoWidth;d=d.videoHeight;e&&d?c.s=e/d:c.s=null});this.C=null;"ResizeObserver"in window&&(this.C=new ResizeObserver(function(){Oo(c,!0)}),this.C.observe(this.g));this.F=new Map}p=No.prototype;p.configure=function(a){this.B=a;Po(this);Oo(this,!0)}; p.append=function(a){var b=[].concat(x(this.h));a=t(Eo(a));for(var c=a.next(),d={};!c.done;d={dg:void 0},c=a.next())d.dg=c.value,b.some(function(e){return function(f){return ce(f,e.dg)}}(d))||this.h.push(d.dg);this.h.length&&Po(this);Oo(this)}; p.destroy=function(){if(!this.g)return Promise.resolve();this.g.parentElement&&this.o.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.A&&(this.A.stop(),this.A=null);this.l.clear();this.i&&(this.i.release(),this.i=null);this.C&&(this.C.disconnect(),this.C=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});Oo(this,c>this.h.length);this.h.length||Po(this);return!0}; p.isTextVisible=function(){return this.m};p.setTextVisibility=function(a){(this.m=a)?(this.g.parentElement||this.o.appendChild(this.g),Oo(this,!0)):this.g.parentElement&&this.o.removeChild(this.g)};p.setTextLanguage=function(a){a&&"und"!=a?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};p.enableTextDisplayer=function(){};function Po(a){a.A&&(a.h.length?a.A.Ga((a.B?a.B.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(a.j.playbackRate))):a.A.stop())} function Qo(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1} function Ro(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.l.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Yi:null;l&&(g.push(l.eg),l.Uc&&g.push(l.Uc),m||(f=!0,a.l.delete(k),l=null));m&&(h.push(k),l?Qo(a,n)||(f=!0):(So(a,k,e),l=a.l.get(k),n=l.Yi,f=!0));0a.s&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Vd?(f.width="100%",c.lineAlign==Xd?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Xd?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Xd?f.right=d+"%":"end"==c.lineAlign&&(f.left= 100-d+"%"))));f.lineHeight=c.lineHeight;a=Uo(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Vd?(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==Vd?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Vd?(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==Vd?f.width=c.size+"%":f.height=c.size+"%")} function Vo(a,b,c,d){d=void 0===d?1:d;var e=(e=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(e[1]),unit:e[2]}:null;if(!e)return a;a=e.unit;d*=e.value;switch(a){case "%":return d/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*d/b.cellResolution.rows+"px";default:return d+a}}function Wo(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}T("shaka.text.UITextDisplayer",No);No.prototype.enableTextDisplayer=No.prototype.enableTextDisplayer; No.prototype.setTextLanguage=No.prototype.setTextLanguage;No.prototype.setTextVisibility=No.prototype.setTextVisibility;No.prototype.isTextVisible=No.prototype.isTextVisible;No.prototype.remove=No.prototype.remove;No.prototype.destroy=No.prototype.destroy;No.prototype.append=No.prototype.append;No.prototype.configure=No.prototype.configure;function Xo(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.startf?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Do(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left"); break;case "right":g.push("align:right");break;case Sd: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}T("shaka.text.WebVttGenerator",function(){});function Yo(a,b){this.h=a;this.g=b;this.i=void 0;this.s=!1;this.F=!0;this.l=this.B=!1;this.o=this.m=void 0;this.A=0;this.G=!1;this.C=new jb;this.j=null}Yo.prototype.setMediaElement=function(a){this.j=a;Zo(this)};Yo.prototype.configure=function(a){this.g=a};function $o(a){a.s=!1;a.F=!0;a.B=!1;a.l=!1;a.m=0;a.o=0;a.A=0;a.G=!1;a.j=null;a.C.Ra()}function ap(a,b){a.l=b;a.l?a.i==bp?a.i=cp:a.i==dp&&(a.i=ep):a.i==cp?a.i=bp:a.i==ep&&(a.i=dp)} function fp(a,b){if(a.g&&a.g.enabled&&a.g.version==gp&&a.j&&a.j.autoplay){var c=a.j.play();c&&c.then(function(){a.A=b}).catch(function(){a.A=0})}} function hp(a,b,c){try{if(!a.g.enabled)return b;var d=ip(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=jp;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=kp;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=lp;break a}e=void 0}d.ot=e;d.su= !0;var f=mp(d);return np(b,f)}catch(g){return cb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Zo(a){a.C.za(a.j,"play",function(){a.m||(a.m=Date.now())});a.C.za(a.j,"playing",function(){a.o||(a.o=Date.now())})}function ip(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.i,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}} function op(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled)if(a=pp(a,c),d)d=qp(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var e=mp(a);e&&(b.uris=b.uris.map(function(f){return np(f,e)}))}}function rp(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 sp(a){if(0===a.type)return tp;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?kp:up;if("audio"==b)return jp;if("text"==b)return"application/mp4"===a.mimeType?vp:wp}}function xp(a,b){b=a.h.Lb()[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 yp(a,b){b=a.h.Lb()[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 zp(a,b){var c=a.h.Fb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case up:return a.videoBandwidth||NaN;case jp:return a.audioBandwidth||NaN;default:return a.bandwidth}} function pp(a,b){b=void 0===b?{}:b;Object.assign(b,ip(a));b.pr=a.h.sb();var c=b.ot===up||b.ot===kp;a.B&&c&&(b.bs=!0,b.su=!0,a.B=!1);null==b.su&&(b.su=a.F);b.v===gp&&(a.h.V()&&(b.ltc=a.h.Te()),c=!a.G&&a.o&&a.m?a.o-(a.A||a.m):void 0,void 0!=c&&(b.msd=c,a.G=!0));return rp(a,b)} function mp(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"=== l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function qp(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a=c?a*(1-c)+b*c:a};function Fp(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}T("shaka.util.CmsdManager",Ap);Ap.prototype.getBandwidthEstimate=Ap.prototype.getBandwidthEstimate;Ap.prototype.getRoundTripTime=Ap.prototype.Mj;Ap.prototype.getResponseDelay=Ap.prototype.Lj;Ap.prototype.getEstimatedThroughput=Ap.prototype.Sh; Ap.prototype.getMaxBitrate=Ap.prototype.Uh;var Cp="etp",Bp="mb",Dp="rd",Ep="rtt";function Gp(){this.g=null;this.h=[]}function Hp(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.u(2);a.g=b;G(c)})}Gp.prototype.release=function(){0B.end&&(B.end=E.end)}return B};d.va=new Sl(q);d.va.addEventListener("regionadd", function(A){dq(d,A.region,"metadataadded")});if(m)return F(z,k(function(){return Q(function(A){return F(A,eq(d,c),0)})},"initializeSrcEqualsDrmInner_"),23);d.Za=new Sl(q);return F(z,k(function(){return Q(function(A){if(1==A.g)return F(A,Promise.race([e.ua,e.s]),2);d.mc=e.G;var B=e;B.va=!0;d.G=B.l;d.i=e.zg();G(A)})},"waitForFinish"),15);case 15:if(d.I){z.u(16);break}return F(z,k(function(){return Q(function(A){return F(A,$p(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return d.i&&d.i.textStreams.length&& (d.o.enableTextDisplayer?d.o.enableTextDisplayer():wb("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),F(z,k(function(){return Q(function(A){return F(A,e.s,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.re=e.F;d.G&&d.G.setMediaElement&&d.h&&d.G.setMediaElement(d.h);d.ke=Sn(e);d.je=e.Ua;if(r=e.A)d.N=r;l&&d.h&&"AUDIO"===d.h.nodeName&&(fq(d),d.configure("manifest.disableVideo",!0));if(e.i){z.u(19);break}return F(z,k(function(){return Q(function(A){return F(A, Xn(e,d.h),0)})},"drmEngine_.init"),19);case 19:return d.C=Tn(e),F(z,k(function(){return Q(function(A){return F(A,d.C.cc(d.h),0)})},"drmEngine_.attach"),21);case 21:return!(u=e.C)||d.Ua&&d.Ua==u||(d.s=Rn(e),d.Ua=e.C,"function"!=typeof d.s.setMediaElement&&(wb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.s.setMediaElement=function(){}),"function"!=typeof d.s.setCmsdManager&&(wb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."), d.s.setCmsdManager=function(){}),"function"!=typeof d.s.trySuggestStreams&&(wb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.s.trySuggestStreams=function(){})),w=Un(e),v=e.K,F(z,k(function(){return Q(function(A){return F(A,gq(d,n,v,w),0)})},"loadInner_"),22);case 22:Pn(e);d.kc&&qb().Ti()&&Ne(d.kc)&&vk(d.I,d.W,d.kc);z.u(14);break;case 23:return F(z,k(function(){return Q(function(A){return F(A,hq(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(Sp("loaded")); case 6:Ba(z);if(!e){z.u(25);break}return F(z,e.destroy(),25);case 25:d.Pa=null;Ca(z,0);break;case 5:y=Aa(z);if(!y||7E3==y.code){z.u(27);break}return F(z,d.rc(!1),27);case 27:throw y;}})};function fq(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})} p.Vk=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,iq(c),2):3!=e.g?(d=e.h,F(e,c.rc(a,b),3)):e.return(d)})};p.Mh=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,iq(c,b),2):3!=e.g?(d=e.h,F(e,c.detach(a),3)):e.return(d)})}; function iq(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.mc&&a.W&&a.g))return e.u(2);d=a.h.currentTime;a.V()&&!b&&(d=null);return F(e,jq(a,a.W,d,a.kc,a.g,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.we.push(c);a.G&&a.G.setMediaElement&&a.G.setMediaElement(null);var f=c,g=a.G,h=a.mc;f.h=a.i;f.l=g;f.G=h;f=c;g=a.Ua;f.j=a.s;f.C=g;c.A=a.N;c.start();a.i=null;a.G=null;a.mc=null;a.s=null;a.Ua=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=Jp(e),Bn(f,d||e.g,Jp(e)),F(h,cq(e,a,b,c,!1,f),2);(g=h.h)?g.start():Zp(e,new U(2,7,7005));return h.return(g)})};p.hg=function(){var a=this,b,c,d,e;return Q(function(f){b=[];c=t(a.we);for(d=c.next();!d.done;d=c.next())e=d.value,e.o||b.push(e.destroy());a.we=[];return F(f,Promise.all(b),0)})}; function cq(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.u(2):F(n,bq(a,b),3);2!=n.g&&(d=n.h);if(g=kq(a,d))return n.return(null);h=f||a.g;k=!1;l=!0;e&&(a.s&&a.Ua==h.abrFactory&&(l=!1),a.h&&"AUDIO"===a.h.nodeName&&(k=!0));m=jq(a,b,c,d||null,h,!e,k,l);m=e?m.then(function(q){q.B=!1;return q}):m.then(function(q){a.we.push(q);return q});return n.return(m)})} function jq(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,u,w,v,y,z,A,B,E,H;return Q(function(C){if(1==C.g){k=null;l=ed(e);g&&(l.manifest.disableVideo=!0);m=function(){return k.S&&k.o?null:k};n=function(){return m()?m().getConfiguration():a.g};if(Infinity!=a.ua.width||Infinity!=a.ua.height||a.g.ignoreHardwareResolution)return C.u(2);q=qb();return F(C,q.ec(),3)}2!=C.g&&(r=C.h,a.ua.width=r.width,a.ua.height=r.height);u=new ki(l,a.ua,null);w={networkingEngine:a.H, filter:function(D){var I,L;return Q(function(K){if(1==K.g)return F(K,li(u,D),2);if(4!=K.g){I=K.h;if(!I)return K.u(0);L=Sp("trackschanged");return F(K,Promise.resolve(),4)}k.dispatchEvent(L);G(K)})},makeTextStreamsForClosedCaptions:function(D){return lq(a,D)},onTimelineRegionAdded:function(D){Tl(k.H,D)},onEvent:function(D){return k.dispatchEvent(D)},onError:function(D){return k.onError(D)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},updateDuration:function(){a.l&&k.S&&a.l.updateDuration()}, newDrmInfo:function(D){var I=k.i,L=I?I.h:null;L&&I.A&&oi(u,L.keySystem,D)},onManifestUpdated:function(){var D=(new Map).set("isLive",a.V());k.dispatchEvent(Sp("manifestupdated",D));On(k,!1,function(){if(a.B)a.B.onManifestUpdated(a.V())})},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},onMetadata:function(D,I,L,K){var J=D;if("com.apple.hls.interstitial"==D&&(J="com.apple.quicktime.HLS",D={startTime:I,endTime:L,values:K},a.B))a.B.onHLSInterstitialMetadata(a,a.h,D);K=t(K);D=K.next(); for(var M={};!D.done;M={Rg:void 0},D=K.next())M.Rg=D.value,"ID"!=M.Rg.name&&On(k,!1,function(O){return function(){mq(a,I,L,J,O.Rg)}}(M))},disableStream:function(D){return a.disableStream(D,a.g.streaming.maxDisabledTime)},addFont:function(D,I){return a.addFont(D,I)}};v=new Sl(function(){return a.Sa()});v.addEventListener("regionadd",function(D){var I=D.region;nq(a,"timelineregionadded",I,k);On(k,!1,function(){a.B&&(a.B.onDashTimedMetadata(I),a.B.onDASHInterstitialMetadata(a,a.h,I))})});y=null;l.streaming.observeQualityChanges&& (y=new Ml(function(){return a.Lb()}),y.addEventListener("qualitychange",function(D){oq(a,D.quality,D.position)}),y.addEventListener("audiotrackchange",function(D){oq(a,D.quality,D.position,!0)}));z=!0;A={lc:a.H,onError:function(D){return k.onError(D)},nf:function(D){On(k,!0,function(){if(a.C)a:{var I=D,L=Sp("keystatuschanged");a.dispatchEvent(L);var K=Object.keys(I);1==K.length&&""==K[0]&&(K=["00"],I={"00":I[""]});L=1==K.length&&"00"==K[0];var J=!1;if(K.length){K=a.keySystem();for(var M=Xg(a.g.drm.clearKeys), O=t(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=t(P);for(var R=P.next();!R.done;R=P.next()){var S=R.value;R=N.allowedByKeySystem;if(S.keyIds.size)if(S.drmInfos.length&&!M.size){S=t(S.drmInfos);for(var aa=S.next();!aa.done;aa=S.next())if(aa=aa.value,aa.keyIds.size&&aa.keySystem==K){N.allowedByKeySystem=!0;aa=t(aa.keyIds);for(var W=aa.next();!W.done;W=aa.next())if(W=W.value,(W=I[L?"00":W])||a.C.F)N.allowedByKeySystem=N.allowedByKeySystem&& !!W&&!qi.includes(W)}}else for(N.allowedByKeySystem=!0,S=t(S.keyIds),aa=S.next();!aa.done;aa=S.next())if(aa=aa.value,(aa=I[L?"00":aa])||a.C.F)N.allowedByKeySystem=N.allowedByKeySystem&&!!aa&&!qi.includes(aa);R!=N.allowedByKeySystem&&(J=!0)}}}if(J&&(pq(a),!qq(a)))break a;(I=a.l.l)&&!I.allowedByKeySystem&&Pp(a)}})},onExpirationUpdated:function(D,I){var L=Sp("expirationupdated");k.dispatchEvent(L);if((L=k.l)&&L.onExpirationUpdated)L.onExpirationUpdated(D,I)},onEvent:function(D){k.dispatchEvent(D);"drmsessionupdate"== D.type&&z&&(z=!1,D=Date.now()/1E3-k.Ka,(a.A||k.getStats()).m=D,a.S&&Cc(a.S))}};B=Lp(a,m);Kg(a.H,B);E=function(){return a.dd(A)};H={config:l,kk:w,zk:v,yk:y,dd:E,jk:u,networkingEngine:B,bj:f,aj:h};k=new Nn(b,d,c,H);return C.return(k)})}function bq(a,b){var c,d,e;return Q(function(f){if(1==f.g)return c=a.g.manifest.retryParameters,F(f,vo(b,a.H,c),2);d=f.h;"application/x-mpegurl"==d&&(e=qb(),"WEBKIT"===e.Ea()&&(d="application/vnd.apple.mpegurl"));return f.return(d)})} function kq(a,b){if(!vi(qb()))return!0;if(b){if(""==(a.h||wi()).canPlayType(b))return!1;if(!vi(qb())||!ti.has(b))return!0;if(Ne(b))return"WEBKIT"===qb().Ea()&&(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 rq(a){var b=a.g.textDisplayFactory;b!==a.Ae&&(a.o=b(),a.o.configure?a.o.configure(a.g.textDisplayer):wb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Ae=b,a.o.setTextVisibility(a.oa))} function $p(a){var b,c,d;return Q(function(e){if(1==e.g)return qb(),Wp(a,"media-source"),a.g.mediaSource.useSourceElements&&Cj(a.h),rq(a),b=sq(a.h,a.o,{Bj:function(){return a.keySystem()},onMetadata:function(f,g,h){f=t(f);for(var k=f.next();!k.done;k=f.next())if(k=k.value,k.data&&"number"==typeof k.cueTime&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=t(k.frames),q=n.next();!q.done;q=n.next())mq(a,l,m,"org.id3",q.value);if(a.B)a.B.onHlsTimedMetadata(k,l)}},rk:function(f){a.Za&&Tl(a.Za, {schemeIdUri:f.schemeIdUri,startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},vk:function(){a.G&&a.G.update&&a.G.update()}},a.S,a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Ka=d,F(e,b.K,2);a.I=b;G(e)})} function tq(a,b,c){function d(){return uq(a)}a.j.D(b,"playing",d);a.j.D(b,"pause",d);a.j.D(b,"ended",d);a.j.D(b,"ratechange",function(){var f=a.h.playbackRate;0!=f&&(a.K&&(a.K.set(f),a.m==vq&&a.s.playbackRateChanged(f),wq(a,f)),f=Sp("ratechange"),a.dispatchEvent(f))});b.remote&&(a.j.D(b.remote,"connect",function(){a.l&&"connected"==b.remote.state&&xq(a);pq(a)}),a.j.D(b.remote,"connecting",function(){return pq(a)}),a.j.D(b.remote,"disconnect",function(){return Q(function(f){if(1==f.g)return a.l&&"disconnected"== b.remote.state?F(f,Em(a.l),3):f.u(2);2!=f.g&&xq(a);pq(a);G(f)})}));b.audioTracks&&(a.j.D(b.audioTracks,"addtrack",function(){return pq(a)}),a.j.D(b.audioTracks,"removetrack",function(){return pq(a)}),a.j.D(b.audioTracks,"change",function(){return pq(a)}));b.videoTracks&&(a.j.D(b.videoTracks,"addtrack",function(){return pq(a)}),a.j.D(b.videoTracks,"removetrack",function(){return pq(a)}),a.j.D(b.videoTracks,"change",function(){return pq(a)}));if(b.textTracks){var e=function(){a.m===yq&&a.o instanceof Io&&xq(a);pq(a)};a.j.D(b.textTracks,"addtrack",function(f){if(f.track)switch(f=f.track,f.kind){case "metadata":zq(a,f);break;case "chapters":Aq(a,f);break;default:e()}});a.j.D(b.textTracks,"removetrack",e);a.j.D(b.textTracks,"change",e);"keep"!==a.g.streaming.crossBoundaryStrategy&&(a.j.D(b,"waiting",function(){a.l&&Im(a.l)}),a.j.D(b,"timeupdate",function(){a.l&&Im(a.l)}))}"none"!=b.preload&&a.j.za(b,"loadedmetadata",function(){a.A.F=Date.now()/1E3-c})} function gq(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,E,H,C,D,I,L,K,J,M,O,N;return Q(function(P){switch(P.g){case 1:Wp(a,"load");e=a.h;a.K=new Il({Ue:function(){return e.playbackRate},Kc:function(){return e.defaultPlaybackRate},hh:function(R){e.playbackRate=R},ki:function(R){e.currentTime+=R}});tq(a,e,b);"onchange"in window.screen&&a.j.D(window.screen,"change",function(){if(a.N.getConfiguration){var R=a.N.getConfiguration();"AUTO"==R.zc?qq(a):"AUTO"==a.g.preferredVideoHdrLevel&&a.g.abr.enabled&& (R.zc="AUTO",a.N.configure(R),qq(a))}});f=!1;g=t(a.i.variants);for(h=g.next();!h.done;h=g.next())k=h.value,(l=k.video&&k.video.dependencyStream)&&(f=Dc(l));Rp(a,a.g,f);a.td=a.g.preferredTextLanguage;a.qe=a.g.preferredTextRole;a.pe=a.g.preferForcedSubs;Bq(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.s.init(function(R,S,aa){a.i&&a.l&&R!=a.l.l&&Cq(a,R,!0,void 0===S?!1:S,void 0===aa?0:aa)});a.s.setMediaElement(e);a.s.setCmsdManager(a.ka);a.l=Dq(a);a.l.configure(a.g.streaming);a.m=vq; a.dispatchEvent(Sp("streaming"));m=c;case 2:(q=a.l.l)||m||(m=qq(a)?a.s.chooseVariant():null);r=[];n=q||m;u=t([n.video,n.audio]);for(w=u.next();!w.done;w=u.next())(v=w.value)&&!v.segmentIndex&&(r.push(v.createSegmentIndex()),v.dependencyStream&&r.push(v.dependencyStream.createSegmentIndex()));if(!(0D&&(B=D);return F(P,Hq(m,B),9);case 9:I=P.h,y(I);case 8:Cq(a,m,!0,!1,0);case 7:return a.F.ready(),L=a.yc().find(function(R){return R.active}), L||((K=ag(a.i.textStreams,a.td,a.qe,a.pe)[0]||null)&&Gn(a.A.h,K,!0),m&&(K?(dg(m.audio,K,a.g)&&(a.oa=!0),a.oa&&a.o.setTextVisibility(!0)):(a.oa=!1,a.o.setTextVisibility(!1)),Iq(a)),K&&(a.g.streaming.alwaysStreamText||a.Hg())&&(Cm(a.l,K),Jq(a))),F(P,a.l.start(d),10);case 10:a.g.abr.enabled&&(a.s.enable(),Kq(a));pq(a);qq(a);a.i.variants.some(function(R){return R.primary});if((J=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)|| a.g.streaming.vodDynamicPlaybackRate)M=function(){return Lq(a)},a.j.D(e,"timeupdate",M);J||(O=function(){return Mq(a)},a.j.D(e,"timeupdate",O),Mq(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.za(d,"error",function(){l.reject(Yp(a))}),F(w,df(a.g.streaming.loadTimeout,l),4);case 4:if((n=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)q=function(){return Lq(a)},a.j.D(d,"timeupdate",q);n||(r=function(){return Mq(a)},a.j.D(d,"timeupdate",r),Mq(a));a.B&&(a.B.onManifestUpdated(n),n&&(u=a.Sa().end,a.j.D(d,"progress",function(){var v=a.Sa().end;u!=v&&(a.B.onManifestUpdated(a.V()),u=v)}))); a.Ka=!0;G(w)}})}function Qq(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Ei(b,a.g.preferredVariantRole)}function Sq(a){var b=a.g.preferredTextLanguage;""!=b&&a.bh(b,a.g.preferredTextRole,a.g.preferForcedSubs)} function zq(a,b){if("metadata"==b.kind){b.mode="hidden";a.j.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,mq(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value);if(b.cues){d=[];e=t(b.cues);for(var f=e.next(),g={};!f.done;g={tc:void 0},f=e.next())g.tc=f.value,"com.apple.quicktime.HLS"==g.tc.type&&null!=g.tc.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.tc.startTime&&k.endTime==h.tc.endTime}}(g)), f||(f={startTime:g.tc.startTime,endTime:g.tc.endTime,values:[]},d.push(f)),f.values.push(g.tc.value));d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.B&&(e.values.push({key:"CUE",description:"",data:0!=e.startTime||a.V()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.B.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new $e(function(){var d=Tq(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Hb().ha(.5); a.oe.push(function(){c.stop()})}}function dq(a,b,c){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(Sp(c,b))}function mq(a,b,c,d,e){a.va&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),Tl(a.va,b))}function Aq(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new $e(function(){b.mode="hidden"})).Hb().ha(.5);a.oe.push(function(){c.stop()})}} p.Dk=function(){for(var a=this.$;a.g;)a.release()};p.dd=function(a){return new oh(a)}; function Lp(a,b){function c(f){b()?b().dispatchEvent(f):a.dispatchEvent(f)}function d(f){b()?On(b(),!0,f):f()}b||(b=function(){return null});var e=new Gg(function(f,g,h,k,l){var m=b()?b().j:a.s;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(Sp("downloadheadersreceived",g));d(function(){if(a.ka){var k=a.ka;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&&!Wc(q.O(),A.O())){var B=A.O()[0],E=new URL(B),H=new URL(n);if(E.origin!==H.origin)var C=B;else{for(var D=E.pathname.split("/").slice(1),I=H.pathname.split("/").slice(1,-1);D[0]===I[0];)D.shift(),I.shift();for(;I.length;)I.shift(),D.unshift("..");C=D.join("/")}r.nor=C}if((A.startByte|| A.endByte)&&(q.startByte!=A.startByte||q.endByte!=A.endByte)){var L=A.startByte+"-";A.endByte&&(L+=A.endByte);r.nrr=L}}}var K=k.h.sb()||1,J=yp(k,w.type)||500,M=w.bandwidth;var O=M?M*(q.endTime-q.startTime)/1E3/(J/K/1E3)*k.g.rtpSafetyFactor:NaN;isNaN(O)||(r.rtp=O)}}u&&r.ot!==vp&&(r.tb=zp(k,r.ot)/1E3);op(k,g,r)}}catch(N){cb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:op(k,g,{ot:"k"});break;case 4:op(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.A;h&&(Ln(h,g),0===f&&(h.ci=g))}});e.configure(a.g.networking);return e}function Eq(a,b){return new xl(a.h,a.i,a.g.streaming,b,function(){a.eb&&Ll(a.eb,!0);a.l&&a.l.Vc();a.P&&Uq(a)},function(c){return a.dispatchEvent(c)})} function Fq(a,b){var c=a.V()||"number"===typeof b&&0=e&&0=b)return 1;if(!(a<=this.h.currentTime)&&al(r,m))&&(q=r);q!=m&&(q?(m=Lf(q),k.ce(m,!0,d||0)):Pp(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.ya()))return;(function(){if(k.h&&k.h.audioTracks){var l= ag(k.Fb(),a,b||"",!1)[0];l&&k.ce(l)}})()};p.bh=function(a,b,c){function d(){e.td=a;e.qe=b||"";e.pe=c||!1;var f=ag(e.i.textStreams,e.td,e.qe,e.pe)[0]||null;f&&f!=e.l.A&&(Gn(e.A.h,f,!1),e.g.streaming.alwaysStreamText||e.Hg())&&(Cm(e.l,f),xq(e),Jq(e))}var e=this;c=void 0===c?!1:c;if(this.i&&this.F&&(d(),!this.ya()))return;(function(){var f=ag(e.yc(),a,b||"",c||!1)[0];f&&e.dh(f)})()}; p.Mk=function(a,b,c){function d(){for(var f=null,g=t(e.i.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.audio.label==a){f=h;break}null!=f&&(e.N=e.g.adaptationSetCriteriaFactory(),e.N.configure({language:f.language,role:"",channelCount:0,zc:"",spatialAudio:!1,videoLayout:"",zd:"",cd:a,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Cd:"",Ee:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount}),Pp(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.ya()))return;(function(){if(e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks),g=null;f=t(f);for(var h=f.next();!h.done;h=f.next())h=h.value,h.label==a&&(g=h);g&&ar(e,g)}})()};p.Hg=function(){var a=this.oa;return this.o?this.o.isTextVisible():a};p.tj=function(){return this.ab.map(function(a){return Of(a)})}; p.rj=function(a){wb("getChapters","Please use an getChaptersAsync.");if(!this.ab.length)return[];var b=gf(a);a=this.ab.filter(function(f){return gf(f.language)==b});if(!a.length)return[];var c=[],d=new Set;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,e.segmentIndex&&e.segmentIndex.Cb(function(f){var g=f.O()[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.sj=function(a){var b=this,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(!b.ab.length)return l.return([]);c=gf(a);d=b.ab.filter(function(m){return gf(m.language)==c});if(!d.length)return l.return([]);e=[];f=new Set;g=t(d);h=g.next();case 2:if(h.done){l.u(4);break}k=h.value;if(k.segmentIndex){l.u(5);break}return F(l,k.createSegmentIndex(),5);case 5:k.segmentIndex.Cb(function(m){var n=m.O()[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.u(2);break;case 4:return l.return(e)}})};function Oq(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Pq(a){return Array.from(a.h.textTracks).find(function(b){return"Shaka Player TextTrack"==b.label})}function Tq(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})} p.ih=function(a){a=!!a;this.oa!=a&&(this.oa=a,this.m==vq?(this.o.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.l.A||(a=ag(this.i.textStreams,this.td,this.qe,this.pe),0=Math.floor(d.end)&&a.Ed():Math.floor(c)<=Math.floor(d.start+e)&&a.Ed()})} function uq(a){if(a.A&&a.P){var b=a.A.g,c="playing";a.P.g==ji?c="buffering":a.Td()?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(Sp("statechanged",c)))}} function Lq(a){var b=a.h.playbackRate,c=a.V();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Rh();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.ie(d,!1):1==e&&b!==a.K.Kc()&&a.Ed()}if(c&&(c=a.Sa(),Number.isFinite(c.end)&&!(a.h.currentTime1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency, a.U=Math.max(a.U-(g-f)/2,f+d),a.Xb=Date.now());e&&null!==a.U&&(h=a.U+d,k=a.U-d);g=c.end-a.h.currentTime;d=0;a.m==yq&&(e=a.h.buffered,0h?(b!=l&&a.ie(l,!1),a.Xb=null):void 0!=k&&m&&g-de)&&a.Qfb&&(b+=Math.pow(2,32)),b=b.toString(16);return new U(2,3,3016,c,b,a.h.error.message)}function Bq(a,b,c){0=this.Sa().end};T("shaka.Player",Y);Y.prototype.isEnded=Y.prototype.Td;Y.prototype.isRemotePlayback=Y.prototype.ya;Y.prototype.addFont=Y.prototype.addFont;Y.prototype.setVideoContainer=Y.prototype.Li;Y.prototype.getFetchedPlaybackInfo=Y.prototype.xj;Y.prototype.getManifestParserFactory=Y.prototype.Dj; Y.prototype.getManifest=Y.prototype.zg;Y.prototype.retryStreaming=Y.prototype.Yg;Y.prototype.setMaxHardwareResolution=Y.prototype.Sk;Y.prototype.addChaptersTrack=Y.prototype.Fe;Y.prototype.addThumbnailsTrack=Y.prototype.Ge;Y.prototype.addTextTrackAsync=Y.prototype.Dd;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getBufferedInfo=Y.prototype.Lb;Y.prototype.getSegmentAvailabilityDuration=Y.prototype.Ve;Y.prototype.getPresentationStartTimeAsDate=Y.prototype.Ag; Y.prototype.getPlayheadTimeAsDate=Y.prototype.Hj;Y.prototype.setTextTrackVisibility=Y.prototype.ih;Y.prototype.getChaptersAsync=Y.prototype.sj;Y.prototype.getChapters=Y.prototype.rj;Y.prototype.getChaptersTracks=Y.prototype.tj;Y.prototype.isTextTrackVisible=Y.prototype.Hg;Y.prototype.selectVariantsByLabel=Y.prototype.Mk;Y.prototype.selectTextLanguage=Y.prototype.bh;Y.prototype.selectAudioLanguage=Y.prototype.Ei;Y.prototype.getTextLanguages=Y.prototype.Nj;Y.prototype.getAudioLanguages=Y.prototype.oj; Y.prototype.getTextLanguagesAndRoles=Y.prototype.Oj;Y.prototype.getAudioLanguagesAndRoles=Y.prototype.pj;Y.prototype.getVideoTracks=Y.prototype.getVideoTracks;Y.prototype.selectVideoTrack=Y.prototype.Nk;Y.prototype.getAudioTracks=Y.prototype.getAudioTracks;Y.prototype.selectAudioTrack=Y.prototype.Lk;Y.prototype.selectVariantTrack=Y.prototype.ce;Y.prototype.selectTextTrack=Y.prototype.dh;Y.prototype.getThumbnails=Y.prototype.Qj;Y.prototype.getAllThumbnails=Y.prototype.nj; Y.prototype.getImageTracks=Y.prototype.zj;Y.prototype.getTextTracks=Y.prototype.yc;Y.prototype.getVariantTracks=Y.prototype.Fb;Y.prototype.cancelTrickPlay=Y.prototype.Ed;Y.prototype.trickPlay=Y.prototype.ie;Y.prototype.useTrickPlayTrackIfAvailable=Y.prototype.yh;Y.prototype.getPlaybackRate=Y.prototype.sb;Y.prototype.isBuffering=Y.prototype.Gg;Y.prototype.getKeyStatuses=Y.prototype.Se;Y.prototype.getActiveSessionsMetadata=Y.prototype.yg;Y.prototype.getExpiration=Y.prototype.Md; Y.prototype.drmInfo=Y.prototype.drmInfo;Y.prototype.keySystem=Y.prototype.keySystem;Y.prototype.isFullyLoaded=Y.prototype.$j;Y.prototype.goToLive=Y.prototype.Wj;Y.prototype.seekRange=Y.prototype.Sa;Y.prototype.isVideoOnly=Y.prototype.gk;Y.prototype.isAudioOnly=Y.prototype.Zj;Y.prototype.isInProgress=Y.prototype.Oc;Y.prototype.isLive=Y.prototype.V;Y.prototype.getQueueManager=Y.prototype.Wh;Y.prototype.getAdManager=Y.prototype.Qh;Y.prototype.getAssetUri=Y.prototype.jd; Y.prototype.getNetworkingEngine=Y.prototype.Nb;Y.prototype.getMediaElement=Y.prototype.Gj;Y.prototype.getManifestType=Y.prototype.Th;Y.prototype.getLoadMode=Y.prototype.Cj;Y.prototype.resetConfiguration=Y.prototype.zi;Y.prototype.getBufferFullness=Y.prototype.Rh;Y.prototype.getNonDefaultConfiguration=Y.prototype.Vh;Y.prototype.getConfigurationForLowLatency=Y.prototype.uj;Y.prototype.getConfiguration=Y.prototype.getConfiguration;Y.prototype.configurationForLowLatency=Y.prototype.kj; Y.prototype.configure=Y.prototype.configure;Y.prototype.releaseAllMutexes=Y.prototype.Dk;Y.prototype.destroyAllPreloads=Y.prototype.hg;Y.prototype.preload=Y.prototype.preload;Y.prototype.detachAndSavePreload=Y.prototype.Mh;Y.prototype.unloadAndSavePreload=Y.prototype.Vk;Y.prototype.load=Y.prototype.load;Y.prototype.updateStartTime=Y.prototype.Zk;Y.prototype.unload=Y.prototype.rc;Y.prototype.detach=Y.prototype.detach;Y.prototype.attachCanvas=Y.prototype.cj;Y.prototype.attach=Y.prototype.cc; Y.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.u(2);break}return F(k,bi(),3);case 3:b=k.h;case 2:return c=ui(),d=wk(),e=qb(),F(k,e.ec(),4);case 4:return f=k.h,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=Vp,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})}; Y.isBrowserSupported=function(){window.Promise||bb("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))return!1;qb();return vi()?!0:""!=wi().canPlayType("application/x-mpegurl")};Y.setQueueManagerFactory=function(a){Np=a};Y.setAdManagerFactory=function(a){Mp=a};Y.registerSupportPlugin=Up;Y.prototype.destroy=Y.prototype.destroy;var Tp=0,Ip=1,vq=2,yq=3; Y.LoadMode={DESTROYED:Tp,NOT_LOADED:Ip,MEDIA_SOURCE:vq,SRC_EQUALS:yq};Y.version="v4.15.0";var lr=["4","15"];xb=new function(a){this.g=a;this.i=yb;this.h=zb}(new vb(Number(lr[0]),Number(lr[1])));var Vp=new Map,Mp=null,Np=null;function mr(){this.g=[];this.i=this.m=this.l=this.j=this.h=0}function nr(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function or(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 jb;this.l.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.l.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=or.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};T("shaka.ads.ClientSideAd",or);or.prototype.release=or.prototype.release;or.prototype.getPodIndex=or.prototype.getPodIndex; or.prototype.getTimeOffset=or.prototype.getTimeOffset;or.prototype.getMediaUrl=or.prototype.getMediaUrl;or.prototype.getAdvertiserName=or.prototype.getAdvertiserName;or.prototype.getCreativeAdId=or.prototype.getCreativeAdId;or.prototype.getAdId=or.prototype.getAdId;or.prototype.getVastAdId=or.prototype.getVastAdId;or.prototype.getVastMediaWidth=or.prototype.getVastMediaWidth;or.prototype.getVastMediaHeight=or.prototype.getVastMediaHeight;or.prototype.getVastMediaBitrate=or.prototype.getVastMediaBitrate; or.prototype.getDescription=or.prototype.getDescription;or.prototype.getTitle=or.prototype.getTitle;or.prototype.getPositionInSequence=or.prototype.getPositionInSequence;or.prototype.getSequenceLength=or.prototype.getSequenceLength;or.prototype.setMuted=or.prototype.setMuted;or.prototype.resize=or.prototype.resize;or.prototype.isLinear=or.prototype.isLinear;or.prototype.isMuted=or.prototype.isMuted;or.prototype.setVolume=or.prototype.setVolume;or.prototype.getVolume=or.prototype.getVolume; or.prototype.play=or.prototype.play;or.prototype.pause=or.prototype.pause;or.prototype.skip=or.prototype.skip;or.prototype.canSkipNow=or.prototype.canSkipNow;or.prototype.getTimeUntilSkippable=or.prototype.getTimeUntilSkippable;or.prototype.isSkippable=or.prototype.isSkippable;or.prototype.isPaused=or.prototype.isPaused;or.prototype.getRemainingTime=or.prototype.getRemainingTime;or.prototype.getMinSuggestedDuration=or.prototype.getMinSuggestedDuration;or.prototype.getDuration=or.prototype.getDuration; or.prototype.isUsingAnotherMediaElement=or.prototype.isUsingAnotherMediaElement;or.prototype.hasCustomClick=or.prototype.hasCustomClick;or.prototype.isClientRendering=or.prototype.isClientRendering;or.prototype.needsSkipUI=or.prototype.needsSkipUI;function pr(){} function qr(a,b){var c=[];a=t(qd(a,"Ad"));for(var d=a.next();!d.done;d=a.next())if(d=ud(d.value,"InLine"))if(d=ud(d,"Creatives")){d=t(qd(d,"Creative"));for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=ud(e,"Linear");f&&rr(c,b,f);if(e=ud(e,"NonLinearAds")){e=qd(e,"NonLinear");e=t(e);for(var g=e.next();!g.done;g=e.next())a:{f=c;var h=b,k=g.value,l=ud(k,"StaticResource");if(l)g=l.attributes.creativeType;else{l=ud(k,"HTMLResource");if(!l)break a;g="text/html"}if(l=sd(l)){"text/html"===g&&(l="data:text/html;charset=UTF-8,"+ encodeURIComponent(l));var m=xd(k,"width",Dd)||xd(k,"expandedWidth",Dd),n=xd(k,"height",Dd)||xd(k,"expandedHeight",Dd);if(m||n){var q=null;(k=k.attributes.minSuggestedDuration)&&(q=dd(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 rr(a,b,c){var d=0;null!=b&&(d=b);var e=null;c.attributes.skipoffset&&(e=dd(c.attributes.skipoffset),isNaN(e)&&(e=null));if(c=ud(c,"MediaFiles")){var f=qd(c,"MediaFile");c=f;f=f.filter(function(h){return"streaming"==h.attributes.delivery});f.length&&(c=f);c=c.sort(function(h,k){return(parseInt(k.attributes.height,10)||0)-(parseInt(h.attributes.height,10)||0)});c=t(c);for(f=c.next();!f.done;f=c.next())if(f=f.value,!f.attributes.apiFramework){var g=sd(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}}}}T("shaka.ads.Utils",pr);pr.ADS_LOADED="ads-loaded";pr.AD_STARTED="ad-started";pr.AD_FIRST_QUARTILE="ad-first-quartile";pr.AD_MIDPOINT="ad-midpoint";pr.AD_THIRD_QUARTILE="ad-third-quartile";pr.AD_COMPLETE="ad-complete"; pr.AD_STOPPED="ad-stopped";pr.AD_SKIPPED="ad-skipped";pr.AD_VOLUME_CHANGED="ad-volume-changed";pr.AD_MUTED="ad-muted";pr.AD_PAUSED="ad-paused";pr.AD_RESUMED="ad-resumed";pr.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";pr.CUEPOINTS_CHANGED="ad-cue-points-changed";pr.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";pr.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";pr.AD_CLICKED="ad-clicked";pr.AD_PROGRESS="ad-progress";pr.AD_BUFFERING="ad-buffering";pr.AD_IMPRESSION="ad-impression"; pr.AD_DURATION_CHANGED="ad-duration-changed";pr.AD_CLOSED="ad-closed";pr.AD_LOADED="ad-loaded";pr.ALL_ADS_COMPLETED="all-ads-completed";pr.AD_LINEAR_CHANGED="ad-linear-changed";pr.AD_METADATA="ad-metadata";pr.AD_RECOVERABLE_ERROR="ad-recoverable-error";pr.AD_ERROR="ad-error";pr.AD_BREAK_READY="ad-break-ready";pr.AD_INTERACTION="ad-interaction";pr.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";pr.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";pr.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function sr(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=e;this.j=null;this.h=new jb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.15.0");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.m, google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){tr(f,g)});this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){ur(f,g)});this.h.D(this.i,"ended",function(){f.m.contentComplete()});this.h.za(this.i,"play",function(){f.F=!0})}sr.prototype.configure=function(a){this.o=a};sr.prototype.stop=function(){this.g&&this.g.stop();this.s&&Dj(this.s)}; sr.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.C.destroy()};function ur(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new V("ad-error",b));vr(a,null);a.l(new V("ad-cue-points-changed",(new Map).set("cuepoints",[])))} function tr(a,b){a.l(new V("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.o.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(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.B);a.l(new V("ima-ad-manager-loaded",(new Map).set("imaAdManager", a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new V("ad-cue-points-changed",(new Map).set("cuepoints",b)))}wr(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth, a.i.offsetHeight)}),a.F||a.o.skipPlayDetection?a.g.start():a.h.za(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){vr(a,null)}} function wr(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new V(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){ur(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){xr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){xr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE, function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){vr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){vr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")}); a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.D(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.D(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.D(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")}); a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g, google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})} function xr(a,b){var c=b.getAd();c?(a.j=new or(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.o.supportsMultipleMediaElements||a.l(new V("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new V("ad-started",b)),a.j.isLinear()&&(a.s.setAttribute("ad-active","true"),a.o.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))):bb("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")} function vr(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.o.supportsMultipleMediaElements&&a.l(new V("ad-content-resume-requested"));a.l(new V("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.o.customPlayheadTracker||a.i.ended||a.i.play())};function yr(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.A=c;this.o=d;this.m=e;this.s=f;this.B=b.overlay}p=yr.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!1};p.isUsingAnotherMediaElement=function(){return this.s};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.C.has(n)&&Er(n)&&e.C.set(n,e.j.preload(n.uri,null,n.mimeType||void 0)),Fr(e,n));v.u(4);break}if(!e.C.has(n)){v.u(7);break}return F(v,e.C.get(n),8);case 8:(u=v.h)&&u.destroy(),e.C.delete(n);case 7:Gr(e,n),w=JSON.stringify(n),e.U.has(w)&&e.U.delete(w),e.H.delete(n),Hr(e),n.overlay||(g=!0);case 4:m=l.next();v.u(3);break;case 5:g&&Ir(e),G(v)}})})}p=Ar.prototype;p.configure=function(a){this.M=a;Jr(this)}; function Kr(a){if(!a.ka&&a.H.size){a.I.D(a.g,"playing",a.W);a.I.D(a.g,"timeupdate",a.W);a.I.D(a.g,"seeked",a.oa);a.I.D(a.g,"ended",a.$);if("requestVideoFrameCallback"in a.g&&!Lr()){var b=a.g,c=function(){-1!=a.P&&(a.$(),-1!=a.P&&(a.P=b.requestVideoFrameCallback(c)))};a.P=b.requestVideoFrameCallback(c)}else a.S.Ga(.025);a.N&&a.N.Ga(1);a.ka=!0}} function Hr(a){a.ka&&!a.H.size&&(a.I.Ja(a.g,"playing",a.W),a.I.Ja(a.g,"timeupdate",a.W),a.I.Ja(a.g,"seeked",a.oa),a.I.Ja(a.g,"ended",a.$),-1!=a.P&&(a.g.cancelVideoFrameCallback(a.P),a.P=-1),a.S&&a.S.stop(),a.N&&a.N.stop(),a.ka=!1)} function Jr(a){if(a.A&&a.M&&!a.K){var b=a.M.supportsMultipleMediaElements,c=a.g;c.webkitSupportsFullscreen&&c.webkitDisplayingFullscreen&&(b=!1);a.B==b&&(a.B=!b,a.B?(a.h=a.g,a.F&&(a.F.parentElement&&a.A.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.Ra();this.U.clear();this.H.clear();this.j.hg();if(this.C.size){var a=Array.from(this.C.values());a=t(a);for(var b=a.next();!b.done;b=a.next())(b=b.value)&&b.then(function(c){c&&c.destroy()})}this.C.clear();if(this.L.size)for(a=Array.from(this.L.keys()),a=t(a),b=a.next();!b.done;b=a.next())Gr(this,b.value);this.L.clear();this.j.detach();this.K=!1;this.s=this.m=null;this.B=!0;this.h=this.g;this.F=null;Mr(this);Hr(this);this.A&&Dj(this.A);this.o&&(this.o.stop(),this.o= null)};p.release=function(){this.stop();this.I&&this.I.release();this.l&&this.l.release();this.S&&(this.S.stop(),this.S=null);this.N&&(this.N.stop(),this.N=null);this.j.destroy()};p.kd=function(){return this.j};function Nr(a,b){var c;Q(function(d){if(1==d.g)return Br(a),F(d,Or(a,b),2);c=d.h;c.length?Pr(a,c):bb("Unsupported HLS interstitial",b);G(d)})} function Qr(a,b){var c=ud(b.eventNode,"OverlayEvent"),d=c.attributes.uri,e=c.attributes.mimeType,f="true"==c.attributes.loop,g=xd(c,"z",Dd);if(d&&0!=g){var h=null,k=ud(c,"Background");if(k){var l=k.attributes.uri;l?h="center / contain no-repeat url('"+l+"')":h=sd(k)}k=1920;l=1080;var m=ud(c,"Viewport");if(m){k=xd(m,"x",Dd);if(null==k)return;l=xd(m,"y",Dd);if(null==l)return}var n={viewport:{x:k,y:l},topLeft:{x:0,y:0},size:{x:k,y:l}},q=ud(c,"Overlay");if(m&&q){var r=ud(q,"TopLeft"),u=ud(q,"Size");if(r&& u){q=xd(r,"x",Dd);if(null==q)return;r=xd(r,"y",Dd);if(null==r)return;var w=xd(u,"x",Dd);if(null==w)return;u=xd(u,"y",Dd);if(null==u)return;n.topLeft.x=q;n.topLeft.y=r;n.size.x=w;n.size.y=u}}q=null;c=ud(c,"Squeeze");if(m&&c&&(u=ud(c,"TopLeft"),c=ud(c,"Size"),u&&c)){m=xd(u,"x",Dd);if(null==m)return;q=xd(u,"y",Dd);if(null==q)return;u=xd(c,"x",Dd);if(null==u)return;c=xd(c,"y",Dd);if(null==c)return;q={viewport:{x:k,y:l},topLeft:{x:m,y:q},size:{x:u,y:c}}}Pr(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,Rr(b,a,c),2);case 2:d=n.h;e=hd(d,"VAST,vmap:VMAP");if(!e)throw new U(2,10,10007);f=[];if("VAST"==e.tagName){f=qr(e,b.m);n.u(3);break}if("vmap:VMAP"!=e.tagName){n.u(3);break}for(var q=[],r=t(qd(e,"vmap:AdBreak")),u=r.next();!u.done;u=r.next()){var w=u.value,v=w.attributes.timeOffset;v&&(u=null,"start"==v?u=0:"end"==v?u=Infinity:u=dd(v),(w=ud(w,"vmap:AdSource"))&&(w=ud(w,"vmap:AdTagURI"))&& (w=rd(w))&&q.push({time:u,uri:w}))}g=t(q);h=g.next();case 5:if(h.done){n.u(3);break}k=h.value;return F(n,Rr(b,k.uri,c),8);case 8:l=n.h;m=hd(l,"VAST");if(!m)throw new U(2,10,10007);f.push.apply(f,x(qr(m,k.time)));h=g.next();n.u(5);break;case 3:Pr(b,f),G(n)}})}; function Pr(a,b){var c,d,e,f,g,h,k,l;Q(function(m){switch(m.g){case 1:c=!1,d=t(b),e=d.next();case 2:if(e.done){m.u(4);break}f=e.value;if(!f.uri){bb("Missing URL in interstitial",f);m.u(3);break}if(f.mimeType){m.u(5);break}wa(m,6);g=a.j.Nb();return F(m,vo(f.uri,g,a.G.getConfiguration().streaming.retryParameters),8);case 8:f.mimeType=m.h;za(m,5);break;case 6:Aa(m);case 5:h=f.id||JSON.stringify(f);if(a.U.has(h)){m.u(3);break}f.loop&&!f.overlay&&bb("Loop is only supported in overlay interstitials",f); f.overlay||(c=!0);a.U.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.C.has(f)&&Er(f)&&a.C.set(f,a.j.preload(f.uri,null,f.mimeType||void 0)),Fr(a,f));case 3:e=d.next();m.u(2);break;case 4:c&&Ir(a),Kr(a),G(m)}})} function Cr(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=t(h);for(h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;if(b)k=h.pre;else if(f)k=h.post;else if(!h.pre&&!h.post){var l=a.m-Math.round(1E3*h.startTime)/1E3,m=1;a.M.allowStartInMiddleOfInterstitial&& h.endTime&&Infinity!=h.endTime&&(m=h.endTime-h.startTime);0=h.startTime?!1:!0)}k&&(!a.s||h.startTime>=a.s.startTime)&&(d==(c||0)?e=h:e&&!h.canJump&&.001Math.abs(g.startTime-b.startTime)}).length);b.once&&(f++,a.H.delete(b),Hr(a),b.overlay||Ir(a));b.mimeType&&(b.mimeType.startsWith("image/")||"text/html"===b.mimeType)?b.overlay?Sr(a,b,c,d,f):bb("Unsupported interstitial",b):a.B&&b.overlay?bb("Unsupported interstitial",b):Tr(a,b,c,d,e,f)} function Sr(a,b,c,d,e){function f(){a.o&&(a.o.stop(),a.o=null);a.A.removeChild(k);Mr(a,b);a.i(new V("ad-stopped"));a.l.Ra();var q=Cr(a,b.pre,d-e);q?Dr(a,q,c,++d,Date.now(),e):a.K=!1}a.K=!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";Ur(a,b);a.i(new V("ad-started",(new Map).set("ad",new zr(b,c,d))));"iframe"==h?k.src=b.uri:(k.src=b.uri,k.onerror=function(q){a.i(new V("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.A.appendChild(k);var n=Date.now();a.o&&a.o.stop();a.o=new $e(function(){b.playoutLimit&&(Date.now()-n)/1E3>b.playoutLimit?(a.i(new V("ad-complete")), f()):b.endTime&&a.g.currentTime>b.endTime?(a.i(new V("ad-complete")),f()):a.g.currentTimeb.endTime)a.o&&a.o.stop(),a.i(new V("ad-skipped")),f()})} function Tr(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,E,H,C,D,I;Q(function(L){switch(L.g){case 1:g=Date.now();a.K=!0;if(!a.B||1!=d){L.u(2);break}a.i(new V("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new tg;k=function(K){return Q(function(J){if(1==J.g)return"detach"!=K.state?J.u(0):Lr()?F(J,new Promise(function(M){return(new $e(M)).ha(.1)}),3):J.u(3);h.resolve();a.l.Ja(a.G,"onstatechange",k);G(J)})};a.l.D(a.G,"onstatechange",k);return F(L,h,2);case 2:return Ur(a,b),a.B|| (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.B&&!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 K=Date.now();a.g.currentTime+=(K-e)/1E3;e=K}},u=function(K){var J,M;return Q(function(O){if(1==O.g){r();J=Cr(a,b.pre,d-f);if(K&&b.groupId)for(;J&&J.groupId==b.groupId;)d++,J=Cr(a,b.pre,d-f);a.o&&(!b.groupId||J&&J.groupId!=b.groupId)&&(a.o.stop(),a.o=null);Mr(a,b);if(J&&!J.overlay)return O.u(2);b.post&&(a.m=null,a.s=null);return a.B?F(O,a.j.detach(),4):F(O,a.j.rc(),4)}2!=O.g&&(a.B&&(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 V("ad-content-resume-requested",(new Map).set("offset",M)))),a.i(new V("ad-stopped")),a.l.Ra(),a.K=!1,a.B?Ir(a):(a.h.style.display="none",r(),a.g.ended||a.g.play()));Jr(a);J&&(a.i(new V("ad-stopped")),a.l.Ra(),Dr(a,J,c,++d,e,f));G(O)})},w=function(K){return Q(function(J){if(q)return J.return();q=!0;a.i(new V("ad-error",(new Map).set("originalEvent",K)));return F(J,u(!1),0)})},v=function(){return Q(function(K){if(1==K.g){if(q)return K.return(); q=!0;return F(K,u(!1),2)}a.i(new V("ad-complete"));G(K)})},a.ia=function(){return Q(function(K){if(q)return K.return();q=!0;a.i(new V("ad-skipped"));return F(K,u(!0),0)})},y=new yr(a.h,b,a.ia,c,d,!a.B),a.B||(y.setMuted(a.g.muted),y.setVolume(a.g.volume)),a.i(new V("ad-started",(new Map).set("ad",y))),(z=y.canSkipNow())&&a.i(new V("ad-skip-state-changed")),a.l.za(a.j,"error",w),a.l.D(a.h,"timeupdate",function(){if(a.h.duration){var K=y.canSkipNow();z!=K&&0=K.playRangeEnd?v():a.i(new V("ad-paused"))}),a.l.D(a.h,"volumechange",function(){a.h.muted? a.i(new V("ad-muted")):a.i(new V("ad-volume-changed"))}),wa(L,4),Br(a),b.startTime&&b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(A=b.endTime-b.startTime,0b.endTime)&&a.ia()}));za(L,0); break;case 4:I=Aa(L);if(!a.K)return L.return();w(I);G(L)}})} function Ur(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.A&& (a.A.style.pointerEvents="none",b.background&&(a.A.style.background=b.background));a.F&&(a.F.style.background=b.overlay?"":"rgb(0, 0, 0)")}function Mr(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.A&&(a.A.style.pointerEvents="",!b||b.background)&&(a.A.style.background="");a.F&&(a.F.style.background="")} function Or(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,E,H,C,D,I,L,K,J,M,O,N,P,R,S,aa,W,Fa,Ga,xa,qa,Da,Ja,ra;return Q(function(da){switch(da.g){case 1:c=[];if(!b)return da.return(c);d=b.values.find(function(sa){return"X-ASSET-URI"==sa.key});e=b.values.find(function(sa){return"X-ASSET-LIST"==sa.key});if(!d&&!e)return da.return(c);f=null;if(g=b.values.find(function(sa){return"ID"==sa.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(sa){return"X-RESTRICT"==sa.key});n=m=!0;l&&l.data&&(q=l.data,m=!q.includes("SKIP"),n=!q.includes("JUMP"));r=m?0:null;if(u=b.values.find(function(sa){return"X-ENABLE-SKIP-AFTER"==sa.key}))w=u.data,r=parseFloat(w),isNaN(r)&&(r=m?0:null);v=null;if(y=b.values.find(function(sa){return"X-ENABLE-SKIP-FOR"==sa.key}))z=y.data,v=parseFloat(z),isNaN(r)&&(v=null);A=null;if(B=b.values.find(function(sa){return"X-RESUME-OFFSET"== sa.key}))E=B.data,A=parseFloat(E),isNaN(A)&&(A=null);H=null;if(C=b.values.find(function(sa){return"X-PLAYOUT-LIMIT"==sa.key}))D=C.data,H=parseFloat(D),isNaN(H)&&(H=null);K=L=I=!1;if(J=b.values.find(function(sa){return"CUE"==sa.key}))M=J.data,I=M.includes("ONCE"),L=M.includes("PRE"),K=M.includes("POST");O=!1;(N=b.values.find(function(sa){return"X-TIMELINE-OCCUPIES"==sa.key}))?(P=N.data,O=P.includes("RANGE")):!B&&a.G.V()&&(O=!L&&!K);if(d){R=d.data;if(!R)return da.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:H,once:I,pre:L,post:K,timelineRange:O,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});da.u(2);break}if(!e){da.u(2);break}S=e.data;if(!S)return da.return(c);wa(da,4);aa={type:11};return F(da,Rr(a,S,aa),6);case 6:W=da.h;Fa=ac(W);Ga=JSON.parse(Fa);if(xa=Ga["SKIP-CONTROL"])qa=xa["ENABLE-SKIP-AFTER"],"number"==typeof qa&&(r=parseFloat(qa),isNaN(qa)&&(r=m? 0:null)),Da=xa["ENABLE-SKIP-FOR"],"number"==typeof Da&&(v=parseFloat(Da),isNaN(Da)&&(v=null));for(Ja=0;Jad.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.M.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}} function cs(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.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),es(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),es(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),es(a,"thirdQuartile"));d=a.g.getRemainingTime(); e=a.g.getDuration();a.g.canSkipNow()&&0=d||d>e)&&Xr(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;fb){if(a.M.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}Xr(a);a.L=e;a.g=new Vr(g,f+1,e.ads.length,!0,a.h);a.C=g;0===f&&es(a,"breakStart");fs(a);break}}}if(!a.g)for(d= t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;fb&&(a.h.currentTime=a.A),a.A=null)}}} function Xr(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.I||a.M.push(a.C.adId);var b=a.g.m;(void 0===b?0:b)?es(a,"skip"):es(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.Ja(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&es(a,"breakEnd");a.g=null;a.C=null;a.L=null}} function fs(a){var b=!1;a.h.paused?b=!0:(es(a,"impression"),es(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&es(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||es(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(es(a,"impression"),es(a,"start"),b=!1):es(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){es(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target, d.type,d.listener)} function es(a,b){var c=a.C.trackingEvents.find(function(f){return f.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(f){return f.eventType==b}));if(c){var d={type:10};c=t(c.beaconUrls);for(var e=c.next();!e.done;e=c.next())(e=e.value)&&""!=e&&(e=Lg([e],rg()),e.method="POST",a.K.request(7,e,d))}switch(b){case "impression":a.i(new V("ad-impression"));break;case "start":a.i(new V("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new V("ad-muted"));break;case "unmute":a.i(new V("ad-volume-changed"));break; case "resume":a.i(new V("ad-resumed"));break;case "pause":a.i(new V("ad-paused"));break;case "firstQuartile":a.i(new V("ad-first-quartile"));break;case "midpoint":a.i(new V("ad-midpoint"));break;case "thirdQuartile":a.i(new V("ad-third-quartile"));break;case "complete":a.i(new V("ad-complete"));a.i(new V("ad-stopped"));break;case "skip":a.i(new V("ad-skipped"));a.i(new V("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active"); break;case "skipStateChanged":a.i(new V("ad-skip-state-changed"))}};function gs(a,b){this.g=a;this.i=null;this.h=b}p=gs.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};T("shaka.ads.ServerSideAd",gs); gs.prototype.release=gs.prototype.release;gs.prototype.getPodIndex=gs.prototype.getPodIndex;gs.prototype.getTimeOffset=gs.prototype.getTimeOffset;gs.prototype.getMediaUrl=gs.prototype.getMediaUrl;gs.prototype.getAdvertiserName=gs.prototype.getAdvertiserName;gs.prototype.getCreativeAdId=gs.prototype.getCreativeAdId;gs.prototype.getAdId=gs.prototype.getAdId;gs.prototype.getVastAdId=gs.prototype.getVastAdId;gs.prototype.getVastMediaWidth=gs.prototype.getVastMediaWidth; gs.prototype.getVastMediaHeight=gs.prototype.getVastMediaHeight;gs.prototype.getVastMediaBitrate=gs.prototype.getVastMediaBitrate;gs.prototype.getDescription=gs.prototype.getDescription;gs.prototype.getTitle=gs.prototype.getTitle;gs.prototype.getPositionInSequence=gs.prototype.getPositionInSequence;gs.prototype.getSequenceLength=gs.prototype.getSequenceLength;gs.prototype.setMuted=gs.prototype.setMuted;gs.prototype.resize=gs.prototype.resize;gs.prototype.isLinear=gs.prototype.isLinear; gs.prototype.isMuted=gs.prototype.isMuted;gs.prototype.setVolume=gs.prototype.setVolume;gs.prototype.getVolume=gs.prototype.getVolume;gs.prototype.play=gs.prototype.play;gs.prototype.pause=gs.prototype.pause;gs.prototype.skip=gs.prototype.skip;gs.prototype.canSkipNow=gs.prototype.canSkipNow;gs.prototype.getTimeUntilSkippable=gs.prototype.getTimeUntilSkippable;gs.prototype.isSkippable=gs.prototype.isSkippable;gs.prototype.isPaused=gs.prototype.isPaused;gs.prototype.getRemainingTime=gs.prototype.getRemainingTime; gs.prototype.getMinSuggestedDuration=gs.prototype.getMinSuggestedDuration;gs.prototype.getDuration=gs.prototype.getDuration;gs.prototype.isUsingAnotherMediaElement=gs.prototype.isUsingAnotherMediaElement;gs.prototype.hasCustomClick=gs.prototype.hasCustomClick;gs.prototype.isClientRendering=gs.prototype.isClientRendering;gs.prototype.needsSkipUI=gs.prototype.needsSkipUI;function hs(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new jb;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new V("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){is(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length? e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new gs(f,e.l);e.A&&(e.m.i=e.A);e.i(new V("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active"); var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new V("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new V("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new V("ad-third-quartile"))}); this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new V("ad-complete"));e.i(new V("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new V("ad-skipped"));e.i(new V("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C= f;e.i(new V("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}p=hs.prototype;p.configure=function(){};p.stop=function(){this.B="";this.o=null;this.C=[]};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.C}; function is(a,b){a.i(new V("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.D(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.o=c,a.l.currentTime=d.start)}})};function Z(){Dg.call(this);this.h=this.i=this.j=this.g=null;this.m=new mr;this.o=navigator.language;this.l=null}pa(Z,Dg);p=Z.prototype;p.setLocale=function(a){this.o=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 Ar(a,b,c,function(e){return js(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 U(2,10,1E4);this.j&&this.j.release();this.j=new sr(a,b,this.o,c,function(e){return js(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);Dg.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 V("ad-stopped"));this.dispatchEvent(new V("ad-content-attach-requested"));this.m=new mr};p.requestClientSideAds=function(a){if(!this.j)throw new U(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 U(1,10,10001);var b=this.j;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new Wr(a,b,c,function(e){return js(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new U(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new U(1,10,10004)):(d.l=new tg,Zr(d,a,b),d.H=c||"",d.P=Date.now()/1E3,a=d.l);return a}; p.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new U(1,10,10005);var b=this.i;b.G=a;b.i(new V("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 U(2,10,10002);this.h&&this.h.release();this.h=new hs(a,b,this.o,function(d){return js(c,d)});this.h.configure(this.l)}; p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.h)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&bb('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 U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&& (c.G=!0),c.j=new tg,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.h)throw new U(1,10,10003);(a.mpt||a.mpv)&&bb('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(){wb("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:nr(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&&Nr(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=t(c.eventNode.children),m=l.next();!m.done;m= l.next())if(m=m.value,"AlternativeMPD"==m.tagName){if(m=m.attributes.uri){k=m;break}}else if("InsertPresentation"==m.tagName||"ReplacePresentation"==m.tagName){var n=m.attributes.url;if(n){k=n;(l=xd(m,"maxDuration",Dd))&&(g=l/c.timescale);(l=xd(m,"returnOffset",Dd))&&(h=l/c.timescale);b&&h&&(f=e+h);break}}k&&Pr(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&&ud(c.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,a,b),this.g&&Qr(this.g,c))}};p.addCustomInterstitial=function(a){if(!this.g)throw new U(1,10,10006);Pr(this.g,[a])};p.addAdUrlInterstitial=function(a){if(!this.g)throw new U(1,10,10006);return this.g.addAdUrlInterstitial(a)}; p.getInterstitialPlayer=function(){if(!this.g)throw new U(1,10,10006);return this.g.kd()};function js(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)}T("shaka.ads.AdManager",Z);Z.prototype.getInterstitialPlayer=Z.prototype.getInterstitialPlayer;Z.prototype.addAdUrlInterstitial=Z.prototype.addAdUrlInterstitial; Z.prototype.addCustomInterstitial=Z.prototype.addCustomInterstitial;Z.prototype.onDASHInterstitialMetadata=Z.prototype.onDASHInterstitialMetadata;Z.prototype.onHLSInterstitialMetadata=Z.prototype.onHLSInterstitialMetadata;Z.prototype.onCueMetadataChange=Z.prototype.onCueMetadataChange;Z.prototype.onHlsTimedMetadata=Z.prototype.onHlsTimedMetadata;Z.prototype.onDashTimedMetadata=Z.prototype.onDashTimedMetadata;Z.prototype.onManifestUpdated=Z.prototype.onManifestUpdated;Z.prototype.getStats=Z.prototype.getStats; Z.prototype.getCuePoints=Z.prototype.getCuePoints;Z.prototype.getServerSideCuePoints=Z.prototype.getServerSideCuePoints;Z.prototype.replaceServerSideAdTagParameters=Z.prototype.replaceServerSideAdTagParameters;Z.prototype.requestServerSideStream=Z.prototype.requestServerSideStream;Z.prototype.initServerSide=Z.prototype.initServerSide;Z.prototype.addMediaTailorTrackingUrl=Z.prototype.addMediaTailorTrackingUrl;Z.prototype.requestMediaTailorStream=Z.prototype.requestMediaTailorStream; Z.prototype.initMediaTailor=Z.prototype.initMediaTailor;Z.prototype.updateClientSideAdsRenderingSettings=Z.prototype.updateClientSideAdsRenderingSettings;Z.prototype.requestClientSideAds=Z.prototype.requestClientSideAds;Z.prototype.onAssetUnload=Z.prototype.onAssetUnload;Z.prototype.release=Z.prototype.release;Z.prototype.initClientSide=Z.prototype.initClientSide;Z.prototype.initInterstitial=Z.prototype.initInterstitial;Z.prototype.configure=Z.prototype.configure;Z.prototype.setLocale=Z.prototype.setLocale; Z.ADS_LOADED="ads-loaded";Z.AD_STARTED="ad-started";Z.AD_FIRST_QUARTILE="ad-first-quartile";Z.AD_MIDPOINT="ad-midpoint";Z.AD_THIRD_QUARTILE="ad-third-quartile";Z.AD_COMPLETE="ad-complete";Z.AD_STOPPED="ad-stopped";Z.AD_SKIPPED="ad-skipped";Z.AD_VOLUME_CHANGED="ad-volume-changed";Z.AD_MUTED="ad-muted";Z.AD_PAUSED="ad-paused";Z.AD_RESUMED="ad-resumed";Z.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Z.CUEPOINTS_CHANGED="ad-cue-points-changed";Z.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded"; Z.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Z.AD_CLICKED="ad-clicked";Z.AD_PROGRESS="ad-progress";Z.AD_BUFFERING="ad-buffering";Z.AD_IMPRESSION="ad-impression";Z.AD_DURATION_CHANGED="ad-duration-changed";Z.AD_CLOSED="ad-closed";Z.AD_LOADED="ad-loaded";Z.ALL_ADS_COMPLETED="all-ads-completed";Z.AD_LINEAR_CHANGED="ad-linear-changed";Z.AD_METADATA="ad-metadata";Z.AD_RECOVERABLE_ERROR="ad-recoverable-error";Z.AD_ERROR="ad-error";Z.AD_BREAK_READY="ad-break-ready";Z.AD_INTERACTION="ad-interaction"; Z.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Z.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Z.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";Mp=function(){return new Z};function ks(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof V){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);d=t(Object.getOwnPropertyNames(c));for(b=d.next();!b.done;b=d.next())e.add(b.value);d={};e=t(e);for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=c[b];c={__type__:"Error",contents:d}}else if(c instanceof TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(yj(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 ls(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=ms(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 ms(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}} var ns="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),os="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),ps=["loop","playbackRate"],qs=["pause","play"],rs=(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),ss=(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),ts=(new Map).set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),us=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],vs=[["isTextTrackVisible","setTextTrackVisibility"]],ws="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "), xs="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function ys(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new $e(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.M=f;this.i=this.m=!1;this.I="";this.o=null;this.B=function(){return zs(h)};this.C=function(k,l){k=ls(l);switch(k.type){case "event":var m=k.targetName,n=Bg(k.event);h.A(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.s&&(h.L(),h.s=!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 U(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;As.add(this)}p=ys.prototype;p.destroy=function(){As.delete(this);Bs(this);Cs&&Ds(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.i=this.m=!1;this.C=this.B=this.j=this.h=this.g=this.o=null;return Promise.resolve()};p.ub=function(){return this.i};p.Tg=function(){return this.I}; p.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Hb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(As),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new tg;d.s=!0;Es(d,e)}},function(b){for(var c=t(As),d=c.next();!d.done;d=c.next())d=d.value,Fs="available"==b,d.l.Hb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Fs&&this.l.ha(Gs);(a=Cs)&& a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new tg,this.s=!0,Es(this,a)):Cs=null}else window.__onGCastApiAvailable!==Hs&&(Is=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Hs)};p.eh=function(a){this.o=a;this.i&&Js(this,{type:"appData",appData:this.o})}; p.cast=function(){var a=this;return Q(function(b){if(!a.m)throw new U(1,8,8E3);if(!Fs)throw new U(1,8,8001);if(a.i)throw new U(1,8,8002);a.j=new tg;chrome.cast.requestSession(function(c){return Es(a,c)},function(c){return Ks(a,c)});return F(b,a.j,0)})};function Ls(a){a.i&&chrome.cast.requestSession(function(b){return Es(a,b)},function(b){return Ks(a,b)})}p.hd=function(){if(this.i){Bs(this);if(Cs){Ds(this);try{Cs.stop(function(){},function(){})}catch(a){}Cs=null}zs(this)}}; p.get=function(a,b){var c=this;if("video"==a){if(qs.includes(b))return function(){return c.ui.apply(c,[a,b].concat(x(Oa.apply(0,arguments))))}}else if("player"==a){if(ts.has(b)&&!this.get("player","isLive")())return function(){};if(ws.includes(b))return function(){return c.ui.apply(c,[a,b].concat(x(Oa.apply(0,arguments))))};if(xs.includes(b))return function(){return c.Ek.apply(c,[a,b].concat(x(Oa.apply(0,arguments))))};if(rs.has(b)||ss.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;Js(this,{type:"set",targetName:a,property:b,value:c})};function Es(a,b){var c=a.M();Cs=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);zs(a);Js(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function Ks(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 U(2,8,c,b))} p.ui=function(a,b){Js(this,{type:"call",targetName:a,methodName:b,args:Oa.apply(2,arguments)})};p.Ek=function(a,b){var c=Oa.apply(2,arguments),d=new tg,e=this.H.toString();this.H++;this.h.set(e,d);try{Js(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Ds(a){var b=Cs;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)} function zs(a){var b=Cs?"connected"==Cs.status:!1;if(a.i&&!b){a.F();for(var c in a.g)a.g[c]={};Bs(a)}a.i=b;a.I=b?Cs.receiver.friendlyName:"";a.l.Hb()}function Bs(a){if(a.h)for(var b=t(a.h.keys()),c=b.next();!c.done;c=b.next()){c=c.value;var d=a.h.get(c);a.h.delete(c);d.reject(new U(1,7,7E3))}} function Js(a,b){b=ks(b);var c=Cs;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},eb)}catch(d){throw b=new U(2,8,8005,d),c=new V("error",(new Map).set("detail",b)),a.A("player",c),a.hd(),b;}}var Gs=.02,Fs=!1,Cs=null,Is=null,As=new Set;function Hs(a){Is?window.__onGCastApiAvailable=Is:delete window.__onGCastApiAvailable;Is=null;if(a)for(var b=t(As),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Ms(a,b,c,d){d=void 0===d?!1:d;Dg.call(this);var e=this;this.i=a;this.h=b;this.l=this.o=this.m=this.s=this.j=null;this.H=c;this.G=d;this.C=[];this.B=[];this.A=[];this.F=new Map;this.g=null;window.chrome?(this.g=new ys(c,function(){return Ns(e)},function(){return Os(e)},function(f,g){return Ps(e,f,g)},function(){return Qs(e)},function(){return Rs(e)},d),Ss(this)):(this.j=this.i,this.s=this.h)}pa(Ms,Dg);p=Ms.prototype; p.destroy=function(a){this.g&&(void 0===a?0:a)&&this.g.hd();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.s=this.j=this.i=null;Dg.prototype.release.call(this);return Promise.all(a)};p.Uj=function(){return this.j};p.kd=function(){return this.s};p.ej=function(){return this.g?this.g.m&&Fs:!1};p.ub=function(){return this.g?this.g.ub():!1};p.Tg=function(){return this.g?this.g.Tg():""}; 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.rc(),0):b.return()})};p.eh=function(a){this.g&&this.g.eh(a)};p.Tk=function(){this.g&&Ls(this.g)};p.hd=function(){this.g&&this.g.hd()}; p.fj=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.hd();return F(d,c.g.destroy(),2)}c.g=null;c.g=new ys(a,function(){return Ns(c)},function(){return Os(c)},function(e,f){return Ps(c,e,f)},function(){return Qs(c)},function(){return Rs(c)},b);c.g.init();G(d)})}; function Ss(a){a.g.init();a.l=new jb;for(var b=t(ns),c=b.next();!c.done;c=b.next())a.l.D(a.i,c.value,function(f){a.g.ub()||(f=Bg(f),a.m.dispatchEvent(f))});for(var d in Cg)a.l.D(a.h,Cg[d],function(f){a.g.ub()||a.o.dispatchEvent(f)});a.j={};b={};for(var e in a.i)b={Ud:b.Ud},b.Ud=e,Object.defineProperty(a.j,b.Ud,{configurable:!1,enumerable:!0,get:function(f){return function(){return Ts(a,f.Ud)}}(b),set:function(f){return function(g){var h=f.Ud;a.g.ub()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.s={};Us(a, function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Vs(a,f)}})});Ws(a);a.m=new Dg;a.m.xe=a.j;a.o=new Dg;a.o.xe=a.s;a.l.D(a.h,"unloading",function(){a.g&&a.g.ub()||Xs(a)})}function Ws(a){var b=new Map;Us(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(Ot())}function Ot(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Pt(a,b){Qt(a)&&(a.i[a.h][a.g]=new ut(b,a.C,a.A,a.s,a.B),a.g++)}function Qt(a){var b=a.gc;c++,b++)a.i[b]=a.i[c];for(c=0;1>c;c++,b++)a.i[b]=Ot()} function St(a,b,c){var d=new Qd(a.j,b,"");d.textAlign=0===a.F?"left":1===a.F?"right":Sd;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.M;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?Rc: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=rt(d,"svc"+c,a.i,a.j,b))a.j=b;return c}Mt.prototype.display=function(){this.l=!0};function Tt(){this.i=[];this.h=null;this.g=0}function Ut(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0this.h.length)throw new U(2,2,3E3);this.g+=a}; Vt.prototype.Bi=function(a){if(0>this.g-a)throw new U(2,2,3E3);this.g-=a};function Xt(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null} function Yt(a,b,c,d){if(!a.g)return[];if(24==c)return c=Wt(b).value,d=Wt(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),Pt(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!Qt(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=St(b,d,a.i));b.h+1>=b.o?Rt(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=St(b,d,a.i));b.i[b.h]=Ot();b.g=0;break;case 12:b.isVisible()&& (e=St(b,d,a.i)),Nt(b),b.h=0,b.g=0}return e?[e]:[]} function Zt(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=Wt(b).value;b=[];c=t($t(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=St(e,d,a.i);f&&b.push(f)}Nt(e)}return b}if(137===c)for(b=Wt(b).value,b=t($t(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=Wt(b).value;b=null;c=t($t(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=St(e,d,a.i)),e.l=!1;return b? [b]:[]}if(139===c){c=Wt(b).value;b=null;c=t($t(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=St(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(140===c)return b=Wt(b).value,au(a,b,d);if(143===c)return d=au(a,255,d),bu(a),d;if(144===c)b.skip(1),d=Wt(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Wt(b).value,c=Wt(b).value,b.skip(1),a.g&&(b=cu((c&48)>>4,(c&12)>>2,c&3),a.g.B=cu((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=Wt(b).value,b=Wt(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=Wt(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 Mt(c,a.i),f.j=d,a.h[c]=f);d=Wt(b).value;f=Wt(b).value;var g=Wt(b).value,h=Wt(b).value,k=Wt(b).value;b=Wt(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]} function $t(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function au(a,b,c){var d=[];b=t($t(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=St(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function bu(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function cu(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return du[a<<2|b<<1|c]} var eu=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"]]),du="black blue green cyan red magenta yellow white".split(" ");function fu(){this.h=[];this.g=[];this.i=new Tt;this.l=0;this.m=new Map([["CC1",new Gt(0,0)],["CC2",new Gt(0,1)],["CC3",new Gt(1,0)],["CC4",new Gt(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;gu(this)}fu.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;gu(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())bu(b.value)}; function gu(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,wt(c.i),wt(c.j),wt(c.o);a.B=!0} fu.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Zg(a,0);if(!(8>a.getLength())&&181===a.X()&&49===a.Aa()&&1195456820===a.T()&&3===a.X()&&(c=a.X(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d>2,g=a.X(),h=a.X();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Ab:g,dc: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})))}}; fu.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=hu(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())Ut(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=iu(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b}; function hu(a,b){var c=b.type;if(16===(b.Ab&112)){var d=b.Ab>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.Ab&&255===b.dc||!b.Ab&&!b.dc||!ju(b.Ab)||!ju(b.dc))return 45<=++a.l&&gu(a),null;a.l=0;b.Ab&=127;b.dc&=127;var e=b.Ab;if(1<=e&&15>=e||!b.Ab&&!b.dc)return null;e=null;if(16===(b.Ab&112))a:{a.A.add(d),d=b.Ab;a=b.dc;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=Lt[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,Ft(g,c,1+g.g-g.h,g.h),zt(g,0,c-1),zt(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.s=f,g.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",At(c.g,0,32),d=!1,b=Lt[(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=Kt[(a& 14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))At(c.g,1,a);else if(18===(d&246)&&32===(a&224))At(c.g,d&1?3:2,a);else{if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.dc){case 32:It(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Ht(c,2,a);break;case 38:d=Ht(c,3,a);break;case 39:d=Ht(c,4,a);break;case 40:At(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:wt(c.o);Jt(c);break;case 43:Jt(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=xt(b,c.l,a));zt(b,0,15);break;case 45:b= c.g;3!==c.h?d=null:(d=xt(b,c.l,a),e=b.g-b.h+1,Ft(b,e-1,e,b.h),zt(b,0,e-1),zt(b,b.g,15-b.g),c.l=a);break;case 46:zt(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=xt(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,It(c),c.l=a,d=b}e=d;break a}(23==d||31==d)&&33<=a&&35>=a&&(c.g.A=a-32)}e=null}else a=b.dc,At(c.g,0,b.Ab),At(c.g,0,a);return e} function iu(a,b){var c=[];try{for(;b.Fa();){var d=Wt(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Wt(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Xt(e));for(var g=a.j.get(e),h=b.Ma();b.Ma()-h=m)var r=Yt(e,k,m,n);else if(128<=m&&159>=m)r=Zt(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?Pt(e.g,"\u266a"):Pt(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&Pt(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(eu.has(k)){var u=eu.get(k);Pt(e.g,u)}else Pt(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?Pt(e.g,"_"):Pt(e.g,"[CC]"));r=[]}c.push.apply(c,x(r))}}}}catch(w){if(w instanceof U&&3E3===w.code)cb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data."); else throw w;}return c}function ju(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}fu.prototype.getStreams=function(){return Array.from(this.A)};T("shaka.cea.CeaDecoder",fu);Nc=function(){return new fu};function ku(a){for(var b=[],c=a,d=a=0;d>1&63;r=39==r||40==r;break;case ru: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=Tb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function uu(a){a=mc(rd(a));a=tu(a).filter(function(b){return b.type===vu})[0];if(!a)return null;a=bc(a.value,!0);return(a=jd(a,"WRMHEADER"))?a:null} function wu(a){try{var b=uu(a);if(b)a:{for(var c=t(td(b,"DATA")),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.children)for(var f=t(e.children),g=f.next();!g.done;g=f.next()){var h=g.value;if("LA_URL"==h.tagName){var k=rd(h);break a}}}k=""}else k="";return k}catch(l){return""}}var vu=1;function xu(a,b,c){var d=yu(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 wu(a)}return""} function Au(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.wd];if(h){var k;if((k=vd(g.node,"urn:microsoft:playready","pro"))&&rd(k)){k=rd(k);k=mc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:nh(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.wd){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:nh(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=rc(h,b,g.init||a||k||l);if(h=Du.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function yu(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Eu(c.value))&&b.push(c);return b} function Eu(a){var b=a.attributes.schemeIdUri,c=yd(a,"urn:mpeg:cenc:2013","default_KID"),d=wd(a,"urn:mpeg:cenc:2013","pssh").map(sd),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new U(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:mc(g),keyId:null}})}catch(g){throw new U(2,4,4007);}return{node:a,wd:b,keyId:c,init:0v)if(r){r=xd(r,"t",Fd);if(null== r)break;else if(u>=r)break;v=Math.ceil((r-u)/w)-1}else{if(Infinity==a)break;else if(u/f>=a)break;v=Math.ceil((a*f-u)/w)-1}0>>31;q&=2147483647;var u=g.reader.T();g.reader.skip(4);if(1==r)throw new U(2,3,3006);h.push(new qj(l/k+c,(l+u)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=u;a+=q}g.parser.stop();return h};function Ou(a){this.h=Yb(a);this.g=new Zg(this.h,0)}Ou.prototype.Fa=function(){return this.g.Fa()}; function Pu(a){var b=Qu(a);if(7=c&&(c=v.timeline+1)}-1==k&&(k=c);r=new pv(n,a.J.originalId,a.bandwidth,a.J.cb,a.Jb,u,w,m,g,a.J.Af,k)}n.timeline&&"image"!==a.ma.contentType&&"text"!==a.ma.contentType&&a.presentationTimeline.oi(r.h?r.h.timeline:[],u);d&&a.hc&&(d.segmentIndex=r);d=(d=(d=n.timeline)&&d[d.length-1])?d.end+n.$b:-1;l=-1;r instanceof pv&&(l=r.Oe());return{endTime:d,timeline:l,Jc:function(){r instanceof pv&&0==r.getNumReferences()&&ov(r,n,u,w,m);return Promise.resolve(r)}, timescale:n.timescale}}function jv(a){return a.Cc}function lv(a){var b=Gu(a,jv),c=Hu(a,jv,"media"),d=Hu(a,jv,"index"),e=Hu(a,jv,"k"),f=0;e&&(f=parseInt(e,10));return{Ef:b.Ef,gb:b.gb,timescale:b.timescale,fe:b.fe,$b:b.$b,wh:b.wh,timeline:b.timeline,Ac:c&&hc(c),Sd:d,mimeType:a.J.mimeType,codecs:a.J.codecs,bandwidth:a.bandwidth,qk:f}} function mv(a){var b=a.Sd?1:0;b+=a.timeline?1:0;b+=a.gb?1:0;if(0==b)throw new U(2,4,4002);1!=b&&(a.Sd&&(a.timeline=null),a.Ef=null,a.gb=null);if(!a.Sd&&!a.Ac)throw new U(2,4,4002);} function nv(a,b,c,d,e,f,g,h){function k(J){var M=J-v,O=M*w,N=b.Ef,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=[],S=b.qk;if(S)for(var aa=(N-O)/S,W={},Fa=0;Fam()&&!O.length?null:O})}return Promise.resolve(L)} function kv(a,b){var c=a.J.Ye;c||(c=Hu(a,jv,"initialization"));if(!c)return null;c=hc(c);var d=a.J.originalId,e=a.bandwidth||null,f=a.J.cb,g=a.Jb;b=new oj(function(){var h=Fu(c,d,null,null,e,null);return qc(f(),[h],g())},0,null,Xu(a),null,null,b,a.ma.encrypted);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;a.na&&(b.g=a.na.start+a.na.duration);return b} function pv(a,b,c,d,e,f,g,h,k,l,m){Cl.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.H=e;this.j=f;this.l=g;this.s=h;this.A=k;this.G=l;this.I=m;qv(this)}pa(pv,Cl);p=pv.prototype;p.getNumReferences=function(){return this.h?this.h.timeline.length:0};p.release=function(){Cl.prototype.release.call(this);this.h=null}; p.$a=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 ov(a,b,c,d,e){rv(a,e);if(a.h){c=a.h.timeline;a.h.Ac!==b.Ac&&(a.h.Ac=b.Ac);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.$a(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.Kk,f=d.xh+this.h.wh;c=this.j-this.h.$b;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=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new Bb(k.location)).Bb))return!1;return!0});d.length&&(a.B=d[0].Qg);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:qc(a.i,d)};function zv(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}p=zv.prototype;p.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.s=this.o=!1;this.m.clear()};p.Tj=function(){return this.l};p.Bg=function(){return this.j.slice()};p.yj=function(){return this.i}; p.Lh=function(a,b){if(a){if("audio"==a.type)for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a})),d.dependencyStream&&(d.dependencyStream.matchedStreams=d.dependencyStream.matchedStreams.filter(function(e){return e!== a}));else if(a.type==wc)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("image"==a.type)for(c=t(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}}; function Av(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Bv(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Cv(n),n]})),l=new Map(h.textStreams.map(function(n){return[Dv(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Ev(n),n]}));if(b){var m=Fv(wc);l.set(Dv(m),m);m=Fv("image");h.set(Ev(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Eh:c,Xi:d,Ui:e,Yh:f}} p.$f=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,E,H,C,D,I,L,K,J,M,O,N,P,R,S,aa;return Q(function(W){if(1==W.g){e=yc;if(!b&&1==a.length)return f=Av(a,!1),g=f.Eh,h=f.Xi,k=f.Ui,l=f.Yh,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()),W.u(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=t(b);m=l.next();case 2:if(m.done){K.u(4);break}n=m.value;return F(K,Nv(a,n,c,d,f,h,g),5);case 5:q=K.h;if(!q)throw new U(2,4,4037);m=l.next();K.u(2);break;case 4:r=t(h);for(u=r.next();!u.done;u=r.next())for(w=u.value,v=t(w),y=v.next();!y.done;y=v.next())z=y.value,(A=Ov(a,z,c,e,f,h))&&b.push(A);B=t(h);for(E=B.next();!E.done;E= B.next())for(H=E.value,C=t(H),D=C.next(),I={};!D.done;I={kh:void 0},D=C.next())if(I.kh=D.value,!Pv(I.kh)&&(L=b.some(function(J){return function(M){return Qv(a,J.kh,M)}}(I))))throw new U(2,4,4037);return K.return(b)}})}function Nv(a,b,c,d,e,f,g){return Q(function(h){if(1==h.g)return Rv(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 uw}else{if(c>a)return uw;if(a-ca-b)return uw}return ww}function vw(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return av&&w>u&&a.M++;null==w&&(w=u);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=Ww(a,b,c,{start:q,duration:w,node:m,ai:null==w||!n});h.push(k);b.ra.id&&w&&a.va.set(b.ra.id,w);if(null==w){k=null;break}k=q+w}}if(e)for(b=t(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,Nh:!1}:{periods:h,duration:k,Nh:!0}} function Pw(a){var b=Array.from(a.C.keys()).filter(function(h){return!a.F.includes(h)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=!0,e=t(a.C.get(c)),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.o.get(f);g&&(g.segmentIndex&&0!=g.segmentIndex.getNumReferences()?d=!1:(a.m&&a.m.Lh(g,c),a.o.delete(f)))}d&&a.C.delete(c)}}function Qw(a,b){b=new Set(b.map(function(e){return e.id}));for(var c=t(a.B.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.has(d)||a.B.delete(d)} function Ww(a,b,c,d){b.ra=Xw(a,d.node,null,c);b.na=d;b.ra.pb=b.pb;b.ra.id||(b.ra.id="__shaka_period_"+d.start);var e=qd(d.node,"EventStream");c=b.presentationTimeline.Eb();e=t(e);for(var f=e.next();!f.done;f=e.next())Yw(a,d.start,d.duration,f.value,c);c=qd(d.node,"SupplementalProperty");c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri&&(e=Zw(a,e)))b.Jb=e;c=qd(d.node,"AdaptationSet").map(function(r,u){return $w(a,b,u,r)}).filter(cf);if(b.hc){e= [];f=t(c);for(var g=f.next();!g.done;g=f.next()){g=t(g.value.Gk);for(var h=g.next();!h.done;h=g.next())e.push(h.value)}if(e.length!=(new Set(e)).size)throw new U(2,4,4018);}e=new Map;f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.mj),h=g.next();!h.done;h=g.next()){var k=t(h.value);h=k.next().value;k=k.next().value;e.set(h,k)}if(e.size)for(f=null,g=t(c),h=g.next();!h.done;h=g.next()){h=h.value;k=[];for(var l=t(h.streams),m=l.next(),n={};!m.done;n={lh:void 0},m=l.next())if(n.lh=m.value,e.has(n.lh.originalId)){f|| (f=qd(d.node,"AdaptationSet").map(function(r,u){return $w(a,b,u,r)}).filter(cf));m=t(f);for(var q=m.next();!q.done;q=m.next())if(q=q.value.streams.find(function(r){return function(u){return u.originalId==r.lh.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.vh});c=c.filter(function(r){return r.vh});if(!a.g.disableIFrames)for(c=t(c),e=c.next();!e.done;e=c.next())for(e= e.value,f=e.vh.split(" "),g=t(d),h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id))for(h=t(h.streams),k=h.next();!k.done;k=h.next())cg(k.value,e.streams);c=ax(a.g.disableAudio,d,"audio");e=ax(a.g.disableVideo,d,"video");f=ax(a.g.disableText,d,wc);d=ax(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new U(2,4,4004);return{id:b.ra.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}} function ax(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 $w(a,b,c,d){function e(J){var M=J.attributes["dvb:fontFamily"];J=J.attributes["dvb:url"];M&&J&&(J=qc(b.ma.cb(),[J],b.Jb()),a.j.addFont(M,J[0]))}function f(J){switch(J){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(J){switch(J){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ma=Xw(a,d,b.ra,null);b.ma.position=c;var h=!1;c=qd(d,"Role");var k=c.map(function(J){return J.attributes.value}).filter(cf), l=void 0,m=b.ma.contentType==wc;m&&(l="subtitle");c=t(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var q=n.attributes.schemeIdUri;if(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=qd(d,"EssentialProperty");c=null;var u=!1;n=null;q=!1;r=t(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?u=!0:"urn:dvb:dash:fontdownload:2014"==v?e(w):"urn:mpeg:dash:urlparam:2014"==v?(n=Zw(a,w))||(q=!0):q=!0)}if(q)return null;var A=null;q=qd(d,"SupplementalProperty");q=t(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=Zw(a,r));n&&(b.Jb=n);n=qd(d,"Accessibility");var B=new Map,E;n=t(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?E="visually impaired":"2"==r?E="hard of hearing":"9"==r&&(E="spoken subtitles"));else if(q=1,null!=r)for(r=t(r.split(";")),w=r.next();!w.done;w=r.next()){v=w.value;var H=w=void 0;v.includes("=")?(v=v.split("="),w="svc"+v[0],H=v[1].split(",")[0].split(":").pop()):(w="svc"+q,q++,H=v);B.set(w,gf(H))}else B.set("svc1","und");else if(q=1,null!=r)for(r= r.split(";"),w=t(r),v=w.next();!v.done;v=w.next()){H=v.value;var C=v=void 0;H.includes("=")?(H=H.split("="),v=H[0].startsWith("CC")?H[0]:"CC"+H[0],C=H[1]||"und"):(v="CC"+q,2==r.length?q+=2:q++,C=H);B.set(v,gf(C))}else B.set("CC1","und");n=qd(d,"ContentProtection");var D=xu(n,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);b.ma.encrypted=0a.K)){var c=a.K;0<=a.g.updatePeriod&&(c=a.g.updatePeriod);a.L.ha(Math.max(c-b,Wa(a.xa)))}} function Xw(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,mf:null,audioSamplingRate:null,pb:0,Af:0,encrypted:!1};d=d||c.cb;var e=b.attributes.id,f=b.attributes.supplementalId,g=qd(b,"BaseURL"),h,k=!1;if(a.h)for(var l=t(g),m=l.next();!m.done;m=l.next()){var n=m.value;m=n.attributes.serviceLocation;n=sd(n);m&&n&&(xv(a.h,e,m,n),k=!0)}k&&a.h||(h=g.map(sd));l=b.attributes.contentType||c.contentType;m=b.attributes.mimeType||c.mimeType;n= im([b.attributes.codecs||c.codecs]).join(",");var q=xd(b,"frameRate",Id)||c.frameRate,r=b.attributes.sar||c.pixelAspectRatio,u=gx(qd(b,"InbandEventStream"),c.emsgSchemeIdUris),w=qd(b,"AudioChannelConfiguration");w=hx(w)||c.mf;var v=xd(b,"audioSamplingRate",Fd)||c.audioSamplingRate;l||(l=cx(m,n));var y=ud(b,"SegmentBase"),z=ud(b,"SegmentTemplate"),A=y?xd(y,"availabilityTimeOffset",Gd)||0:0,B=z?xd(z,"availabilityTimeOffset",Gd)||0:0,E=g&&g.length?xd(g[0],"availabilityTimeOffset",Gd)||0:0;A=c.pb+E+A+ B;B=null;(E=ud(b,"SegmentSequenceProperties"))&&(E=ud(E,"SAP"))&&(B=xd(E,"cadence",Dd));E=b.attributes.label;var H=qd(b,"Label");H&&H.length&&(H=H[0],rd(H)&&(E=rd(H)));return{cb:function(){return qc(d(),g.length?a.h&&k?yv(a.h,e):h?h:[]:[])},xd:y||c.xd,pc:ud(b,"SegmentList")||c.pc,Cc:z||c.Cc,vf:ud(b,"ProducerReferenceTime")||c.vf,width:xd(b,"width",Fd)||c.width,height:xd(b,"height",Fd)||c.height,contentType:l,mimeType:m,codecs:n,frameRate:q,pixelAspectRatio:r,emsgSchemeIdUris:u,id:f||e,originalId:e, language:b.attributes.lang,mf:w,audioSamplingRate:v,pb:A,Ye:null,Af:B||c.Af,label:E||null,encrypted:!1}}function gx(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b} function hx(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=b.attributes.schemeIdUri;if(c&&(b=b.attributes.value))switch(c){case "urn:mpeg:dash:outputChannelPositionList:2012":return b.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(b,10);if(!b)continue;return b;case "tag:dolby.com,2015:dash:audio_channel_configuration:2015":c=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2];b=parseInt(b, 16);if(!b)continue;for(var d=0,e=0;ec}).map(sd).filter(cf);return d.length?qc(a.A,d):[]}T("shaka.dash.DashParser",Bw);si("application/dash+xml",function(){return new Bw});si("video/vnd.mpeg.dash.mpd",function(){return new Bw});function jx(){}T("shaka.dependencies",jx);jx.has=function(a){return kx.has(a)};jx.add=function(a,b){if(!lx[a])throw Error(a+" is not supported");a==mx?wb("mux.js","mux.js is no longer used in Shaka Player."):kx.set(a,function(){return b})};var mx="muxjs",lx={um:mx,ISOBoxer:"ISOBoxer"};jx.Allowed=lx;var kx=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function nx(){this.j=new pb(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 pb(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 vi(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}p=nx.prototype;p.bc=function(){return!!navigator.mediaCapabilities};p.La=function(){return this.j.value()};p.Ea=function(){return this.l.value()};p.be=function(){return!1}; p.wi=function(){return!1};p.Ze=function(){return!1};p.xi=function(){return!1};p.ae=function(){return!1};p.Xc=function(){return!0};p.Yc=function(){return!0};p.ge=function(){return!0};p.Di=function(){return 0};p.ec=function(){return Promise.resolve({width:Infinity,height:Infinity})};p.Mi=function(){return!1};p.jh=function(){return!1}; p.Ta=function(a){var b=this.La();if("TV"===b||"CONSOLE"===b||"CAST"===b)a.ads.customPlayheadTracker=!0,a.ads.skipPlayDetection=!0,a.ads.supportsMultipleMediaElements=!1;return a};p.oh=function(){return!!window.indexedDB};p.ti=function(){return[]};function un(a){qb();return void 0!==window.matchMedia&&window.matchMedia("(color-gamut: p3)").matches?a?"HLG":"PQ":"SDR"}p.Ti=function(){return!1};p.ii=function(){return!1};p.Zg=function(){return!1};p.nh=function(){return!0};p.ji=function(){return!1}; p.Si=function(){return!0};p.toString=function(){return"Device: "+this.Mb()+" v"+this.Ca()+"; Type: "+this.La()};function ox(){nx.call(this);this.g=new pb(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 pb(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1this.g&&a.push("opus");return a};p.ii=function(){return!0};p.ji=function(){return 3===this.Ca()};navigator.userAgent.includes("Tizen")&&(tb=function(){return new xx});function yx(){nx.apply(this,arguments)}pa(yx,nx);yx.prototype.Ca=function(){return null};yx.prototype.Mb=function(){return"Vizio"};yx.prototype.La=function(){return"TV"};yx.prototype.bc=function(){return!1};navigator.userAgent.includes("VIZIO SmartCast")&&(tb=function(){return new yx});function zx(){nx.call(this);this.h=new pb(function(){return navigator.userAgent.includes("DT_STB_BCM")});this.g=new pb(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(zx,nx);p=zx.prototype;p.Ca=function(){return this.g.value()};p.Mb=function(){return"WebKit STB"};p.La=function(){return"TV"};p.Ea=function(){return"WEBKIT"}; p.bc=function(){return!1};p.Xc=function(){var a=this.g.value();return null!==a?15<=a:!0};p.ec=function(){return Promise.resolve({width:window.screen.width*window.devicePixelRatio,height:window.screen.height*window.devicePixelRatio})};p.nh=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 U(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new U(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",lc(b),""].join("\n")))d.licenseServerUri=wu(b);d=Promise.resolve(d)}else d=Promise.resolve(null);return d}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(b){var c=Jx(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";"SAMPLE-AES"==c&&(d="cbcs");c=Jx(b,"URI");c=$x(c.split("?")[0]);c=Tb(c.data);d=rc("com.huawei.wiseplay",d,[{initDataType:"cenc",initData:c}]);(b=Ix(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2)); b=Promise.resolve(d)}else b=Promise.resolve(null);return b});this.ab=new Set;this.i=new Map;this.l=null;this.C="";this.Pa=new Tx;this.K=-1;this.ia=Infinity;this.$=this.mc=this.Za=!1;this.B=new $e(function(){if(a.U&&!a.g.continueLoadingWhenPaused&&(a.S.Ja(a.U,"timeupdate"),a.U.paused)){a.S.za(a.U,"timeupdate",function(){return cy(a)});return}cy(a)});this.Ba=dy;this.m=null;this.Ua=0;this.o=Infinity;this.Ya=this.Ka=this.P=0;this.W=new Eg;this.G=new Map;this.H=new Map;this.xa=new Map;this.oa=new Map; this.L=new Map;this.ua=new Map;this.va=new Map;this.kc=this.ka=!1;this.eb=new Va(5);this.j=null;this.N=!0;this.S=new jb;this.s=this.U=null;this.Xb=function(){return!1}}p=ay.prototype;p.configure=function(a,b){var c=this.h&&a.updatePeriod!=this.g.updatePeriod&&0<=a.updatePeriod;this.g=a;b&&(this.Xb=b);this.j&&this.j.configure(this.g);c&&this.m&&this.m.presentationTimeline.V()&&this.B.Hb()}; p.start=function(a,b){var c=this,d;return Q(function(e){return 1==e.g?(c.h=b,c.ka=b.isLowLatencyMode(),F(e,ey(c,[a]).promise,2)):3!=e.g?(d=e.h,c.C=d.uri,F(e,fy(c,d.data),3)):e.return(c.m)})}; p.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.W&&(a.push(this.W.destroy()),this.W=null);this.g=this.h=null;this.ab.clear();this.m=null;this.i.clear();this.I.clear();this.H.clear();this.A.clear();this.xa.clear();this.oa.clear();this.L.clear();this.ua.clear();this.va.clear();this.j&&this.j.destroy();this.S&&(this.S.release(),this.S=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(!gy(a))return r.return();b=[];c=Array.from(a.i.values());a.o=Infinity;a.m.gapCount=0;d=c.filter(function(u){return u.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(hy(a,g));return F(r,Promise.all(b),2)}iy(a,d.map(function(u){return u.stream}));h=d.some(function(u){return 0==u.Od});d.length&&!h&&(k=jy,ky(a,k.$i),l=d.map(function(u){return u.ic}),a.l.ob(Math.min.apply(Math,x(l))), a.h.updateDuration());h&&ly(a);m=t(d);for(n=m.next();!n.done;n=m.next())q=n.value,q.stream.isAudioMuxedInVideo||!q.stream.segmentIndex||Qf(q.stream.segmentIndex)||a.h.disableStream(q.stream);G(r)})};function my(a,b){return gy(a)?a.M.get(b.type):b.gf} function hy(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,E,H,C,D,I,L,K,J,M,O,N,P,R,S,aa,W,Fa,Ga;return Q(function(xa){switch(xa.g){case 1:if(b.stream.isAudioMuxedInVideo)return xa.return();c=[];d=t(b.O());for(e=d.next();!e.done;e=d.next())f=e.value,g=new Bb(f),h=g.g,b.Le&&(0<=b.Qb&&h.add("_HLS_msn",String(b.Qb)),0<=b.Rb&&h.add("_HLS_part",String(b.Rb))),b.Me&&h.add("_HLS_skip","YES"),Qb(h)&&Fb(g,Gb(h.toString())),c.push(g.toString());wa(xa,2);return F(xa,ey(a,c,!0).promise,4);case 4:k=xa.h;za(xa, 3);break;case 2:throw l=Aa(xa),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return xa.return();m=Ux(a.Pa,k.data);if(1!=m.type)throw new U(2,4,4017);n=k.uri;n==k.originalUri||b.O().includes(n)||b.wf.push(n);q=Mx(m.ea,"EXT-X-DEFINE");r=ny(a,q,n);u=b.stream;w=my(a,b);return F(xa,oy(a,m,u.mimeType,b.O,r),5);case 5:v=xa.h;y=v.keyIds;z=v.drmInfos;A=v.encrypted;B=v.Dh;u.encrypted||!A||B||(u.encrypted=!0);E=function(qa,Da){return qa.size===Da.size&&[].concat(x(qa)).every(function(Ja){return Da.has(Ja)})}; E(u.keyIds,y)||(u.keyIds=y,u.drmInfos=z,a.h.newDrmInfo(u));H=py(a,m,w,r,b.O,b.type);C=H.segments;if(D=H.bandwidth)u.bandwidth=D;I=Rl(u);L=t(C);for(K=L.next();!K.done;K=L.next())J=K.value,J.Z&&(J.Z.nd=I);u.segmentIndex.Vd(C,a.l.Eb());C.length&&(M=Px(m.ea,"EXT-X-MEDIA-SEQUENCE",0),N=(O=Ox(m.ea,"EXT-X-SKIP"))?Number(Ix(O,"SKIPPED-SEGMENTS")):0,P=qy(M,C),R=P.Qb,S=P.Rb,b.Qb=R+N,b.Rb=S,aa=w.get(M),u.segmentIndex.$a(aa));if(W=Qf(u.segmentIndex))b.Rc=W.startTime,Fa=C[C.length-1],b.ic=Fa.endTime;if(Ga=Ox(m.ea, "EXT-X-ENDLIST"))b.Od=!0;ry(a,m);sy(a,m.ea,u.type,r,b.O);G(xa)}})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.banLocation(a)};p.setMediaElement=function(a){this.U=a}; function ty(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.K,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=my(a,f);if(g=Qf(g)){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.K=Math.max(a.K,l));f.ig=l;break}}}}if(!(0>a.K))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,uy(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.K-d.ig,0Math.abs(c))){b.Rc+=c;b.ic+=c;a=my(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.O()}} function fy(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,E,H,C,D,I,L,K,J,M,O,N,P,R,S,aa,W,Fa,Ga,xa,qa,Da,Ja,ra,da;return Q(function(sa){switch(sa.g){case 1:c=yc;d=Ux(a.Pa,b);e=Mx(d.ea,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new el(null,0);a.l.Wc(!0);k=function(){return[a.C]};l=null;m=new Map;if(1==d.type)return a.N=!1,R=Mx(d.ea,"EXT-X-DEFINE"),m=ny(a,R,a.C),l=c.wa,S="",aa=new Map,F(sa,xy(a,a.F++,m,d,k,"",l,S,!0,"Media Playlist",null,aa,null,!1,null,!1),7);yy(a,e);n=Mx(d.ea,"EXT-X-MEDIA");q=Mx(d.ea,"EXT-X-STREAM-INF"); r=Mx(d.ea,"EXT-X-IMAGE-STREAM-INF");u=Mx(d.ea,"EXT-X-I-FRAME-STREAM-INF");w=Mx(d.ea,"EXT-X-SESSION-KEY");v=Mx(d.ea,"EXT-X-SESSION-DATA");y=Mx(d.ea,"EXT-X-CONTENT-STEERING");zy(a,v);return F(sa,Ay(a,y),4);case 4:if(!a.g.ignoreSupplementalCodecs){z=[];A=t(q);B=A.next();for(E={};!B.done;E={Qi:void 0},B=A.next())if(H=B.value,C=Ix(H,"SUPPLEMENTAL-CODECS"))E.Qi=C.split(/\s*,\s*/).map(function(Za){return Za.split("/")[0]}),D=H.attributes.map(function(Za){return function($a){var hb=$a.name,rb=$a.value;"CODECS"== hb&&(rb=Za.Qi.join(","),$a=$a.value.split(","),1<$a.length&&($a=uc("audio",$a))&&(rb+=","+$a));return new Lx(hb,rb)}}(E)),z.push(new Fx(H.id,H.name,D,null));q.push.apply(q,x(z));I=[];L=t(u);K=L.next();for(J={};!K.done;J={Ri:void 0},K=L.next())if(M=K.value,O=Ix(M,"SUPPLEMENTAL-CODECS"))J.Ri=O.split(/\s*,\s*/).map(function(Za){return Za.split("/")[0]}),N=M.attributes.map(function(Za){return function($a){var hb=$a.name;$a=$a.value;"CODECS"==hb&&($a=Za.Ri.join(","));return new Lx(hb,$a)}}(J)),I.push(new Fx(M.id, M.name,N,null));u.push.apply(u,x(I))}By(a,q);Cy(a,n);P=Dy(a,u);return F(sa,Ey(a,q,w,n,k,a.A,P),5);case 5:return f=sa.h,g=Fy(a,n),F(sa,Gy(a,r,u),6);case 6:h=sa.h;sa.u(3);break;case 7:W=sa.h,a.i.set(a.C,W),W.stream&&(Fa=Rl(W.stream),W.stream.segmentIndex.Cb(function(Za){Za.Z&&(Za.Z.nd=Fa)})),l=W.stream.type,Ga=!0,a.g.disableAudio&&"audio"==W.type?Ga=!1:a.g.disableVideo&&"video"==W.type&&!W.stream.codecs.includes(",")&&(Ga=!1),Ga&&f.push({id:0,language:gf(S||"und"),disabledUntilTime:0,primary:!0,audio:"audio"== W.type?W.stream:null,video:"video"==W.type?W.stream:null,bandwidth:W.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new U(2,7,7001);Hy(a,d);1==d.type&&(gy(a)&&(Iy(a,d),xa=a.o,a.B.ha(xa)),qa=Array.from(a.i.values()),Jy(a,qa),ly(a),sy(a,d.ea,l,m,k));a.m={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode, type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.s};if(a.$||!a.g.hls.disableCodecGuessing){sa.u(8);break}Da=[];Ja=t(a.m.variants);for(ra=Ja.next();!ra.done;ra=Ja.next())da=ra.value,da.audio&&""===da.audio.codecs&&Da.push(da.audio.createSegmentIndex()),da.video&&""===da.video.codecs&&Da.push(da.video.createSegmentIndex());return F(sa,Promise.all(Da),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m),G(sa)}})} function Ky(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A;return Q(function(B){if(1==B.g){c=gm(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return B.return(c);d=Ly(a,b);e=d.segment;f=d.segmentIndex;g=e.O();h=g[0];k=new Bb(h);l=k.mb.split(".").pop();return(m=My.get(l))?B.return(gm(m)):F(B,Promise.all([Ny(a,e.Z,0),Ny(a,e,f)]),2)}n=B.h;q=n[1].mimeType;r=n[0].data;u=n[1].data;w="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");v=["audio/mp4","video/mp4","video/iso.segment"];y=e.Z||v.includes(q); if(!y&&qk(Tb(u))){var E=u,H=a.g.disableAudio,C=a.g.disableVideo,D=a.g.disableText;var I=Tb(E);var L=(new ak).parse(I),K=L.Ld();I=L.Cg();var J=[],M=!1,O=!1;if(!H)switch(K.audio){case "aac":case "aac-loas":L.rb().length&&(J.push("mp4a.40.2"),M=!0);break;case "mp3":L.rb().length&&(J.push("mp4a.40.34"),M=!0);break;case "ac3":L.rb().length&&(J.push("ac-3"),M=!0);break;case "ec3":L.rb().length&&(J.push("ec-3"),M=!0);break;case "opus":L.rb().length&&(J.push("opus"),M=!0)}if(!C)switch(K.video){case "avc":I.codec? J.push(I.codec):J.push("avc1.42E01E");O=!0;break;case "hvc":I.codec?J.push(I.codec):J.push("hvc1.1.6.L93.90");O=!0;break;case "av1":J.push("av01.0.01M.08"),O=!0}if(J.length){H=M&&!O;C=new Map;if(O&&!D){D=new Lc("video/mp2t");D.rf(E);E=t(D.Of());for(O=E.next();!O.done;O=E.next())O=O.value,C.set(O,O);D.Bd()}I={type:H?"audio":"video",mimeType:"video/mp2t",codecs:J.join(", "),language:null,height:I.height,width:I.width,channelCount:null,sampleRate:null,closedCaptions:C,le:null,colorGamut:null,frameRate:I.frameRate}}else I= null;if(z=I)return B.return(z)}else if(y||w.includes(l))if(A=hm(r,u,a.g.disableText))return B.return(A);return q?B.return(gm(q)):B.return(c)})} function Ny(a,b,c){var d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(!b)return l.return({mimeType:null,data:null});d=Rg;e=mm(b.O(),b.wc(),b.uc(),a.g.retryParameters);f=b instanceof qj?1:0;return F(l,Oy(a,e,d,{type:f}).promise,2);case 2:g=l.h;h=g.data;if(!b.aesKey){l.u(3);break}return F(l,lm(h,b.aesKey,c),4);case 4:h=l.h;case 3:return b instanceof qj?b.ee(h,!0):b.ee(h),(k=g.headers["content-type"])&&(k=k.split(";")[0].toLowerCase()),l.return({mimeType:k,data:h})}})} function ly(a){if(gy(a)){if(a.Ba==Py){for(var b=Infinity,c=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&!e.stream.isAudioMuxedInVideo&&(b=Math.min(b,e.ic),c=Math.min(c,e.Rc));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Bf(b)}}else a.l.ob(Qy(a));if(!a.l.o)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=Qf(c.stream.segmentIndex))&& c.h&&a.l.gh(c.h);a.l.ef()}function yy(a,b){var c=(new Bb(a.C)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Ix(e,"NAME");var f=Ix(e,"VALUE");e=Ix(e,"QUERYPARAM");d&&f&&(a.A.has(d)||a.A.set(d,f));e&&(d=c.get(e)[0])&&!a.A.has(d)&&a.A.set(e,d)}} function ny(a,b,c){c=(new Bb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Ix(f,"NAME"),h=Ix(f,"VALUE");e=Ix(f,"QUERYPARAM");f=Ix(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.A.get(f))&&d.set(f,e)}return d} function By(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Ix(d,"AUDIO");c=Ix(d,"VIDEO");var f=Ix(d,"SUBTITLES");d=Ry(a,d);if(f){var g=uc(wc,d);a.H.set(f,g);Uc(d,g)}e&&(f=uc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.H.set(e,f));c&&(e=uc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.H.set(c,e))}} function zy(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Ix(d,"DATA-ID");c=Ix(d,"URI");var f=Ix(d,"LANGUAGE");d=Ix(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Qx([a.C],c,a.A)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new V("sessiondata",e);if(a.h)a.h.onEvent(c)}} function Ay(a,b){var c,d,e,f,g,h;return Q(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Ix(f,"PATHWAY-ID"),h=Ix(f,"SERVER-URI"),g&&h){a.j=new tv(a.h);a.j.configure(a.g);a.j.i=[a.C];a.j.setManifestType("HLS");a.j.h=g;c=uv(a.j,h);break}return F(k,c,0)})} function Fy(a,b){var c=Nx(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Sy(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Jx(d.value,"GROUP-ID");if(d=a.H.get(e))if(e=a.I.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Ty(wc,d)||Uy(wc),Vy(f.stream)}}return b.filter(function(g){return g})} function Vy(a){var b=new Set([De(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Cb(function(c){c.mimeType&&b.add(De(c.mimeType,a.codecs))});a.fullMimeTypes=b} function Gy(a,b,c){var d,e;return Q(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return Q(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);wa(m,2);return F(m,Wy(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=Aa(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Xy(a,g);return"image"!==h.stream.type?null:h.stream}catch(k){if(a.g.hls.ignoreImageStreamFailures)return null; throw k;}})),F(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}function Yy(a,b,c){b=b.filter(function(h){var k=Ix(h,"URI")||"";h=Ix(h,"TYPE");return"SUBTITLES"!=h&&(""!=k||"AUDIO"==h)});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Gx(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Sy(a,d[g],c,!1)}function Dy(a,b){return b.map(function(c){c=Xy(a,c);return"video"!==c.stream.type?null:c.stream}).filter(function(c){return c})} function Ey(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,w,v,y,z,A,B,E,H,C,D,I,L,K,J,M,O,N,P,R,S,aa,W,Fa,Ga,xa,qa,Da,Ja;return Q(function(ra){switch(ra.g){case 1:h=[];k=new Set;if(a.g.ignoreDrmInfo||!(0d-2&&(e=Math.max(1,d-2));for(e=d-e;ea.s&&(c=Math.min(-a.s,c),a.s+=c);a.l.Ii(0);a.l.fh(c);a.l.Wc(!1)} function jz(a,b,c,d,e){var f=Ox(c,"EXT-X-MAP");if(!f)return null;var g=Jx(f,"URI"),h=Qx(d(),g,e);g=[h.toString(),Ix(f,"BYTERANGE","")].join("-");if(!a.xa.has(g)){var k=void 0,l=null,m=!1;c=t(c);for(var n=c.next();!n.done;n=c.next())n=n.value,"EXT-X-KEY"==n.name?(m=Jx(n,"METHOD"),Zy(m)&&n.idK?1:0}),c=0;cm))continue}if(null==m){var r=Ix(g,"DURATION")||Ix(g,"PLANNED-DURATION");if(r){var u= parseFloat(r);isNaN(u)||(m=l+u);if(0>k-f+u)continue}}var w=Ix(g,"CLASS")||"com.apple.quicktime.HLS",v="YES"==Ix(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 E=[],H=t(g.attributes),C=H.next();!C.done;C=H.next()){var D=C.value;if(!y.includes(D.name)){var I= Sx(D.value,d);if("X-ASSET-URI"==D.name||"X-ASSET-LIST"==D.name)I=Qx(e(),D.value,d)[0];E.push({key:D.name,description:"",data:I,mimeType:null,pictureType:null})}}if(1C)if(D){D=xd(D,"t",Fd);if(null==D)break;else if(I>=D)break;C=Math.ceil((D-I)/L)-1}else{if(Infinity==z)break;else if(I/v>=z)break;C=Math.ceil((z*v-I)/L)-1}for(D=0;D<=C;++D)E=I+L,B.push({start:I/v,end:E/v,xh:I}),I=E}v=B;y=t(y);for(z=y.next();!z.done;z=y.next())(z=Bz(a,w,z.value,v,u,l))&&("audio"!=z.type||a.g.disableAudio?"video"!=z.type||a.g.disableVideo?z.type!=wc||a.g.disableText||m.push(z):n.push(z):r.push(z))}q=[];r=t(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 Fz(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 Gz(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""} function Hz(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={Df:void 0},g=e.next())h.Df=g.value,d.push(new qj(h.Df.start,h.Df.end,function(k){return function(){return qc(a.l,[f.replace("{start time}",String(k.Df.xh))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}T("shaka.mss.MssParser",yz); var Dz="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Cz=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");si("application/vnd.ms-sstr+xml",function(){return new yz});function Iz(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=dc(b)}catch(h){}throw new U(401==c||403==c?2:1,1,1001,d,c,f,a,g,e||d);};function Jz(){} function Kz(a,b,c,d,e,f){var g=new Lz;Xg(b.headers).forEach(function(m,n){g.append(n,m)});var h=new Mz,k={Hh:!1,Vi:!1};a=Nz(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 ug(a,function(){k.Hh=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new $e(function(){k.Vi=!0;h.abort()});l.ha(b/1E3);a.finally(function(){l.stop()})}return a} function Nz(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,u,w,v,y,z,A,B,E,H,C;return Q(function(D){switch(D.g){case 1:return l=Oz,m=Pz,q=new ArrayBuffer(0),u=r=0,w={},v=Date.now(),wa(D,2),F(D,l(a,d),4);case 4:n=D.h;w=Qz(n.headers);g(w);if("HEAD"==d.method){D.u(5);break}z=(y=n.headers.get("Content-Length"))?parseInt(y,10):0;if(!n.body)return F(D,n.arrayBuffer(),9);A=n.clone().body.getReader();B=function(I){function L(){var K,J,M,O;return Q(function(N){switch(N.g){case 1:return wa(N,2),F(N,A.read(),4);case 4:K= N.h;za(N,3);break;case 2:return Aa(N),N.return();case 3:if(K.done){N.u(5);break}r+=K.value.byteLength;if(!h){N.u(5);break}return F(N,h(K.value),5);case 5:J=Date.now();M=r-u;if(100=k||K.done)O=K.done?0:z-r,f(J-v,M,O),u=r,v=J;K.done?I.close():(I.enqueue(K.value),L());G(N)}})}L()};new m({start:B});return F(D,n.arrayBuffer(),8);case 8:q=D.h;D.u(5);break;case 9:q=D.h,E=Date.now(),f(E-v,q.byteLength,0);case 5:b.headers.Range&&(H=b.headers.Range.replace("bytes=","").split("-").filter(function(I){return I}).map(function(I){return parseInt(I, 10)}),2==H.length&&q.byteLength!=H[1]-H[0]+1&&bb("Payload length does not match range requested bytes",b,n));za(D,3);break;case 2:C=Aa(D);if(e.Hh)throw new U(1,1,7001,a,c);if(e.Vi)throw new U(1,1,1003,a,c);throw new U(1,1,1002,a,C,c);case 3:return D.return(Iz(w,q,n.status,a,n.url,b,c))}})}function Qz(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b} function Rz(){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)}T("shaka.net.HttpFetchPlugin",Jz);Jz.isSupported=Rz;Jz.parse=Kz;var Oz=window.fetch,Mz=window.AbortController,Pz=window.ReadableStream,Lz=window.Headers;Rz()&&(Hg("http",Kz,2,!0),Hg("https",Kz,2,!0),Hg("blob",Kz,2,!0));function Sz(){} function Tz(a,b,c,d,e,f){var g=new Uz,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 U(1,1,7001,a,c))};var q=!1;g.onreadystatechange=function(){if(2==g.readyState&&!q){var u=Vz(g);e(u);q=!0}};g.onload=function(u){var w=Vz(g),v=g.response;try{d(Date.now()-h,u.loaded-k,0);var y=Iz(w,v,g.status,a,g.responseURL,b,c);m(y)}catch(z){n(z)}};g.onerror= function(u){n(new U(1,1,1002,a,u,c))};g.ontimeout=function(){n(new U(1,1,1003,a,c))};g.onprogress=function(u){var w=Date.now(),v=f.minBytesForProgressEvents||0,y=u.loaded-k;if(100=v||u.lengthComputable&&u.loaded==u.total)d(w-h,y,4==g.readyState?0:u.total-u.loaded),k=u.loaded,h=w};for(var r in b.headers)g.setRequestHeader(r.toLowerCase(),b.headers[r]);g.send(b.body)});return new ug(l,function(){g.abort();return Promise.resolve()})} function Vz(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}T("shaka.net.HttpXHRPlugin",Sz);Sz.parse=Tz;var Uz=window.XMLHttpRequest;Hg("http",Tz,1,!0);Hg("https",Tz,1,!0);Hg("blob",Tz,1,!0);function Wz(a,b,c,d,e){this.g=a;this.i=b;this.groupId=c;this.h=d;this.j=e}function Xz(a){var b=a.Wb(!1);return b?lc(b):a.O().map(function(c){return"{"+encodeURI(c.split("#xywh=")[0])+"}"}).join("")+":"+a.startByte+":"+a.endByte}function Yz(a,b){return mm(a.g.O(),a.g.startByte,a.g.endByte,b.streaming.retryParameters)};function Zz(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function $z(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}Zz.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 aA(a){return 0==a.i?0:a.j/a.i};function bA(a){var b=this;this.s=a;this.i=new Map;this.h=new Tg(function(){return cA(b).catch(function(){})});this.j=[];this.o=function(){};this.m=function(){};this.g=new Zz;this.l=!1}bA.prototype.destroy=function(){return this.h.destroy()};function dA(a,b,c){a.o=b;a.m=c}function cA(a){a.l=!0;var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)} bA.prototype.queue=function(a,b,c,d,e){var f=this;Ug(this.h);var g=(this.i.get(a)||Promise.resolve()).then(function(){var h,k,l,m,n,q,r;return Q(function(u){if(1==u.g)return F(u,eA(f,b),2);h=u.h;if(f.h.g)throw new U(2,9,7001);if(d)for(m in k=Tb(h),l=new mh(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.o(aA(f.g),f.g.g);return u.return(e(h))})});this.i.set(a,g);return g}; function fA(a,b,c,d,e,f){Ug(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new U(2,9,7001);if(e){var h=Tb(c);h=new mh(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.o(aA(a.g),a.g.g);return f(c)});a.i.set(b,g)}function gA(a){return Q(function(b){return 1==b.g?F(b,Promise.all(a.i.values()),2):b.return(a.g.g)})} function eA(a,b){var c,d,e,f;return Q(function(g){if(1==g.g)return c=Rg,d=a.s.request(c,b),e=function(){return d.abort()},a.j.push(e),F(g,d.promise,2);f=g.h;Uc(a.j,e);return g.return(f.data)})};function hA(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new tg;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}hA.prototype.abort=function(){var a=this;return Q(function(b){if(1==b.g){try{a.i.abort()}catch(c){}wa(b,2);return F(b,a.g,4)}if(2!=b.g)return za(b,0);Aa(b);G(b)})}; function iA(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();G(g)})}})}hA.prototype.store=function(){return this.h};hA.prototype.promise=function(){return this.g};function jA(a){this.h=a;this.g=[]}jA.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function kA(a,b){return lA(a,b,"readwrite")}function lA(a,b,c){c=a.h.transaction([b],c);var d=new hA(c,b);a.g.push(d);d.promise().then(function(){Uc(a.g,d)},function(){Uc(a.g,d)});return d};function mA(a,b,c){this.h=new jA(a);this.i=b;this.g=c}p=mA.prototype;p.destroy=function(){return this.h.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return nA(this.i)};p.removeSegments=function(a,b){return oA(this,this.i,a,b)};p.getSegments=function(a){var b=this,c;return Q(function(d){if(1==d.g)return F(d,pA(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Jh(e)}))})};p.addManifests=function(){return nA(this.g)}; p.updateManifest=function(){return Promise.reject(new U(2,9,9016,"Cannot modify values in "+this.g))};function qA(a,b,c){a=kA(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=kA(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 oA(this,this.g,a,b)}; p.getManifests=function(a){var b=this,c;return Q(function(d){if(1==d.g)return F(d,pA(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Gd(e)})))})};p.getAllManifests=function(){var a=this,b,c;return Q(function(d){return 1==d.g?(b=lA(a.h,a.g,"readonly"),c=new Map,F(d,iA(b,function(e,f){var g;return Q(function(h){if(1==h.g)return F(h,a.Gd(f),2);g=h.h;c.set(e,g);G(h)})}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};p.Jh=function(a){return a};p.Gd=function(a){return Promise.resolve(a)}; function nA(a){return Promise.reject(new U(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=kA(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={Wg:void 0},h=g.next())l=h.value,k.Wg=e.add(l),k.Wg.onsuccess=function(n){return function(){f.push(n.Wg.result)}}(k);return F(m,d.promise(),2)}return m.return(f)})}; function oA(a,b,c,d){a=kA(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={Ig:void 0},e=c.next())f.Ig=e.value,b.delete(f.Ig).onsuccess=function(g){return function(){return d(g.Ig)}}(f);return a.promise()} function pA(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){if(1==m.g){d=lA(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={xf:void 0,$e:void 0},k=h.next())l.$e=k.value,l.xf=e.get(l.$e),l.xf.onsuccess=function(n){return function(){void 0==n.xf.result&&g.push(n.$e);f[n.$e]=n.xf.result}}(l);return F(m,d.promise(),2)}if(g.length)throw new U(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function rA(a){this.g=new jA(a)}rA.prototype.destroy=function(){return this.g.destroy()};rA.prototype.getAll=function(){var a=this,b,c;return Q(function(d){return 1==d.g?(b=lA(a.g,"session-ids","readonly"),c=[],F(d,iA(b,function(e,f){c.push(f)}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};rA.prototype.add=function(a){var b=kA(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()}; rA.prototype.remove=function(a){var b=this,c;return Q(function(d){return 1==d.g?(c=kA(b.g,"session-ids"),F(d,iA(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):F(d,c.promise(),0)})};function sA(){this.g=new Map}sA.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};sA.prototype.init=function(){var a=this;tA.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)}; function uA(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Pb:d,bb:f},bb:e})})});if(b)return b;throw new U(2,9,9013,"Could not find a cell that supports add-operations");}function vA(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Pb:d,bb:f},e)})})} function wA(a,b,c){a=a.g.get(b);if(!a)throw new U(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new U(2,9,9013,"Could not find cell with name "+c);return b}function xA(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function yA(a){var b=Array.from(a.g.keys());if(!b.length)throw new U(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()} function zA(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.u(3);break}return F(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Ba(m),F(m,e.destroy(),10);case 10:Ca(m,0);break;case 2:Aa(m),m.u(3)}})}; p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};si("application/x-offline-manifest",function(){return new UA});function VA(){}function WA(a,b){var c=NA(a);c&&"manifest"==c.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:b},a=xg(a)):a=c&&"segment"==c.g?XA(c.key(),c,b):vg(new U(2,1,9004,a));return a} function XA(a,b,c){var d=new sA;return xg(void 0).Va(function(){return d.init()}).Va(function(){return wA(d,b.Pb(),b.bb())}).Va(function(e){return e.getSegments([b.key()])}).Va(function(e){return{uri:b,data:e[0].data,headers:{},originalRequest:c}}).finally(function(){return d.destroy()})}T("shaka.offline.OfflineScheme",VA);VA.plugin=WA;Hg("offline",WA);function YA(a,b,c){var d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var r=!1,u=t(m),w=u.next();!w.done;w=u.next())if(w=w.value,ZA(w.info,q)){w.sessionIds.push(q.sessionId);r=!0;break}r||m.push({info:q,sessionIds:[q.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=$A(a,b,g);return F(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})} function $A(a,b,c){var d,e;return Q(function(f){switch(f.g){case 1:return d=new oh({lc:b,onError:function(){},nf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),wa(f,2),d.configure(a),F(f,zh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:za(f,3);break;case 2:return Aa(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 wa(h,2),F(h,Lh(d,g),4);if(2!=h.g)return e.push(g),za(h,0);Aa(h);G(h)})})),6);case 6:return F(f,d.destroy(),7);case 7:return f.return(e)}})}function ZA(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Vc(a.audioCapabilities,b.audioCapabilities,c)&&Vc(a.videoCapabilities,b.videoCapabilities,c)};function aB(a,b,c){var d=b.presentationTimeline.getDuration();b=bB(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function cB(a,b){var c=PA(new OA(a.Pb(),a.bb()),b),d=b.appMetadata||{};c=bB(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 bB(a){var b=[],c=$f(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Lf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Of(c.value));return b};function dB(){this.g=new Map}function eB(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 fB(a,b){a.g.set(b.id,b.bandwidth||2048)}function gB(a,b){a=a.g.get(b);null==a&&(a=0);return a};function hB(a){var b=this;if(a&&a.constructor!=Y)throw new U(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Nb()):(this.h=wn(),this.g=new Gg,this.g.configure(this.h.networking));this.i=[];this.l=[];var c=!a;this.j=new Tg(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 cA(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return F(k,Promise.all(e),3);case 3:if(!c){k.u(4); break}return F(k,b.g.destroy(),4);case 4:b.h=null,b.g=null,G(k)}})});this.m=1E9}function iB(){if(vi(qb()))a:{var a=t(tA.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=hB.prototype;p.destroy=function(){return this.j.destroy()};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=bn(a,b));return Bn(this.h,a)};p.getConfiguration=function(){var a=wn();Bn(a,this.h,wn());return a};p.Nb=function(){return this.g}; p.store=function(a,b,c,d,e){var f=this,g=this.getConfiguration(),h=new bA(this.g);this.l.push(h);b=jB(this,a,b||{},d||[],e||[],function(){var k;return Q(function(l){if(1==l.g)return c?l.u(2):F(l,vo(a,f.g,g.manifest.retryParameters),3);2!=l.g&&(c=l.h);k=xi(a,c||null);return l.return(k())})},g,h);b=new ug(b,function(){return cA(h)});b.finally(function(){Uc(f.l,h)});return kB(this,b)}; function jB(a,b,c,d,e,f,g,h){var k,l,m,n,q,r,u,w,v,y,z,A,B,E,H,C,D,I,L,K,J,M,O,N;return Q(function(P){switch(P.g){case 1:return lB(),l=k=null,m=new sA,r=q=n=null,wa(P,2,3),F(P,f(),5);case 5:return k=P.h,F(P,mB(a,b,k,g),6);case 6:u=P.h;nB(a);w=!u.presentationTimeline.V()&&!u.presentationTimeline.Oc();if(!w)throw new U(2,9,9005,b);v=t(d);y=v.next();case 7:if(y.done){P.u(9);break}z=y.value;return F(P,oB(a,z,u),10);case 10:A=P.h;u.imageStreams.push(A);nB(a);y=v.next();P.u(7);break;case 9:B=t(e),E=B.next(); case 11:if(E.done)return Bh(g.drm.clearKeys,u.variants),D=u.variants.some(function(R){if(R.audio)for(var S=t(R.audio.drmInfos),aa=S.next();!aa.done;aa=S.next())if(aa.value.licenseServerUri.startsWith("data:"))return!0;if(R.video)for(R=t(R.video.drmInfos),S=R.next();!S.done;S=R.next())if(S.value.licenseServerUri.startsWith("data:"))return!0;return!1}),I=g.offline.usePersistentLicense,D&&(I=!1),F(P,a.dd(u,function(R){r=r||R},g,I),15);H=E.value;return F(P,pB(a,u,H.uri,H.language,H.kind,H.mime,H.codecs), 14);case 14:C=P.h;u.textStreams.push(C);nB(a);E=B.next();P.u(11);break;case 15:l=P.h;nB(a);if(r)throw r;return F(P,qB(u,l,g,I),16);case 16:return F(P,m.init(),17);case 17:return nB(a),F(P,uA(m),18);case 18:return n=P.h,nB(a),L=rB(l,u,b,c,g,h,I),K=L.ik,J=L.sh,F(P,n.bb.addManifests([K]),19);case 19:M=P.h;nB(a);q=M[0];nB(a);if(r)throw r;return F(P,sB(a,J,q,K,h,g,n.bb,u,l,I),20);case 20:return nB(a),tB(u,K,l,I),F(P,n.bb.updateManifest(q,K),21);case 21:return nB(a),O=new MA("manifest",n.path.Pb,n.path.bb, q),P.return(cB(O,K));case 3:return Ba(P),F(P,m.destroy(),22);case 22:if(!k){P.u(23);break}return F(P,k.stop(),23);case 23:if(!l){P.u(25);break}return F(P,l.destroy(),25);case 25:Ca(P,0);break;case 2:N=Aa(P);if(null==q){P.u(27);break}return F(P,uB(q),27);case 27:throw r||N;}})} function sB(a,b,c,d,e,f,g,h,k,l){var m,n,q,r,u,w,v,y,z,A,B;return Q(function(E){switch(E.g){case 1:m={};n=0;q=function(){if(a.j.g||e.l)throw new U(2,9,7001);};r=function(H,C){var D,I,L,K,J,M,O,N,P;return Q(function(R){if(1==R.g){D=t(H);I=D.next();for(L={};!I.done;L={fc:void 0},I=D.next())L.fc=I.value,q(),K=Yz(L.fc,f),J=L.fc.i,M=L.fc.h,O=function(S){return function(aa){var W,Fa,Ga,xa;return Q(function(qa){switch(qa.g){case 1:W=S.fc.g;Fa=W.Wb(!1);if(!W.aesKey||Fa){qa.u(2);break}return F(qa,lm(aa,W.aesKey, S.fc.j),3);case 3:aa=qa.h;case 2:return Ga=Xz(W),F(qa,g.addSegments([{data:aa}]),4);case 4:xa=qa.h,q(),m[Ga]=xa[0],n+=aa.byteLength,G(qa)}})}}(L),N=L.fc.g,(P=N.Wb(!1))?fA(e,L.fc.groupId,P,J,M,O):e.queue(L.fc.groupId,K,J,M,O);return F(R,gA(e),2)}q();if(!C||e.l)return R.u(0);tB(h,d,k,l);return F(R,g.updateManifest(c,d),0)})};u=!1;wa(E,2);if(!vB(h)||!u||wB(h)){E.u(4);break}return F(E,r(b.filter(function(H){return H.h}),!0),5);case 5:return q(),b=b.filter(function(H){return!H.h}),w=m,v=n,m={},n=0,F(E, xB(g,c,d,w,v,function(){return nB(a)}),6);case 6:q();case 4:if(u){E.u(7);break}return F(E,r(b,!1),8);case 8:return q(),y=m,z=n,m={},n=0,F(E,xB(g,c,d,y,z,function(){return q()}),9);case 9:q();case 7:za(E,0);break;case 2:return A=Aa(E),B=Object.values(m),F(E,g.removeSegments(B,function(){}),10);case 10:throw A;}})} function uB(a){var b,c,d,e;return Q(function(f){switch(f.g){case 1:return b=new sA,F(f,b.init(),2);case 2:return F(f,uA(b),3);case 3:return c=f.h,d=new MA("manifest",c.path.Pb,c.path.bb,a),F(f,b.destroy(),4);case 4:return e=new hB,F(f,e.remove(d.toString()),0)}})} function xB(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,w,v;return Q(function(y){switch(y.g){case 1:g=!1;wa(y,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),q=n.next();!q.done;q=n.next())r=q.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=u&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=u&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&& (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return F(y,a.updateManifest(b,c),4);case 4:g=!0;f();za(y,0);break;case 2:return w=Aa(y),F(y,uB(b),5);case 5:if(g){y.u(6);break}v=Object.values(d);return F(y,a.removeSegments(v,function(){}),6);case 6:throw w;}})} function qB(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,E,H,C,D,I,L,K,J,M,O,N,P,R;return Q(function(S){switch(S.g){case 1:return e={width:Infinity,height:Infinity},sf(a,c.restrictions,e),F(S,vf(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;qf(a,h,k,g,l);m=t(a.variants);for(n=m.next();!n.done;n=m.next())q=n.value,f.push(Lf(q));r=t(a.textStreams);for(u=r.next();!u.done;u= r.next())w=u.value,f.push(Of(w));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())z=y.value,f.push(Pf(z));return F(S,c.offline.trackSelectionCallback(f),3);case 3:A=S.h;B=a.presentationTimeline.getDuration();E=0;H=t(A);for(C=H.next();!C.done;C=H.next())D=C.value,I=D.bandwidth*B/8,E+=I;wa(S,4);return F(S,c.offline.downloadSizeCallback(E),6);case 6:L=S.h;if(!L)throw new U(2,9,9014);za(S,5);break;case 4:K=Aa(S);if(K instanceof U)throw K;throw new U(2,9,9015);case 5:J=new Set;M=new Set;O=new Set; N=t(A);for(P=N.next();!P.done;P=N.next())R=P.value,"variant"==R.type&&J.add(R.id),"text"==R.type&&M.add(R.id),"image"==R.type&&O.add(R.id);a.variants=a.variants.filter(function(aa){return J.has(aa.id)});a.textStreams=a.textStreams.filter(function(aa){return M.has(aa.id)});a.imageStreams=a.imageStreams.filter(function(aa){return O.has(aa.id)});yB(a);G(S)}})} function rB(a,b,c,d,e,f,g){var h=aB(c,b,d),k=e.offline.progressCallback;dA(f,function(u,w){h.size=w;k(h,u)},function(u,w){l&&g&&m==w&&Hh(a,"cenc",u)});var l=vB(b)&&!wB(b),m=null;l&&(m=zB.get(a.h.keySystem));for(var n=new dB,q=t(b.textStreams),r=q.next();!r.done;r=q.next())n.g.set(r.value.id,52);q=t(b.imageStreams);for(r=q.next();!r.done;r=q.next())fB(n,r.value);q=t(b.variants);for(r=q.next();!r.done;r=q.next())eB(n,r.value);f=AB(f,n,b,e);e=f.streams;f=f.sh;(n=a.h)&&g&&(n.initData=[]);return{ik:{creationTime:Date.now(), originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Md(),streams:e,sessionIds:g?Qh(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},sh:f}}function vB(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})} function wB(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 tB(a,b,c,d){b.expiration=c.Md();c=Qh(c);b.sessionIds=d?c:[];if(vB(a)&&d&&!c.length)throw new U(2,9,9007);}p.remove=function(a){return BB(this,CB(this,a))}; function CB(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:lB();c=NA(b);if(null==c||"manifest"!=c.g)throw new U(2,9,9004,b);d=c;e=new sA;ya(k,2);return F(k,e.init(),4);case 4:return F(k,wA(e,d.Pb(),d.bb()),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([DB(a,h,e),EB(f,d,h)]),2);case 2:return Ba(k),F(k,e.destroy(),8);case 8:Ca(k,0)}})} function FB(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:De(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:De(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function DB(a,b,c){return Q(function(d){return F(d,GB(a.g,a.h.drm,c,b),0)})} function EB(a,b,c){function d(){}var e=HB(c);cB(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.Fk=function(){return BB(this,IB(this))}; function IB(a){var b,c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return lB(),b=a.g,c=a.h.drm,d=new sA,e=!1,ya(n,2),F(n,d.init(),4);case 4:f=[],xA(d,function(q){return f.push(q)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return F(n,k.getAll(),8);case 8:return l=n.h,F(n,YA(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.u(5);break;case 2:return Ba(n),F(n,d.destroy(),11);case 11:Ca(n,3);break;case 3:return n.return(!e)}})} p.list=function(){return BB(this,JB())};function JB(){var a,b,c;return Q(function(d){switch(d.g){case 1:return lB(),a=[],b=new sA,ya(d,2),F(d,b.init(),4);case 4:return c=Promise.resolve(),vA(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=cB(new MA("manifest",e.Pb,e.bb,l),k);a.push(k)});G(h)})})}),F(d,c,2);case 2:return Ba(d),F(d,b.destroy(),6);case 6:Ca(d,3);break;case 3:return d.return(a)}})} function mB(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),nB(a),F(l,c.start(b,g),2);if(3!=l.g)return h=l.h,nB(a),k=KB(h),F(l,Promise.all(Vg(k,function(m){return m.createSegmentIndex()})),3);nB(a);if(e)throw e;return l.return(h)})} function oB(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,w,v,y;return Q(function(z){switch(z.g){case 1:return F(z,LB(a,b),2);case 2:d=z.h;if("text/vtt"!=d)throw new U(1,2,2017,b);return F(z,MB(b,a.g,a.h.streaming.retryParameters),3);case 3:e=z.h;f=Se(d);if(!f)throw new U(2,2,2014,d);g=f();h={periodStart:0,segmentStart:0,segmentEnd:c.presentationTimeline.getDuration(),vttOffset:0};k=Tb(e);l=g.parseMedia(k,h,b,[]);m=[];n=t(l);q=n.next();for(r={};!q.done;r={Jf:void 0,fd:void 0},q=n.next())r.fd=q.value,r.Jf=null, u=function(A){return function(){null==A.Jf&&(A.Jf=qc([b],[A.fd.payload]));return A.Jf||[]}}(r),w=new qj(r.fd.startTime,r.fd.endTime,u,0,null,null,0,0,Infinity),r.fd.payload.includes("#xywh")&&(v=r.fd.payload.split("#xywh=")[1].split(","),4===v.length&&w.Cf({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.u(4);break}return F(z,vo(m[0].O()[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 Cl(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([De(y|| "","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})} function pB(a,b,c,d,e,f,g){var h,k,l;return Q(function(m){if(1==m.g)return f?m.u(2):F(m,LB(a,c),3);2!=m.g&&(f=m.h);h={id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:El(0,b.presentationTimeline.getDuration(),[c]),mimeType:f||"",codecs:g||"",kind:e,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,originalLanguage:d,label:null,type:wc,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([De(f||"",g||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};k=De(h.mimeType,h.codecs);l=Te(k);if(!l)throw new U(2,2,2014,f);return m.return(h)})} function LB(a,b){var c;return Q(function(d){switch(d.g){case 1:return wa(d,2),F(d,vo(b,a.g,a.h.streaming.retryParameters),4);case 4:c=d.h;za(d,3);break;case 2:Aa(d);case 3:if(c)return d.return(c);throw new U(1,2,2011,b);}})}function MB(a,b,c){var d,e,f;return Q(function(g){if(1==g.g)return d=Rg,e=Lg([a],c),e.method="GET",F(g,b.request(d,e).promise,2);f=g.h;return g.return(f.data)})} p.dd=function(a,b,c,d){var e=this,f;return Q(function(g){return 1==g.g?(f=new oh({lc:e.g,onError:b,nf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),f.configure(c.drm),F(g,wh(f,a.variants,d),2)):3!=g.g?F(g,Jh(f),3):g.return(f)})}; function AB(a,b,c,d){var e=new Map,f=KB(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=NB(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),sh:Array.from(e.values())}} function NB(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;OB(d,c.presentationTimeline.Eb(),function(l,m){var n=Xz(l),q=void 0;if(!f.has(n)){var r=l.endTime-l.startTime;r=gB(b,d.id)*r;r=$z(a.g,r);f.set(n,new Wz(l,r,k,!1,m))}l.Z&&(q=Xz(l.Z),f.has(q)||(r=.5*gB(b, d.id),r=$z(a.g,r),f.set(q,new Wz(l.Z,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 OB(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 nB(a){if(a.j.g)throw new U(2,9,7001);}function lB(){if(!iB())throw new U(2,9,9E3);}function BB(a,b){return Q(function(c){if(1==c.g)return a.i.push(b),ya(c,2),F(c,b,4);if(2!=c.g)return c.return(c.h);Ba(c);Uc(a.i,b);return Ca(c,0)})}function kB(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Uc(a.i,c)})} function HB(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)} function GB(a,b,c,d){var e,f,g;return Q(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=yA(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:FB(d,!1),videoCapabilities:FB(d,!0)}});return F(h,YA(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 KB(a){for(var b=new Set,c=t(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=t(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b} function yB(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}T("shaka.offline.Storage",hB);hB.deleteAll=function(){var a;return Q(function(b){return 1==b.g?(a=new sA,ya(b,2),F(b,zA(a),2)):5!=b.g?(Ba(b),F(b,a.destroy(),5)):Ca(b,0)})}; hB.prototype.list=hB.prototype.list;hB.prototype.removeEmeSessions=hB.prototype.Fk;hB.prototype.remove=hB.prototype.remove;hB.prototype.store=hB.prototype.store;hB.prototype.getNetworkingEngine=hB.prototype.Nb;hB.prototype.getConfiguration=hB.prototype.getConfiguration;hB.prototype.configure=hB.prototype.configure;hB.prototype.destroy=hB.prototype.destroy;hB.support=iB; var zB=(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"); Up("offline",iB);function PB(){}function QB(a,b){a={priority:b||0,callback:a};for(b=0;b=b?(jC(),kC()):15>=b&&jC());a=t(a.ti());for(b=a.next();!b.done;b=a.next())lC(b.value);(window.MediaSource||window.ManagedMediaSource)&&mC();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&nC()} function jC(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Oa.apply(0,arguments));b.abort=function(){};return b}}function kC(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}} function mC(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=He(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=He(c)&&b(c)}}} function lC(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return Ke(d)!=a&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return Ke(d)!=a&&c(d)}}} function nC(){var a=MediaSource.isTypeSupported;qb().Si()&&(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)})}PB.MediaSource=hC;hC.install=iC;QB(iC);function oC(){}function pC(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?qC():void 0!=window.orientation&&rC())}function qC(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})} function rC(){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 sC;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new V("change");b.dispatchEvent(c)})}PB.Orientation=oC;oC.install=pC;function sC(){Dg.call(this);this.type="";this.angle=0}pa(sC,Dg); sC.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)}; sC.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};QB(pC);function tC(){}var uC,vC,wC,xC,yC,zC; function AC(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys&&window.shakaMediaKeysPolyfill!=BC){if(void 0===a?0:a)uC=!0,vC=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),wC=HTMLMediaElement.prototype.setMediaKeys,xC=window.MediaKeys,yC=window.MediaKeySystemAccess,zC=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=CC;window.MediaKeys=DC;window.MediaKeySystemAccess= EC;navigator.requestMediaKeySystemAccess=FC;window.shakaMediaKeysPolyfill=BC;Df.clear();pg.clear()}}function FC(a,b){try{var c=new EC(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function CC(a){var b=this.mediaKeys;b&&b!=a&&GC(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?GC(a,this):Promise.resolve()} function HC(a){a=Tb(a.initData);if(Yb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=bc(a.subarray(4),!0);a=ec(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ub(a);this.dispatchEvent(b)}PB.PatchedMediaKeysApple=tC; tC.uninstall=function(){window.shakaMediaKeysPolyfill==BC&&uC&&(uC=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",vC),HTMLMediaElement.prototype.setMediaKeys=wC,window.MediaKeys=xC,window.MediaKeySystemAccess=yC,navigator.requestMediaKeySystemAccess=zC,vC=zC=wC=yC=xC=null,window.shakaMediaKeysPolyfill="",Df.clear(),pg.clear())};tC.install=AC; function EC(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem, g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;} EC.prototype.createMediaKeys=function(){var a=new DC(this.keySystem);return Promise.resolve(a)};EC.prototype.getConfiguration=function(){return this.g};function DC(a){this.h=new WebKitMediaKeys(a);this.g=new jb}DC.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new IC(this.h,a)};DC.prototype.setServerCertificate=function(){return Promise.resolve(!1)}; function GC(a,b){a.g.Ra();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",HC);try{return ll(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}DC.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function IC(a){Dg.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new jb;this.sessionId="";this.expiration=NaN;this.closed=new tg;this.keyStatuses=new JC}pa(IC,Dg);p=IC.prototype; p.generateRequest=function(a,b){var c=this;this.h=new tg;try{var d=this.l.createSession("video/mp4",Tb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.xc()?"license-request":"license-renewal").set("message",Ub(e.message));e=new V("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(KC(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(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:KC(c,"output-not-allowed");break;default:KC(c,"internal-error")}});KC(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 tg;try{this.i.update(Tb(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ra()}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 KC(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new V("keystatuseschange");a.dispatchEvent(b)} function JC(){this.size=0;this.g=void 0}p=JC.prototype;p.xc=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,og.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=og.value();return this.g&&Sb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var BC="apple";QB(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||AC())});function LC(){}function MC(){if(window.MediaKeys){var a=qb();MediaKeys.prototype.setServerCertificate&&a.ge()||(MediaKeys.prototype.setServerCertificate=NC)}}function NC(){return Promise.resolve(!1)}PB.PatchedMediaKeysCert=LC;LC.install=MC;QB(MC);function OC(){} function PC(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)QC="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=RC;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=SC;window.MediaKeys=TC;window.MediaKeySystemAccess=UC;window.shakaMediaKeysPolyfill=VC}} function WC(a){var b=QC;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function RC(a,b){try{var c=new UC(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function SC(a){var b=this.mediaKeys;b&&b!=a&&XC(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&XC(a,this);return Promise.resolve()}PB.PatchedMediaKeysWebkit=OC;OC.install=PC; function UC(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities), l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]): d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}UC.prototype.createMediaKeys=function(){var a=new TC(this.g);return Promise.resolve(a)};UC.prototype.getConfiguration=function(){return this.h};function TC(a){this.l=a;this.h=null;this.g=new jb;this.i=[];this.j=new Map} function XC(a,b){a.h=b;a.g.Ra();var c=QC;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ub(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=YC(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.xc()?"licenserequest":"licenserenewal").set("message",d.message),d=new V("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){(d=YC(a,d.sessionId))&&d.ready()}), a.g.D(b,c+"keyerror",function(d){var e=YC(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?ZC(e,"output-restricted"):1==f?ZC(e,"expired"):ZC(e,"internal-error"))}}))} TC.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 $C(b,this.l,a);this.i.push(a);return a};TC.prototype.setServerCertificate=function(){return Promise.resolve(!1)};TC.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")}; function YC(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 $C(a,b,c){Dg.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 tg;this.keyStatuses=new aD}pa($C,Dg);p=$C.prototype;p.ready=function(){ZC(this,"usable");this.g&&this.g.resolve();this.g=null}; function bD(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=Tb(ec("LOAD_SESSION|"+c));else{var e=ec("PERSISTENT|");d=pc(e,b)}else d=Tb(b)}catch(g){return Promise.reject(g)}a.h=new tg;var f=WC("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new $e(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).ha(.01)}return a.h} function cD(a,b,c){if(a.g)a.g.then(function(){return cD(a,b,c)}).catch(function(){return cD(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=ac(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=mc(e.keys[0].k);e=mc(e.keys[0].kid)}else d=Tb(c),e=null;var f=WC("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}} function ZC(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new V("keystatuseschange");a.dispatchEvent(b)}p.generateRequest=function(a,b){return bD(this,b,null)};p.load=function(a){return"persistent-license"==this.l?bD(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new tg;cD(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=WC("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 aD(){this.size=0;this.g=void 0}p=aD.prototype;p.xc=function(){return this.g}; p.forEach=function(a){this.g&&a(this.g,og.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=og.value();return this.g&&Sb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var QC="",VC="webkit";QB(PC);function dD(){}function eD(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=fD,Object.defineProperty(a,"disablePictureInPicture",{get:gD,set:hD,enumerable:!0,configurable:!0}),document.exitPictureInPicture=iD,document.addEventListener("webkitpresentationmodechanged",jD,!0))}} function jD(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 fD(){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 iD(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))} function gD(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function hD(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}PB.PiPWebkit=dD;dD.install=eD;QB(eD);function kD(){}function lD(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=mD))}function mD(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}PB.RandomUUID=kD;kD.install=lD;QB(lD);function nD(){}function oD(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:pD})}function pD(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}PB.Symbol=nD;nD.install=oD;QB(oD);function qD(){}function rD(){for(var a=t([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=sD),b.prototype.lastIndexOf||(b.prototype.lastIndexOf=tD),b.prototype.includes||(b.prototype.includes=uD)}function sD(a,b){return Array.prototype.indexOf.call(this,a,b)}function tD(a,b){return Array.prototype.lastIndexOf.call(this,a,b)} function uD(a,b){return-1!==this.indexOf(a,b)}PB.TypedArray=qD;qD.install=rD;QB(rD);function vD(){}function wD(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}PB.VideoPlayPromise=vD;vD.install=wD;QB(wD);function xD(){}function yD(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||"number"===typeof wi().webkitDroppedFrameCount)&&(a.getVideoPlaybackQuality=zD)}}function zD(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}PB.VideoPlaybackQuality=xD;xD.install=yD;QB(yD);function AD(){}function BD(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=CD;else if(6==b)a=DD;else{try{var c=!!CD(1,2,"")}catch(d){c=!1}c&&(a=CD)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function CD(a,b,c){return new window.TextTrackCue(a,b,c)}function DD(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}PB.VTTCue=AD;AD.install=BD;QB(BD);function ED(a){Dg.call(this);this.h=a;this.l=null;this.g=[];this.i=-1;this.j=null;this.m=new jb}pa(ED,Dg);p=ED.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);Dg.prototype.release.call(a);G(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 U(2,7,7007);c=b.g[a];b.i!=a&&(b.i=a,b.dispatchEvent(new V("currentitemchanged")));d=b.h.h;e=b.l?b.l.preloadNextUrlWindow:0;0=b.g.length||f||b.h.V()||!d.duration)return E.return();y=b.h.Sa().end-d.currentTime;if(isNaN(y)){E.u(0);break}if(!(y<=e)){E.u(0);break}z= b.l&&b.l.repeatMode;A=null;b.i+1 can only be inside
in TTML");q=t(qd(e,"div"));for(r=q.next();!r.done;r=q.next())if(qd(r.value,"span").length)throw new U(2,2,2001," can only be inside

in TTML");if(b=OD(e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor="transparent"), a.push(b);return a}; function OD(a,b,c,d,e,f,g,h,k,l,m,n,q){var r=l;if(od(a)){if(!m)return null;var u={tagName:"span",children:[rd(a)],attributes:{},parent:null}}else u=a;for(var w=null,v=t(PD),y=v.next();!y.done&&!(w=QD(u,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=null;y=zd(u,PD,"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 Bb(n),y=new Bb(y),(y=z.resolve(y).toString())&& (v=y));if("p"==a.tagName||w||v)m=!0;a=m;y="default"==(u.attributes["xml:space"]||(h?"default":"preserve"));z=u.children.every(od);h=[];if(!z)for(var A=t(u.children),B=A.next();!B.done;B=A.next())(B=OD(B.value,b,c,d,e,f,g,y,k,u,m,n,q))&&h.push(B);d=null!=l;n=rd(u);n=u.children.length&&n&&/\S/.test(n);A=u.attributes.begin||u.attributes.end||u.attributes.dur;if(!(A||n||"br"==u.tagName||0!=h.length||d&&!y))return null;q=RD(u,c);n=q.start;for(q=q.end;r&&r.tagName&&"tt"!=r.tagName;)q=SD(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?yd(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f} function SD(a,b,c,d){a=RD(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 RD(a,b){var c=fE(a.attributes.begin,b),d=fE(a.attributes.end,b);a=fE(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}} function fE(a,b){var c=null;if(gE.test(a)){a=gE.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(hE.test(a))c=iE(hE,a);else if(jE.test(a))c=iE(jE,a);else if(kE.test(a))a=kE.exec(a),c=Number(a[1])/b.frameRate;else if(lE.test(a))a=lE.exec(a),c=Number(a[1])/b.g;else if(mE.test(a))c=iE(mE,a);else if(a)throw new U(2,2,2001,"Could not parse cue time range in TTML");return c} function iE(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 MD(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{Gc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}T("shaka.text.TtmlTextParser",ID);ID.prototype.parseMedia=ID.prototype.parseMedia;ID.prototype.setManifestType=ID.prototype.setManifestType;ID.prototype.setSequenceMode=ID.prototype.setSequenceMode;ID.prototype.parseInit=ID.prototype.parseInit; function LD(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 UD=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,bE=/^(\d{1,4}(?:\.\d+)?|100)%$/,aE=/^(\d+px|\d+em|\d*\.?\d+c)$/,VD=/^(\d+)px (\d+)px$/,gE=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,hE=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,jE=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,kE=/^(\d*(?:\.\d*)?)f$/,lE=/^(\d*(?:\.\d*)?)t$/,mE=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),$D=(new Map).set("left",Xd).set("center","center").set("right", "end").set("start",Xd).set("end","end"),ZD=(new Map).set("left","line-left").set("center","center").set("right","line-right"),JD=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],KD=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],PD=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Qe("application/ttml+xml",function(){return new ID});function nE(){this.g=new ID}nE.prototype.parseInit=function(a){var b=!1;(new bh).box("moov",gh).box("trak",gh).box("mdia",gh).box("minf",gh).box("stbl",gh).R("stsd",ih).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new U(2,2,2007);};nE.prototype.setSequenceMode=function(){};nE.prototype.setManifestType=function(){}; nE.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new bh).box("moof",gh).box("traf",gh).R("tfhd",function(y){e=yi(y.reader,y.flags).Jd}).R("trun",function(y){y=Bi(y.reader,y.version,y.flags);y=t(y.$g);for(var z=y.next();!z.done;z=y.next())h.push(z.value.sampleSize||e||0)}).R("subs",function(y){for(var z=y.reader,A=z.T(),B=-1,E=0;E").replace(/{\/b}/g,"").replace(/{i}/g,"").replace(/{\/i}/g,"").replace(/{u}/g,"").replace(/{\/u}/g,"")+"\n\n";return b}T("shaka.text.SrtTextParser",vE);vE.srt2webvtt=wE;vE.prototype.parseMedia=vE.prototype.parseMedia; vE.prototype.setManifestType=vE.prototype.setManifestType;vE.prototype.setSequenceMode=vE.prototype.setSequenceMode;vE.prototype.parseInit=vE.prototype.parseInit;Qe("text/srt",function(){return new vE});function xE(){}xE.prototype.parseInit=function(){};xE.prototype.setSequenceMode=function(){};xE.prototype.setManifestType=function(){}; xE.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=ac(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=yE.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=zE.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(AE);else if("Style"==a){a=f.split(AE);f={};for(var g=0;g>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null} function BE(a){a=EE.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}T("shaka.text.SsaTextParser",xE);xE.prototype.parseMedia=xE.prototype.parseMedia;xE.prototype.setManifestType=xE.prototype.setManifestType;xE.prototype.setSequenceMode=xE.prototype.setSequenceMode;xE.prototype.parseInit=xE.prototype.parseInit;var yE=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,zE=/^\s*([^:]+):\s*(.*)/,AE=/\s*,\s*/,EE=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/; Qe("text/x-ssa",function(){return new xE});function FE(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 HE(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,Da:a,qa:e}} function LE(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 ME(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=ME.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?Ec(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?qb().ae()?'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=Tb(a);for(var e=Nj(a),f=e.length;fa.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Pj(a.subarray(b+2));Rj(c,2);Rj(c,3);var d=Sj(c,11)+1<<1,e=Sj(c,2);if(3==e){e=Sj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Sj(c,2);var g=Sj(c,3),h=Sj(c,1);c=Sj(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,Da:a,qa:d}};function OE(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=OE.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?Ec(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=Tb(a);for(var e=Nj(a),f=e.length;fe?Yj(c,16):Yj(c,64))}Uj(c);d=X(c);if(0===d)X(c);else if(1===d)for(Rj(c,1),Uj(c),Uj(c),d=X(c),e=0;e=q?(d=r[q-1],e=u[q-1]):255===q&&(d=Sj(c,16),e=Sj(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,Na:a,Wa:d,Xa:e}} function RE(a){function b(u){e={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:u.pts,dts:u.dts,nalus:[]}}function c(){if(e&&e.nalus.length&&e.frame){for(var u=[],w=t(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;u.push(z);u.push(v.fullData)}e.data=pc.apply(jc,x(u));d.push(e)}}for(var d=[],e=null,f=!1,g=0;gH;H++)Sj(a,2);for(H=0;HL;L++)for(var K=0;K<(3===L?2:6);K++)if(Wj(a)){var J=Math.min(64,1<<4+(L<<1));1=J?(I=M[J-1],L=O[J-1]):255===J&&(I=Sj(a,16),L=Sj(a,16)));Wj(a)&&Wj(a);Wj(a)&&(Sj(a,3),Wj(a),Wj(a)&&(Xj(a),Xj(a),Xj(a)));Wj(a)&&(X(a),X(a));Wj(a);Wj(a);Wj(a);if(J=Wj(a))X(a),X(a),X(a),X(a);if(Wj(a)&&(Sj(a,32),Sj(a,32),Wj(a)&&X(a),Wj(a))){O=!1;J=Wj(a);M=Wj(a);if(J||M){if(O=Wj(a))Xj(a),Sj(a,5),Wj(a),Sj(a,5);Sj(a,4);Sj(a,4);O&& Sj(a,4);Sj(a,5);Sj(a,5);Sj(a,5)}for(N=0;N<=f;N++){var R=!0;P=1;Wj(a)||(R=Wj(a));var S=!1;R?X(a):S=Wj(a);S||(P=X(a)+1);if(J){for(R=0;R>8;e[14]=d.jf&255;e[15]=252|d.Og&3;e[16]=252|d.Zf&3;e[17]=248|d.Yf&7;e[18]=248|d.Xf&7;e[19]=0;e[20]=0;e[21]=(d.ag&3)<<6|(d.Mg&7)<<3|(d.qh?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 XE(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*YE[14*(3===c?3-d:3===d?3:4)+e-1];f=ZE[3*(3===c?0:2===c?1:2)+f];c=$E[c][d];var h=aF[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,qa:k,Hk:8*c*h}}return null} function bF(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function cF(a,b){if(b+1d;d++)this.usertype[d]!==hF[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}p=fF.prototype;p.destroy=function(){}; p.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return Ec(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Ec(b)||Ec(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(Tb(a));if(!b.mssPrivateData)return Promise.reject(new U(2,3,3020,c?c.O()[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;Ga[1]=Fa>>16&255;Ga[2]=Fa>>8&255;Ga[3]=Fa&255;N.push(Ga);N.push(aa.fullData)}}var xa=N.length?{data:pc.apply(jc,x(N)),isKeyframe:O}:null;if(xa){null==D&&null!=J.dts&&(D=J.dts);var qa=void 0;qa=K+ 1>>24&255,id.sampleRate>>>17&255,id.sampleRate>>>8&255,id.sampleRate>>>0&255,0,0].concat(x(Wb)));for(var nw=id.sampleRate,ow=t(k.rb()),jo=ow.next();!jo.done;jo=ow.next()){var ko=jo.value,Wf=ko.data;null==kk&&null!==ko.pts&&(kk=ko.pts);for(var sh=0;sh