Socket
Socket
Sign inDemoInstall

shaka-player

Package Overview
Dependencies
Maintainers
1
Versions
327
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shaka-player - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

build/wrapper.template.js

15

CHANGELOG.md

@@ -0,1 +1,16 @@

## 1.2.4 (2015-04-16)
Bugfixes backported from v1.3.0 to the v1.2.x branch.
Bugfixes:
- Fixed FakeEventTarget exception handling.
- Fixed aggressive dead code stripping by the compiler.
- Fixed a bug in which subtitles were enabled by default without a subtitle
language match.
Features:
- Added support for requireJS and improved support for commonJS.
- Improved documentation for Role tags and multilingual assets.
## 1.2.3 (2015-04-07)

@@ -2,0 +17,0 @@

2

lib/player/player.js

@@ -132,3 +132,3 @@ /**

*/
goog.define('GIT_VERSION', 'v1.2.3-debug');
goog.define('GIT_VERSION', 'v1.2.4-debug');

@@ -135,0 +135,0 @@

@@ -382,2 +382,3 @@ /**

this.subsNeeded_ = true;
var LanguageUtils = shaka.util.LanguageUtils;

@@ -396,3 +397,2 @@ var audioSets = this.streamSetsByType_['audio'];

// are not needed.
var LanguageUtils = shaka.util.LanguageUtils;
if (LanguageUtils.match(LanguageUtils.MatchType.MAX, this.lang_, lang)) {

@@ -406,2 +406,10 @@ this.subsNeeded_ = false;

this.sortByLanguage_(textSets);
var lang = textSets[0].lang || this.lang_;
// If there is no text track to match the user's language preference,
// do not turn subs on by default.
if (!LanguageUtils.match(LanguageUtils.MatchType.MAX, this.lang_, lang)) {
this.subsNeeded_ = false;
}
}

@@ -408,0 +416,0 @@ };

@@ -140,8 +140,15 @@ /**

var listener = list[i];
if (listener.handleEvent) {
listener.handleEvent(event);
} else {
listener.call(this, event);
try {
if (listener.handleEvent) {
listener.handleEvent(event);
} else {
listener.call(this, event);
}
// NOTE: If needed, stopImmediatePropagation() would be checked here.
} catch (exception) {
// Exceptions during event handlers should not affect the caller,
// but should appear on the console as uncaught, according to MDN:
// http://goo.gl/N6Ff27
shaka.log.error('Uncaught exception in event handler', exception);
}
// NOTE: If needed, stopImmediatePropagation() would be checked here.
}

@@ -148,0 +155,0 @@

{
"name": "shaka-player",
"description": "DASH/EME video player library",
"version": "1.2.3",
"version": "1.2.4",
"homepage": "https://github.com/google/shaka-player",

@@ -6,0 +6,0 @@ "author": "Google",

@@ -1,15 +0,16 @@

(function(){var h,aa=this;function m(a,b){var c=a.split("."),d=aa;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function q(a,b){function c(){}c.prototype=b.prototype;a.ld=b.prototype;a.prototype=new c;a.hd=function(a,c,f){return b.prototype[c].apply(a,Array.prototype.slice.call(arguments,2))}};function ba(){this.Y=ca++;this.id=null;this.timestampOffset=this.t=0;this.height=this.width=this.bandwidth=null;this.ea=this.l="";this.Ma=this.Ob=this.Za=this.D=null;this.enabled=!0}var ca=0;function da(a){var b=a.l||"";a.ea&&(b+='; codecs="'+a.ea+'"');return b}function ea(){this.url=null;this.Pa=0;this.Ta=null}function fa(){this.Y=ga++;this.contentType="";this.j=[];this.Sa=[];this.lang="";this.Va=!1}var ga=0;
fa.prototype.Cb=function(){for(var a=[],b=0;b<this.Sa.length;++b){var c=new ha;c.id=this.Y;c.ha=this.Sa[b];c.contentType=this.contentType;c.la=this.j.length?da(this.j[0]):"";a.push(c)}return a};function ia(){this.duration=this.start=0;this.N=[]}ia.prototype.Cb=function(){for(var a=[],b=0;b<this.N.length;++b)a.push.apply(a,this.N[b].Cb());return a};function ja(){this.t=0;this.J=[]}function ha(){this.id=0;this.ha=null;this.la=this.contentType=""};function ka(a,b){this.id=a;this.lang=b||"unknown";this.enabled=this.active=!1}m("shaka.player.TextTrack.compare",function(a,b){return a.lang<b.lang?-1:a.lang>b.lang?1:0});function la(a,b,c,d){this.id=a;this.bandwidth=b||0;this.width=c||0;this.height=d||0;this.active=!1}function ma(a,b){var c=a.width*a.height,d=b.width*b.height;return c<d?-1:c>d?1:a.bandwidth<b.bandwidth?-1:a.bandwidth>b.bandwidth?1:0}m("shaka.player.VideoTrack.compare",ma);function na(a,b,c){this.id=a;this.bandwidth=b||0;this.lang=c||"unknown";this.active=!1}m("shaka.player.AudioTrack.compare",function(a,b){return a.lang<b.lang?-1:a.lang>b.lang?1:a.bandwidth<b.bandwidth?-1:a.bandwidth>b.bandwidth?1:0});function s(){var a,b,c=new Promise(function(c,e){a=c;b=e});c.resolve=a;c.reject=b;return c};function t(a,b){return b.bind(a)};function oa(a,b){for(var c={},d=0;d<a.length;++d){var e=b?b(a[d]):a[d].toString();c[e]=a[d]}var d=[],f;for(f in c)d.push(c[f]);return d};function pa(a){return String.fromCharCode.apply(null,a)}m("shaka.util.Uint8ArrayUtils.toString",pa);function v(a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}m("shaka.util.Uint8ArrayUtils.fromString",v);m("shaka.util.Uint8ArrayUtils.toBase64",function(a,b){var c=void 0==b?!0:b,d=window.btoa(pa(a)).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")});function qa(a){return v(window.atob(a.replace(/-/g,"+").replace(/_/g,"/")))}
m("shaka.util.Uint8ArrayUtils.fromBase64",qa);m("shaka.util.Uint8ArrayUtils.fromHex",function(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b});function ra(a){for(var b="",c=0;c<a.length;++c){var d=a[c].toString(16);1==d.length&&(d="0"+d);b+=d}return b}m("shaka.util.Uint8ArrayUtils.toHex",ra);function sa(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!=b.length)return!1;for(var c=0;c<a.length;++c)if(a[c]!=b[c])return!1;return!0};function x(a){this.h=a;this.xa=new ta(a,ua)}var va=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])];x.prototype.ra=function(){return this.xa.ra()};
(function(){var g={};
(function(window){var h,aa=this;function m(a,b){var c=a.split("."),d=aa;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function q(a,b){function c(){}c.prototype=b.prototype;a.ld=b.prototype;a.prototype=new c;a.hd=function(a,c,f){return b.prototype[c].apply(a,Array.prototype.slice.call(arguments,2))}};function ba(){this.Y=ca++;this.id=null;this.timestampOffset=this.t=0;this.height=this.width=this.bandwidth=null;this.ea=this.l="";this.Ma=this.Pb=this.Za=this.D=null;this.enabled=!0}var ca=0;function da(a){var b=a.l||"";a.ea&&(b+='; codecs="'+a.ea+'"');return b}function ea(){this.url=null;this.Pa=0;this.Ta=null}function fa(){this.Y=ga++;this.contentType="";this.j=[];this.Sa=[];this.lang="";this.Va=!1}var ga=0;
fa.prototype.Db=function(){for(var a=[],b=0;b<this.Sa.length;++b){var c=new ha;c.id=this.Y;c.ha=this.Sa[b];c.contentType=this.contentType;c.ma=this.j.length?da(this.j[0]):"";a.push(c)}return a};function ia(){this.duration=this.start=0;this.N=[]}ia.prototype.Db=function(){for(var a=[],b=0;b<this.N.length;++b)a.push.apply(a,this.N[b].Db());return a};function ja(){this.t=0;this.J=[]}function ha(){this.id=0;this.ha=null;this.ma=this.contentType=""};function ka(a,b){this.id=a;this.lang=b||"unknown";this.enabled=this.active=!1}m("shaka.player.TextTrack.compare",function(a,b){return a.lang<b.lang?-1:a.lang>b.lang?1:0});function la(a,b,c,d){this.id=a;this.bandwidth=b||0;this.width=c||0;this.height=d||0;this.active=!1}function ma(a,b){var c=a.width*a.height,d=b.width*b.height;return c<d?-1:c>d?1:a.bandwidth<b.bandwidth?-1:a.bandwidth>b.bandwidth?1:0}m("shaka.player.VideoTrack.compare",ma);function na(a,b,c){this.id=a;this.bandwidth=b||0;this.lang=c||"unknown";this.active=!1}m("shaka.player.AudioTrack.compare",function(a,b){return a.lang<b.lang?-1:a.lang>b.lang?1:a.bandwidth<b.bandwidth?-1:a.bandwidth>b.bandwidth?1:0});function s(){var a,b,c=new Promise(function(c,e){a=c;b=e});c.resolve=a;c.reject=b;return c};function t(a,b){return b.bind(a)};function oa(a,b){for(var c={},d=0;d<a.length;++d){var e=b?b(a[d]):a[d].toString();c[e]=a[d]}var d=[],f;for(f in c)d.push(c[f]);return d};function pa(a){return String.fromCharCode.apply(null,a)}m("shaka.util.Uint8ArrayUtils.toString",pa);function v(a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}m("shaka.util.Uint8ArrayUtils.fromString",v);m("shaka.util.Uint8ArrayUtils.toBase64",function(a,b){var c=void 0==b?!0:b,d=window.btoa(pa(a)).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")});function qa(a){return v(window.atob(a.replace(/-/g,"+").replace(/_/g,"/")))}
m("shaka.util.Uint8ArrayUtils.fromBase64",qa);m("shaka.util.Uint8ArrayUtils.fromHex",function(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b});function ra(a){for(var b="",c=0;c<a.length;++c){var d=a[c].toString(16);1==d.length&&(d="0"+d);b+=d}return b}m("shaka.util.Uint8ArrayUtils.toHex",ra);function sa(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!=b.length)return!1;for(var c=0;c<a.length;++c)if(a[c]!=b[c])return!1;return!0};function x(a){this.h=a;this.xa=new ta(a,ua)}var va=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])];x.prototype.sa=function(){return this.xa.sa()};
function y(a){var b;b=wa(a);if(7<b.length)throw new RangeError("EbmlParser: EBML ID must be at most 7 bytes.");for(var c=0,d=0;d<b.length;d++)c=256*c+b[d];b=c;c=wa(a);a:{for(d=0;d<va.length;d++)if(sa(c,va[d])){d=!0;break a}d=!1}if(d)throw new RangeError("EbmlParser: Element cannot contain dynamically sized data.");if(8==c.length&&c[1]&224)throw new RangeError("EbmlParser: Variable sized integer value must be at most 53 bits.");for(var d=c[0]&(1<<8-c.length)-1,e=1;e<c.length;e++)d=256*d+c[e];c=d;c=
a.xa.f+c<=a.h.byteLength?c:a.h.byteLength-a.xa.f;d=new DataView(a.h.buffer,a.h.byteOffset+a.xa.f,c);z(a.xa,c);return new xa(b,d)}function wa(a){var b=ya(a.xa),c;for(c=1;8>=c&&!(b&1<<8-c);c++);if(8<c)throw new RangeError("EbmlParser: Variable sized integer must fit within 8 bytes.");var d=new Uint8Array(c);d[0]=b;for(b=1;b<c;b++)d[b]=ya(a.xa);return d}function xa(a,b){this.id=a;this.h=b}
function za(a){if(8<a.h.byteLength)throw new RangeError("EbmlElement: Unsigned integer has too many bytes.");if(8==a.h.byteLength&&a.h.getUint8(0)&224)throw new RangeError("EbmlParser: Unsigned integer must be at most 53 bits.");for(var b=0,c=0;c<a.h.byteLength;c++)var d=a.h.getUint8(c),b=256*b+d;return b};function Aa(){this.V={}}h=Aa.prototype;h.push=function(a,b){this.V.hasOwnProperty(a)?this.V[a].push(b):this.V[a]=[b]};h.set=function(a,b){this.V[a]=b};h.has=function(a){return this.V.hasOwnProperty(a)};h.get=function(a){return(a=this.V[a])?a.slice():null};h.remove=function(a,b){var c=this.V[a];if(c)for(var d=0;d<c.length;++d)c[d]==b&&(c.splice(d,1),--d)};h.keys=function(){var a=[],b;for(b in this.V)a.push(b);return a};h.clear=function(){this.V={}};function Ba(){this.streamStats=null;this.droppedFrames=this.decodedFrames=NaN;this.bufferingTime=this.playTime=this.estimatedBandwidth=0;this.playbackLatency=NaN;this.bufferingHistory=[];this.bandwidthHistory=[];this.streamHistory=[]}function Ea(a){a.playTime+=Fa("playing")/1E3}function Ga(a,b){var c=new Ha(b);a.streamHistory.push(new Ia(c));if(c.videoHeight||!a.streamStats)a.streamStats=c}
function Ha(a){this.videoWidth=a.width;this.videoHeight=a.height;this.videoMimeType=a.l;this.videoBandwidth=a.bandwidth}function Ia(a){this.timestamp=Date.now()/1E3;this.value=a};function A(a,b,c,d,e,f){this.keySystem=a;this.nc=b;this.$b=c;this.withCredentials=d;this.Ga=[];this.Zb=f;e&&this.Ga.push(e)}m("shaka.player.DrmSchemeInfo",A);function Ja(){this.maxWidth=this.maxHeight=null}function Ka(){return new A("",!1,"",!1,null,null)}A.createUnencrypted=Ka;function La(a,b){var c=new A(a.keySystem,a.nc,a.$b,a.withCredentials,null,a.Zb);c.Ga=oa(a.Ga.concat(b.Ga),function(a){return Array.prototype.join.apply(a.initData)});return c}A.combine=La;A.prototype.key=function(){return JSON.stringify(this)};function Ma(a){this.Ub=Math.exp(Math.log(.5)/a);this.yb=this.Ab=0}Ma.prototype.tb=function(a,b){var c=Math.pow(this.Ub,a);this.Ab=b*(1-c)+c*this.Ab;this.yb+=a};function Na(a){return a.Ab/(1-Math.pow(a.Ub,a.yb))};function B(a){var b=new CustomEvent(a.type,{detail:a.detail,bubbles:!!a.bubbles}),c;for(c in a)c in b||(b[c]=a[c]);return b}function D(a){return new CustomEvent("error",{detail:a,bubbles:!0})};function Oa(a,b,c){E(b);E(c);return c==b||a>=Pa&&c==b.split("-")[0]||a>=Qa&&c.split("-")[0]==b.split("-")[0]?!0:!1}var Pa=1,Qa=2;function E(a){a=a.toLowerCase().split("-");var b=Ra[a[0]];b&&(a[0]=b);return a.join("-")}
function Ha(a){this.videoWidth=a.width;this.videoHeight=a.height;this.videoMimeType=a.l;this.videoBandwidth=a.bandwidth}function Ia(a){this.timestamp=Date.now()/1E3;this.value=a};function A(a,b,c,d,e,f){this.keySystem=a;this.nc=b;this.$b=c;this.withCredentials=d;this.Ga=[];this.Zb=f;e&&this.Ga.push(e)}m("shaka.player.DrmSchemeInfo",A);function Ja(){this.maxWidth=this.maxHeight=null}function Ka(){return new A("",!1,"",!1,null,null)}A.createUnencrypted=Ka;function La(a,b){var c=new A(a.keySystem,a.nc,a.$b,a.withCredentials,null,a.Zb);c.Ga=oa(a.Ga.concat(b.Ga),function(a){return Array.prototype.join.apply(a.initData)});return c}A.combine=La;A.prototype.key=function(){return JSON.stringify(this)};function Ma(a){this.Ub=Math.exp(Math.log(.5)/a);this.zb=this.Bb=0}Ma.prototype.tb=function(a,b){var c=Math.pow(this.Ub,a);this.Bb=b*(1-c)+c*this.Bb;this.zb+=a};function Na(a){return a.Bb/(1-Math.pow(a.Ub,a.zb))};function B(a){var b=new CustomEvent(a.type,{detail:a.detail,bubbles:!!a.bubbles}),c;for(c in a)c in b||(b[c]=a[c]);return b}function D(a){return new CustomEvent("error",{detail:a,bubbles:!0})};function Oa(a,b,c){E(b);E(c);return c==b||a>=Pa&&c==b.split("-")[0]||a>=Qa&&c.split("-")[0]==b.split("-")[0]?!0:!1}var Pa=1,Qa=2;function E(a){a=a.toLowerCase().split("-");var b=Ra[a[0]];b&&(a[0]=b);return a.join("-")}
var Ra={aar:"aa",abk:"ab",afr:"af",aka:"ak",alb:"sq",amh:"am",ara:"ar",arg:"an",arm:"hy",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",baq:"eu",bel:"be",ben:"bn",bih:"bh",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",bur:"my",cat:"ca",ces:"cs",cha:"ch",che:"ce",chi:"zh",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",cze:"cs",dan:"da",deu:"de",div:"dv",dut:"nl",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fre:"fr",
fry:"fy",ful:"ff",geo:"ka",ger:"de",gla:"gd",gle:"ga",glg:"gl",glv:"gv",gre:"el",grn:"gn",guj:"gu",hat:"ht",hau:"ha",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ice:"is",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",
lug:"lg",mac:"mk",mah:"mh",mal:"ml",mao:"mi",mar:"mr",may:"ms",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",per:"fa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",rum:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slo:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",
srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tib:"bo",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"};function F(a){this.Gb=new Aa;this.parent=a}F.prototype.addEventListener=function(a,b,c){c||this.Gb.push(a,b)};F.prototype.removeEventListener=function(a,b,c){c||this.Gb.remove(a,b)};F.prototype.dispatchEvent=function(a){delete a.srcElement;delete a.target;delete a.currentTarget;Object.defineProperties(a,{srcElement:{value:null,writable:!0},target:{value:this,writable:!0},currentTarget:{value:null,writable:!0}});return Sa(this,a)};
function Sa(a,b){b.currentTarget=a;for(var c=a.Gb.get(b.type)||[],d=0;d<c.length;++d){var e=c[d];e.handleEvent?e.handleEvent(b):e.call(a,b)}a.parent&&b.bubbles&&Sa(a.parent,b);return b.defaultPrevented};function Ta(){F.call(this,null);this.Bb=new Ma(3);this.lc=new Ma(10);this.Cc=50;this.uc=5E5;this.Dc=.5;this.Bc=65536}q(Ta,F);Ta.prototype.tb=function(a,b){if(!(b<this.Bc)){a=Math.max(a,this.Cc);var c=8E3*b/a,d=a/1E3;this.Bb.tb(d,c);this.lc.tb(d,c);this.dispatchEvent(B({type:"bandwidth"}))}};function Ua(a){return a.Bb.yb<a.Dc?a.uc:Math.min(Na(a.Bb),Na(a.lc))};function ta(a,b){this.h=a;this.Hb=b==Va;this.f=0}var ua=0,Va=1;ta.prototype.ra=function(){return this.f<this.h.byteLength};function ya(a){var b=a.h.getUint8(a.f);a.f+=1;return b}function G(a){var b=a.h.getUint32(a.f,a.Hb);a.f+=4;return b}function Wa(a){var b,c;a.Hb?(b=a.h.getUint32(a.f,!0),c=a.h.getUint32(a.f+4,!0)):(c=a.h.getUint32(a.f,!1),b=a.h.getUint32(a.f+4,!1));if(2097151<c)throw new RangeError("DataViewReader: Overflow reading 64-bit value.");a.f+=8;return c*Math.pow(2,32)+b}
srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tib:"bo",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"};function F(a){this.Hb=new Aa;this.parent=a}F.prototype.addEventListener=function(a,b,c){c||this.Hb.push(a,b)};F.prototype.removeEventListener=function(a,b,c){c||this.Hb.remove(a,b)};F.prototype.dispatchEvent=function(a){delete a.srcElement;delete a.target;delete a.currentTarget;Object.defineProperties(a,{srcElement:{value:null,writable:!0},target:{value:this,writable:!0},currentTarget:{value:null,writable:!0}});return Sa(this,a)};
function Sa(a,b){b.currentTarget=a;for(var c=a.Hb.get(b.type)||[],d=0;d<c.length;++d){var e=c[d];try{e.handleEvent?e.handleEvent(b):e.call(a,b)}catch(f){}}a.parent&&b.bubbles&&Sa(a.parent,b);return b.defaultPrevented};function Ta(){F.call(this,null);this.Cb=new Ma(3);this.lc=new Ma(10);this.Cc=50;this.uc=5E5;this.Dc=.5;this.Bc=65536}q(Ta,F);Ta.prototype.tb=function(a,b){if(!(b<this.Bc)){a=Math.max(a,this.Cc);var c=8E3*b/a,d=a/1E3;this.Cb.tb(d,c);this.lc.tb(d,c);this.dispatchEvent(B({type:"bandwidth"}))}};function Ua(a){return a.Cb.zb<a.Dc?a.uc:Math.min(Na(a.Cb),Na(a.lc))};function ta(a,b){this.h=a;this.Ib=b==Va;this.f=0}var ua=0,Va=1;ta.prototype.sa=function(){return this.f<this.h.byteLength};function ya(a){var b=a.h.getUint8(a.f);a.f+=1;return b}function G(a){var b=a.h.getUint32(a.f,a.Ib);a.f+=4;return b}function Wa(a){var b,c;a.Ib?(b=a.h.getUint32(a.f,!0),c=a.h.getUint32(a.f+4,!0)):(c=a.h.getUint32(a.f,!1),b=a.h.getUint32(a.f+4,!1));if(2097151<c)throw new RangeError("DataViewReader: Overflow reading 64-bit value.");a.f+=8;return c*Math.pow(2,32)+b}
function Xa(a){if(a.f+16>a.h.byteLength)throw new RangeError("DataViewReader: Read past end of DataView.");var b=new Uint8Array(a.h.buffer,a.f,16);a.f+=16;return b}function z(a,b){if(a.f+b>a.h.byteLength)throw new RangeError("DataViewReader: Skip past end of DataView.");a.f+=b};function H(){this.Da=new Aa}H.prototype.u=function(){Ya(this);this.Da=null};function I(a,b,c,d){b=new Za(b,c,d);a.Da.push(c,b)}H.prototype.ab=function(a,b){for(var c=this.Da.get(b)||[],d=0;d<c.length;++d){var e=c[d];e.target==a&&(e.ab(),this.Da.remove(b,e))}};function Ya(a){var b=a.Da,c=[],d;for(d in b.V)c.push.apply(c,b.V[d]);for(b=0;b<c.length;++b)c[b].ab();a.Da.clear()}function Za(a,b,c){this.target=a;this.type=b;this.ac=c;this.target.addEventListener(b,c,!1)}
Za.prototype.ab=function(){this.target&&(this.target.removeEventListener(this.type,this.ac,!1),this.ac=this.target=null)};function $a(a){this.systemIds=[];this.cencKeyIds=[];a=new ta(new DataView(a.buffer),ua);try{for(;a.ra();){var b=a.f,c=G(a),d=G(a);1==c?c=Wa(a):0==c&&(c=a.h.byteLength-b);if(1886614376!=d)z(a,c-(a.f-b));else{var e=ya(a);if(1<e)z(a,c-(a.f-b));else{z(a,3);var f=ra(Xa(a)),g=[];if(0<e)for(var k=G(a),l=0;l<k;++l){var p=ra(Xa(a));g.push(p)}var n=G(a);z(a,n);this.cencKeyIds.push.apply(this.cencKeyIds,g);this.systemIds.push(f);a.f!=b+c&&z(a,c-(a.f-b))}}}}catch(r){}};function J(a){ab[a]={hb:bb(),end:NaN}}function K(a){if(a=ab[a])a.end=bb()}function Fa(a){return(a=ab[a])&&a.end?a.end-a.hb:NaN}var bb=window.performance?window.performance.now.bind(window.performance):Date.now,ab={};m("shaka.polyfill.VideoPlaybackQuality.install",function(){var a=HTMLVideoElement.prototype;a.getVideoPlaybackQuality||(a.getVideoPlaybackQuality=function(){return"webkitDroppedFrameCount"in this?{corruptedVideoFrames:0,droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,creationTime:null,totalFrameDelay:null}:null})});m("shaka.polyfill.Fullscreen.install",function(){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;document.fullscreenElement||Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}})});function cb(){return Promise.reject(Error("The key system specified is not supported."))}function db(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function eb(){throw new TypeError("Illegal constructor.");}eb.prototype.createSession=function(){};function fb(){throw new TypeError("Illegal constructor.");}fb.prototype.getConfiguration=function(){};fb.prototype.createMediaKeys=function(){};function gb(a,b){try{var c=new hb(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function ib(a){var b=this.mediaKeys;b&&b!=a&&jb(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&jb(a,this);return Promise.resolve()}
Za.prototype.ab=function(){this.target&&(this.target.removeEventListener(this.type,this.ac,!1),this.ac=this.target=null)};function $a(a){this.systemIds=[];this.cencKeyIds=[];a=new ta(new DataView(a.buffer),ua);try{for(;a.sa();){var b=a.f,c=G(a),d=G(a);1==c?c=Wa(a):0==c&&(c=a.h.byteLength-b);if(1886614376!=d)z(a,c-(a.f-b));else{var e=ya(a);if(1<e)z(a,c-(a.f-b));else{z(a,3);var f=ra(Xa(a)),g=[];if(0<e)for(var k=G(a),l=0;l<k;++l){var p=ra(Xa(a));g.push(p)}var n=G(a);z(a,n);this.cencKeyIds.push.apply(this.cencKeyIds,g);this.systemIds.push(f);a.f!=b+c&&z(a,c-(a.f-b))}}}}catch(r){}};function J(a){ab[a]={hb:bb(),end:NaN}}function K(a){if(a=ab[a])a.end=bb()}function Fa(a){return(a=ab[a])&&a.end?a.end-a.hb:NaN}var bb=window.performance?window.performance.now.bind(window.performance):Date.now,ab={};m("shaka.polyfill.VideoPlaybackQuality.install",function(){var a=HTMLVideoElement.prototype;a.getVideoPlaybackQuality||(a.getVideoPlaybackQuality=function(){return"webkitDroppedFrameCount"in this?{corruptedVideoFrames:0,droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,creationTime:null,totalFrameDelay:null}:null})});m("shaka.polyfill.Fullscreen.install",function(){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;document.fullscreenElement||Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}})});function cb(){return Promise.reject(Error("The key system specified is not supported."))}function db(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function eb(){throw new TypeError("Illegal constructor.");}eb.prototype.createSession=function(){};function fb(){throw new TypeError("Illegal constructor.");}fb.prototype.getConfiguration=function(){};fb.prototype.createMediaKeys=function(){};function gb(a,b){try{var c=new hb(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function ib(a){var b=this.mediaKeys;b&&b!=a&&jb(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&jb(a,this);return Promise.resolve()}
function hb(a,b){this.Ia=this.keySystem=a;"org.w3.clearkey"==a&&(this.Ia="webkit-org.w3.clearkey");var c=!1,d;d=document.getElementsByTagName("video");d=d.length?d[0]:document.createElement("video");for(var e=0;e<b.length;++e){var f=b[e],g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes},k=!1;if(f.audioCapabilities)for(var l=0;l<f.audioCapabilities.length;++l){var p=f.audioCapabilities[l];p.contentType&&(k=!0,d.canPlayType(p.contentType.split(";")[0],

@@ -27,45 +28,45 @@ this.Ia)&&(g.audioCapabilities.push(p),c=!0))}if(f.videoCapabilities)for(l=0;l<f.videoCapabilities.length;++l)p=f.videoCapabilities[l],p.contentType&&(k=!0,d.canPlayType(p.contentType,this.Ia)&&(g.videoCapabilities.push(p),c=!0));k||(c=d.canPlayType("video/mp4",this.Ia)||d.canPlayType("video/webm",this.Ia));if(c){this.tc=g;return}}throw Error("The key system specified is not supported.");}hb.prototype.createMediaKeys=function(){var a=new kb(this.Ia);return Promise.resolve(a)};

function nb(){this.size=0;this.Qa=void 0}var qb=v("FAKE_KEY_ID");nb.prototype.get=function(a){if(this.has(a))return this.Qa};nb.prototype.has=function(a){return this.Qa&&sa(new Uint8Array(a),qb)?!0:!1};nb.prototype.keys=function(){var a=[];this.Qa&&a.push(qb);return new pb(a)};nb.prototype.values=function(){var a=[];this.Qa&&a.push(this.Qa);return new pb(a)};m("shaka.polyfill.MediaKeys.install",function(){Navigator.prototype.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(HTMLMediaElement.prototype.webkitGenerateKeyRequest?(Navigator.prototype.requestMediaKeySystemAccess=gb,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ib,window.MediaKeys=kb,window.MediaKeySystemAccess=hb):(Navigator.prototype.requestMediaKeySystemAccess=cb,delete HTMLMediaElement.prototype.mediaKeys,
HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=db,window.MediaKeys=eb,window.MediaKeySystemAccess=fb))});var rb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function L(a){var b;a instanceof L?(sb(this,a.na),this.Ba=a.Ba,this.ga=a.ga,tb(this,a.La),this.Z=a.Z,ub(this,a.wa.clone()),this.qa=a.qa):a&&(b=String(a).match(rb))?(sb(this,b[1]||"",!0),this.Ba=vb(b[2]||""),this.ga=vb(b[3]||"",!0),tb(this,b[4]),this.Z=vb(b[5]||"",!0),ub(this,b[6]||"",!0),this.qa=vb(b[7]||"")):this.wa=new wb(null)}h=L.prototype;h.na="";h.Ba="";h.ga="";h.La=null;h.Z="";h.qa="";
h.toString=function(){var a=[],b=this.na;b&&a.push(xb(b,yb,!0),":");if(b=this.ga){a.push("//");var c=this.Ba;c&&a.push(xb(c,yb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.La;null!=b&&a.push(":",String(b))}if(b=this.Z)this.ga&&"/"!=b.charAt(0)&&a.push("/"),a.push(xb(b,"/"==b.charAt(0)?zb:Ab,!0));(b=this.wa.toString())&&a.push("?",b);(b=this.qa)&&a.push("#",xb(b,Bb));return a.join("")};
h.resolve=function(a){var b=this.clone(),c=!!a.na;c?sb(b,a.na):c=!!a.Ba;c?b.Ba=a.Ba:c=!!a.ga;c?b.ga=a.ga:c=null!=a.La;var d=a.Z;if(c)tb(b,a.La);else if(c=!!a.Z){if("/"!=d.charAt(0))if(this.ga&&!this.Z)d="/"+d;else{var e=b.Z.lastIndexOf("/");-1!=e&&(d=b.Z.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){for(var e=0==d.lastIndexOf("/",0),d=d.split("/"),f=[],g=0;g<d.length;){var k=d[g++];"."==k?e&&g==d.length&&f.push(""):".."==k?((1<f.length||1==f.length&&""!=
f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(k),e=!0)}d=f.join("/")}}c?b.Z=d:c=""!==a.wa.toString();c?ub(b,a.wa.clone()):c=!!a.qa;c&&(b.qa=a.qa);return b};h.clone=function(){return new L(this)};function sb(a,b,c){a.na=c?vb(b,!0):b;a.na&&(a.na=a.na.replace(/:$/,""))}function tb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.La=b}else a.La=null}function ub(a,b,c){b instanceof wb?a.wa=b:(c||(b=xb(b,Cb)),a.wa=new wb(b))}
function vb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function xb(a,b,c){return"string"==typeof a?(a=encodeURI(a).replace(b,Db),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Db(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var yb=/[#\/\?@]/g,Ab=/[\#\?:]/g,zb=/[\#\?]/g,Cb=/[\#\?@]/g,Bb=/#/g;function wb(a){this.ka=a||null}h=wb.prototype;h.Q=null;h.ib=null;
h.add=function(a,b){if(!this.Q&&(this.Q={},this.ib=0,this.ka))for(var c=this.ka.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null,g=null;0<=e?(f=c[d].substring(0,e),g=c[d].substring(e+1)):f=c[d];f=decodeURIComponent(f.replace(/\+/g," "));g=g||"";this.add(f,decodeURIComponent(g.replace(/\+/g," ")))}this.ka=null;(c=this.Q.hasOwnProperty(a)&&this.Q[a])||(this.Q[a]=c=[]);c.push(b);this.ib++;return this};
h.toString=function(){if(this.ka)return this.ka;if(!this.Q)return"";var a=[],b;for(b in this.Q)for(var c=encodeURIComponent(b),d=this.Q[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.ka=a.join("&")};h.clone=function(){var a=new wb;a.ka=this.ka;if(this.Q){var b={},c;for(c in this.Q)b[c]=this.Q[c].concat();a.Q=b;a.ib=this.ib}return a};function Eb(a,b,c,d,e,f){this.index=a;this.startTime=b;this.endTime=c;this.Pa=d;this.Ta=e;this.url=f};function Fb(a){this.Vc=a};function Gb(a){this.Ka=a}Gb.prototype.parse=function(a,b,c){a=null;try{a=this.Lb(b,c)}catch(d){if(!(d instanceof RangeError))throw d;}return a};
Gb.prototype.Lb=function(a,b){var c=new ta(a,ua),d=[],e=G(c);if(1936286840!=G(c))return null;1==e&&(e=Wa(c));var f=ya(c);z(c,3);z(c,4);var g=G(c);if(0==g)return null;var k,l;0==f?(k=G(c),l=G(c)):(k=Wa(c),l=Wa(c));z(c,2);f=c.h.getUint16(c.f,c.Hb);c.f+=2;e=b+e+l;for(l=0;l<f;l++){var p=G(c),n=(p&2147483648)>>>31,p=p&2147483647,r=G(c);G(c);if(1==n)return null;d.push(new Eb(l,k/g,(k+r)/g,e,e+p-1,this.Ka));k+=r;e+=p}return d};function Hb(a){this.Ka=a}Hb.prototype.parse=function(a,b){var c=null;try{c=this.Lb(a,b)}catch(d){if(!(d instanceof RangeError))throw d;}return c};
Hb.prototype.Lb=function(a,b){var c;var d=new x(a);if(440786851!=y(d).id)c=null;else if(c=y(d),408125543!=c.id)c=null;else{d=c.h.byteOffset;c=new x(c.h);for(var e=null;c.ra();){var f=y(c);if(357149030==f.id){e=f;break}}if(e){c=new x(e.h);for(e=1E6;c.ra();)if(f=y(c),2807729==f.id){e=za(f);break}c=e/1E9}else c=null;c=c?{$c:d,ed:c}:null}if(!c)return null;e=y(new x(b));if(475249515!=e.id)return null;d=c.$c;c=c.ed;for(var e=new x(e.h),f=[],g=-1,k=-1,l=0;e.ra();){var p=y(e);if(187==p.id){var n;n=new x(p.h);
p=y(n);if(179!=p.id)n=null;else if(p=za(p),n=y(n),183!=n.id)n=null;else{n=new x(n.h);for(var r=0;n.ra();){var w=y(n);if(241==w.id){r=za(w);break}}n={fd:p,Wc:r}}n&&(p=c*n.fd,n=d+n.Wc,0<=g&&(f.push(new Eb(l,g,p,k,n-1,this.Ka)),++l),g=p,k=n)}}0<=g&&f.push(new Eb(l,g,null,k,null,this.Ka));return f};function Ib(a){this.i=a}function Jb(a,b){return 0>b||b>=a.i.length?null:a.i[b]}function Kb(a,b,c){var d=Lb(a,b);if(0>d)return null;for(var e=[];d<a.i.length;d++){e.push(a.i[d]);var f=a.i[d].endTime;if(!f||f>b+c)break}return new Fb(e)}function Lb(a,b){for(var c=0;c<a.i.length;c++)if(a.i[c].startTime>b)return c?c-1:0;return a.i.length-1};function N(a){this.url=a;this.o=new Mb;this.Ya=this.mc=this.Vb=0;this.n=null;this.v=new s;this.pa=null}function Mb(){this.body=null;this.bc=1;this.rc=1E3;this.Yc=2;this.Zc=.5;this.Xc=0;this.method="GET";this.responseType="arraybuffer";this.Nb={};this.withCredentials=!1}function Nb(a){Ob(a);a.o.body=null;a.v=null;a.pa=null}function Ob(a){a.n&&(a.n.onload=null,a.n.onerror=null);a.n=null}
HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=db,window.MediaKeys=eb,window.MediaKeySystemAccess=fb))});var rb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function L(a){var b;a instanceof L?(sb(this,a.oa),this.Ba=a.Ba,this.ga=a.ga,tb(this,a.La),this.Z=a.Z,ub(this,a.wa.clone()),this.ra=a.ra):a&&(b=String(a).match(rb))?(sb(this,b[1]||"",!0),this.Ba=vb(b[2]||""),this.ga=vb(b[3]||"",!0),tb(this,b[4]),this.Z=vb(b[5]||"",!0),ub(this,b[6]||"",!0),this.ra=vb(b[7]||"")):this.wa=new wb(null)}h=L.prototype;h.oa="";h.Ba="";h.ga="";h.La=null;h.Z="";h.ra="";
h.toString=function(){var a=[],b=this.oa;b&&a.push(xb(b,yb,!0),":");if(b=this.ga){a.push("//");var c=this.Ba;c&&a.push(xb(c,yb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.La;null!=b&&a.push(":",String(b))}if(b=this.Z)this.ga&&"/"!=b.charAt(0)&&a.push("/"),a.push(xb(b,"/"==b.charAt(0)?zb:Ab,!0));(b=this.wa.toString())&&a.push("?",b);(b=this.ra)&&a.push("#",xb(b,Bb));return a.join("")};
h.resolve=function(a){var b=this.clone(),c=!!a.oa;c?sb(b,a.oa):c=!!a.Ba;c?b.Ba=a.Ba:c=!!a.ga;c?b.ga=a.ga:c=null!=a.La;var d=a.Z;if(c)tb(b,a.La);else if(c=!!a.Z){if("/"!=d.charAt(0))if(this.ga&&!this.Z)d="/"+d;else{var e=b.Z.lastIndexOf("/");-1!=e&&(d=b.Z.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){for(var e=0==d.lastIndexOf("/",0),d=d.split("/"),f=[],g=0;g<d.length;){var k=d[g++];"."==k?e&&g==d.length&&f.push(""):".."==k?((1<f.length||1==f.length&&""!=
f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(k),e=!0)}d=f.join("/")}}c?b.Z=d:c=""!==a.wa.toString();c?ub(b,a.wa.clone()):c=!!a.ra;c&&(b.ra=a.ra);return b};h.clone=function(){return new L(this)};function sb(a,b,c){a.oa=c?vb(b,!0):b;a.oa&&(a.oa=a.oa.replace(/:$/,""))}function tb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.La=b}else a.La=null}function ub(a,b,c){b instanceof wb?a.wa=b:(c||(b=xb(b,Cb)),a.wa=new wb(b))}
function vb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function xb(a,b,c){return"string"==typeof a?(a=encodeURI(a).replace(b,Db),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Db(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var yb=/[#\/\?@]/g,Ab=/[\#\?:]/g,zb=/[\#\?]/g,Cb=/[\#\?@]/g,Bb=/#/g;function wb(a){this.la=a||null}h=wb.prototype;h.Q=null;h.ib=null;
h.add=function(a,b){if(!this.Q&&(this.Q={},this.ib=0,this.la))for(var c=this.la.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null,g=null;0<=e?(f=c[d].substring(0,e),g=c[d].substring(e+1)):f=c[d];f=decodeURIComponent(f.replace(/\+/g," "));g=g||"";this.add(f,decodeURIComponent(g.replace(/\+/g," ")))}this.la=null;(c=this.Q.hasOwnProperty(a)&&this.Q[a])||(this.Q[a]=c=[]);c.push(b);this.ib++;return this};
h.toString=function(){if(this.la)return this.la;if(!this.Q)return"";var a=[],b;for(b in this.Q)for(var c=encodeURIComponent(b),d=this.Q[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.la=a.join("&")};h.clone=function(){var a=new wb;a.la=this.la;if(this.Q){var b={},c;for(c in this.Q)b[c]=this.Q[c].concat();a.Q=b;a.ib=this.ib}return a};function Eb(a,b,c,d,e,f){this.index=a;this.startTime=b;this.endTime=c;this.Pa=d;this.Ta=e;this.url=f};function Fb(a){this.Vc=a};function Gb(a){this.Ka=a}Gb.prototype.parse=function(a,b,c){a=null;try{a=this.Mb(b,c)}catch(d){if(!(d instanceof RangeError))throw d;}return a};
Gb.prototype.Mb=function(a,b){var c=new ta(a,ua),d=[],e=G(c);if(1936286840!=G(c))return null;1==e&&(e=Wa(c));var f=ya(c);z(c,3);z(c,4);var g=G(c);if(0==g)return null;var k,l;0==f?(k=G(c),l=G(c)):(k=Wa(c),l=Wa(c));z(c,2);f=c.h.getUint16(c.f,c.Ib);c.f+=2;e=b+e+l;for(l=0;l<f;l++){var p=G(c),n=(p&2147483648)>>>31,p=p&2147483647,r=G(c);G(c);if(1==n)return null;d.push(new Eb(l,k/g,(k+r)/g,e,e+p-1,this.Ka));k+=r;e+=p}return d};function Hb(a){this.Ka=a}Hb.prototype.parse=function(a,b){var c=null;try{c=this.Mb(a,b)}catch(d){if(!(d instanceof RangeError))throw d;}return c};
Hb.prototype.Mb=function(a,b){var c;var d=new x(a);if(440786851!=y(d).id)c=null;else if(c=y(d),408125543!=c.id)c=null;else{d=c.h.byteOffset;c=new x(c.h);for(var e=null;c.sa();){var f=y(c);if(357149030==f.id){e=f;break}}if(e){c=new x(e.h);for(e=1E6;c.sa();)if(f=y(c),2807729==f.id){e=za(f);break}c=e/1E9}else c=null;c=c?{$c:d,ed:c}:null}if(!c)return null;e=y(new x(b));if(475249515!=e.id)return null;d=c.$c;c=c.ed;for(var e=new x(e.h),f=[],g=-1,k=-1,l=0;e.sa();){var p=y(e);if(187==p.id){var n;n=new x(p.h);
p=y(n);if(179!=p.id)n=null;else if(p=za(p),n=y(n),183!=n.id)n=null;else{n=new x(n.h);for(var r=0;n.sa();){var w=y(n);if(241==w.id){r=za(w);break}}n={fd:p,Wc:r}}n&&(p=c*n.fd,n=d+n.Wc,0<=g&&(f.push(new Eb(l,g,p,k,n-1,this.Ka)),++l),g=p,k=n)}}0<=g&&f.push(new Eb(l,g,null,k,null,this.Ka));return f};function Ib(a){this.i=a}function Jb(a,b){return 0>b||b>=a.i.length?null:a.i[b]}function Kb(a,b,c){var d=Lb(a,b);if(0>d)return null;for(var e=[];d<a.i.length;d++){e.push(a.i[d]);var f=a.i[d].endTime;if(!f||f>b+c)break}return new Fb(e)}function Lb(a,b){for(var c=0;c<a.i.length;c++)if(a.i[c].startTime>b)return c?c-1:0;return a.i.length-1};function N(a){this.url=a;this.o=new Mb;this.Ya=this.mc=this.Vb=0;this.n=null;this.v=new s;this.qa=null}function Mb(){this.body=null;this.bc=1;this.rc=1E3;this.Yc=2;this.Zc=.5;this.Xc=0;this.method="GET";this.responseType="arraybuffer";this.Ob={};this.withCredentials=!1}function Nb(a){Ob(a);a.o.body=null;a.v=null;a.qa=null}function Ob(a){a.n&&(a.n.onload=null,a.n.onerror=null);a.n=null}
N.prototype.ub=function(){if(this.n)return this.v;if(0==this.url.lastIndexOf("data:",0)){var a=this.url.split(":")[1].split(";").pop().split(","),b=a.pop(),b="base64"==a.pop()?window.atob(b.replace(/-/g,"+").replace(/_/g,"/")):window.decodeURIComponent(b);"arraybuffer"==this.o.responseType&&(b=v(b).buffer);a=JSON.parse(JSON.stringify(new XMLHttpRequest));a.response=b;a.responseText=b.toString();b=this.v;b.resolve(a);Nb(this);return b}this.Vb++;this.mc=Date.now();this.Ya||(this.Ya=this.o.rc);this.n=
new XMLHttpRequest;a=this.url;this.pa&&(a=new L(a),a.wa.add("_",Date.now()),a=a.toString());this.n.open(this.o.method,a,!0);this.n.responseType=this.o.responseType;this.n.timeout=this.o.Xc;this.n.withCredentials=this.o.withCredentials;this.n.onload=this.Jc.bind(this);this.n.onerror=this.Jb.bind(this);for(b in this.o.Nb)this.n.setRequestHeader(b,this.o.Nb[b]);this.n.send(this.o.body);return this.v};
new XMLHttpRequest;a=this.url;this.qa&&(a=new L(a),a.wa.add("_",Date.now()),a=a.toString());this.n.open(this.o.method,a,!0);this.n.responseType=this.o.responseType;this.n.timeout=this.o.Xc;this.n.withCredentials=this.o.withCredentials;this.n.onload=this.Jc.bind(this);this.n.onerror=this.Kb.bind(this);for(b in this.o.Ob)this.n.setRequestHeader(b,this.o.Ob[b]);this.n.send(this.o.body);return this.v};
function Pb(a,b,c){b=Error(b);b.type=c;b.status=a.n.status;b.url=a.url;b.method=a.o.method;b.body=a.o.body;b.gd=a.n;return b}N.prototype.abort=function(){if(this.n&&this.n.readyState!=XMLHttpRequest.DONE){this.n.abort();var a=Pb(this,"Request aborted.","aborted");this.v.reject(a);Nb(this)}};
N.prototype.Jc=function(a){this.pa&&this.pa.tb(Date.now()-this.mc,a.loaded);200<=this.n.status&&299>=this.n.status?(this.v.resolve(this.n),Nb(this)):this.Vb<this.o.bc?(Ob(this),window.setTimeout(this.ub.bind(this),this.Ya*(1+(2*Math.random()-1)*this.o.Zc)),this.Ya*=this.o.Yc):(a=Pb(this,"HTTP error.","net"),this.v.reject(a),Nb(this))};N.prototype.Jb=function(){var a=Pb(this,"Network failure.","net");this.v.reject(a);Nb(this)};function Qb(a,b,c){N.call(this,a);this.o.body=b;this.o.method="POST";this.o.bc=3;this.o.withCredentials=c}q(Qb,N);Qb.prototype.send=function(){return this.ub().then(function(a){return Promise.resolve(new Uint8Array(a.response))})};function O(a){F.call(this,null);this.a=a;this.G=this.pb=this.d=null;this.b=new H;this.rb={};this.Ea=[];this.vb=[];this.sa="en";this.cb=this.sb=null;this.Ra=!1;this.L=new Ba;this.Ca=!0}q(O,F);m("shaka.player.Player",O);O.version="v1.2.3";
N.prototype.Jc=function(a){this.qa&&this.qa.tb(Date.now()-this.mc,a.loaded);200<=this.n.status&&299>=this.n.status?(this.v.resolve(this.n),Nb(this)):this.Vb<this.o.bc?(Ob(this),window.setTimeout(this.ub.bind(this),this.Ya*(1+(2*Math.random()-1)*this.o.Zc)),this.Ya*=this.o.Yc):(a=Pb(this,"HTTP error.","net"),this.v.reject(a),Nb(this))};N.prototype.Kb=function(){var a=Pb(this,"Network failure.","net");this.v.reject(a);Nb(this)};function Qb(a,b,c){N.call(this,a);this.o.body=b;this.o.method="POST";this.o.bc=3;this.o.withCredentials=c}q(Qb,N);Qb.prototype.send=function(){return this.ub().then(function(a){return Promise.resolve(new Uint8Array(a.response))})};function O(a){F.call(this,null);this.a=a;this.G=this.pb=this.d=null;this.b=new H;this.rb={};this.Ea=[];this.vb=[];this.ia="en";this.cb=this.sb=null;this.Ra=!1;this.L=new Ba;this.Ca=!0}q(O,F);m("shaka.player.Player",O);O.version="v1.2.4";
O.isBrowserSupported=function(){return!!window.MediaSource&&!!window.MediaKeys&&!!window.navigator&&!!window.navigator.requestMediaKeySystemAccess&&!!window.MediaKeySystemAccess&&!!window.MediaKeySystemAccess.prototype.getConfiguration&&!!window.Promise&&!!HTMLVideoElement.prototype.getVideoPlaybackQuality&&!!Element.prototype.requestFullscreen&&!!document.exitFullscreen&&"fullscreenElement"in document&&!!document.body.children};
function Rb(a){return"text/vtt"==a?!!window.VTTCue:MediaSource.isTypeSupported(a)}O.isTypeSupported=Rb;O.prototype.u=function(){this.Sb().catch(function(){});this.b.u();this.a=this.b=null};O.prototype.destroy=O.prototype.u;
O.prototype.Sb=function(){this.a.pause();Ya(this.b);Sb(this);Tb(this);for(var a=0;a<this.vb.length;++a)this.vb[a].close().catch(function(){});this.vb=[];this.Ea=[];this.G=this.pb=null;this.a.src="";a=this.a.setMediaKeys(null);this.d&&(this.d.u(),this.d=null);this.Ra=!1;this.rb={};this.L=new Ba;return a};O.prototype.unload=O.prototype.Sb;
O.prototype.load=function(a){var b=this.d?this.Sb():Promise.resolve();this.a.autoplay&&(J("load"),I(this.b,this.a,"timeupdate",this.Hc.bind(this)));a.ja(this.Ca);return b.then(t(this,function(){return a.load(this.sa)})).then(t(this,function(){this.d=a;var b;b=new Aa;for(var d=this.d.lb(),e=0;e<d.length;++e){var f=d[e];f.ha.keySystem||f.la&&!Rb(f.la)||b.push(f.contentType,f)}for(var e={},f=!1,g=0;g<d.length;++g){var k=d[g];if(k.ha.keySystem&&!b.has(k.contentType)){var l=k.ha.keySystem,p=e[l];p||(p=
e[l]={audioCapabilities:void 0,videoCapabilities:void 0,initDataTypes:void 0,distinctiveIdentifier:"optional",persistentState:"optional"});k.la&&(l=k.contentType+"Capabilities",l in p&&(f=!0,p[l]||(p[l]=[]),p[l].push({contentType:k.la})))}}f||(this.G=d[0].ha);0==Object.keys(e).length?(this.d.$a(b),b=Promise.resolve()):(f=new s,e=Ub(e,f),e=e.then(this.sc.bind(this,d,b)),e=e.then(this.dd.bind(this)),f.reject(null),b=e);return b})).then(t(this,function(){I(this.b,this.a,"error",this.Jb.bind(this));I(this.b,
this.a,"play",this.Mc.bind(this));I(this.b,this.a,"playing",this.Nc.bind(this));I(this.b,this.a,"seeking",this.Kb.bind(this));I(this.b,this.a,"pause",this.Lc.bind(this));I(this.b,this.a,"ended",this.Gc.bind(this));return this.d.fb(this,this.a)})).then(t(this,function(){for(var a=0;a<this.Ea.length;++a)this.dc(this.Ea[a]);return Promise.resolve()})).catch(t(this,function(b){a.u();this.d=null;var d=D(b);this.dispatchEvent(d);return Promise.reject(b)}))};O.prototype.load=O.prototype.load;
function Ub(a,b){for(var c in a){var d=a[c];b=b.catch(function(){return navigator.requestMediaKeySystemAccess(c,[d])})}return b}h=O.prototype;h.sc=function(a,b,c){for(var d=c.keySystem,e=c.getConfiguration(),f=["audio","video"],g=0;g<f.length;++g){var k=f[g];if(!b.has(k)){var l=e[k+"Capabilities"];if(l&&l.length){for(var l=l[0],p=[],n=0;n<a.length;++n){var r=a[n];if(r.ha.keySystem==d&&r.la==l.contentType){p.push(r);this.G=this.G?La(this.G,r.ha):r.ha;break}}b.set(k,p)}}}this.d.$a(b);return c.createMediaKeys()};
O.prototype.load=function(a){var b=this.d?this.Sb():Promise.resolve();this.a.autoplay&&(J("load"),I(this.b,this.a,"timeupdate",this.Hc.bind(this)));a.ka(this.Ca);return b.then(t(this,function(){return a.load(this.ia)})).then(t(this,function(){this.d=a;var b;b=new Aa;for(var d=this.d.lb(),e=0;e<d.length;++e){var f=d[e];f.ha.keySystem||f.ma&&!Rb(f.ma)||b.push(f.contentType,f)}for(var e={},f=!1,g=0;g<d.length;++g){var k=d[g];if(k.ha.keySystem&&!b.has(k.contentType)){var l=k.ha.keySystem,p=e[l];p||(p=
e[l]={audioCapabilities:void 0,videoCapabilities:void 0,initDataTypes:void 0,distinctiveIdentifier:"optional",persistentState:"optional"});k.ma&&(l=k.contentType+"Capabilities",l in p&&(f=!0,p[l]||(p[l]=[]),p[l].push({contentType:k.ma})))}}f||(this.G=d[0].ha);0==Object.keys(e).length?(this.d.$a(b),b=Promise.resolve()):(f=new s,e=Ub(e,f),e=e.then(this.sc.bind(this,d,b)),e=e.then(this.dd.bind(this)),f.reject(null),b=e);return b})).then(t(this,function(){I(this.b,this.a,"error",this.Kb.bind(this));I(this.b,
this.a,"play",this.Mc.bind(this));I(this.b,this.a,"playing",this.Nc.bind(this));I(this.b,this.a,"seeking",this.Lb.bind(this));I(this.b,this.a,"pause",this.Lc.bind(this));I(this.b,this.a,"ended",this.Gc.bind(this));return this.d.fb(this,this.a)})).then(t(this,function(){for(var a=0;a<this.Ea.length;++a)this.dc(this.Ea[a]);return Promise.resolve()})).catch(t(this,function(b){a.u();this.d=null;var d=D(b);this.dispatchEvent(d);return Promise.reject(b)}))};O.prototype.load=O.prototype.load;
function Ub(a,b){for(var c in a){var d=a[c];b=b.catch(function(){return navigator.requestMediaKeySystemAccess(c,[d])})}return b}h=O.prototype;h.sc=function(a,b,c){for(var d=c.keySystem,e=c.getConfiguration(),f=["audio","video"],g=0;g<f.length;++g){var k=f[g];if(!b.has(k)){var l=e[k+"Capabilities"];if(l&&l.length){for(var l=l[0],p=[],n=0;n<a.length;++n){var r=a[n];if(r.ha.keySystem==d&&r.ma==l.contentType){p.push(r);this.G=this.G?La(this.G,r.ha):r.ha;break}}b.set(k,p)}}}this.d.$a(b);return c.createMediaKeys()};
h.dd=function(a){this.pb=a;return this.a.setMediaKeys(this.pb).then(t(this,function(){this.Ea=[];for(var a=0;a<this.G.Ga.length;++a){var c=this.G.Ga[a];this.Ea.push({type:"encrypted",initDataType:c.initDataType,initData:c.initData})}0==this.Ea.length&&I(this.b,this.a,"encrypted",this.dc.bind(this))}))};
h.dc=function(a){var b=new Uint8Array(a.initData),c=Array.prototype.join.apply(b);this.G.nc&&(c="first");this.rb[c]||(b=this.pb.createSession(),this.vb.push(b),I(this.b,b,"message",this.Oc.bind(this)),I(this.b,b,"keystatuseschange",this.Ic.bind(this)),a=b.generateRequest(a.initDataType,a.initData),this.rb[c]=!0,a.catch(t(this,function(a){this.rb[c]=!1;a=D(a);this.dispatchEvent(a)})))};h.Oc=function(a){Vb(this,a.target,this.G.$b,a.message,this.G.withCredentials,this.G.Zb)};
h.Ic=function(a){var b=a.target.keyStatuses.values();for(a=b.next();!a.done;a=b.next()){var c=Wb[a.value];c&&(c=Error(c),c.type=a.value,a=D(c),this.dispatchEvent(a))}};function Vb(a,b,c,d,e,f){(new Qb(c,d,e)).send().then(t(a,function(a){if(f){var c=new Ja;a=f(a,c);this.d.xb(c)}return b.update(a)})).then(function(){}).catch(t(a,function(a){a.kd=b;a=D(a);this.dispatchEvent(a)}))}h.Hc=function(){K("load");this.L.playbackLatency=Fa("load")/1E3;this.b.ab(this.a,"timeupdate")};
h.Jb=function(a){this.a.error&&(a=this.a.error.code,a!=MediaError.MEDIA_ERR_ABORTED&&(a=Error(Xb[a]||"Unknown playback error."),a.type="playback",a=D(a),this.dispatchEvent(a)))};h.Mc=function(){};h.Nc=function(){J("playing");Sb(this);this.cb=window.setTimeout(this.fc.bind(this),100)};h.Kb=function(){Sb(this);this.Ra=!1};h.Lc=function(){K("playing");Ea(this.L)};h.Gc=function(){this.getStats();Sb(this)};
h.Kb=function(a){this.a.error&&(a=this.a.error.code,a!=MediaError.MEDIA_ERR_ABORTED&&(a=Error(Xb[a]||"Unknown playback error."),a.type="playback",a=D(a),this.dispatchEvent(a)))};h.Mc=function(){};h.Nc=function(){J("playing");Sb(this);this.cb=window.setTimeout(this.fc.bind(this),100)};h.Lb=function(){Sb(this);this.Ra=!1};h.Lc=function(){K("playing");Ea(this.L)};h.Gc=function(){this.getStats();Sb(this)};
h.getStats=function(){this.a.paused||(K("playing"),Ea(this.L),J("playing"));var a=this.L,b=this.a.getVideoPlaybackQuality();b&&(a.decodedFrames=b.totalVideoFrames,a.droppedFrames=b.droppedVideoFrames);return this.L};O.prototype.getStats=O.prototype.getStats;O.prototype.wc=function(){var a=this.a.videoWidth,b=this.a.videoHeight;return a&&b?{width:a,height:b}:null};O.prototype.getCurrentResolution=O.prototype.wc;O.prototype.getVideoTracks=function(){return this.d?this.d.getVideoTracks():[]};
O.prototype.getVideoTracks=O.prototype.getVideoTracks;O.prototype.getAudioTracks=function(){return this.d?this.d.getAudioTracks():[]};O.prototype.getAudioTracks=O.prototype.getAudioTracks;O.prototype.Fa=function(){return this.d?this.d.Fa():[]};O.prototype.getTextTracks=O.prototype.Fa;O.prototype.za=function(a,b){return this.d?this.d.za(a,void 0==b?!0:b):!1};O.prototype.selectVideoTrack=O.prototype.za;O.prototype.Na=function(a){return this.d?this.d.Na(a,!1):!1};O.prototype.selectAudioTrack=O.prototype.Na;
O.prototype.Oa=function(a){return this.d?this.d.Oa(a,!1):!1};O.prototype.selectTextTrack=O.prototype.Oa;O.prototype.oa=function(a){this.d&&this.d.oa(a)};O.prototype.enableTextTrack=O.prototype.oa;O.prototype.ja=function(a){this.Ca=a;this.d&&this.d.ja(a)};O.prototype.enableAdaptation=O.prototype.ja;O.prototype.vc=function(){return this.Ca};O.prototype.getAdaptationEnabled=O.prototype.vc;O.prototype.xc=function(){return this.a.currentTime};O.prototype.getCurrentTime=O.prototype.xc;O.prototype.yc=function(){return this.a.duration};
O.prototype.Oa=function(a){return this.d?this.d.Oa(a,!1):!1};O.prototype.selectTextTrack=O.prototype.Oa;O.prototype.pa=function(a){this.d&&this.d.pa(a)};O.prototype.enableTextTrack=O.prototype.pa;O.prototype.ka=function(a){this.Ca=a;this.d&&this.d.ka(a)};O.prototype.enableAdaptation=O.prototype.ka;O.prototype.vc=function(){return this.Ca};O.prototype.getAdaptationEnabled=O.prototype.vc;O.prototype.xc=function(){return this.a.currentTime};O.prototype.getCurrentTime=O.prototype.xc;O.prototype.yc=function(){return this.a.duration};
O.prototype.getDuration=O.prototype.yc;O.prototype.zc=function(){return this.a.muted};O.prototype.getMuted=O.prototype.zc;O.prototype.Ac=function(){return this.a.volume};O.prototype.getVolume=O.prototype.Ac;O.prototype.play=function(){this.kc(1);this.a.play()};O.prototype.play=O.prototype.play;O.prototype.pause=function(){this.a.pause()};O.prototype.pause=O.prototype.pause;O.prototype.requestFullscreen=function(){this.a.requestFullscreen()};O.prototype.requestFullscreen=O.prototype.requestFullscreen;
O.prototype.seek=function(a){this.a.currentTime=a};O.prototype.seek=O.prototype.seek;O.prototype.ad=function(a){this.a.muted=a};O.prototype.setMuted=O.prototype.ad;O.prototype.cd=function(a){this.a.volume=a};O.prototype.setVolume=O.prototype.cd;O.prototype.bd=function(a){this.sa=E(a)};O.prototype.setPreferredLanguage=O.prototype.bd;O.prototype.kc=function(a){Tb(this);0<=a?this.a.playbackRate=a:(this.a.playbackRate=0,this.ec(this.a.currentTime,Date.now(),a))};O.prototype.setPlaybackRate=O.prototype.kc;
O.prototype.seek=function(a){this.a.currentTime=a};O.prototype.seek=O.prototype.seek;O.prototype.ad=function(a){this.a.muted=a};O.prototype.setMuted=O.prototype.ad;O.prototype.cd=function(a){this.a.volume=a};O.prototype.setVolume=O.prototype.cd;O.prototype.bd=function(a){this.ia=E(a)};O.prototype.setPreferredLanguage=O.prototype.bd;O.prototype.kc=function(a){Tb(this);0<=a?this.a.playbackRate=a:(this.a.playbackRate=0,this.ec(this.a.currentTime,Date.now(),a))};O.prototype.setPlaybackRate=O.prototype.kc;
function Tb(a){a.sb&&(window.clearTimeout(a.sb),a.sb=null)}function Sb(a){a.cb&&(window.clearTimeout(a.cb),a.cb=null)}O.prototype.ec=function(a,b,c){this.a.currentTime=a+(Date.now()-b)/1E3*c;this.sb=window.setTimeout(this.ec.bind(this,a,b,c),100)};
O.prototype.fc=function(){this.cb=window.setTimeout(this.fc.bind(this),100);var a=this.a.buffered,a=a.length?a.end(a.length-1):0,a=this.a.currentTime-a;this.Ra?a<-this.d.mb()&&(K("buffering"),a=this.L,a.bufferingTime+=Fa("buffering")/1E3,this.Ra=!1,this.dispatchEvent(B({type:"bufferingEnd"})),this.a.play()):.05<a&&(this.Ra=!0,this.a.pause(),this.L.bufferingHistory.push(Date.now()/1E3),J("buffering"),this.dispatchEvent(B({type:"bufferingStart"})))};
var Wb={"output-not-allowed":"The required output protection is not available.",expired:"A required key has expired and the content cannot be decrypted.","internal-error":"An unknown error has occurred in the CDM."},Xb={2:"A network failure occured while loading media content.",3:"The browser failed to decode the media content.",4:"The browser does not support the media content."};function Yb(){}Yb.prototype.Mb=function(a){for(var b=0;b<a.length;++b)for(var c=a[b],d=0;d<c.N.length;++d){for(var e=c.N[d],f=e,g=0;g<f.j.length;++g)Rb(da(f.j[g]))||(f.j.splice(g,1),--g);0==e.j.length&&(c.N.splice(d,1),--d)}for(b=0;b<a.length;++b)for(c=a[b],d=0;d<c.N.length;++d)c.N[d].j.sort(Zb)};function Zb(a,b){var c=a.bandwidth||Number.MAX_VALUE,d=b.bandwidth||Number.MAX_VALUE;return c<d?-1:c>d?1:0};function $b(a,b){this.A=a;this.d=b;this.b=new H;this.Wa=Date.now()/1E3+4;this.Wb=!0;I(this.b,this.A,"bandwidth",this.Ib.bind(this));I(this.b,this.d,"adaptation",this.Fc.bind(this))}$b.prototype.u=function(){this.b.u();this.d=this.A=this.b=null};$b.prototype.enable=function(a){this.Wb=a};$b.prototype.Ib=function(){if(this.Wb){var a=Date.now()/1E3;if(!(a<this.Wa)){var b=ac(this);if(b){if(b.active){this.Wa=a+3;return}this.d.za(b.id,!1)}this.Wa=Number.POSITIVE_INFINITY}}};
var Wb={"output-not-allowed":"The required output protection is not available.",expired:"A required key has expired and the content cannot be decrypted.","internal-error":"An unknown error has occurred in the CDM."},Xb={2:"A network failure occured while loading media content.",3:"The browser failed to decode the media content.",4:"The browser does not support the media content."};function Yb(){}Yb.prototype.Nb=function(a){for(var b=0;b<a.length;++b)for(var c=a[b],d=0;d<c.N.length;++d){for(var e=c.N[d],f=e,g=0;g<f.j.length;++g)Rb(da(f.j[g]))||(f.j.splice(g,1),--g);0==e.j.length&&(c.N.splice(d,1),--d)}for(b=0;b<a.length;++b)for(c=a[b],d=0;d<c.N.length;++d)c.N[d].j.sort(Zb)};function Zb(a,b){var c=a.bandwidth||Number.MAX_VALUE,d=b.bandwidth||Number.MAX_VALUE;return c<d?-1:c>d?1:0};function $b(a,b){this.A=a;this.d=b;this.b=new H;this.Wa=Date.now()/1E3+4;this.Wb=!0;I(this.b,this.A,"bandwidth",this.Jb.bind(this));I(this.b,this.d,"adaptation",this.Fc.bind(this))}$b.prototype.u=function(){this.b.u();this.d=this.A=this.b=null};$b.prototype.enable=function(a){this.Wb=a};$b.prototype.Jb=function(){if(this.Wb){var a=Date.now()/1E3;if(!(a<this.Wa)){var b=ac(this);if(b){if(b.active){this.Wa=a+3;return}this.d.za(b.id,!1)}this.Wa=Number.POSITIVE_INFINITY}}};
$b.prototype.Fc=function(){this.Wa==Number.POSITIVE_INFINITY&&(this.Wa=Date.now()/1E3+30)};
function ac(a){var b=a.d.getVideoTracks();if(0==b.length)return null;b.sort(ma);var c;a:{c=a.d.getAudioTracks();for(var d=0;d<c.length;++d)if(c[d].active){c=c[d];break a}c=null}c=c?c.bandwidth:0;a=Ua(a.A);for(var d=b[0],e=0;e<b.length;++e){var f=b[e],g=e+1<b.length?b[e+1]:{bandwidth:Number.POSITIVE_INFINITY};if(f.bandwidth&&(g=(g.bandwidth+c)/.85,a>=(f.bandwidth+c)/.95&&a<=g&&(d=f,d.active)))break}return d};function bc(a,b,c){F.call(this,null);this.Ka=a;this.oc=b;this.G=c?c:Ka();this.da=null}q(bc,F);m("shaka.player.HttpVideoSource",bc);h=bc.prototype;h.u=function(){this.da&&(this.da.parentElement.removeChild(this.da),this.da=null);this.parent=this.G=null};h.fb=function(a,b){this.parent=a;var c=b.mediaKeys;b.src=this.Ka;c=b.setMediaKeys(c);this.oc&&(this.da=document.createElement("track"),this.da.src=this.oc,b.appendChild(this.da),this.da.track.mode="showing");return c};h.load=function(){return Promise.resolve()};
h.getVideoTracks=function(){return[]};h.getAudioTracks=function(){return[]};h.Fa=function(){return[]};h.mb=function(){return 5};h.lb=function(){var a=new ha;a.ha=this.G;return[a]};h.$a=function(){};h.za=function(){return!1};h.Na=function(){return!1};h.Oa=function(){return!1};h.oa=function(a){this.da&&(this.da.track.mode=a?"showing":"disabled")};h.ja=function(){};h.xb=function(){};function cc(a,b,c){N.call(this,a);if(b||c)this.o.Nb.Range="bytes="+(b+"-"+(null!=c?c:""))}q(cc,N);cc.prototype.send=function(){return this.ub().then(function(a){return Promise.resolve(a.response)})};function dc(a,b,c){this.R=a;this.ba=b;this.A=c;this.b=new H;this.Ha=[];this.e=P;this.ia=this.v=null;this.i=[];this.aa=null;this.ya=[];I(this.b,this.ba,"updateend",this.Pc.bind(this))}var P=0,ec=1/60;h=dc.prototype;h.u=function(){this.abort();this.v=this.ia=this.i=this.aa=this.ya=this.e=null;this.b.u();this.R=this.ba=this.Ha=this.b=null};
h.getVideoTracks=function(){return[]};h.getAudioTracks=function(){return[]};h.Fa=function(){return[]};h.mb=function(){return 5};h.lb=function(){var a=new ha;a.ha=this.G;return[a]};h.$a=function(){};h.za=function(){return!1};h.Na=function(){return!1};h.Oa=function(){return!1};h.pa=function(a){this.da&&(this.da.track.mode=a?"showing":"disabled")};h.ka=function(){};h.xb=function(){};function cc(a,b,c){N.call(this,a);if(b||c)this.o.Ob.Range="bytes="+(b+"-"+(null!=c?c:""))}q(cc,N);cc.prototype.send=function(){return this.ub().then(function(a){return Promise.resolve(a.response)})};function dc(a,b,c){this.R=a;this.ba=b;this.A=c;this.b=new H;this.Ha=[];this.e=P;this.ja=this.v=null;this.i=[];this.aa=null;this.ya=[];I(this.b,this.ba,"updateend",this.Pc.bind(this))}var P=0,ec=1/60;h=dc.prototype;h.u=function(){this.abort();this.v=this.ja=this.i=this.aa=this.ya=this.e=null;this.b.u();this.R=this.ba=this.Ha=this.b=null};
function fc(a,b,c){if(a.e!=P)return a=Error("Cannot fetch: previous operation not complete."),a.type="stream",Promise.reject(a);a.e=1;a.v=new s;a.i=b.Vc;c&&a.ya.push(c);b=!0;c=a.i[0].url.toString();for(var d=1;d<a.i.length;++d)if(a.i[d].url.toString()!=c){b=!1;break}(b?gc(a):hc(a)).then(t(a,function(){Ua(this.A);this.ba.appendBuffer(this.ya.shift());this.e=2;this.aa=null})).catch(t(a,function(a){"aborted"!=a.type&&ic(this,a)}));return a.v}
function gc(a){a.aa=new cc(a.i[0].url.toString(),a.i[0].Pa,a.i[a.i.length-1].Ta);a.aa.pa=a.A;return a.aa.send().then(a.zb.bind(a))}function hc(a){function b(a){this.aa=new cc(a.url.toString(),a.Pa,a.Ta);this.aa.pa=this.A;return this.aa.send()}for(var c=b.bind(a)(a.i[0]),d=a.zb.bind(a),e=1;e<a.i.length;++e)var f=b.bind(a,a.i[e]),c=c.then(d).then(f);return c=c.then(a.zb.bind(a))}h.zb=function(a){this.ya.push(a);return Promise.resolve()};
function gc(a){a.aa=new cc(a.i[0].url.toString(),a.i[0].Pa,a.i[a.i.length-1].Ta);a.aa.qa=a.A;return a.aa.send().then(a.Ab.bind(a))}function hc(a){function b(a){this.aa=new cc(a.url.toString(),a.Pa,a.Ta);this.aa.qa=this.A;return this.aa.send()}for(var c=b.bind(a)(a.i[0]),d=a.Ab.bind(a),e=1;e<a.i.length;++e)var f=b.bind(a,a.i[e]),c=c.then(d).then(f);return c=c.then(a.Ab.bind(a))}h.Ab=function(a){this.ya.push(a);return Promise.resolve()};
h.clear=function(){if(this.e!=P){var a=Error("Cannot clear: previous operation not complete.");a.type="stream";return Promise.reject(a)}if(0==this.ba.buffered.length)return Promise.resolve();try{this.ba.remove(0,Number.POSITIVE_INFINITY)}catch(b){return Promise.reject(b)}this.Ha=[];this.e=3;return this.v=new s};h.reset=function(){this.Ha=[]};
h.abort=function(){switch(this.e){case P:return Promise.resolve();case 1:this.e=4;var a=this.ia=new s;this.aa.abort();jc(this);return a;case 2:case 3:return this.e=4,this.ia=new s,"open"==this.R.readyState&&this.ba.abort(),this.ia;case 4:return this.ia}};
h.Pc=function(){switch(this.e){case 2:if(0<this.ya.length){try{this.ba.appendBuffer(this.ya.shift())}catch(a){ic(this,a)}break}for(var b=0;b<this.i.length;++b)this.Ha[this.i[b].index]=!0;this.i=[];case 3:this.e=P;this.v.resolve();this.v=null;break;case 4:jc(this)}};function jc(a){a.ia.resolve();a.ia=null;var b=Error("Current operation aborted.");b.type="aborted";ic(a,b)}function ic(a,b){a.v.reject(b);a.e=P;a.v=null;a.i=[];a.aa=null;a.ya=[]};function kc(){this.duration=this.c=this.type=this.id=null;this.t=5;this.p=[]}function lc(){this.id=null;this.t=5;this.w=this.r=this.q=this.c=this.duration=this.start=null;this.P=[]}function mc(){this.id=null;this.t=5;this.w=this.r=this.q=this.c=this.ea=this.l=this.height=this.width=this.contentType=this.lang=null;this.fa=[];this.m=[]}function nc(){this.value=null}function oc(){this.contentType=this.lang=this.id=null}
function pc(){this.lang=this.id=null;this.t=5;this.w=this.r=this.q=this.c=this.ea=this.l=this.height=this.width=this.bandwidth=null;this.fa=[];this.Va=!1}function qc(){this.value=this.schemeIdUri=null;this.children=[];this.pssh=null}function rc(){this.parsedPssh=this.psshBox=null}function Q(){this.url=null}function R(){this.D=this.c=null;this.F=1;this.W=0;this.ma=this.S=this.Eb=null}function sc(){this.$=this.url=null}function tc(){this.$=this.url=null}
function S(){this.c=null;this.F=1;this.W=0;this.T=null;this.ca=1;this.ma=null;this.B=[]}function uc(){this.duration=this.startTime=this.qb=this.D=null}function vc(){this.F=1;this.W=0;this.T=null;this.ca=1;this.Rb=this.Fb=this.nb=this.ta=null}function wc(){this.pc=[]}function xc(){this.repeat=this.duration=this.startTime=null}function yc(a,b){this.hb=a;this.end=b}kc.TAG_NAME="MPD";lc.TAG_NAME="Period";mc.TAG_NAME="AdaptationSet";nc.TAG_NAME="Role";oc.TAG_NAME="ContentComponent";pc.TAG_NAME="Representation";
h.abort=function(){switch(this.e){case P:return Promise.resolve();case 1:this.e=4;var a=this.ja=new s;this.aa.abort();jc(this);return a;case 2:case 3:return this.e=4,this.ja=new s,"open"==this.R.readyState&&this.ba.abort(),this.ja;case 4:return this.ja}};
h.Pc=function(){switch(this.e){case 2:if(0<this.ya.length){try{this.ba.appendBuffer(this.ya.shift())}catch(a){ic(this,a)}break}for(var b=0;b<this.i.length;++b)this.Ha[this.i[b].index]=!0;this.i=[];case 3:this.e=P;this.v.resolve();this.v=null;break;case 4:jc(this)}};function jc(a){a.ja.resolve();a.ja=null;var b=Error("Current operation aborted.");b.type="aborted";ic(a,b)}function ic(a,b){a.v.reject(b);a.e=P;a.v=null;a.i=[];a.aa=null;a.ya=[]};function kc(){this.duration=this.c=this.type=this.id=null;this.t=5;this.p=[]}function lc(){this.id=null;this.t=5;this.w=this.r=this.q=this.c=this.duration=this.start=null;this.P=[]}function mc(){this.id=null;this.t=5;this.w=this.r=this.q=this.c=this.ea=this.l=this.height=this.width=this.contentType=this.lang=null;this.fa=[];this.m=[]}function nc(){this.value=null}function oc(){this.contentType=this.lang=this.id=null}
function pc(){this.lang=this.id=null;this.t=5;this.w=this.r=this.q=this.c=this.ea=this.l=this.height=this.width=this.bandwidth=null;this.fa=[];this.Va=!1}function qc(){this.value=this.schemeIdUri=null;this.children=[];this.pssh=null}function rc(){this.parsedPssh=this.psshBox=null}function Q(){this.url=null}function R(){this.D=this.c=null;this.F=1;this.W=0;this.na=this.S=this.Fb=null}function sc(){this.$=this.url=null}function tc(){this.$=this.url=null}
function S(){this.c=null;this.F=1;this.W=0;this.T=null;this.ca=1;this.na=null;this.B=[]}function uc(){this.duration=this.startTime=this.qb=this.D=null}function vc(){this.F=1;this.W=0;this.T=null;this.ca=1;this.Rb=this.Gb=this.nb=this.ta=null}function wc(){this.pc=[]}function xc(){this.repeat=this.duration=this.startTime=null}function yc(a,b){this.hb=a;this.end=b}kc.TAG_NAME="MPD";lc.TAG_NAME="Period";mc.TAG_NAME="AdaptationSet";nc.TAG_NAME="Role";oc.TAG_NAME="ContentComponent";pc.TAG_NAME="Representation";
qc.TAG_NAME="ContentProtection";rc.TAG_NAME="cenc:pssh";Q.TAG_NAME="BaseURL";R.TAG_NAME="SegmentBase";sc.TAG_NAME="RepresentationIndex";tc.TAG_NAME="Initialization";S.TAG_NAME="SegmentList";uc.TAG_NAME="SegmentURL";vc.TAG_NAME="SegmentTemplate";wc.TAG_NAME="SegmentTimeline";xc.TAG_NAME="S";

@@ -77,9 +78,9 @@ kc.prototype.parse=function(a,b){this.id=T(b,"id",U);this.type=T(b,"type",U);this.duration=T(b,"mediaPresentationDuration",zc);this.t=T(b,"minBufferTime",zc)||5;var c=V(this,b,Q);this.c=W(a.c,c?c.url:null);this.p=X(this,b,lc)};lc.prototype.parse=function(a,b){this.id=T(b,"id",U);this.start=T(b,"start",zc);this.duration=T(b,"duration",zc);this.t=a.t;var c=V(this,b,Q);this.c=W(a.c,c?c.url:null);this.q=V(this,b,R);this.r=V(this,b,S);this.w=V(this,b,vc);this.P=X(this,b,mc)};

qc.prototype.parse=function(a,b){this.schemeIdUri=T(b,"schemeIdUri",U);this.value=T(b,"value",U);this.pssh=V(this,b,rc);this.children=b.children};rc.prototype.parse=function(a,b){var c=Ac(b);if(c){this.psshBox=qa(c);try{this.parsedPssh=new $a(this.psshBox)}catch(d){if(!(d instanceof RangeError))throw d;}}};Q.prototype.parse=function(a,b){this.url=Ac(b)};
R.prototype.parse=function(a,b){this.D=this.c=a.c;this.F=T(b,"timescale",Y)||1;this.W=T(b,"presentationTimeOffset",$)||0;this.Eb=T(b,"indexRange",Bc);this.S=V(this,b,sc);this.ma=V(this,b,tc);this.S?this.S.$||(this.S.$=this.Eb):(this.S=new sc,this.S.url=this.c,this.S.$=this.Eb)};sc.prototype.parse=function(a,b){var c=T(b,"sourceURL",U);this.url=W(a.c,c);this.$=T(b,"range",Bc)};tc.prototype.parse=function(a,b){var c=T(b,"sourceURL",U);this.url=W(a.c,c);this.$=T(b,"range",Bc)};
S.prototype.parse=function(a,b){this.c=a.c;this.F=T(b,"timescale",Y)||1;this.W=T(b,"presentationTimeOffset",$)||0;this.T=T(b,"duration",$);this.ca=T(b,"startNumber",Y)||1;this.ma=V(this,b,tc);this.B=X(this,b,uc)};uc.prototype.parse=function(a,b){var c=T(b,"media",U);this.D=W(a.c,c);this.qb=T(b,"mediaRange",Bc)};
vc.prototype.parse=function(a,b){this.F=T(b,"timescale",Y)||1;this.W=T(b,"presentationTimeOffset",$)||0;this.T=T(b,"duration",$);this.ca=T(b,"startNumber",Y)||1;this.ta=T(b,"media",U);this.nb=T(b,"index",U);this.Fb=T(b,"initialization",U);this.Rb=V(this,b,wc)};wc.prototype.parse=function(a,b){this.pc=X(this,b,xc)};xc.prototype.parse=function(a,b){this.startTime=T(b,"t",$);this.duration=T(b,"d",$);this.repeat=T(b,"r",$)};function W(a,b){var c=b?new L(b):null;return a?c?a.resolve(c):a:c}
R.prototype.parse=function(a,b){this.D=this.c=a.c;this.F=T(b,"timescale",Y)||1;this.W=T(b,"presentationTimeOffset",$)||0;this.Fb=T(b,"indexRange",Bc);this.S=V(this,b,sc);this.na=V(this,b,tc);this.S?this.S.$||(this.S.$=this.Fb):(this.S=new sc,this.S.url=this.c,this.S.$=this.Fb)};sc.prototype.parse=function(a,b){var c=T(b,"sourceURL",U);this.url=W(a.c,c);this.$=T(b,"range",Bc)};tc.prototype.parse=function(a,b){var c=T(b,"sourceURL",U);this.url=W(a.c,c);this.$=T(b,"range",Bc)};
S.prototype.parse=function(a,b){this.c=a.c;this.F=T(b,"timescale",Y)||1;this.W=T(b,"presentationTimeOffset",$)||0;this.T=T(b,"duration",$);this.ca=T(b,"startNumber",Y)||1;this.na=V(this,b,tc);this.B=X(this,b,uc)};uc.prototype.parse=function(a,b){var c=T(b,"media",U);this.D=W(a.c,c);this.qb=T(b,"mediaRange",Bc)};
vc.prototype.parse=function(a,b){this.F=T(b,"timescale",Y)||1;this.W=T(b,"presentationTimeOffset",$)||0;this.T=T(b,"duration",$);this.ca=T(b,"startNumber",Y)||1;this.ta=T(b,"media",U);this.nb=T(b,"index",U);this.Gb=T(b,"initialization",U);this.Rb=V(this,b,wc)};wc.prototype.parse=function(a,b){this.pc=X(this,b,xc)};xc.prototype.parse=function(a,b){this.startTime=T(b,"t",$);this.duration=T(b,"d",$);this.repeat=T(b,"r",$)};function W(a,b){var c=b?new L(b):null;return a?c?a.resolve(c):a:c}
function V(a,b,c){for(var d=null,e=0;e<b.children.length;e++)if(b.children[e].tagName==c.TAG_NAME){if(d)return null;d=b.children[e]}if(!d)return null;b=new c;b.parse.call(b,a,d);return b}function X(a,b,c){for(var d=[],e=0;e<b.children.length;e++)if(b.children[e].tagName==c.TAG_NAME){var f=new c;f.parse.call(f,a,b.children[e]);d.push(f)}return d}function Ac(a){a=a.firstChild;return a.nodeType!=Node.TEXT_NODE?null:a.nodeValue}function T(a,b,c){return c(a.getAttribute(b))}
function zc(a){if(!a)return null;var b=/^P(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(a);if(!b)return null;a=0;var c=$(b[1]);c&&(a+=86400*c);(c=$(b[2]))&&(a+=3600*c);(c=$(b[3]))&&(a+=60*c);b=window.parseFloat(b[4]);(b=isNaN(b)?null:b)&&(a+=b);return a}function Bc(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=$(b[1]);if(null==a)return null;b=$(b[2]);return null==b?null:new yc(a,b)}function Y(a){a=window.parseInt(a,10);return 0<a?a:null}
function $(a){a=window.parseInt(a,10);return 0<=a?a:null}function U(a){return a};function Cc(a,b){F.call(this,a);this.a=b;this.X=this.M=null}q(Cc,F);h=Cc.prototype;h.u=function(){this.X&&this.a.removeChild(this.X);this.parent=this.a=this.M=this.X=null};h.Xb=function(){return!0};h.start=function(a){this.M=a;a=this.Db();this.X&&(this.wb(!1),this.a.removeChild(this.X));this.X=document.createElement("track");this.a.appendChild(this.X);this.X.src=this.M.D.toString();this.wb(a)};h.Qb=function(a){this.start(a)};h.ic=function(){};h.wb=function(a){this.X.track.mode=a?"showing":"disabled"};
h.Db=function(){return this.X?"showing"==this.X.track.mode:!1};function Dc(a,b,c,d,e){F.call(this,a);this.a=b;this.ba=d;this.K=new dc(c,d,e);this.A=e;this.bb=this.Xa=this.H=this.M=null;this.e=Ec;this.Aa=""}q(Dc,F);var Ec=0;h=Dc.prototype;h.u=function(){this.e=null;Fc(this);this.A=this.M=this.H=this.Xa=null;this.K.u();this.parent=this.a=this.ba=this.K=null};h.Xb=function(){return 5==this.e};
function $(a){a=window.parseInt(a,10);return 0<=a?a:null}function U(a){return a};function Cc(a,b){F.call(this,a);this.a=b;this.X=this.M=null}q(Cc,F);h=Cc.prototype;h.u=function(){this.X&&this.a.removeChild(this.X);this.parent=this.a=this.M=this.X=null};h.Xb=function(){return!0};h.start=function(a){this.M=a;a=this.Eb();this.X&&(this.wb(!1),this.a.removeChild(this.X));this.X=document.createElement("track");this.a.appendChild(this.X);this.X.src=this.M.D.toString();this.wb(a)};h.Qb=function(a){this.start(a)};h.ic=function(){};h.wb=function(a){this.X.track.mode=a?"showing":"disabled"};
h.Eb=function(){return this.X?"showing"==this.X.track.mode:!1};function Dc(a,b,c,d,e){F.call(this,a);this.a=b;this.ba=d;this.K=new dc(c,d,e);this.A=e;this.bb=this.Xa=this.H=this.M=null;this.e=Ec;this.Aa=""}q(Dc,F);var Ec=0;h=Dc.prototype;h.u=function(){this.e=null;Fc(this);this.A=this.M=this.H=this.Xa=null;this.K.u();this.parent=this.a=this.ba=this.K=null};h.Xb=function(){return 5==this.e};
h.start=function(a){if(this.e==Ec){this.M=a;this.Aa=a.l.split("/")[0];this.H=null;this.e=1;var b=Gc(this,a);Promise.all(b).then(t(this,function(b){var d=b[0];b=b[1];if(a.Za){if(this.H=this.jb(a,d,b),!this.H)return d=Error("Failed to create SegmentIndex."),d.type="stream",Promise.reject(d)}else this.H=a.Ma;return(d=Kb(this.H,this.a.currentTime,a.t))?fc(this.K,d,b):Promise.reject(Error("No segments available."))})).then(t(this,function(){Hc(this,a);Ic(this)})).catch(t(this,function(a){"aborted"!=a.type&&

@@ -90,29 +91,35 @@ (this.e=Ec,a=D(a),this.dispatchEvent(a))}))}};

this.e=4,this.va())}))}};function Hc(a,b){var c=b.l.split("/")[0],c=B({type:"adaptation",bubbles:!0,contentType:c,size:"video"!=c?null:{width:b.width,height:b.height},bandwidth:b.bandwidth});a.dispatchEvent(c)}function Ic(a){a.e=4;if(a.Xa){var b=a.Xa;a.Xa=null;b()}else a.va()}
h.ic=function(){this.e!=Ec&&1!=this.e&&2!=this.e&&3!=this.e&&(Fc(this),this.K.abort().then(t(this,function(){var a=this.a.currentTime,b=Lb(this.H,a);a:{for(var c=this.K.ba.buffered,d=0;d<c.length;++d){var e=c.start(d)-ec,f=c.end(d)+ec;if(a>=e&&a<=f){a=!0;break a}}a=!1}return a&&this.K.Ha[b]?Promise.resolve():this.K.clear()})).then(t(this,function(){this.e=4;this.va()})))};h.wb=function(){};h.Db=function(){return!0};function Gc(a,b){return[Jc(a,b.Za),Jc(a,b.Ob)]}
function Jc(a,b){if(!b||!b.url)return Promise.resolve(null);var c=new cc(b.url.toString(),b.Pa,b.Ta);c.pa=a.A;return c.send()}h.jb=function(a,b,c){var d=null;if(0<=a.l.indexOf("mp4"))d=new Gb(a.D);else if(0<=a.l.indexOf("webm")){if(!c)return null;d=new Hb(a.D)}else return null;c=c?new DataView(c):null;b=new DataView(b);return(a=d.parse(c,b,a.Za.Pa))?new Ib(a):null};
h.ic=function(){this.e!=Ec&&1!=this.e&&2!=this.e&&3!=this.e&&(Fc(this),this.K.abort().then(t(this,function(){var a=this.a.currentTime,b=Lb(this.H,a);a:{for(var c=this.K.ba.buffered,d=0;d<c.length;++d){var e=c.start(d)-ec,f=c.end(d)+ec;if(a>=e&&a<=f){a=!0;break a}}a=!1}return a&&this.K.Ha[b]?Promise.resolve():this.K.clear()})).then(t(this,function(){this.e=4;this.va()})))};h.wb=function(){};h.Eb=function(){return!0};function Gc(a,b){return[Jc(a,b.Za),Jc(a,b.Pb)]}
function Jc(a,b){if(!b||!b.url)return Promise.resolve(null);var c=new cc(b.url.toString(),b.Pa,b.Ta);c.qa=a.A;return c.send()}h.jb=function(a,b,c){var d=null;if(0<=a.l.indexOf("mp4"))d=new Gb(a.D);else if(0<=a.l.indexOf("webm")){if(!c)return null;d=new Hb(a.D)}else return null;c=c?new DataView(c):null;b=new DataView(b);return(a=d.parse(c,b,a.Za.Pa))?new Ib(a):null};
h.va=function(){Fc(this);var a=this.a.currentTime,b=Kc(this,a);if(b=Jb(this.H,b)){var c=Math.max(this.M.t,15);b.startTime-a>=c?this.bb=window.setTimeout(this.va.bind(this),1E3):fc(this.K,new Fb([b])).then(t(this,function(){this.va()})).catch(t(this,function(a){if("aborted"!=a.type){var b=D(a);this.dispatchEvent(b);"net"==a.type&&0==a.gd.status&&(this.bb=window.setTimeout(this.va.bind(this),5E3))}}))}else this.e=5,a=B({type:"ended"}),this.dispatchEvent(a)};
function Kc(a,b){for(var c=Lb(a.H,b);0<=c&&c<a.H.i.length&&a.K.Ha[c];)c++;return c}function Fc(a){a.bb&&(window.clearTimeout(a.bb),a.bb=null)};function Lc(a){F.call(this,null);this.I=a;this.hc=0;this.gc=new Yb;this.R=new MediaSource;this.a=null;this.C={};this.s={};this.b=new H;this.gb=new s;this.sa="";this.Pb=!1;this.A=new Ta;this.L=null;this.eb=new $b(this.A,this)}q(Lc,F);m("shaka.player.StreamVideoSource",Lc);h=Lc.prototype;h.u=function(){this.b.u();this.b=null;this.eb.u();this.eb=null;Mc(this);this.parent=this.A=this.gb=this.a=this.R=this.gc=this.C=null};
h.fb=function(a,b){if(0==this.I.J.length){var c=Error("Manifest has not been loaded.");c.type="stream";return Promise.reject(c)}this.parent=a;this.a=b;this.L=a.getStats();I(this.b,this.R,"sourceopen",this.Kc.bind(this));I(this.b,this.a,"seeking",this.Kb.bind(this));I(this.b,this.A,"bandwidth",this.Ib.bind(this));c=this.a.mediaKeys;this.a.src=window.URL.createObjectURL(this.R);c=this.a.setMediaKeys(c);return Promise.all([this.gb,c])};
h.load=function(a){this.sa=a;if(0==this.I.J.length)return a=Error("The manifest contains no stream information."),a.type="stream",Promise.reject(a);this.hc=this.I.t;this.gc.Mb(this.I.J);return 0==this.I.J.length||0==this.I.J[0].N.length?(a=Error("The manifest specifies content that cannot be displayed on this browser/platform."),a.type="stream",Promise.reject(a)):Promise.resolve()};
function Kc(a,b){for(var c=Lb(a.H,b);0<=c&&c<a.H.i.length&&a.K.Ha[c];)c++;return c}function Fc(a){a.bb&&(window.clearTimeout(a.bb),a.bb=null)};function Lc(a){F.call(this,null);this.I=a;this.hc=0;this.gc=new Yb;this.R=new MediaSource;this.a=null;this.C={};this.s={};this.b=new H;this.gb=new s;this.ia="";this.yb=!1;this.A=new Ta;this.L=null;this.eb=new $b(this.A,this)}q(Lc,F);m("shaka.player.StreamVideoSource",Lc);h=Lc.prototype;h.u=function(){this.b.u();this.b=null;this.eb.u();this.eb=null;Mc(this);this.parent=this.A=this.gb=this.a=this.R=this.gc=this.C=null};
h.fb=function(a,b){if(0==this.I.J.length){var c=Error("Manifest has not been loaded.");c.type="stream";return Promise.reject(c)}this.parent=a;this.a=b;this.L=a.getStats();I(this.b,this.R,"sourceopen",this.Kc.bind(this));I(this.b,this.a,"seeking",this.Lb.bind(this));I(this.b,this.A,"bandwidth",this.Jb.bind(this));c=this.a.mediaKeys;this.a.src=window.URL.createObjectURL(this.R);c=this.a.setMediaKeys(c);return Promise.all([this.gb,c])};
h.load=function(a){this.ia=a;if(0==this.I.J.length)return a=Error("The manifest contains no stream information."),a.type="stream",Promise.reject(a);this.hc=this.I.t;this.gc.Nb(this.I.J);return 0==this.I.J.length||0==this.I.J[0].N.length?(a=Error("The manifest specifies content that cannot be displayed on this browser/platform."),a.type="stream",Promise.reject(a)):Promise.resolve()};
h.getVideoTracks=function(){if(!this.s.video)return[];for(var a=this.C.video,a=(a=a?a.M:null)?a.Y:0,b=[],c=0;c<this.s.video.length;++c)for(var d=this.s.video[c],e=0;e<d.j.length;++e){var f=d.j[e];if(f.enabled){var g=f.Y,f=new la(g,f.bandwidth,f.width,f.height);g==a&&(f.active=!0);b.push(f)}}return b};
h.getAudioTracks=function(){if(!this.s.audio)return[];for(var a=this.C.audio,a=(a=a?a.M:null)?a.Y:0,b=[],c=0;c<this.s.audio.length;++c)for(var d=this.s.audio[c],e=d.lang,f=0;f<d.j.length;++f){var g=d.j[f],k=g.Y,g=new na(k,g.bandwidth,e);k==a&&(g.active=!0);b.push(g)}return b};
h.Fa=function(){if(!this.s.text)return[];for(var a=this.C.text,b=a?a.M:null,b=b?b.Y:0,c=[],d=0;d<this.s.text.length;++d)for(var e=this.s.text[d],f=e.lang,g=0;g<e.j.length;++g){var k=e.j[g].Y,l=new ka(k,f);k==b&&(l.active=!0,l.enabled=a.Db());c.push(l)}return c};h.mb=function(){return this.hc};h.lb=function(){return 0==this.I.J.length?[]:this.I.J[0].Cb()};
h.$a=function(a){for(var b={},c=this.I.J[0],d=0;d<c.N.length;++d){var e=c.N[d];b[e.Y]=e}this.s={};c=a.keys();for(d=0;d<c.length;++d){var e=c[d],f=a.get(e);this.s[e]=[];if("video"==e){var g=f[0].id;this.s[e].push(b[g])}else if("audio"==e)for(var g=f[0].la.split(";")[0],k=0;k<f.length;++k){var l=f[k];l.la.split(";")[0]==g&&this.s[e].push(b[l.id])}else for(k=0;k<f.length;++k)g=f[k].id,this.s[e].push(b[g])}this.Pb=!0;if(a=this.s.audio)Nc(this,a),Oa(2,this.sa,a[0].lang||this.sa)&&(this.Pb=!1);(a=this.s.text)&&
Nc(this,a)};h.za=function(a,b){return Oc(this,"video",a,b)};h.Na=function(a,b){return Oc(this,"audio",a,b)};h.Oa=function(a,b){return Oc(this,"text",a,b)};h.oa=function(a){var b=this.C.text;b&&b.wb(a)};h.ja=function(a){this.eb.enable(a)};h.xb=function(a){for(var b=0;b<this.I.J.length;++b)for(var c=this.I.J[b],d=0;d<c.N.length;++d)for(var e=c.N[d],f=0;f<e.j.length;++f){var g=e.j[f];g.enabled=!0;a.maxWidth&&g.width>a.maxWidth&&(g.enabled=!1);a.maxHeight&&g.height>a.maxHeight&&(g.enabled=!1)}};
function Oc(a,b,c,d){if(!a.s[b])return!1;for(var e=0;e<a.s[b].length;++e)for(var f=a.s[b][e],g=0;g<f.j.length;++g){var k=f.j[g];if(k.Y==c)return Ga(a.L,k),a.C[b].Qb(k,d),!0}return!1}function Nc(a,b){for(var c=0;2>=c;++c)for(var d=0;d<b.length;++d){var e=b[d];if(Oa(c,a.sa,e.lang)){b.splice(d,1);b.splice(0,0,e);return}}for(d=0;d<b.length;++d)if(e=b[d],e.Va){b.splice(d,1);b.splice(0,0,e);break}}
h.Fa=function(){if(!this.s.text)return[];for(var a=this.C.text,b=a?a.M:null,b=b?b.Y:0,c=[],d=0;d<this.s.text.length;++d)for(var e=this.s.text[d],f=e.lang,g=0;g<e.j.length;++g){var k=e.j[g].Y,l=new ka(k,f);k==b&&(l.active=!0,l.enabled=a.Eb());c.push(l)}return c};h.mb=function(){return this.hc};h.lb=function(){return 0==this.I.J.length?[]:this.I.J[0].Db()};
h.$a=function(a){for(var b={},c=this.I.J[0],d=0;d<c.N.length;++d){var e=c.N[d];b[e.Y]=e}this.s={};c=a.keys();for(d=0;d<c.length;++d){var e=c[d],f=a.get(e);this.s[e]=[];if("video"==e){var g=f[0].id;this.s[e].push(b[g])}else if("audio"==e)for(var g=f[0].ma.split(";")[0],k=0;k<f.length;++k){var l=f[k];l.ma.split(";")[0]==g&&this.s[e].push(b[l.id])}else for(k=0;k<f.length;++k)g=f[k].id,this.s[e].push(b[g])}this.yb=!0;if(a=this.s.audio)Nc(this,a),a=a[0].lang||this.ia,Oa(2,this.ia,a)&&(this.yb=!1);if(a=
this.s.text)Nc(this,a),a=a[0].lang||this.ia,Oa(2,this.ia,a)||(this.yb=!1)};h.za=function(a,b){return Oc(this,"video",a,b)};h.Na=function(a,b){return Oc(this,"audio",a,b)};h.Oa=function(a,b){return Oc(this,"text",a,b)};h.pa=function(a){var b=this.C.text;b&&b.wb(a)};h.ka=function(a){this.eb.enable(a)};
h.xb=function(a){for(var b=0;b<this.I.J.length;++b)for(var c=this.I.J[b],d=0;d<c.N.length;++d)for(var e=c.N[d],f=0;f<e.j.length;++f){var g=e.j[f];g.enabled=!0;a.maxWidth&&g.width>a.maxWidth&&(g.enabled=!1);a.maxHeight&&g.height>a.maxHeight&&(g.enabled=!1)}};function Oc(a,b,c,d){if(!a.s[b])return!1;for(var e=0;e<a.s[b].length;++e)for(var f=a.s[b][e],g=0;g<f.j.length;++g){var k=f.j[g];if(k.Y==c)return Ga(a.L,k),a.C[b].Qb(k,d),!0}return!1}
function Nc(a,b){for(var c=0;2>=c;++c)for(var d=0;d<b.length;++d){var e=b[d];if(Oa(c,a.ia,e.lang)){b.splice(d,1);b.splice(0,0,e);return}}for(d=0;d<b.length;++d)if(e=b[d],e.Va){b.splice(d,1);b.splice(0,0,e);break}}
h.Kc=function(){this.b.ab(this.R,"sourceopen");this.R.duration=this.I.J[0].duration;for(var a=[],b=["audio","video","text"],c=0;c<b.length;++c){var d=b[c];this.s[d]&&a.push(this.s[d][0])}b={};for(c=d=0;c<a.length;++c){var e=a[c],f=e.j[0];if("video"==e.contentType){var g;g=(g=ac(this.eb))?g.id:null;for(var k=0;k<e.j.length&&(f=e.j[k],f.Y!=g);++k);}else"audio"==e.contentType&&(f=e.j[Math.floor(e.j.length/2)]);Ga(this.L,f);if("text"==e.contentType)g=new Cc(this,this.a);else a:{g=f;var k=da(g),l=void 0;
try{l=this.R.addSourceBuffer(k)}catch(p){Mc(this);g=Error("Failed to create stream for "+k+".");g.type="stream";g.jd=p;this.gb.reject(g);g=null;break a}l.timestampOffset=this.I.J[0].start-g.timestampOffset;g=new Dc(this,this.a,this.R,l,this.A)}if(!g)return;this.C[e.contentType]=g;b[e.contentType]=f;f.Ma&&(e=Jb(f.Ma,0))&&(d=Math.max(d,e.startTime))}this.a.currentTime=d;for(var n in this.C)g=this.C[n],I(this.b,g,"ended",this.Qc.bind(this)),g.start(b[n]);this.oa(this.Pb);this.gb.resolve()};
function Mc(a){for(var b in a.C)a.C[b].u();a.C={}}h.Qc=function(){if("open"==this.R.readyState){for(var a in this.C)if(!this.C[a].Xb())return;this.R.endOfStream()}};h.Kb=function(){for(var a in this.C)this.C[a].ic()};h.Ib=function(){var a=this.L,b=Ua(this.A);a.estimatedBandwidth=b;a.bandwidthHistory.push(new Ia(b))};function Pc(a){N.call(this,a);this.o.responseType="text"}q(Pc,N);Pc.prototype.send=function(){var a=this.url;return this.ub().then(function(b){b=b.responseText;if(b=(new DOMParser).parseFromString(b,"text/xml")){var c={c:new L(a)};b=V(c,b,kc)}else b=null;if(b)return Promise.resolve(b);b=Error("MPD parse failure.");b.type="mpd";return Promise.reject(b)})};function Qc(a){this.Ua=a;this.ob=new ja}
Qc.prototype.Mb=function(a){this.ob=new ja;for(var b=0;b<a.p.length;++b)for(var c=a.p[b],d=0;d<c.P.length;++d){var e=c.P[d];if("text"!=e.contentType)for(var f=0;f<e.m.length;++f){var g=e.m[f],k=0,k=k+(g.q?1:0),k=k+(g.r?1:0),k=k+(g.w?1:0);0==k?(e.m.splice(f,1),--f):1!=k&&(g.q?(g.r=null,g.w=null):g.r&&(g.w=null));!g.q||g.q.S&&g.q.S.$&&g.q.D||(e.m.splice(f,1),--f)}}Rc(a);for(b=0;b<a.p.length;++b)for(c=a.p[b],d=0;d<c.P.length;++d)for(e=c.P[d],f=0;f<e.m.length;++f)if(g=e.m[f],g.w)if(k=g.w,k.nb){a:{var k=
g,l=k.w,p=new R,n;n=k;var r=n.w;if(r.nb){var w=new sc;(r=Sc(r.nb,n.id,null,n.bandwidth,null))?(w.url=n.c&&r?n.c.resolve(r):r,n=w):n=null}else n=null;p.S=n;if(p.S){p.ma=Tc(k);n=void 0;if(l.ta){l=Sc(l.ta,k.id,1,k.bandwidth,0);if(!l)break a;n=k.c?k.c.resolve(l):l}else n=k.c;p.D=n;k.q=p}}g.q||(e.m.splice(f,1),--f)}else if(k.Rb){a:if(k=g,p=k.w,p.ta){l=new S;l.F=p.F;l.W=p.W;l.ca=p.ca;l.ma=Tc(k);l.B=[];n=p.Rb.pc;for(var w=1,r=-1,u=0;u<n.length;++u)for(var C=n[u].repeat||0,Ca=0;Ca<=C;++Ca){if(!n[u].duration)break a;
var Z;Z=n[u].startTime&&0==Ca?n[u].startTime:0==u&&0==Ca?0:r;if(0<=r&&Z!=r){var M=l.B[l.B.length-1];M.duration+=Z-r}r=Z+n[u].duration;M=Sc(p.ta,k.id,w-1+p.ca,k.bandwidth,Z);if(!M)break a;var M=k.c?k.c.resolve(M):M,Da=new uc;Da.D=M;Da.startTime=Z;Da.duration=n[u].duration;l.B.push(Da);++w}k.r=l}g.r||(e.m.splice(f,1),--f)}else if(k.T)if(null!=c.duration){a:if(k=g,n=c.duration,p=k.w,p.ta){l=new S;l.F=p.F;l.W=p.W;l.T=p.T;l.ca=p.ca;l.ma=Tc(k);l.B=[];n=Math.floor(n/(p.T/p.F));for(w=1;w<=n;++w){r=(w-1+(p.ca-
try{l=this.R.addSourceBuffer(k)}catch(p){Mc(this);g=Error("Failed to create stream for "+k+".");g.type="stream";g.jd=p;this.gb.reject(g);g=null;break a}l.timestampOffset=this.I.J[0].start-g.timestampOffset;g=new Dc(this,this.a,this.R,l,this.A)}if(!g)return;this.C[e.contentType]=g;b[e.contentType]=f;f.Ma&&(e=Jb(f.Ma,0))&&(d=Math.max(d,e.startTime))}this.a.currentTime=d;for(var n in this.C)g=this.C[n],I(this.b,g,"ended",this.Qc.bind(this)),g.start(b[n]);this.pa(this.yb);this.gb.resolve()};
function Mc(a){for(var b in a.C)a.C[b].u();a.C={}}h.Qc=function(){if("open"==this.R.readyState){for(var a in this.C)if(!this.C[a].Xb())return;this.R.endOfStream()}};h.Lb=function(){for(var a in this.C)this.C[a].ic()};h.Jb=function(){var a=this.L,b=Ua(this.A);a.estimatedBandwidth=b;a.bandwidthHistory.push(new Ia(b))};function Pc(a){N.call(this,a);this.o.responseType="text"}q(Pc,N);Pc.prototype.send=function(){var a=this.url;return this.ub().then(function(b){b=b.responseText;if(b=(new DOMParser).parseFromString(b,"text/xml")){var c={c:new L(a)};b=V(c,b,kc)}else b=null;if(b)return Promise.resolve(b);b=Error("MPD parse failure.");b.type="mpd";return Promise.reject(b)})};function Qc(a){this.Ua=a;this.ob=new ja}
Qc.prototype.Nb=function(a){this.ob=new ja;for(var b=0;b<a.p.length;++b)for(var c=a.p[b],d=0;d<c.P.length;++d){var e=c.P[d];if("text"!=e.contentType)for(var f=0;f<e.m.length;++f){var g=e.m[f],k=0,k=k+(g.q?1:0),k=k+(g.r?1:0),k=k+(g.w?1:0);0==k?(e.m.splice(f,1),--f):1!=k&&(g.q?(g.r=null,g.w=null):g.r&&(g.w=null));!g.q||g.q.S&&g.q.S.$&&g.q.D||(e.m.splice(f,1),--f)}}Rc(a);for(b=0;b<a.p.length;++b)for(c=a.p[b],d=0;d<c.P.length;++d)for(e=c.P[d],f=0;f<e.m.length;++f)if(g=e.m[f],g.w)if(k=g.w,k.nb){a:{var k=
g,l=k.w,p=new R,n;n=k;var r=n.w;if(r.nb){var w=new sc;(r=Sc(r.nb,n.id,null,n.bandwidth,null))?(w.url=n.c&&r?n.c.resolve(r):r,n=w):n=null}else n=null;p.S=n;if(p.S){p.na=Tc(k);n=void 0;if(l.ta){l=Sc(l.ta,k.id,1,k.bandwidth,0);if(!l)break a;n=k.c?k.c.resolve(l):l}else n=k.c;p.D=n;k.q=p}}g.q||(e.m.splice(f,1),--f)}else if(k.Rb){a:if(k=g,p=k.w,p.ta){l=new S;l.F=p.F;l.W=p.W;l.ca=p.ca;l.na=Tc(k);l.B=[];n=p.Rb.pc;for(var w=1,r=-1,u=0;u<n.length;++u)for(var C=n[u].repeat||0,Ca=0;Ca<=C;++Ca){if(!n[u].duration)break a;
var Z;Z=n[u].startTime&&0==Ca?n[u].startTime:0==u&&0==Ca?0:r;if(0<=r&&Z!=r){var M=l.B[l.B.length-1];M.duration+=Z-r}r=Z+n[u].duration;M=Sc(p.ta,k.id,w-1+p.ca,k.bandwidth,Z);if(!M)break a;var M=k.c?k.c.resolve(M):M,Da=new uc;Da.D=M;Da.startTime=Z;Da.duration=n[u].duration;l.B.push(Da);++w}k.r=l}g.r||(e.m.splice(f,1),--f)}else if(k.T)if(null!=c.duration){a:if(k=g,n=c.duration,p=k.w,p.ta){l=new S;l.F=p.F;l.W=p.W;l.T=p.T;l.ca=p.ca;l.na=Tc(k);l.B=[];n=Math.floor(n/(p.T/p.F));for(w=1;w<=n;++w){r=(w-1+(p.ca-
1))*p.T;u=Sc(p.ta,k.id,w-1+p.ca,k.bandwidth,r);if(!u)break a;u=k.c?k.c.resolve(u):u;C=new uc;C.D=u;C.startTime=r;C.duration=p.T;l.B.push(C)}k.r=l}g.r||(e.m.splice(f,1),--f)}else e.m.splice(f,1),--f;else e.m.splice(f,1),--f;Rc(a);for(b=0;b<a.p.length;++b)for(c=a.p[b],d=0;d<c.P.length;++d){f=e=c.P[d];g=null;for(k=0;k<f.m.length;++k)(p=f.m[k].l||"",g)?p!=g&&(f.m.splice(k,1),--k):g=p;0==e.m.length&&(c.P.splice(d,1),--d)}this.ob.t=a.t||0;for(b=0;b<a.p.length;++b){c=a.p[b];d=new ia;d.start=c.start||0;d.duration=
c.duration||0;for(e=0;e<c.P.length;++e){f=c.P[e];g=new fa;g.Va=f.Va;g.contentType=f.contentType||"";g.lang=f.lang||"";for(k=0;k<f.m.length;++k){l=f.m[k];n=p=g.Sa.slice(0);w=l;r=[];if(0==w.fa.length)r.push(Ka());else if(this.Ua)for(u=0;u<w.fa.length;++u)(C=this.Ua(w.fa[u]))&&r.push(C);w=r;if(0==n.length)Array.prototype.push.apply(n,w);else for(r=0;r<n.length;++r){u=!1;for(C=0;C<w.length;++C)if(n[r].key()==w[C].key()){u=!0;break}u||(n.splice(r,1),--r)}if(!(0==p.length&&0<g.Sa.length)){a:{n=new ba;n.id=
l.id;n.t=l.t;n.bandwidth=l.bandwidth;n.width=l.width;n.height=l.height;n.l=l.l||"";n.ea=l.ea||"";n.D=l.c;if(l.q)n.timestampOffset=l.q.W/l.q.F,n.D=l.q.D,n.Za=Uc(l.q.S),n.Ob=Uc(l.q.ma);else if(l.r&&(n.timestampOffset=l.r.W/l.r.F,n.Ob=Uc(l.r.ma),n.Ma=this.jb(l.r),!n.Ma)){l=null;break a}l=n}l&&(g.j.push(l),g.Sa=p)}}d.N.push(g)}this.ob.J.push(d)}};
l.id;n.t=l.t;n.bandwidth=l.bandwidth;n.width=l.width;n.height=l.height;n.l=l.l||"";n.ea=l.ea||"";n.D=l.c;if(l.q)n.timestampOffset=l.q.W/l.q.F,n.D=l.q.D,n.Za=Uc(l.q.S),n.Pb=Uc(l.q.na);else if(l.r&&(n.timestampOffset=l.r.W/l.r.F,n.Pb=Uc(l.r.na),n.Ma=this.jb(l.r),!n.Ma)){l=null;break a}l=n}l&&(g.j.push(l),g.Sa=p)}}d.N.push(g)}this.ob.J.push(d)}};
function Rc(a){if(a.p.length){"static"==a.type&&null==a.p[0].start&&(a.p[0].start=0);var b=function(a){return 0==a||!!a};1==a.p.length&&!b(a.p[0].duration)&&b(a.duration)&&(a.p[0].duration=a.duration);for(var c=0;c<a.p.length;++c){var d=a.p[c-1],e=a.p[c];Vc(e);var f=a.p[c+1]||{start:a.duration};!b(e.start)&&d&&b(d.duration)&&(e.start=d.start+d.duration);!b(e.duration)&&b(f.start)&&(e.duration=f.start-e.start)}c=a.p[a.p.length-1];!b(a.duration)&&b(c.start)&&b(c.duration)&&(a.duration=c.start+c.duration)}}
function Vc(a){if(null==a.duration){for(var b=null,c=0;c<a.P.length;++c)for(var d=a.P[c],e=0;e<d.m.length;++e){var f=d.m[e];if(f.r){f=f.r;if(0==f.B.length)f=0;else if(f.T)f=f.T/f.F*f.B.length;else{for(var g=f.B[0].startTime,k=0;k<f.B.length;++k)g+=f.B[k].duration;f=g/f.F}b=Math.max(b,f)}}a.duration=b}}function Tc(a){var b=a.w;if(!b.Fb)return null;var c=new tc,b=Sc(b.Fb,a.id,null,a.bandwidth,null);if(!b)return null;c.url=a.c&&b?a.c.resolve(b):b;return c}
function Vc(a){if(null==a.duration){for(var b=null,c=0;c<a.P.length;++c)for(var d=a.P[c],e=0;e<d.m.length;++e){var f=d.m[e];if(f.r){f=f.r;if(0==f.B.length)f=0;else if(f.T)f=f.T/f.F*f.B.length;else{for(var g=f.B[0].startTime,k=0;k<f.B.length;++k)g+=f.B[k].duration;f=g/f.F}b=Math.max(b,f)}}a.duration=b}}function Tc(a){var b=a.w;if(!b.Gb)return null;var c=new tc,b=Sc(b.Gb,a.id,null,a.bandwidth,null);if(!b)return null;c.url=a.c&&b?a.c.resolve(b):b;return c}
function Sc(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};a=a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)d)?\$/g,function(a,b,c){if("$$"==a)return"$";var d=f[b];if(null==d)return a;"RepresentationID"==b&&c&&(c=void 0);a=d.toString();c=window.parseInt(c,10)||1;c=Math.max(0,c-a.length);return Array(c+1).join("0")+a});try{return new L(a)}catch(g){if(g instanceof URIError)return null;throw g;}}
function Uc(a){if(!a)return null;var b=new ea;b.url=a.url;a.$&&(b.Pa=a.$.hb,b.Ta=a.$.end);return b}Qc.prototype.jb=function(a){for(var b=a.F,c=a.T,d=[],e=0;e<a.B.length;++e){var f=a.B[e],g=0,k=null,l=0,p=null;if(null!=f.startTime)0<e&&null!=a.B[e-1].startTime&&(g=a.B[e-1].startTime),g=f.startTime/b,k=g+f.duration/b;else{if(!c)return null;0==e?g=0:(g=d[e-1].startTime,g+=c/b);k=g+c/b;f.qb&&(l=f.qb.hb,p=f.qb.end)}d.push(new Eb(e,g,k,l,p,f.D))}return new Ib(d)};function Wc(a,b){F.call(this,null);this.Ec=a;this.Ua=b;this.g=null;this.Ca=!0}q(Wc,F);m("shaka.player.DashVideoSource",Wc);h=Wc.prototype;h.u=function(){this.g&&(this.g.u(),this.g=null);this.parent=this.Ua=null};h.fb=function(a,b){if(!this.g){var c=Error("Manifest has not been loaded.");c.type="stream";return Promise.reject(c)}return this.g.fb(a,b)};h.load=function(a){return(new Pc(this.Ec)).send().then(t(this,function(b){var c=new Qc(this.Ua);c.Mb(b);this.g=new Lc(c.ob);this.g.ja(this.Ca);return this.g.load(a)}))};
h.getVideoTracks=function(){return this.g?this.g.getVideoTracks():[]};h.getAudioTracks=function(){return this.g?this.g.getAudioTracks():[]};h.Fa=function(){return this.g?this.g.Fa():[]};h.mb=function(){return this.g?this.g.mb():0};h.lb=function(){return this.g?this.g.lb():[]};h.$a=function(a){return this.g.$a(a)};h.za=function(a,b){return this.g?this.g.za(a,b):!1};h.Na=function(a,b){return this.g?this.g.Na(a,b):!1};h.Oa=function(a,b){return this.g?this.g.Oa(a,b):!1};h.oa=function(a){this.g&&this.g.oa(a)};
h.ja=function(a){this.Ca=a;this.g&&this.g.ja(a)};h.xb=function(a){this.g&&this.g.xb(a)};}.bind((typeof(module)!="undefined"&&module.exports)?module.exports:window))()
function Uc(a){if(!a)return null;var b=new ea;b.url=a.url;a.$&&(b.Pa=a.$.hb,b.Ta=a.$.end);return b}Qc.prototype.jb=function(a){for(var b=a.F,c=a.T,d=[],e=0;e<a.B.length;++e){var f=a.B[e],g=0,k=null,l=0,p=null;if(null!=f.startTime)0<e&&null!=a.B[e-1].startTime&&(g=a.B[e-1].startTime),g=f.startTime/b,k=g+f.duration/b;else{if(!c)return null;0==e?g=0:(g=d[e-1].startTime,g+=c/b);k=g+c/b;f.qb&&(l=f.qb.hb,p=f.qb.end)}d.push(new Eb(e,g,k,l,p,f.D))}return new Ib(d)};function Wc(a,b){F.call(this,null);this.Ec=a;this.Ua=b;this.g=null;this.Ca=!0}q(Wc,F);m("shaka.player.DashVideoSource",Wc);h=Wc.prototype;h.u=function(){this.g&&(this.g.u(),this.g=null);this.parent=this.Ua=null};h.fb=function(a,b){if(!this.g){var c=Error("Manifest has not been loaded.");c.type="stream";return Promise.reject(c)}return this.g.fb(a,b)};h.load=function(a){return(new Pc(this.Ec)).send().then(t(this,function(b){var c=new Qc(this.Ua);c.Nb(b);this.g=new Lc(c.ob);this.g.ka(this.Ca);return this.g.load(a)}))};
h.getVideoTracks=function(){return this.g?this.g.getVideoTracks():[]};h.getAudioTracks=function(){return this.g?this.g.getAudioTracks():[]};h.Fa=function(){return this.g?this.g.Fa():[]};h.mb=function(){return this.g?this.g.mb():0};h.lb=function(){return this.g?this.g.lb():[]};h.$a=function(a){return this.g.$a(a)};h.za=function(a,b){return this.g?this.g.za(a,b):!1};h.Na=function(a,b){return this.g?this.g.Na(a,b):!1};h.Oa=function(a,b){return this.g?this.g.Oa(a,b):!1};h.pa=function(a){this.g&&this.g.pa(a)};
h.ka=function(a){this.Ca=a;this.g&&this.g.ka(a)};h.xb=function(a){this.g&&this.g.xb(a)};}.bind(g,this))();
if (typeof(module)!="undefined"&&module.exports)module.exports=g.shaka;
else if (typeof(define)!="undefined")define(function(){return g.shaka});
else this.shaka=g.shaka;
})();
//# sourceMappingURL=shaka-player.compiled.debug.map

@@ -1,15 +0,16 @@

(function(){var h,aa=this;function m(a,b){var c=a.split("."),d=aa;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function q(a,b){function c(){}c.prototype=b.prototype;a.ld=b.prototype;a.prototype=new c;a.hd=function(a,c,f){return b.prototype[c].apply(a,Array.prototype.slice.call(arguments,2))}};function ba(){this.Y=ca++;this.id=null;this.timestampOffset=this.t=0;this.height=this.width=this.bandwidth=null;this.ea=this.l="";this.Ma=this.Ob=this.Za=this.D=null;this.enabled=!0}var ca=0;function da(a){var b=a.l||"";a.ea&&(b+='; codecs="'+a.ea+'"');return b}function ea(){this.url=null;this.Pa=0;this.Ta=null}function fa(){this.Y=ga++;this.contentType="";this.j=[];this.Sa=[];this.lang="";this.Va=!1}var ga=0;
fa.prototype.Cb=function(){for(var a=[],b=0;b<this.Sa.length;++b){var c=new ha;c.id=this.Y;c.ha=this.Sa[b];c.contentType=this.contentType;c.la=this.j.length?da(this.j[0]):"";a.push(c)}return a};function ia(){this.duration=this.start=0;this.N=[]}ia.prototype.Cb=function(){for(var a=[],b=0;b<this.N.length;++b)a.push.apply(a,this.N[b].Cb());return a};function ja(){this.t=0;this.J=[]}function ha(){this.id=0;this.ha=null;this.la=this.contentType=""};function ka(a,b){this.id=a;this.lang=b||"unknown";this.enabled=this.active=!1}m("shaka.player.TextTrack.compare",function(a,b){return a.lang<b.lang?-1:a.lang>b.lang?1:0});function la(a,b,c,d){this.id=a;this.bandwidth=b||0;this.width=c||0;this.height=d||0;this.active=!1}function ma(a,b){var c=a.width*a.height,d=b.width*b.height;return c<d?-1:c>d?1:a.bandwidth<b.bandwidth?-1:a.bandwidth>b.bandwidth?1:0}m("shaka.player.VideoTrack.compare",ma);function na(a,b,c){this.id=a;this.bandwidth=b||0;this.lang=c||"unknown";this.active=!1}m("shaka.player.AudioTrack.compare",function(a,b){return a.lang<b.lang?-1:a.lang>b.lang?1:a.bandwidth<b.bandwidth?-1:a.bandwidth>b.bandwidth?1:0});function s(){var a,b,c=new Promise(function(c,e){a=c;b=e});c.resolve=a;c.reject=b;return c};function t(a,b){return b.bind(a)};function oa(a,b){for(var c={},d=0;d<a.length;++d){var e=b?b(a[d]):a[d].toString();c[e]=a[d]}var d=[],f;for(f in c)d.push(c[f]);return d};function pa(a){return String.fromCharCode.apply(null,a)}m("shaka.util.Uint8ArrayUtils.toString",pa);function v(a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}m("shaka.util.Uint8ArrayUtils.fromString",v);m("shaka.util.Uint8ArrayUtils.toBase64",function(a,b){var c=void 0==b?!0:b,d=window.btoa(pa(a)).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")});function qa(a){return v(window.atob(a.replace(/-/g,"+").replace(/_/g,"/")))}
m("shaka.util.Uint8ArrayUtils.fromBase64",qa);m("shaka.util.Uint8ArrayUtils.fromHex",function(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b});function ra(a){for(var b="",c=0;c<a.length;++c){var d=a[c].toString(16);1==d.length&&(d="0"+d);b+=d}return b}m("shaka.util.Uint8ArrayUtils.toHex",ra);function sa(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!=b.length)return!1;for(var c=0;c<a.length;++c)if(a[c]!=b[c])return!1;return!0};function x(a){this.h=a;this.xa=new ta(a,ua)}var va=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])];x.prototype.ra=function(){return this.xa.ra()};
(function(){var g={};
(function(window){var h,aa=this;function m(a,b){var c=a.split("."),d=aa;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function q(a,b){function c(){}c.prototype=b.prototype;a.ld=b.prototype;a.prototype=new c;a.hd=function(a,c,f){return b.prototype[c].apply(a,Array.prototype.slice.call(arguments,2))}};function ba(){this.Y=ca++;this.id=null;this.timestampOffset=this.t=0;this.height=this.width=this.bandwidth=null;this.ea=this.l="";this.Ma=this.Pb=this.Za=this.D=null;this.enabled=!0}var ca=0;function da(a){var b=a.l||"";a.ea&&(b+='; codecs="'+a.ea+'"');return b}function ea(){this.url=null;this.Pa=0;this.Ta=null}function fa(){this.Y=ga++;this.contentType="";this.j=[];this.Sa=[];this.lang="";this.Va=!1}var ga=0;
fa.prototype.Db=function(){for(var a=[],b=0;b<this.Sa.length;++b){var c=new ha;c.id=this.Y;c.ha=this.Sa[b];c.contentType=this.contentType;c.ma=this.j.length?da(this.j[0]):"";a.push(c)}return a};function ia(){this.duration=this.start=0;this.N=[]}ia.prototype.Db=function(){for(var a=[],b=0;b<this.N.length;++b)a.push.apply(a,this.N[b].Db());return a};function ja(){this.t=0;this.J=[]}function ha(){this.id=0;this.ha=null;this.ma=this.contentType=""};function ka(a,b){this.id=a;this.lang=b||"unknown";this.enabled=this.active=!1}m("shaka.player.TextTrack.compare",function(a,b){return a.lang<b.lang?-1:a.lang>b.lang?1:0});function la(a,b,c,d){this.id=a;this.bandwidth=b||0;this.width=c||0;this.height=d||0;this.active=!1}function ma(a,b){var c=a.width*a.height,d=b.width*b.height;return c<d?-1:c>d?1:a.bandwidth<b.bandwidth?-1:a.bandwidth>b.bandwidth?1:0}m("shaka.player.VideoTrack.compare",ma);function na(a,b,c){this.id=a;this.bandwidth=b||0;this.lang=c||"unknown";this.active=!1}m("shaka.player.AudioTrack.compare",function(a,b){return a.lang<b.lang?-1:a.lang>b.lang?1:a.bandwidth<b.bandwidth?-1:a.bandwidth>b.bandwidth?1:0});function s(){var a,b,c=new Promise(function(c,e){a=c;b=e});c.resolve=a;c.reject=b;return c};function t(a,b){return b.bind(a)};function oa(a,b){for(var c={},d=0;d<a.length;++d){var e=b?b(a[d]):a[d].toString();c[e]=a[d]}var d=[],f;for(f in c)d.push(c[f]);return d};function pa(a){return String.fromCharCode.apply(null,a)}m("shaka.util.Uint8ArrayUtils.toString",pa);function v(a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}m("shaka.util.Uint8ArrayUtils.fromString",v);m("shaka.util.Uint8ArrayUtils.toBase64",function(a,b){var c=void 0==b?!0:b,d=window.btoa(pa(a)).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")});function qa(a){return v(window.atob(a.replace(/-/g,"+").replace(/_/g,"/")))}
m("shaka.util.Uint8ArrayUtils.fromBase64",qa);m("shaka.util.Uint8ArrayUtils.fromHex",function(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b});function ra(a){for(var b="",c=0;c<a.length;++c){var d=a[c].toString(16);1==d.length&&(d="0"+d);b+=d}return b}m("shaka.util.Uint8ArrayUtils.toHex",ra);function sa(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!=b.length)return!1;for(var c=0;c<a.length;++c)if(a[c]!=b[c])return!1;return!0};function x(a){this.h=a;this.xa=new ta(a,ua)}var va=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])];x.prototype.sa=function(){return this.xa.sa()};
function y(a){var b;b=wa(a);if(7<b.length)throw new RangeError("EbmlParser: EBML ID must be at most 7 bytes.");for(var c=0,d=0;d<b.length;d++)c=256*c+b[d];b=c;c=wa(a);a:{for(d=0;d<va.length;d++)if(sa(c,va[d])){d=!0;break a}d=!1}if(d)throw new RangeError("EbmlParser: Element cannot contain dynamically sized data.");if(8==c.length&&c[1]&224)throw new RangeError("EbmlParser: Variable sized integer value must be at most 53 bits.");for(var d=c[0]&(1<<8-c.length)-1,e=1;e<c.length;e++)d=256*d+c[e];c=d;c=
a.xa.f+c<=a.h.byteLength?c:a.h.byteLength-a.xa.f;d=new DataView(a.h.buffer,a.h.byteOffset+a.xa.f,c);z(a.xa,c);return new xa(b,d)}function wa(a){var b=ya(a.xa),c;for(c=1;8>=c&&!(b&1<<8-c);c++);if(8<c)throw new RangeError("EbmlParser: Variable sized integer must fit within 8 bytes.");var d=new Uint8Array(c);d[0]=b;for(b=1;b<c;b++)d[b]=ya(a.xa);return d}function xa(a,b){this.id=a;this.h=b}
function za(a){if(8<a.h.byteLength)throw new RangeError("EbmlElement: Unsigned integer has too many bytes.");if(8==a.h.byteLength&&a.h.getUint8(0)&224)throw new RangeError("EbmlParser: Unsigned integer must be at most 53 bits.");for(var b=0,c=0;c<a.h.byteLength;c++)var d=a.h.getUint8(c),b=256*b+d;return b};function Aa(){this.V={}}h=Aa.prototype;h.push=function(a,b){this.V.hasOwnProperty(a)?this.V[a].push(b):this.V[a]=[b]};h.set=function(a,b){this.V[a]=b};h.has=function(a){return this.V.hasOwnProperty(a)};h.get=function(a){return(a=this.V[a])?a.slice():null};h.remove=function(a,b){var c=this.V[a];if(c)for(var d=0;d<c.length;++d)c[d]==b&&(c.splice(d,1),--d)};h.keys=function(){var a=[],b;for(b in this.V)a.push(b);return a};h.clear=function(){this.V={}};function Ba(){this.streamStats=null;this.droppedFrames=this.decodedFrames=NaN;this.bufferingTime=this.playTime=this.estimatedBandwidth=0;this.playbackLatency=NaN;this.bufferingHistory=[];this.bandwidthHistory=[];this.streamHistory=[]}function Ea(a){a.playTime+=Fa("playing")/1E3}function Ga(a,b){var c=new Ha(b);a.streamHistory.push(new Ia(c));if(c.videoHeight||!a.streamStats)a.streamStats=c}
function Ha(a){this.videoWidth=a.width;this.videoHeight=a.height;this.videoMimeType=a.l;this.videoBandwidth=a.bandwidth}function Ia(a){this.timestamp=Date.now()/1E3;this.value=a};function A(a,b,c,d,e,f){this.keySystem=a;this.nc=b;this.$b=c;this.withCredentials=d;this.Ga=[];this.Zb=f;e&&this.Ga.push(e)}m("shaka.player.DrmSchemeInfo",A);function Ja(){this.maxWidth=this.maxHeight=null}function Ka(){return new A("",!1,"",!1,null,null)}A.createUnencrypted=Ka;function La(a,b){var c=new A(a.keySystem,a.nc,a.$b,a.withCredentials,null,a.Zb);c.Ga=oa(a.Ga.concat(b.Ga),function(a){return Array.prototype.join.apply(a.initData)});return c}A.combine=La;A.prototype.key=function(){return JSON.stringify(this)};function Ma(a){this.Ub=Math.exp(Math.log(.5)/a);this.yb=this.Ab=0}Ma.prototype.tb=function(a,b){var c=Math.pow(this.Ub,a);this.Ab=b*(1-c)+c*this.Ab;this.yb+=a};function Na(a){return a.Ab/(1-Math.pow(a.Ub,a.yb))};function B(a){var b=new CustomEvent(a.type,{detail:a.detail,bubbles:!!a.bubbles}),c;for(c in a)c in b||(b[c]=a[c]);return b}function D(a){return new CustomEvent("error",{detail:a,bubbles:!0})};function Oa(a,b,c){E(b);E(c);return c==b||a>=Pa&&c==b.split("-")[0]||a>=Qa&&c.split("-")[0]==b.split("-")[0]?!0:!1}var Pa=1,Qa=2;function E(a){a=a.toLowerCase().split("-");var b=Ra[a[0]];b&&(a[0]=b);return a.join("-")}
function Ha(a){this.videoWidth=a.width;this.videoHeight=a.height;this.videoMimeType=a.l;this.videoBandwidth=a.bandwidth}function Ia(a){this.timestamp=Date.now()/1E3;this.value=a};function A(a,b,c,d,e,f){this.keySystem=a;this.nc=b;this.$b=c;this.withCredentials=d;this.Ga=[];this.Zb=f;e&&this.Ga.push(e)}m("shaka.player.DrmSchemeInfo",A);function Ja(){this.maxWidth=this.maxHeight=null}function Ka(){return new A("",!1,"",!1,null,null)}A.createUnencrypted=Ka;function La(a,b){var c=new A(a.keySystem,a.nc,a.$b,a.withCredentials,null,a.Zb);c.Ga=oa(a.Ga.concat(b.Ga),function(a){return Array.prototype.join.apply(a.initData)});return c}A.combine=La;A.prototype.key=function(){return JSON.stringify(this)};function Ma(a){this.Ub=Math.exp(Math.log(.5)/a);this.zb=this.Bb=0}Ma.prototype.tb=function(a,b){var c=Math.pow(this.Ub,a);this.Bb=b*(1-c)+c*this.Bb;this.zb+=a};function Na(a){return a.Bb/(1-Math.pow(a.Ub,a.zb))};function B(a){var b=new CustomEvent(a.type,{detail:a.detail,bubbles:!!a.bubbles}),c;for(c in a)c in b||(b[c]=a[c]);return b}function D(a){return new CustomEvent("error",{detail:a,bubbles:!0})};function Oa(a,b,c){E(b);E(c);return c==b||a>=Pa&&c==b.split("-")[0]||a>=Qa&&c.split("-")[0]==b.split("-")[0]?!0:!1}var Pa=1,Qa=2;function E(a){a=a.toLowerCase().split("-");var b=Ra[a[0]];b&&(a[0]=b);return a.join("-")}
var Ra={aar:"aa",abk:"ab",afr:"af",aka:"ak",alb:"sq",amh:"am",ara:"ar",arg:"an",arm:"hy",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",baq:"eu",bel:"be",ben:"bn",bih:"bh",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",bur:"my",cat:"ca",ces:"cs",cha:"ch",che:"ce",chi:"zh",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",cze:"cs",dan:"da",deu:"de",div:"dv",dut:"nl",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fre:"fr",
fry:"fy",ful:"ff",geo:"ka",ger:"de",gla:"gd",gle:"ga",glg:"gl",glv:"gv",gre:"el",grn:"gn",guj:"gu",hat:"ht",hau:"ha",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ice:"is",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",
lug:"lg",mac:"mk",mah:"mh",mal:"ml",mao:"mi",mar:"mr",may:"ms",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",per:"fa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",rum:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slo:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",
srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tib:"bo",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"};function F(a){this.Gb=new Aa;this.parent=a}F.prototype.addEventListener=function(a,b,c){c||this.Gb.push(a,b)};F.prototype.removeEventListener=function(a,b,c){c||this.Gb.remove(a,b)};F.prototype.dispatchEvent=function(a){delete a.srcElement;delete a.target;delete a.currentTarget;Object.defineProperties(a,{srcElement:{value:null,writable:!0},target:{value:this,writable:!0},currentTarget:{value:null,writable:!0}});return Sa(this,a)};
function Sa(a,b){b.currentTarget=a;for(var c=a.Gb.get(b.type)||[],d=0;d<c.length;++d){var e=c[d];e.handleEvent?e.handleEvent(b):e.call(a,b)}a.parent&&b.bubbles&&Sa(a.parent,b);return b.defaultPrevented};function Ta(){F.call(this,null);this.Bb=new Ma(3);this.lc=new Ma(10);this.Cc=50;this.uc=5E5;this.Dc=.5;this.Bc=65536}q(Ta,F);Ta.prototype.tb=function(a,b){if(!(b<this.Bc)){a=Math.max(a,this.Cc);var c=8E3*b/a,d=a/1E3;this.Bb.tb(d,c);this.lc.tb(d,c);this.dispatchEvent(B({type:"bandwidth"}))}};function Ua(a){return a.Bb.yb<a.Dc?a.uc:Math.min(Na(a.Bb),Na(a.lc))};function ta(a,b){this.h=a;this.Hb=b==Va;this.f=0}var ua=0,Va=1;ta.prototype.ra=function(){return this.f<this.h.byteLength};function ya(a){var b=a.h.getUint8(a.f);a.f+=1;return b}function G(a){var b=a.h.getUint32(a.f,a.Hb);a.f+=4;return b}function Wa(a){var b,c;a.Hb?(b=a.h.getUint32(a.f,!0),c=a.h.getUint32(a.f+4,!0)):(c=a.h.getUint32(a.f,!1),b=a.h.getUint32(a.f+4,!1));if(2097151<c)throw new RangeError("DataViewReader: Overflow reading 64-bit value.");a.f+=8;return c*Math.pow(2,32)+b}
srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tib:"bo",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"};function F(a){this.Hb=new Aa;this.parent=a}F.prototype.addEventListener=function(a,b,c){c||this.Hb.push(a,b)};F.prototype.removeEventListener=function(a,b,c){c||this.Hb.remove(a,b)};F.prototype.dispatchEvent=function(a){delete a.srcElement;delete a.target;delete a.currentTarget;Object.defineProperties(a,{srcElement:{value:null,writable:!0},target:{value:this,writable:!0},currentTarget:{value:null,writable:!0}});return Sa(this,a)};
function Sa(a,b){b.currentTarget=a;for(var c=a.Hb.get(b.type)||[],d=0;d<c.length;++d){var e=c[d];try{e.handleEvent?e.handleEvent(b):e.call(a,b)}catch(f){}}a.parent&&b.bubbles&&Sa(a.parent,b);return b.defaultPrevented};function Ta(){F.call(this,null);this.Cb=new Ma(3);this.lc=new Ma(10);this.Cc=50;this.uc=5E5;this.Dc=.5;this.Bc=65536}q(Ta,F);Ta.prototype.tb=function(a,b){if(!(b<this.Bc)){a=Math.max(a,this.Cc);var c=8E3*b/a,d=a/1E3;this.Cb.tb(d,c);this.lc.tb(d,c);this.dispatchEvent(B({type:"bandwidth"}))}};function Ua(a){return a.Cb.zb<a.Dc?a.uc:Math.min(Na(a.Cb),Na(a.lc))};function ta(a,b){this.h=a;this.Ib=b==Va;this.f=0}var ua=0,Va=1;ta.prototype.sa=function(){return this.f<this.h.byteLength};function ya(a){var b=a.h.getUint8(a.f);a.f+=1;return b}function G(a){var b=a.h.getUint32(a.f,a.Ib);a.f+=4;return b}function Wa(a){var b,c;a.Ib?(b=a.h.getUint32(a.f,!0),c=a.h.getUint32(a.f+4,!0)):(c=a.h.getUint32(a.f,!1),b=a.h.getUint32(a.f+4,!1));if(2097151<c)throw new RangeError("DataViewReader: Overflow reading 64-bit value.");a.f+=8;return c*Math.pow(2,32)+b}
function Xa(a){if(a.f+16>a.h.byteLength)throw new RangeError("DataViewReader: Read past end of DataView.");var b=new Uint8Array(a.h.buffer,a.f,16);a.f+=16;return b}function z(a,b){if(a.f+b>a.h.byteLength)throw new RangeError("DataViewReader: Skip past end of DataView.");a.f+=b};function H(){this.Da=new Aa}H.prototype.u=function(){Ya(this);this.Da=null};function I(a,b,c,d){b=new Za(b,c,d);a.Da.push(c,b)}H.prototype.ab=function(a,b){for(var c=this.Da.get(b)||[],d=0;d<c.length;++d){var e=c[d];e.target==a&&(e.ab(),this.Da.remove(b,e))}};function Ya(a){var b=a.Da,c=[],d;for(d in b.V)c.push.apply(c,b.V[d]);for(b=0;b<c.length;++b)c[b].ab();a.Da.clear()}function Za(a,b,c){this.target=a;this.type=b;this.ac=c;this.target.addEventListener(b,c,!1)}
Za.prototype.ab=function(){this.target&&(this.target.removeEventListener(this.type,this.ac,!1),this.ac=this.target=null)};function $a(a){this.systemIds=[];this.cencKeyIds=[];a=new ta(new DataView(a.buffer),ua);try{for(;a.ra();){var b=a.f,c=G(a),d=G(a);1==c?c=Wa(a):0==c&&(c=a.h.byteLength-b);if(1886614376!=d)z(a,c-(a.f-b));else{var e=ya(a);if(1<e)z(a,c-(a.f-b));else{z(a,3);var f=ra(Xa(a)),g=[];if(0<e)for(var k=G(a),l=0;l<k;++l){var p=ra(Xa(a));g.push(p)}var n=G(a);z(a,n);this.cencKeyIds.push.apply(this.cencKeyIds,g);this.systemIds.push(f);a.f!=b+c&&z(a,c-(a.f-b))}}}}catch(r){}};function J(a){ab[a]={hb:bb(),end:NaN}}function K(a){if(a=ab[a])a.end=bb()}function Fa(a){return(a=ab[a])&&a.end?a.end-a.hb:NaN}var bb=window.performance?window.performance.now.bind(window.performance):Date.now,ab={};m("shaka.polyfill.VideoPlaybackQuality.install",function(){var a=HTMLVideoElement.prototype;a.getVideoPlaybackQuality||(a.getVideoPlaybackQuality=function(){return"webkitDroppedFrameCount"in this?{corruptedVideoFrames:0,droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,creationTime:null,totalFrameDelay:null}:null})});m("shaka.polyfill.Fullscreen.install",function(){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;document.fullscreenElement||Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}})});function cb(){return Promise.reject(Error("The key system specified is not supported."))}function db(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function eb(){throw new TypeError("Illegal constructor.");}eb.prototype.createSession=function(){};function fb(){throw new TypeError("Illegal constructor.");}fb.prototype.getConfiguration=function(){};fb.prototype.createMediaKeys=function(){};function gb(a,b){try{var c=new hb(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function ib(a){var b=this.mediaKeys;b&&b!=a&&jb(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&jb(a,this);return Promise.resolve()}
Za.prototype.ab=function(){this.target&&(this.target.removeEventListener(this.type,this.ac,!1),this.ac=this.target=null)};function $a(a){this.systemIds=[];this.cencKeyIds=[];a=new ta(new DataView(a.buffer),ua);try{for(;a.sa();){var b=a.f,c=G(a),d=G(a);1==c?c=Wa(a):0==c&&(c=a.h.byteLength-b);if(1886614376!=d)z(a,c-(a.f-b));else{var e=ya(a);if(1<e)z(a,c-(a.f-b));else{z(a,3);var f=ra(Xa(a)),g=[];if(0<e)for(var k=G(a),l=0;l<k;++l){var p=ra(Xa(a));g.push(p)}var n=G(a);z(a,n);this.cencKeyIds.push.apply(this.cencKeyIds,g);this.systemIds.push(f);a.f!=b+c&&z(a,c-(a.f-b))}}}}catch(r){}};function J(a){ab[a]={hb:bb(),end:NaN}}function K(a){if(a=ab[a])a.end=bb()}function Fa(a){return(a=ab[a])&&a.end?a.end-a.hb:NaN}var bb=window.performance?window.performance.now.bind(window.performance):Date.now,ab={};m("shaka.polyfill.VideoPlaybackQuality.install",function(){var a=HTMLVideoElement.prototype;a.getVideoPlaybackQuality||(a.getVideoPlaybackQuality=function(){return"webkitDroppedFrameCount"in this?{corruptedVideoFrames:0,droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,creationTime:null,totalFrameDelay:null}:null})});m("shaka.polyfill.Fullscreen.install",function(){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;document.fullscreenElement||Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}})});function cb(){return Promise.reject(Error("The key system specified is not supported."))}function db(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function eb(){throw new TypeError("Illegal constructor.");}eb.prototype.createSession=function(){};function fb(){throw new TypeError("Illegal constructor.");}fb.prototype.getConfiguration=function(){};fb.prototype.createMediaKeys=function(){};function gb(a,b){try{var c=new hb(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function ib(a){var b=this.mediaKeys;b&&b!=a&&jb(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&jb(a,this);return Promise.resolve()}
function hb(a,b){this.Ia=this.keySystem=a;"org.w3.clearkey"==a&&(this.Ia="webkit-org.w3.clearkey");var c=!1,d;d=document.getElementsByTagName("video");d=d.length?d[0]:document.createElement("video");for(var e=0;e<b.length;++e){var f=b[e],g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes},k=!1;if(f.audioCapabilities)for(var l=0;l<f.audioCapabilities.length;++l){var p=f.audioCapabilities[l];p.contentType&&(k=!0,d.canPlayType(p.contentType.split(";")[0],

@@ -27,45 +28,45 @@ this.Ia)&&(g.audioCapabilities.push(p),c=!0))}if(f.videoCapabilities)for(l=0;l<f.videoCapabilities.length;++l)p=f.videoCapabilities[l],p.contentType&&(k=!0,d.canPlayType(p.contentType,this.Ia)&&(g.videoCapabilities.push(p),c=!0));k||(c=d.canPlayType("video/mp4",this.Ia)||d.canPlayType("video/webm",this.Ia));if(c){this.tc=g;return}}throw Error("The key system specified is not supported.");}hb.prototype.createMediaKeys=function(){var a=new kb(this.Ia);return Promise.resolve(a)};

function nb(){this.size=0;this.Qa=void 0}var qb=v("FAKE_KEY_ID");nb.prototype.get=function(a){if(this.has(a))return this.Qa};nb.prototype.has=function(a){return this.Qa&&sa(new Uint8Array(a),qb)?!0:!1};nb.prototype.keys=function(){var a=[];this.Qa&&a.push(qb);return new pb(a)};nb.prototype.values=function(){var a=[];this.Qa&&a.push(this.Qa);return new pb(a)};m("shaka.polyfill.MediaKeys.install",function(){Navigator.prototype.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(HTMLMediaElement.prototype.webkitGenerateKeyRequest?(Navigator.prototype.requestMediaKeySystemAccess=gb,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ib,window.MediaKeys=kb,window.MediaKeySystemAccess=hb):(Navigator.prototype.requestMediaKeySystemAccess=cb,delete HTMLMediaElement.prototype.mediaKeys,
HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=db,window.MediaKeys=eb,window.MediaKeySystemAccess=fb))});var rb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function L(a){var b;a instanceof L?(sb(this,a.na),this.Ba=a.Ba,this.ga=a.ga,tb(this,a.La),this.Z=a.Z,ub(this,a.wa.clone()),this.qa=a.qa):a&&(b=String(a).match(rb))?(sb(this,b[1]||"",!0),this.Ba=vb(b[2]||""),this.ga=vb(b[3]||"",!0),tb(this,b[4]),this.Z=vb(b[5]||"",!0),ub(this,b[6]||"",!0),this.qa=vb(b[7]||"")):this.wa=new wb(null)}h=L.prototype;h.na="";h.Ba="";h.ga="";h.La=null;h.Z="";h.qa="";
h.toString=function(){var a=[],b=this.na;b&&a.push(xb(b,yb,!0),":");if(b=this.ga){a.push("//");var c=this.Ba;c&&a.push(xb(c,yb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.La;null!=b&&a.push(":",String(b))}if(b=this.Z)this.ga&&"/"!=b.charAt(0)&&a.push("/"),a.push(xb(b,"/"==b.charAt(0)?zb:Ab,!0));(b=this.wa.toString())&&a.push("?",b);(b=this.qa)&&a.push("#",xb(b,Bb));return a.join("")};
h.resolve=function(a){var b=this.clone(),c=!!a.na;c?sb(b,a.na):c=!!a.Ba;c?b.Ba=a.Ba:c=!!a.ga;c?b.ga=a.ga:c=null!=a.La;var d=a.Z;if(c)tb(b,a.La);else if(c=!!a.Z){if("/"!=d.charAt(0))if(this.ga&&!this.Z)d="/"+d;else{var e=b.Z.lastIndexOf("/");-1!=e&&(d=b.Z.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){for(var e=0==d.lastIndexOf("/",0),d=d.split("/"),f=[],g=0;g<d.length;){var k=d[g++];"."==k?e&&g==d.length&&f.push(""):".."==k?((1<f.length||1==f.length&&""!=
f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(k),e=!0)}d=f.join("/")}}c?b.Z=d:c=""!==a.wa.toString();c?ub(b,a.wa.clone()):c=!!a.qa;c&&(b.qa=a.qa);return b};h.clone=function(){return new L(this)};function sb(a,b,c){a.na=c?vb(b,!0):b;a.na&&(a.na=a.na.replace(/:$/,""))}function tb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.La=b}else a.La=null}function ub(a,b,c){b instanceof wb?a.wa=b:(c||(b=xb(b,Cb)),a.wa=new wb(b))}
function vb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function xb(a,b,c){return"string"==typeof a?(a=encodeURI(a).replace(b,Db),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Db(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var yb=/[#\/\?@]/g,Ab=/[\#\?:]/g,zb=/[\#\?]/g,Cb=/[\#\?@]/g,Bb=/#/g;function wb(a){this.ka=a||null}h=wb.prototype;h.Q=null;h.ib=null;
h.add=function(a,b){if(!this.Q&&(this.Q={},this.ib=0,this.ka))for(var c=this.ka.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null,g=null;0<=e?(f=c[d].substring(0,e),g=c[d].substring(e+1)):f=c[d];f=decodeURIComponent(f.replace(/\+/g," "));g=g||"";this.add(f,decodeURIComponent(g.replace(/\+/g," ")))}this.ka=null;(c=this.Q.hasOwnProperty(a)&&this.Q[a])||(this.Q[a]=c=[]);c.push(b);this.ib++;return this};
h.toString=function(){if(this.ka)return this.ka;if(!this.Q)return"";var a=[],b;for(b in this.Q)for(var c=encodeURIComponent(b),d=this.Q[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.ka=a.join("&")};h.clone=function(){var a=new wb;a.ka=this.ka;if(this.Q){var b={},c;for(c in this.Q)b[c]=this.Q[c].concat();a.Q=b;a.ib=this.ib}return a};function Eb(a,b,c,d,e,f){this.index=a;this.startTime=b;this.endTime=c;this.Pa=d;this.Ta=e;this.url=f};function Fb(a){this.Vc=a};function Gb(a){this.Ka=a}Gb.prototype.parse=function(a,b,c){a=null;try{a=this.Lb(b,c)}catch(d){if(!(d instanceof RangeError))throw d;}return a};
Gb.prototype.Lb=function(a,b){var c=new ta(a,ua),d=[],e=G(c);if(1936286840!=G(c))return null;1==e&&(e=Wa(c));var f=ya(c);z(c,3);z(c,4);var g=G(c);if(0==g)return null;var k,l;0==f?(k=G(c),l=G(c)):(k=Wa(c),l=Wa(c));z(c,2);f=c.h.getUint16(c.f,c.Hb);c.f+=2;e=b+e+l;for(l=0;l<f;l++){var p=G(c),n=(p&2147483648)>>>31,p=p&2147483647,r=G(c);G(c);if(1==n)return null;d.push(new Eb(l,k/g,(k+r)/g,e,e+p-1,this.Ka));k+=r;e+=p}return d};function Hb(a){this.Ka=a}Hb.prototype.parse=function(a,b){var c=null;try{c=this.Lb(a,b)}catch(d){if(!(d instanceof RangeError))throw d;}return c};
Hb.prototype.Lb=function(a,b){var c;var d=new x(a);if(440786851!=y(d).id)c=null;else if(c=y(d),408125543!=c.id)c=null;else{d=c.h.byteOffset;c=new x(c.h);for(var e=null;c.ra();){var f=y(c);if(357149030==f.id){e=f;break}}if(e){c=new x(e.h);for(e=1E6;c.ra();)if(f=y(c),2807729==f.id){e=za(f);break}c=e/1E9}else c=null;c=c?{$c:d,ed:c}:null}if(!c)return null;e=y(new x(b));if(475249515!=e.id)return null;d=c.$c;c=c.ed;for(var e=new x(e.h),f=[],g=-1,k=-1,l=0;e.ra();){var p=y(e);if(187==p.id){var n;n=new x(p.h);
p=y(n);if(179!=p.id)n=null;else if(p=za(p),n=y(n),183!=n.id)n=null;else{n=new x(n.h);for(var r=0;n.ra();){var w=y(n);if(241==w.id){r=za(w);break}}n={fd:p,Wc:r}}n&&(p=c*n.fd,n=d+n.Wc,0<=g&&(f.push(new Eb(l,g,p,k,n-1,this.Ka)),++l),g=p,k=n)}}0<=g&&f.push(new Eb(l,g,null,k,null,this.Ka));return f};function Ib(a){this.i=a}function Jb(a,b){return 0>b||b>=a.i.length?null:a.i[b]}function Kb(a,b,c){var d=Lb(a,b);if(0>d)return null;for(var e=[];d<a.i.length;d++){e.push(a.i[d]);var f=a.i[d].endTime;if(!f||f>b+c)break}return new Fb(e)}function Lb(a,b){for(var c=0;c<a.i.length;c++)if(a.i[c].startTime>b)return c?c-1:0;return a.i.length-1};function N(a){this.url=a;this.o=new Mb;this.Ya=this.mc=this.Vb=0;this.n=null;this.v=new s;this.pa=null}function Mb(){this.body=null;this.bc=1;this.rc=1E3;this.Yc=2;this.Zc=.5;this.Xc=0;this.method="GET";this.responseType="arraybuffer";this.Nb={};this.withCredentials=!1}function Nb(a){Ob(a);a.o.body=null;a.v=null;a.pa=null}function Ob(a){a.n&&(a.n.onload=null,a.n.onerror=null);a.n=null}
HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=db,window.MediaKeys=eb,window.MediaKeySystemAccess=fb))});var rb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function L(a){var b;a instanceof L?(sb(this,a.oa),this.Ba=a.Ba,this.ga=a.ga,tb(this,a.La),this.Z=a.Z,ub(this,a.wa.clone()),this.ra=a.ra):a&&(b=String(a).match(rb))?(sb(this,b[1]||"",!0),this.Ba=vb(b[2]||""),this.ga=vb(b[3]||"",!0),tb(this,b[4]),this.Z=vb(b[5]||"",!0),ub(this,b[6]||"",!0),this.ra=vb(b[7]||"")):this.wa=new wb(null)}h=L.prototype;h.oa="";h.Ba="";h.ga="";h.La=null;h.Z="";h.ra="";
h.toString=function(){var a=[],b=this.oa;b&&a.push(xb(b,yb,!0),":");if(b=this.ga){a.push("//");var c=this.Ba;c&&a.push(xb(c,yb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.La;null!=b&&a.push(":",String(b))}if(b=this.Z)this.ga&&"/"!=b.charAt(0)&&a.push("/"),a.push(xb(b,"/"==b.charAt(0)?zb:Ab,!0));(b=this.wa.toString())&&a.push("?",b);(b=this.ra)&&a.push("#",xb(b,Bb));return a.join("")};
h.resolve=function(a){var b=this.clone(),c=!!a.oa;c?sb(b,a.oa):c=!!a.Ba;c?b.Ba=a.Ba:c=!!a.ga;c?b.ga=a.ga:c=null!=a.La;var d=a.Z;if(c)tb(b,a.La);else if(c=!!a.Z){if("/"!=d.charAt(0))if(this.ga&&!this.Z)d="/"+d;else{var e=b.Z.lastIndexOf("/");-1!=e&&(d=b.Z.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){for(var e=0==d.lastIndexOf("/",0),d=d.split("/"),f=[],g=0;g<d.length;){var k=d[g++];"."==k?e&&g==d.length&&f.push(""):".."==k?((1<f.length||1==f.length&&""!=
f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(k),e=!0)}d=f.join("/")}}c?b.Z=d:c=""!==a.wa.toString();c?ub(b,a.wa.clone()):c=!!a.ra;c&&(b.ra=a.ra);return b};h.clone=function(){return new L(this)};function sb(a,b,c){a.oa=c?vb(b,!0):b;a.oa&&(a.oa=a.oa.replace(/:$/,""))}function tb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.La=b}else a.La=null}function ub(a,b,c){b instanceof wb?a.wa=b:(c||(b=xb(b,Cb)),a.wa=new wb(b))}
function vb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function xb(a,b,c){return"string"==typeof a?(a=encodeURI(a).replace(b,Db),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Db(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var yb=/[#\/\?@]/g,Ab=/[\#\?:]/g,zb=/[\#\?]/g,Cb=/[\#\?@]/g,Bb=/#/g;function wb(a){this.la=a||null}h=wb.prototype;h.Q=null;h.ib=null;
h.add=function(a,b){if(!this.Q&&(this.Q={},this.ib=0,this.la))for(var c=this.la.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null,g=null;0<=e?(f=c[d].substring(0,e),g=c[d].substring(e+1)):f=c[d];f=decodeURIComponent(f.replace(/\+/g," "));g=g||"";this.add(f,decodeURIComponent(g.replace(/\+/g," ")))}this.la=null;(c=this.Q.hasOwnProperty(a)&&this.Q[a])||(this.Q[a]=c=[]);c.push(b);this.ib++;return this};
h.toString=function(){if(this.la)return this.la;if(!this.Q)return"";var a=[],b;for(b in this.Q)for(var c=encodeURIComponent(b),d=this.Q[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.la=a.join("&")};h.clone=function(){var a=new wb;a.la=this.la;if(this.Q){var b={},c;for(c in this.Q)b[c]=this.Q[c].concat();a.Q=b;a.ib=this.ib}return a};function Eb(a,b,c,d,e,f){this.index=a;this.startTime=b;this.endTime=c;this.Pa=d;this.Ta=e;this.url=f};function Fb(a){this.Vc=a};function Gb(a){this.Ka=a}Gb.prototype.parse=function(a,b,c){a=null;try{a=this.Mb(b,c)}catch(d){if(!(d instanceof RangeError))throw d;}return a};
Gb.prototype.Mb=function(a,b){var c=new ta(a,ua),d=[],e=G(c);if(1936286840!=G(c))return null;1==e&&(e=Wa(c));var f=ya(c);z(c,3);z(c,4);var g=G(c);if(0==g)return null;var k,l;0==f?(k=G(c),l=G(c)):(k=Wa(c),l=Wa(c));z(c,2);f=c.h.getUint16(c.f,c.Ib);c.f+=2;e=b+e+l;for(l=0;l<f;l++){var p=G(c),n=(p&2147483648)>>>31,p=p&2147483647,r=G(c);G(c);if(1==n)return null;d.push(new Eb(l,k/g,(k+r)/g,e,e+p-1,this.Ka));k+=r;e+=p}return d};function Hb(a){this.Ka=a}Hb.prototype.parse=function(a,b){var c=null;try{c=this.Mb(a,b)}catch(d){if(!(d instanceof RangeError))throw d;}return c};
Hb.prototype.Mb=function(a,b){var c;var d=new x(a);if(440786851!=y(d).id)c=null;else if(c=y(d),408125543!=c.id)c=null;else{d=c.h.byteOffset;c=new x(c.h);for(var e=null;c.sa();){var f=y(c);if(357149030==f.id){e=f;break}}if(e){c=new x(e.h);for(e=1E6;c.sa();)if(f=y(c),2807729==f.id){e=za(f);break}c=e/1E9}else c=null;c=c?{$c:d,ed:c}:null}if(!c)return null;e=y(new x(b));if(475249515!=e.id)return null;d=c.$c;c=c.ed;for(var e=new x(e.h),f=[],g=-1,k=-1,l=0;e.sa();){var p=y(e);if(187==p.id){var n;n=new x(p.h);
p=y(n);if(179!=p.id)n=null;else if(p=za(p),n=y(n),183!=n.id)n=null;else{n=new x(n.h);for(var r=0;n.sa();){var w=y(n);if(241==w.id){r=za(w);break}}n={fd:p,Wc:r}}n&&(p=c*n.fd,n=d+n.Wc,0<=g&&(f.push(new Eb(l,g,p,k,n-1,this.Ka)),++l),g=p,k=n)}}0<=g&&f.push(new Eb(l,g,null,k,null,this.Ka));return f};function Ib(a){this.i=a}function Jb(a,b){return 0>b||b>=a.i.length?null:a.i[b]}function Kb(a,b,c){var d=Lb(a,b);if(0>d)return null;for(var e=[];d<a.i.length;d++){e.push(a.i[d]);var f=a.i[d].endTime;if(!f||f>b+c)break}return new Fb(e)}function Lb(a,b){for(var c=0;c<a.i.length;c++)if(a.i[c].startTime>b)return c?c-1:0;return a.i.length-1};function N(a){this.url=a;this.o=new Mb;this.Ya=this.mc=this.Vb=0;this.n=null;this.v=new s;this.qa=null}function Mb(){this.body=null;this.bc=1;this.rc=1E3;this.Yc=2;this.Zc=.5;this.Xc=0;this.method="GET";this.responseType="arraybuffer";this.Ob={};this.withCredentials=!1}function Nb(a){Ob(a);a.o.body=null;a.v=null;a.qa=null}function Ob(a){a.n&&(a.n.onload=null,a.n.onerror=null);a.n=null}
N.prototype.ub=function(){if(this.n)return this.v;if(0==this.url.lastIndexOf("data:",0)){var a=this.url.split(":")[1].split(";").pop().split(","),b=a.pop(),b="base64"==a.pop()?window.atob(b.replace(/-/g,"+").replace(/_/g,"/")):window.decodeURIComponent(b);"arraybuffer"==this.o.responseType&&(b=v(b).buffer);a=JSON.parse(JSON.stringify(new XMLHttpRequest));a.response=b;a.responseText=b.toString();b=this.v;b.resolve(a);Nb(this);return b}this.Vb++;this.mc=Date.now();this.Ya||(this.Ya=this.o.rc);this.n=
new XMLHttpRequest;a=this.url;this.pa&&(a=new L(a),a.wa.add("_",Date.now()),a=a.toString());this.n.open(this.o.method,a,!0);this.n.responseType=this.o.responseType;this.n.timeout=this.o.Xc;this.n.withCredentials=this.o.withCredentials;this.n.onload=this.Jc.bind(this);this.n.onerror=this.Jb.bind(this);for(b in this.o.Nb)this.n.setRequestHeader(b,this.o.Nb[b]);this.n.send(this.o.body);return this.v};
new XMLHttpRequest;a=this.url;this.qa&&(a=new L(a),a.wa.add("_",Date.now()),a=a.toString());this.n.open(this.o.method,a,!0);this.n.responseType=this.o.responseType;this.n.timeout=this.o.Xc;this.n.withCredentials=this.o.withCredentials;this.n.onload=this.Jc.bind(this);this.n.onerror=this.Kb.bind(this);for(b in this.o.Ob)this.n.setRequestHeader(b,this.o.Ob[b]);this.n.send(this.o.body);return this.v};
function Pb(a,b,c){b=Error(b);b.type=c;b.status=a.n.status;b.url=a.url;b.method=a.o.method;b.body=a.o.body;b.gd=a.n;return b}N.prototype.abort=function(){if(this.n&&this.n.readyState!=XMLHttpRequest.DONE){this.n.abort();var a=Pb(this,"Request aborted.","aborted");this.v.reject(a);Nb(this)}};
N.prototype.Jc=function(a){this.pa&&this.pa.tb(Date.now()-this.mc,a.loaded);200<=this.n.status&&299>=this.n.status?(this.v.resolve(this.n),Nb(this)):this.Vb<this.o.bc?(Ob(this),window.setTimeout(this.ub.bind(this),this.Ya*(1+(2*Math.random()-1)*this.o.Zc)),this.Ya*=this.o.Yc):(a=Pb(this,"HTTP error.","net"),this.v.reject(a),Nb(this))};N.prototype.Jb=function(){var a=Pb(this,"Network failure.","net");this.v.reject(a);Nb(this)};function Qb(a,b,c){N.call(this,a);this.o.body=b;this.o.method="POST";this.o.bc=3;this.o.withCredentials=c}q(Qb,N);Qb.prototype.send=function(){return this.ub().then(function(a){return Promise.resolve(new Uint8Array(a.response))})};function O(a){F.call(this,null);this.a=a;this.G=this.pb=this.d=null;this.b=new H;this.rb={};this.Ea=[];this.vb=[];this.sa="en";this.cb=this.sb=null;this.Ra=!1;this.L=new Ba;this.Ca=!0}q(O,F);m("shaka.player.Player",O);O.version="v1.2.3";
N.prototype.Jc=function(a){this.qa&&this.qa.tb(Date.now()-this.mc,a.loaded);200<=this.n.status&&299>=this.n.status?(this.v.resolve(this.n),Nb(this)):this.Vb<this.o.bc?(Ob(this),window.setTimeout(this.ub.bind(this),this.Ya*(1+(2*Math.random()-1)*this.o.Zc)),this.Ya*=this.o.Yc):(a=Pb(this,"HTTP error.","net"),this.v.reject(a),Nb(this))};N.prototype.Kb=function(){var a=Pb(this,"Network failure.","net");this.v.reject(a);Nb(this)};function Qb(a,b,c){N.call(this,a);this.o.body=b;this.o.method="POST";this.o.bc=3;this.o.withCredentials=c}q(Qb,N);Qb.prototype.send=function(){return this.ub().then(function(a){return Promise.resolve(new Uint8Array(a.response))})};function O(a){F.call(this,null);this.a=a;this.G=this.pb=this.d=null;this.b=new H;this.rb={};this.Ea=[];this.vb=[];this.ia="en";this.cb=this.sb=null;this.Ra=!1;this.L=new Ba;this.Ca=!0}q(O,F);m("shaka.player.Player",O);O.version="v1.2.4";
O.isBrowserSupported=function(){return!!window.MediaSource&&!!window.MediaKeys&&!!window.navigator&&!!window.navigator.requestMediaKeySystemAccess&&!!window.MediaKeySystemAccess&&!!window.MediaKeySystemAccess.prototype.getConfiguration&&!!window.Promise&&!!HTMLVideoElement.prototype.getVideoPlaybackQuality&&!!Element.prototype.requestFullscreen&&!!document.exitFullscreen&&"fullscreenElement"in document&&!!document.body.children};
function Rb(a){return"text/vtt"==a?!!window.VTTCue:MediaSource.isTypeSupported(a)}O.isTypeSupported=Rb;O.prototype.u=function(){this.Sb().catch(function(){});this.b.u();this.a=this.b=null};O.prototype.destroy=O.prototype.u;
O.prototype.Sb=function(){this.a.pause();Ya(this.b);Sb(this);Tb(this);for(var a=0;a<this.vb.length;++a)this.vb[a].close().catch(function(){});this.vb=[];this.Ea=[];this.G=this.pb=null;this.a.src="";a=this.a.setMediaKeys(null);this.d&&(this.d.u(),this.d=null);this.Ra=!1;this.rb={};this.L=new Ba;return a};O.prototype.unload=O.prototype.Sb;
O.prototype.load=function(a){var b=this.d?this.Sb():Promise.resolve();this.a.autoplay&&(J("load"),I(this.b,this.a,"timeupdate",this.Hc.bind(this)));a.ja(this.Ca);return b.then(t(this,function(){return a.load(this.sa)})).then(t(this,function(){this.d=a;var b;b=new Aa;for(var d=this.d.lb(),e=0;e<d.length;++e){var f=d[e];f.ha.keySystem||f.la&&!Rb(f.la)||b.push(f.contentType,f)}for(var e={},f=!1,g=0;g<d.length;++g){var k=d[g];if(k.ha.keySystem&&!b.has(k.contentType)){var l=k.ha.keySystem,p=e[l];p||(p=
e[l]={audioCapabilities:void 0,videoCapabilities:void 0,initDataTypes:void 0,distinctiveIdentifier:"optional",persistentState:"optional"});k.la&&(l=k.contentType+"Capabilities",l in p&&(f=!0,p[l]||(p[l]=[]),p[l].push({contentType:k.la})))}}f||(this.G=d[0].ha);0==Object.keys(e).length?(this.d.$a(b),b=Promise.resolve()):(f=new s,e=Ub(e,f),e=e.then(this.sc.bind(this,d,b)),e=e.then(this.dd.bind(this)),f.reject(null),b=e);return b})).then(t(this,function(){I(this.b,this.a,"error",this.Jb.bind(this));I(this.b,
this.a,"play",this.Mc.bind(this));I(this.b,this.a,"playing",this.Nc.bind(this));I(this.b,this.a,"seeking",this.Kb.bind(this));I(this.b,this.a,"pause",this.Lc.bind(this));I(this.b,this.a,"ended",this.Gc.bind(this));return this.d.fb(this,this.a)})).then(t(this,function(){for(var a=0;a<this.Ea.length;++a)this.dc(this.Ea[a]);return Promise.resolve()})).catch(t(this,function(b){a.u();this.d=null;var d=D(b);this.dispatchEvent(d);return Promise.reject(b)}))};O.prototype.load=O.prototype.load;
function Ub(a,b){for(var c in a){var d=a[c];b=b.catch(function(){return navigator.requestMediaKeySystemAccess(c,[d])})}return b}h=O.prototype;h.sc=function(a,b,c){for(var d=c.keySystem,e=c.getConfiguration(),f=["audio","video"],g=0;g<f.length;++g){var k=f[g];if(!b.has(k)){var l=e[k+"Capabilities"];if(l&&l.length){for(var l=l[0],p=[],n=0;n<a.length;++n){var r=a[n];if(r.ha.keySystem==d&&r.la==l.contentType){p.push(r);this.G=this.G?La(this.G,r.ha):r.ha;break}}b.set(k,p)}}}this.d.$a(b);return c.createMediaKeys()};
O.prototype.load=function(a){var b=this.d?this.Sb():Promise.resolve();this.a.autoplay&&(J("load"),I(this.b,this.a,"timeupdate",this.Hc.bind(this)));a.ka(this.Ca);return b.then(t(this,function(){return a.load(this.ia)})).then(t(this,function(){this.d=a;var b;b=new Aa;for(var d=this.d.lb(),e=0;e<d.length;++e){var f=d[e];f.ha.keySystem||f.ma&&!Rb(f.ma)||b.push(f.contentType,f)}for(var e={},f=!1,g=0;g<d.length;++g){var k=d[g];if(k.ha.keySystem&&!b.has(k.contentType)){var l=k.ha.keySystem,p=e[l];p||(p=
e[l]={audioCapabilities:void 0,videoCapabilities:void 0,initDataTypes:void 0,distinctiveIdentifier:"optional",persistentState:"optional"});k.ma&&(l=k.contentType+"Capabilities",l in p&&(f=!0,p[l]||(p[l]=[]),p[l].push({contentType:k.ma})))}}f||(this.G=d[0].ha);0==Object.keys(e).length?(this.d.$a(b),b=Promise.resolve()):(f=new s,e=Ub(e,f),e=e.then(this.sc.bind(this,d,b)),e=e.then(this.dd.bind(this)),f.reject(null),b=e);return b})).then(t(this,function(){I(this.b,this.a,"error",this.Kb.bind(this));I(this.b,
this.a,"play",this.Mc.bind(this));I(this.b,this.a,"playing",this.Nc.bind(this));I(this.b,this.a,"seeking",this.Lb.bind(this));I(this.b,this.a,"pause",this.Lc.bind(this));I(this.b,this.a,"ended",this.Gc.bind(this));return this.d.fb(this,this.a)})).then(t(this,function(){for(var a=0;a<this.Ea.length;++a)this.dc(this.Ea[a]);return Promise.resolve()})).catch(t(this,function(b){a.u();this.d=null;var d=D(b);this.dispatchEvent(d);return Promise.reject(b)}))};O.prototype.load=O.prototype.load;
function Ub(a,b){for(var c in a){var d=a[c];b=b.catch(function(){return navigator.requestMediaKeySystemAccess(c,[d])})}return b}h=O.prototype;h.sc=function(a,b,c){for(var d=c.keySystem,e=c.getConfiguration(),f=["audio","video"],g=0;g<f.length;++g){var k=f[g];if(!b.has(k)){var l=e[k+"Capabilities"];if(l&&l.length){for(var l=l[0],p=[],n=0;n<a.length;++n){var r=a[n];if(r.ha.keySystem==d&&r.ma==l.contentType){p.push(r);this.G=this.G?La(this.G,r.ha):r.ha;break}}b.set(k,p)}}}this.d.$a(b);return c.createMediaKeys()};
h.dd=function(a){this.pb=a;return this.a.setMediaKeys(this.pb).then(t(this,function(){this.Ea=[];for(var a=0;a<this.G.Ga.length;++a){var c=this.G.Ga[a];this.Ea.push({type:"encrypted",initDataType:c.initDataType,initData:c.initData})}0==this.Ea.length&&I(this.b,this.a,"encrypted",this.dc.bind(this))}))};
h.dc=function(a){var b=new Uint8Array(a.initData),c=Array.prototype.join.apply(b);this.G.nc&&(c="first");this.rb[c]||(b=this.pb.createSession(),this.vb.push(b),I(this.b,b,"message",this.Oc.bind(this)),I(this.b,b,"keystatuseschange",this.Ic.bind(this)),a=b.generateRequest(a.initDataType,a.initData),this.rb[c]=!0,a.catch(t(this,function(a){this.rb[c]=!1;a=D(a);this.dispatchEvent(a)})))};h.Oc=function(a){Vb(this,a.target,this.G.$b,a.message,this.G.withCredentials,this.G.Zb)};
h.Ic=function(a){var b=a.target.keyStatuses.values();for(a=b.next();!a.done;a=b.next()){var c=Wb[a.value];c&&(c=Error(c),c.type=a.value,a=D(c),this.dispatchEvent(a))}};function Vb(a,b,c,d,e,f){(new Qb(c,d,e)).send().then(t(a,function(a){if(f){var c=new Ja;a=f(a,c);this.d.xb(c)}return b.update(a)})).then(function(){}).catch(t(a,function(a){a.kd=b;a=D(a);this.dispatchEvent(a)}))}h.Hc=function(){K("load");this.L.playbackLatency=Fa("load")/1E3;this.b.ab(this.a,"timeupdate")};
h.Jb=function(a){this.a.error&&(a=this.a.error.code,a!=MediaError.MEDIA_ERR_ABORTED&&(a=Error(Xb[a]||"Unknown playback error."),a.type="playback",a=D(a),this.dispatchEvent(a)))};h.Mc=function(){};h.Nc=function(){J("playing");Sb(this);this.cb=window.setTimeout(this.fc.bind(this),100)};h.Kb=function(){Sb(this);this.Ra=!1};h.Lc=function(){K("playing");Ea(this.L)};h.Gc=function(){this.getStats();Sb(this)};
h.Kb=function(a){this.a.error&&(a=this.a.error.code,a!=MediaError.MEDIA_ERR_ABORTED&&(a=Error(Xb[a]||"Unknown playback error."),a.type="playback",a=D(a),this.dispatchEvent(a)))};h.Mc=function(){};h.Nc=function(){J("playing");Sb(this);this.cb=window.setTimeout(this.fc.bind(this),100)};h.Lb=function(){Sb(this);this.Ra=!1};h.Lc=function(){K("playing");Ea(this.L)};h.Gc=function(){this.getStats();Sb(this)};
h.getStats=function(){this.a.paused||(K("playing"),Ea(this.L),J("playing"));var a=this.L,b=this.a.getVideoPlaybackQuality();b&&(a.decodedFrames=b.totalVideoFrames,a.droppedFrames=b.droppedVideoFrames);return this.L};O.prototype.getStats=O.prototype.getStats;O.prototype.wc=function(){var a=this.a.videoWidth,b=this.a.videoHeight;return a&&b?{width:a,height:b}:null};O.prototype.getCurrentResolution=O.prototype.wc;O.prototype.getVideoTracks=function(){return this.d?this.d.getVideoTracks():[]};
O.prototype.getVideoTracks=O.prototype.getVideoTracks;O.prototype.getAudioTracks=function(){return this.d?this.d.getAudioTracks():[]};O.prototype.getAudioTracks=O.prototype.getAudioTracks;O.prototype.Fa=function(){return this.d?this.d.Fa():[]};O.prototype.getTextTracks=O.prototype.Fa;O.prototype.za=function(a,b){return this.d?this.d.za(a,void 0==b?!0:b):!1};O.prototype.selectVideoTrack=O.prototype.za;O.prototype.Na=function(a){return this.d?this.d.Na(a,!1):!1};O.prototype.selectAudioTrack=O.prototype.Na;
O.prototype.Oa=function(a){return this.d?this.d.Oa(a,!1):!1};O.prototype.selectTextTrack=O.prototype.Oa;O.prototype.oa=function(a){this.d&&this.d.oa(a)};O.prototype.enableTextTrack=O.prototype.oa;O.prototype.ja=function(a){this.Ca=a;this.d&&this.d.ja(a)};O.prototype.enableAdaptation=O.prototype.ja;O.prototype.vc=function(){return this.Ca};O.prototype.getAdaptationEnabled=O.prototype.vc;O.prototype.xc=function(){return this.a.currentTime};O.prototype.getCurrentTime=O.prototype.xc;O.prototype.yc=function(){return this.a.duration};
O.prototype.Oa=function(a){return this.d?this.d.Oa(a,!1):!1};O.prototype.selectTextTrack=O.prototype.Oa;O.prototype.pa=function(a){this.d&&this.d.pa(a)};O.prototype.enableTextTrack=O.prototype.pa;O.prototype.ka=function(a){this.Ca=a;this.d&&this.d.ka(a)};O.prototype.enableAdaptation=O.prototype.ka;O.prototype.vc=function(){return this.Ca};O.prototype.getAdaptationEnabled=O.prototype.vc;O.prototype.xc=function(){return this.a.currentTime};O.prototype.getCurrentTime=O.prototype.xc;O.prototype.yc=function(){return this.a.duration};
O.prototype.getDuration=O.prototype.yc;O.prototype.zc=function(){return this.a.muted};O.prototype.getMuted=O.prototype.zc;O.prototype.Ac=function(){return this.a.volume};O.prototype.getVolume=O.prototype.Ac;O.prototype.play=function(){this.kc(1);this.a.play()};O.prototype.play=O.prototype.play;O.prototype.pause=function(){this.a.pause()};O.prototype.pause=O.prototype.pause;O.prototype.requestFullscreen=function(){this.a.requestFullscreen()};O.prototype.requestFullscreen=O.prototype.requestFullscreen;
O.prototype.seek=function(a){this.a.currentTime=a};O.prototype.seek=O.prototype.seek;O.prototype.ad=function(a){this.a.muted=a};O.prototype.setMuted=O.prototype.ad;O.prototype.cd=function(a){this.a.volume=a};O.prototype.setVolume=O.prototype.cd;O.prototype.bd=function(a){this.sa=E(a)};O.prototype.setPreferredLanguage=O.prototype.bd;O.prototype.kc=function(a){Tb(this);0<=a?this.a.playbackRate=a:(this.a.playbackRate=0,this.ec(this.a.currentTime,Date.now(),a))};O.prototype.setPlaybackRate=O.prototype.kc;
O.prototype.seek=function(a){this.a.currentTime=a};O.prototype.seek=O.prototype.seek;O.prototype.ad=function(a){this.a.muted=a};O.prototype.setMuted=O.prototype.ad;O.prototype.cd=function(a){this.a.volume=a};O.prototype.setVolume=O.prototype.cd;O.prototype.bd=function(a){this.ia=E(a)};O.prototype.setPreferredLanguage=O.prototype.bd;O.prototype.kc=function(a){Tb(this);0<=a?this.a.playbackRate=a:(this.a.playbackRate=0,this.ec(this.a.currentTime,Date.now(),a))};O.prototype.setPlaybackRate=O.prototype.kc;
function Tb(a){a.sb&&(window.clearTimeout(a.sb),a.sb=null)}function Sb(a){a.cb&&(window.clearTimeout(a.cb),a.cb=null)}O.prototype.ec=function(a,b,c){this.a.currentTime=a+(Date.now()-b)/1E3*c;this.sb=window.setTimeout(this.ec.bind(this,a,b,c),100)};
O.prototype.fc=function(){this.cb=window.setTimeout(this.fc.bind(this),100);var a=this.a.buffered,a=a.length?a.end(a.length-1):0,a=this.a.currentTime-a;this.Ra?a<-this.d.mb()&&(K("buffering"),a=this.L,a.bufferingTime+=Fa("buffering")/1E3,this.Ra=!1,this.dispatchEvent(B({type:"bufferingEnd"})),this.a.play()):.05<a&&(this.Ra=!0,this.a.pause(),this.L.bufferingHistory.push(Date.now()/1E3),J("buffering"),this.dispatchEvent(B({type:"bufferingStart"})))};
var Wb={"output-not-allowed":"The required output protection is not available.",expired:"A required key has expired and the content cannot be decrypted.","internal-error":"An unknown error has occurred in the CDM."},Xb={2:"A network failure occured while loading media content.",3:"The browser failed to decode the media content.",4:"The browser does not support the media content."};function Yb(){}Yb.prototype.Mb=function(a){for(var b=0;b<a.length;++b)for(var c=a[b],d=0;d<c.N.length;++d){for(var e=c.N[d],f=e,g=0;g<f.j.length;++g)Rb(da(f.j[g]))||(f.j.splice(g,1),--g);0==e.j.length&&(c.N.splice(d,1),--d)}for(b=0;b<a.length;++b)for(c=a[b],d=0;d<c.N.length;++d)c.N[d].j.sort(Zb)};function Zb(a,b){var c=a.bandwidth||Number.MAX_VALUE,d=b.bandwidth||Number.MAX_VALUE;return c<d?-1:c>d?1:0};function $b(a,b){this.A=a;this.d=b;this.b=new H;this.Wa=Date.now()/1E3+4;this.Wb=!0;I(this.b,this.A,"bandwidth",this.Ib.bind(this));I(this.b,this.d,"adaptation",this.Fc.bind(this))}$b.prototype.u=function(){this.b.u();this.d=this.A=this.b=null};$b.prototype.enable=function(a){this.Wb=a};$b.prototype.Ib=function(){if(this.Wb){var a=Date.now()/1E3;if(!(a<this.Wa)){var b=ac(this);if(b){if(b.active){this.Wa=a+3;return}this.d.za(b.id,!1)}this.Wa=Number.POSITIVE_INFINITY}}};
var Wb={"output-not-allowed":"The required output protection is not available.",expired:"A required key has expired and the content cannot be decrypted.","internal-error":"An unknown error has occurred in the CDM."},Xb={2:"A network failure occured while loading media content.",3:"The browser failed to decode the media content.",4:"The browser does not support the media content."};function Yb(){}Yb.prototype.Nb=function(a){for(var b=0;b<a.length;++b)for(var c=a[b],d=0;d<c.N.length;++d){for(var e=c.N[d],f=e,g=0;g<f.j.length;++g)Rb(da(f.j[g]))||(f.j.splice(g,1),--g);0==e.j.length&&(c.N.splice(d,1),--d)}for(b=0;b<a.length;++b)for(c=a[b],d=0;d<c.N.length;++d)c.N[d].j.sort(Zb)};function Zb(a,b){var c=a.bandwidth||Number.MAX_VALUE,d=b.bandwidth||Number.MAX_VALUE;return c<d?-1:c>d?1:0};function $b(a,b){this.A=a;this.d=b;this.b=new H;this.Wa=Date.now()/1E3+4;this.Wb=!0;I(this.b,this.A,"bandwidth",this.Jb.bind(this));I(this.b,this.d,"adaptation",this.Fc.bind(this))}$b.prototype.u=function(){this.b.u();this.d=this.A=this.b=null};$b.prototype.enable=function(a){this.Wb=a};$b.prototype.Jb=function(){if(this.Wb){var a=Date.now()/1E3;if(!(a<this.Wa)){var b=ac(this);if(b){if(b.active){this.Wa=a+3;return}this.d.za(b.id,!1)}this.Wa=Number.POSITIVE_INFINITY}}};
$b.prototype.Fc=function(){this.Wa==Number.POSITIVE_INFINITY&&(this.Wa=Date.now()/1E3+30)};
function ac(a){var b=a.d.getVideoTracks();if(0==b.length)return null;b.sort(ma);var c;a:{c=a.d.getAudioTracks();for(var d=0;d<c.length;++d)if(c[d].active){c=c[d];break a}c=null}c=c?c.bandwidth:0;a=Ua(a.A);for(var d=b[0],e=0;e<b.length;++e){var f=b[e],g=e+1<b.length?b[e+1]:{bandwidth:Number.POSITIVE_INFINITY};if(f.bandwidth&&(g=(g.bandwidth+c)/.85,a>=(f.bandwidth+c)/.95&&a<=g&&(d=f,d.active)))break}return d};function bc(a,b,c){F.call(this,null);this.Ka=a;this.oc=b;this.G=c?c:Ka();this.da=null}q(bc,F);m("shaka.player.HttpVideoSource",bc);h=bc.prototype;h.u=function(){this.da&&(this.da.parentElement.removeChild(this.da),this.da=null);this.parent=this.G=null};h.fb=function(a,b){this.parent=a;var c=b.mediaKeys;b.src=this.Ka;c=b.setMediaKeys(c);this.oc&&(this.da=document.createElement("track"),this.da.src=this.oc,b.appendChild(this.da),this.da.track.mode="showing");return c};h.load=function(){return Promise.resolve()};
h.getVideoTracks=function(){return[]};h.getAudioTracks=function(){return[]};h.Fa=function(){return[]};h.mb=function(){return 5};h.lb=function(){var a=new ha;a.ha=this.G;return[a]};h.$a=function(){};h.za=function(){return!1};h.Na=function(){return!1};h.Oa=function(){return!1};h.oa=function(a){this.da&&(this.da.track.mode=a?"showing":"disabled")};h.ja=function(){};h.xb=function(){};function cc(a,b,c){N.call(this,a);if(b||c)this.o.Nb.Range="bytes="+(b+"-"+(null!=c?c:""))}q(cc,N);cc.prototype.send=function(){return this.ub().then(function(a){return Promise.resolve(a.response)})};function dc(a,b,c){this.R=a;this.ba=b;this.A=c;this.b=new H;this.Ha=[];this.e=P;this.ia=this.v=null;this.i=[];this.aa=null;this.ya=[];I(this.b,this.ba,"updateend",this.Pc.bind(this))}var P=0,ec=1/60;h=dc.prototype;h.u=function(){this.abort();this.v=this.ia=this.i=this.aa=this.ya=this.e=null;this.b.u();this.R=this.ba=this.Ha=this.b=null};
h.getVideoTracks=function(){return[]};h.getAudioTracks=function(){return[]};h.Fa=function(){return[]};h.mb=function(){return 5};h.lb=function(){var a=new ha;a.ha=this.G;return[a]};h.$a=function(){};h.za=function(){return!1};h.Na=function(){return!1};h.Oa=function(){return!1};h.pa=function(a){this.da&&(this.da.track.mode=a?"showing":"disabled")};h.ka=function(){};h.xb=function(){};function cc(a,b,c){N.call(this,a);if(b||c)this.o.Ob.Range="bytes="+(b+"-"+(null!=c?c:""))}q(cc,N);cc.prototype.send=function(){return this.ub().then(function(a){return Promise.resolve(a.response)})};function dc(a,b,c){this.R=a;this.ba=b;this.A=c;this.b=new H;this.Ha=[];this.e=P;this.ja=this.v=null;this.i=[];this.aa=null;this.ya=[];I(this.b,this.ba,"updateend",this.Pc.bind(this))}var P=0,ec=1/60;h=dc.prototype;h.u=function(){this.abort();this.v=this.ja=this.i=this.aa=this.ya=this.e=null;this.b.u();this.R=this.ba=this.Ha=this.b=null};
function fc(a,b,c){if(a.e!=P)return a=Error("Cannot fetch: previous operation not complete."),a.type="stream",Promise.reject(a);a.e=1;a.v=new s;a.i=b.Vc;c&&a.ya.push(c);b=!0;c=a.i[0].url.toString();for(var d=1;d<a.i.length;++d)if(a.i[d].url.toString()!=c){b=!1;break}(b?gc(a):hc(a)).then(t(a,function(){Ua(this.A);this.ba.appendBuffer(this.ya.shift());this.e=2;this.aa=null})).catch(t(a,function(a){"aborted"!=a.type&&ic(this,a)}));return a.v}
function gc(a){a.aa=new cc(a.i[0].url.toString(),a.i[0].Pa,a.i[a.i.length-1].Ta);a.aa.pa=a.A;return a.aa.send().then(a.zb.bind(a))}function hc(a){function b(a){this.aa=new cc(a.url.toString(),a.Pa,a.Ta);this.aa.pa=this.A;return this.aa.send()}for(var c=b.bind(a)(a.i[0]),d=a.zb.bind(a),e=1;e<a.i.length;++e)var f=b.bind(a,a.i[e]),c=c.then(d).then(f);return c=c.then(a.zb.bind(a))}h.zb=function(a){this.ya.push(a);return Promise.resolve()};
function gc(a){a.aa=new cc(a.i[0].url.toString(),a.i[0].Pa,a.i[a.i.length-1].Ta);a.aa.qa=a.A;return a.aa.send().then(a.Ab.bind(a))}function hc(a){function b(a){this.aa=new cc(a.url.toString(),a.Pa,a.Ta);this.aa.qa=this.A;return this.aa.send()}for(var c=b.bind(a)(a.i[0]),d=a.Ab.bind(a),e=1;e<a.i.length;++e)var f=b.bind(a,a.i[e]),c=c.then(d).then(f);return c=c.then(a.Ab.bind(a))}h.Ab=function(a){this.ya.push(a);return Promise.resolve()};
h.clear=function(){if(this.e!=P){var a=Error("Cannot clear: previous operation not complete.");a.type="stream";return Promise.reject(a)}if(0==this.ba.buffered.length)return Promise.resolve();try{this.ba.remove(0,Number.POSITIVE_INFINITY)}catch(b){return Promise.reject(b)}this.Ha=[];this.e=3;return this.v=new s};h.reset=function(){this.Ha=[]};
h.abort=function(){switch(this.e){case P:return Promise.resolve();case 1:this.e=4;var a=this.ia=new s;this.aa.abort();jc(this);return a;case 2:case 3:return this.e=4,this.ia=new s,"open"==this.R.readyState&&this.ba.abort(),this.ia;case 4:return this.ia}};
h.Pc=function(){switch(this.e){case 2:if(0<this.ya.length){try{this.ba.appendBuffer(this.ya.shift())}catch(a){ic(this,a)}break}for(var b=0;b<this.i.length;++b)this.Ha[this.i[b].index]=!0;this.i=[];case 3:this.e=P;this.v.resolve();this.v=null;break;case 4:jc(this)}};function jc(a){a.ia.resolve();a.ia=null;var b=Error("Current operation aborted.");b.type="aborted";ic(a,b)}function ic(a,b){a.v.reject(b);a.e=P;a.v=null;a.i=[];a.aa=null;a.ya=[]};function kc(){this.duration=this.c=this.type=this.id=null;this.t=5;this.p=[]}function lc(){this.id=null;this.t=5;this.w=this.r=this.q=this.c=this.duration=this.start=null;this.P=[]}function mc(){this.id=null;this.t=5;this.w=this.r=this.q=this.c=this.ea=this.l=this.height=this.width=this.contentType=this.lang=null;this.fa=[];this.m=[]}function nc(){this.value=null}function oc(){this.contentType=this.lang=this.id=null}
function pc(){this.lang=this.id=null;this.t=5;this.w=this.r=this.q=this.c=this.ea=this.l=this.height=this.width=this.bandwidth=null;this.fa=[];this.Va=!1}function qc(){this.value=this.schemeIdUri=null;this.children=[];this.pssh=null}function rc(){this.parsedPssh=this.psshBox=null}function Q(){this.url=null}function R(){this.D=this.c=null;this.F=1;this.W=0;this.ma=this.S=this.Eb=null}function sc(){this.$=this.url=null}function tc(){this.$=this.url=null}
function S(){this.c=null;this.F=1;this.W=0;this.T=null;this.ca=1;this.ma=null;this.B=[]}function uc(){this.duration=this.startTime=this.qb=this.D=null}function vc(){this.F=1;this.W=0;this.T=null;this.ca=1;this.Rb=this.Fb=this.nb=this.ta=null}function wc(){this.pc=[]}function xc(){this.repeat=this.duration=this.startTime=null}function yc(a,b){this.hb=a;this.end=b}kc.TAG_NAME="MPD";lc.TAG_NAME="Period";mc.TAG_NAME="AdaptationSet";nc.TAG_NAME="Role";oc.TAG_NAME="ContentComponent";pc.TAG_NAME="Representation";
h.abort=function(){switch(this.e){case P:return Promise.resolve();case 1:this.e=4;var a=this.ja=new s;this.aa.abort();jc(this);return a;case 2:case 3:return this.e=4,this.ja=new s,"open"==this.R.readyState&&this.ba.abort(),this.ja;case 4:return this.ja}};
h.Pc=function(){switch(this.e){case 2:if(0<this.ya.length){try{this.ba.appendBuffer(this.ya.shift())}catch(a){ic(this,a)}break}for(var b=0;b<this.i.length;++b)this.Ha[this.i[b].index]=!0;this.i=[];case 3:this.e=P;this.v.resolve();this.v=null;break;case 4:jc(this)}};function jc(a){a.ja.resolve();a.ja=null;var b=Error("Current operation aborted.");b.type="aborted";ic(a,b)}function ic(a,b){a.v.reject(b);a.e=P;a.v=null;a.i=[];a.aa=null;a.ya=[]};function kc(){this.duration=this.c=this.type=this.id=null;this.t=5;this.p=[]}function lc(){this.id=null;this.t=5;this.w=this.r=this.q=this.c=this.duration=this.start=null;this.P=[]}function mc(){this.id=null;this.t=5;this.w=this.r=this.q=this.c=this.ea=this.l=this.height=this.width=this.contentType=this.lang=null;this.fa=[];this.m=[]}function nc(){this.value=null}function oc(){this.contentType=this.lang=this.id=null}
function pc(){this.lang=this.id=null;this.t=5;this.w=this.r=this.q=this.c=this.ea=this.l=this.height=this.width=this.bandwidth=null;this.fa=[];this.Va=!1}function qc(){this.value=this.schemeIdUri=null;this.children=[];this.pssh=null}function rc(){this.parsedPssh=this.psshBox=null}function Q(){this.url=null}function R(){this.D=this.c=null;this.F=1;this.W=0;this.na=this.S=this.Fb=null}function sc(){this.$=this.url=null}function tc(){this.$=this.url=null}
function S(){this.c=null;this.F=1;this.W=0;this.T=null;this.ca=1;this.na=null;this.B=[]}function uc(){this.duration=this.startTime=this.qb=this.D=null}function vc(){this.F=1;this.W=0;this.T=null;this.ca=1;this.Rb=this.Gb=this.nb=this.ta=null}function wc(){this.pc=[]}function xc(){this.repeat=this.duration=this.startTime=null}function yc(a,b){this.hb=a;this.end=b}kc.TAG_NAME="MPD";lc.TAG_NAME="Period";mc.TAG_NAME="AdaptationSet";nc.TAG_NAME="Role";oc.TAG_NAME="ContentComponent";pc.TAG_NAME="Representation";
qc.TAG_NAME="ContentProtection";rc.TAG_NAME="cenc:pssh";Q.TAG_NAME="BaseURL";R.TAG_NAME="SegmentBase";sc.TAG_NAME="RepresentationIndex";tc.TAG_NAME="Initialization";S.TAG_NAME="SegmentList";uc.TAG_NAME="SegmentURL";vc.TAG_NAME="SegmentTemplate";wc.TAG_NAME="SegmentTimeline";xc.TAG_NAME="S";

@@ -77,9 +78,9 @@ kc.prototype.parse=function(a,b){this.id=T(b,"id",U);this.type=T(b,"type",U);this.duration=T(b,"mediaPresentationDuration",zc);this.t=T(b,"minBufferTime",zc)||5;var c=V(this,b,Q);this.c=W(a.c,c?c.url:null);this.p=X(this,b,lc)};lc.prototype.parse=function(a,b){this.id=T(b,"id",U);this.start=T(b,"start",zc);this.duration=T(b,"duration",zc);this.t=a.t;var c=V(this,b,Q);this.c=W(a.c,c?c.url:null);this.q=V(this,b,R);this.r=V(this,b,S);this.w=V(this,b,vc);this.P=X(this,b,mc)};

qc.prototype.parse=function(a,b){this.schemeIdUri=T(b,"schemeIdUri",U);this.value=T(b,"value",U);this.pssh=V(this,b,rc);this.children=b.children};rc.prototype.parse=function(a,b){var c=Ac(b);if(c){this.psshBox=qa(c);try{this.parsedPssh=new $a(this.psshBox)}catch(d){if(!(d instanceof RangeError))throw d;}}};Q.prototype.parse=function(a,b){this.url=Ac(b)};
R.prototype.parse=function(a,b){this.D=this.c=a.c;this.F=T(b,"timescale",Y)||1;this.W=T(b,"presentationTimeOffset",$)||0;this.Eb=T(b,"indexRange",Bc);this.S=V(this,b,sc);this.ma=V(this,b,tc);this.S?this.S.$||(this.S.$=this.Eb):(this.S=new sc,this.S.url=this.c,this.S.$=this.Eb)};sc.prototype.parse=function(a,b){var c=T(b,"sourceURL",U);this.url=W(a.c,c);this.$=T(b,"range",Bc)};tc.prototype.parse=function(a,b){var c=T(b,"sourceURL",U);this.url=W(a.c,c);this.$=T(b,"range",Bc)};
S.prototype.parse=function(a,b){this.c=a.c;this.F=T(b,"timescale",Y)||1;this.W=T(b,"presentationTimeOffset",$)||0;this.T=T(b,"duration",$);this.ca=T(b,"startNumber",Y)||1;this.ma=V(this,b,tc);this.B=X(this,b,uc)};uc.prototype.parse=function(a,b){var c=T(b,"media",U);this.D=W(a.c,c);this.qb=T(b,"mediaRange",Bc)};
vc.prototype.parse=function(a,b){this.F=T(b,"timescale",Y)||1;this.W=T(b,"presentationTimeOffset",$)||0;this.T=T(b,"duration",$);this.ca=T(b,"startNumber",Y)||1;this.ta=T(b,"media",U);this.nb=T(b,"index",U);this.Fb=T(b,"initialization",U);this.Rb=V(this,b,wc)};wc.prototype.parse=function(a,b){this.pc=X(this,b,xc)};xc.prototype.parse=function(a,b){this.startTime=T(b,"t",$);this.duration=T(b,"d",$);this.repeat=T(b,"r",$)};function W(a,b){var c=b?new L(b):null;return a?c?a.resolve(c):a:c}
R.prototype.parse=function(a,b){this.D=this.c=a.c;this.F=T(b,"timescale",Y)||1;this.W=T(b,"presentationTimeOffset",$)||0;this.Fb=T(b,"indexRange",Bc);this.S=V(this,b,sc);this.na=V(this,b,tc);this.S?this.S.$||(this.S.$=this.Fb):(this.S=new sc,this.S.url=this.c,this.S.$=this.Fb)};sc.prototype.parse=function(a,b){var c=T(b,"sourceURL",U);this.url=W(a.c,c);this.$=T(b,"range",Bc)};tc.prototype.parse=function(a,b){var c=T(b,"sourceURL",U);this.url=W(a.c,c);this.$=T(b,"range",Bc)};
S.prototype.parse=function(a,b){this.c=a.c;this.F=T(b,"timescale",Y)||1;this.W=T(b,"presentationTimeOffset",$)||0;this.T=T(b,"duration",$);this.ca=T(b,"startNumber",Y)||1;this.na=V(this,b,tc);this.B=X(this,b,uc)};uc.prototype.parse=function(a,b){var c=T(b,"media",U);this.D=W(a.c,c);this.qb=T(b,"mediaRange",Bc)};
vc.prototype.parse=function(a,b){this.F=T(b,"timescale",Y)||1;this.W=T(b,"presentationTimeOffset",$)||0;this.T=T(b,"duration",$);this.ca=T(b,"startNumber",Y)||1;this.ta=T(b,"media",U);this.nb=T(b,"index",U);this.Gb=T(b,"initialization",U);this.Rb=V(this,b,wc)};wc.prototype.parse=function(a,b){this.pc=X(this,b,xc)};xc.prototype.parse=function(a,b){this.startTime=T(b,"t",$);this.duration=T(b,"d",$);this.repeat=T(b,"r",$)};function W(a,b){var c=b?new L(b):null;return a?c?a.resolve(c):a:c}
function V(a,b,c){for(var d=null,e=0;e<b.children.length;e++)if(b.children[e].tagName==c.TAG_NAME){if(d)return null;d=b.children[e]}if(!d)return null;b=new c;b.parse.call(b,a,d);return b}function X(a,b,c){for(var d=[],e=0;e<b.children.length;e++)if(b.children[e].tagName==c.TAG_NAME){var f=new c;f.parse.call(f,a,b.children[e]);d.push(f)}return d}function Ac(a){a=a.firstChild;return a.nodeType!=Node.TEXT_NODE?null:a.nodeValue}function T(a,b,c){return c(a.getAttribute(b))}
function zc(a){if(!a)return null;var b=/^P(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(a);if(!b)return null;a=0;var c=$(b[1]);c&&(a+=86400*c);(c=$(b[2]))&&(a+=3600*c);(c=$(b[3]))&&(a+=60*c);b=window.parseFloat(b[4]);(b=isNaN(b)?null:b)&&(a+=b);return a}function Bc(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=$(b[1]);if(null==a)return null;b=$(b[2]);return null==b?null:new yc(a,b)}function Y(a){a=window.parseInt(a,10);return 0<a?a:null}
function $(a){a=window.parseInt(a,10);return 0<=a?a:null}function U(a){return a};function Cc(a,b){F.call(this,a);this.a=b;this.X=this.M=null}q(Cc,F);h=Cc.prototype;h.u=function(){this.X&&this.a.removeChild(this.X);this.parent=this.a=this.M=this.X=null};h.Xb=function(){return!0};h.start=function(a){this.M=a;a=this.Db();this.X&&(this.wb(!1),this.a.removeChild(this.X));this.X=document.createElement("track");this.a.appendChild(this.X);this.X.src=this.M.D.toString();this.wb(a)};h.Qb=function(a){this.start(a)};h.ic=function(){};h.wb=function(a){this.X.track.mode=a?"showing":"disabled"};
h.Db=function(){return this.X?"showing"==this.X.track.mode:!1};function Dc(a,b,c,d,e){F.call(this,a);this.a=b;this.ba=d;this.K=new dc(c,d,e);this.A=e;this.bb=this.Xa=this.H=this.M=null;this.e=Ec;this.Aa=""}q(Dc,F);var Ec=0;h=Dc.prototype;h.u=function(){this.e=null;Fc(this);this.A=this.M=this.H=this.Xa=null;this.K.u();this.parent=this.a=this.ba=this.K=null};h.Xb=function(){return 5==this.e};
function $(a){a=window.parseInt(a,10);return 0<=a?a:null}function U(a){return a};function Cc(a,b){F.call(this,a);this.a=b;this.X=this.M=null}q(Cc,F);h=Cc.prototype;h.u=function(){this.X&&this.a.removeChild(this.X);this.parent=this.a=this.M=this.X=null};h.Xb=function(){return!0};h.start=function(a){this.M=a;a=this.Eb();this.X&&(this.wb(!1),this.a.removeChild(this.X));this.X=document.createElement("track");this.a.appendChild(this.X);this.X.src=this.M.D.toString();this.wb(a)};h.Qb=function(a){this.start(a)};h.ic=function(){};h.wb=function(a){this.X.track.mode=a?"showing":"disabled"};
h.Eb=function(){return this.X?"showing"==this.X.track.mode:!1};function Dc(a,b,c,d,e){F.call(this,a);this.a=b;this.ba=d;this.K=new dc(c,d,e);this.A=e;this.bb=this.Xa=this.H=this.M=null;this.e=Ec;this.Aa=""}q(Dc,F);var Ec=0;h=Dc.prototype;h.u=function(){this.e=null;Fc(this);this.A=this.M=this.H=this.Xa=null;this.K.u();this.parent=this.a=this.ba=this.K=null};h.Xb=function(){return 5==this.e};
h.start=function(a){if(this.e==Ec){this.M=a;this.Aa=a.l.split("/")[0];this.H=null;this.e=1;var b=Gc(this,a);Promise.all(b).then(t(this,function(b){var d=b[0];b=b[1];if(a.Za){if(this.H=this.jb(a,d,b),!this.H)return d=Error("Failed to create SegmentIndex."),d.type="stream",Promise.reject(d)}else this.H=a.Ma;return(d=Kb(this.H,this.a.currentTime,a.t))?fc(this.K,d,b):Promise.reject(Error("No segments available."))})).then(t(this,function(){Hc(this,a);Ic(this)})).catch(t(this,function(a){"aborted"!=a.type&&

@@ -90,28 +91,34 @@ (this.e=Ec,a=D(a),this.dispatchEvent(a))}))}};

this.e=4,this.va())}))}};function Hc(a,b){var c=b.l.split("/")[0],c=B({type:"adaptation",bubbles:!0,contentType:c,size:"video"!=c?null:{width:b.width,height:b.height},bandwidth:b.bandwidth});a.dispatchEvent(c)}function Ic(a){a.e=4;if(a.Xa){var b=a.Xa;a.Xa=null;b()}else a.va()}
h.ic=function(){this.e!=Ec&&1!=this.e&&2!=this.e&&3!=this.e&&(Fc(this),this.K.abort().then(t(this,function(){var a=this.a.currentTime,b=Lb(this.H,a);a:{for(var c=this.K.ba.buffered,d=0;d<c.length;++d){var e=c.start(d)-ec,f=c.end(d)+ec;if(a>=e&&a<=f){a=!0;break a}}a=!1}return a&&this.K.Ha[b]?Promise.resolve():this.K.clear()})).then(t(this,function(){this.e=4;this.va()})))};h.wb=function(){};h.Db=function(){return!0};function Gc(a,b){return[Jc(a,b.Za),Jc(a,b.Ob)]}
function Jc(a,b){if(!b||!b.url)return Promise.resolve(null);var c=new cc(b.url.toString(),b.Pa,b.Ta);c.pa=a.A;return c.send()}h.jb=function(a,b,c){var d=null;if(0<=a.l.indexOf("mp4"))d=new Gb(a.D);else if(0<=a.l.indexOf("webm")){if(!c)return null;d=new Hb(a.D)}else return null;c=c?new DataView(c):null;b=new DataView(b);return(a=d.parse(c,b,a.Za.Pa))?new Ib(a):null};
h.ic=function(){this.e!=Ec&&1!=this.e&&2!=this.e&&3!=this.e&&(Fc(this),this.K.abort().then(t(this,function(){var a=this.a.currentTime,b=Lb(this.H,a);a:{for(var c=this.K.ba.buffered,d=0;d<c.length;++d){var e=c.start(d)-ec,f=c.end(d)+ec;if(a>=e&&a<=f){a=!0;break a}}a=!1}return a&&this.K.Ha[b]?Promise.resolve():this.K.clear()})).then(t(this,function(){this.e=4;this.va()})))};h.wb=function(){};h.Eb=function(){return!0};function Gc(a,b){return[Jc(a,b.Za),Jc(a,b.Pb)]}
function Jc(a,b){if(!b||!b.url)return Promise.resolve(null);var c=new cc(b.url.toString(),b.Pa,b.Ta);c.qa=a.A;return c.send()}h.jb=function(a,b,c){var d=null;if(0<=a.l.indexOf("mp4"))d=new Gb(a.D);else if(0<=a.l.indexOf("webm")){if(!c)return null;d=new Hb(a.D)}else return null;c=c?new DataView(c):null;b=new DataView(b);return(a=d.parse(c,b,a.Za.Pa))?new Ib(a):null};
h.va=function(){Fc(this);var a=this.a.currentTime,b=Kc(this,a);if(b=Jb(this.H,b)){var c=Math.max(this.M.t,15);b.startTime-a>=c?this.bb=window.setTimeout(this.va.bind(this),1E3):fc(this.K,new Fb([b])).then(t(this,function(){this.va()})).catch(t(this,function(a){if("aborted"!=a.type){var b=D(a);this.dispatchEvent(b);"net"==a.type&&0==a.gd.status&&(this.bb=window.setTimeout(this.va.bind(this),5E3))}}))}else this.e=5,a=B({type:"ended"}),this.dispatchEvent(a)};
function Kc(a,b){for(var c=Lb(a.H,b);0<=c&&c<a.H.i.length&&a.K.Ha[c];)c++;return c}function Fc(a){a.bb&&(window.clearTimeout(a.bb),a.bb=null)};function Lc(a){F.call(this,null);this.I=a;this.hc=0;this.gc=new Yb;this.R=new MediaSource;this.a=null;this.C={};this.s={};this.b=new H;this.gb=new s;this.sa="";this.Pb=!1;this.A=new Ta;this.L=null;this.eb=new $b(this.A,this)}q(Lc,F);m("shaka.player.StreamVideoSource",Lc);h=Lc.prototype;h.u=function(){this.b.u();this.b=null;this.eb.u();this.eb=null;Mc(this);this.parent=this.A=this.gb=this.a=this.R=this.gc=this.C=null};
h.fb=function(a,b){if(0==this.I.J.length){var c=Error("Manifest has not been loaded.");c.type="stream";return Promise.reject(c)}this.parent=a;this.a=b;this.L=a.getStats();I(this.b,this.R,"sourceopen",this.Kc.bind(this));I(this.b,this.a,"seeking",this.Kb.bind(this));I(this.b,this.A,"bandwidth",this.Ib.bind(this));c=this.a.mediaKeys;this.a.src=window.URL.createObjectURL(this.R);c=this.a.setMediaKeys(c);return Promise.all([this.gb,c])};
h.load=function(a){this.sa=a;if(0==this.I.J.length)return a=Error("The manifest contains no stream information."),a.type="stream",Promise.reject(a);this.hc=this.I.t;this.gc.Mb(this.I.J);return 0==this.I.J.length||0==this.I.J[0].N.length?(a=Error("The manifest specifies content that cannot be displayed on this browser/platform."),a.type="stream",Promise.reject(a)):Promise.resolve()};
function Kc(a,b){for(var c=Lb(a.H,b);0<=c&&c<a.H.i.length&&a.K.Ha[c];)c++;return c}function Fc(a){a.bb&&(window.clearTimeout(a.bb),a.bb=null)};function Lc(a){F.call(this,null);this.I=a;this.hc=0;this.gc=new Yb;this.R=new MediaSource;this.a=null;this.C={};this.s={};this.b=new H;this.gb=new s;this.ia="";this.yb=!1;this.A=new Ta;this.L=null;this.eb=new $b(this.A,this)}q(Lc,F);m("shaka.player.StreamVideoSource",Lc);h=Lc.prototype;h.u=function(){this.b.u();this.b=null;this.eb.u();this.eb=null;Mc(this);this.parent=this.A=this.gb=this.a=this.R=this.gc=this.C=null};
h.fb=function(a,b){if(0==this.I.J.length){var c=Error("Manifest has not been loaded.");c.type="stream";return Promise.reject(c)}this.parent=a;this.a=b;this.L=a.getStats();I(this.b,this.R,"sourceopen",this.Kc.bind(this));I(this.b,this.a,"seeking",this.Lb.bind(this));I(this.b,this.A,"bandwidth",this.Jb.bind(this));c=this.a.mediaKeys;this.a.src=window.URL.createObjectURL(this.R);c=this.a.setMediaKeys(c);return Promise.all([this.gb,c])};
h.load=function(a){this.ia=a;if(0==this.I.J.length)return a=Error("The manifest contains no stream information."),a.type="stream",Promise.reject(a);this.hc=this.I.t;this.gc.Nb(this.I.J);return 0==this.I.J.length||0==this.I.J[0].N.length?(a=Error("The manifest specifies content that cannot be displayed on this browser/platform."),a.type="stream",Promise.reject(a)):Promise.resolve()};
h.getVideoTracks=function(){if(!this.s.video)return[];for(var a=this.C.video,a=(a=a?a.M:null)?a.Y:0,b=[],c=0;c<this.s.video.length;++c)for(var d=this.s.video[c],e=0;e<d.j.length;++e){var f=d.j[e];if(f.enabled){var g=f.Y,f=new la(g,f.bandwidth,f.width,f.height);g==a&&(f.active=!0);b.push(f)}}return b};
h.getAudioTracks=function(){if(!this.s.audio)return[];for(var a=this.C.audio,a=(a=a?a.M:null)?a.Y:0,b=[],c=0;c<this.s.audio.length;++c)for(var d=this.s.audio[c],e=d.lang,f=0;f<d.j.length;++f){var g=d.j[f],k=g.Y,g=new na(k,g.bandwidth,e);k==a&&(g.active=!0);b.push(g)}return b};
h.Fa=function(){if(!this.s.text)return[];for(var a=this.C.text,b=a?a.M:null,b=b?b.Y:0,c=[],d=0;d<this.s.text.length;++d)for(var e=this.s.text[d],f=e.lang,g=0;g<e.j.length;++g){var k=e.j[g].Y,l=new ka(k,f);k==b&&(l.active=!0,l.enabled=a.Db());c.push(l)}return c};h.mb=function(){return this.hc};h.lb=function(){return 0==this.I.J.length?[]:this.I.J[0].Cb()};
h.$a=function(a){for(var b={},c=this.I.J[0],d=0;d<c.N.length;++d){var e=c.N[d];b[e.Y]=e}this.s={};c=a.keys();for(d=0;d<c.length;++d){var e=c[d],f=a.get(e);this.s[e]=[];if("video"==e){var g=f[0].id;this.s[e].push(b[g])}else if("audio"==e)for(var g=f[0].la.split(";")[0],k=0;k<f.length;++k){var l=f[k];l.la.split(";")[0]==g&&this.s[e].push(b[l.id])}else for(k=0;k<f.length;++k)g=f[k].id,this.s[e].push(b[g])}this.Pb=!0;if(a=this.s.audio)Nc(this,a),Oa(2,this.sa,a[0].lang||this.sa)&&(this.Pb=!1);(a=this.s.text)&&
Nc(this,a)};h.za=function(a,b){return Oc(this,"video",a,b)};h.Na=function(a,b){return Oc(this,"audio",a,b)};h.Oa=function(a,b){return Oc(this,"text",a,b)};h.oa=function(a){var b=this.C.text;b&&b.wb(a)};h.ja=function(a){this.eb.enable(a)};h.xb=function(a){for(var b=0;b<this.I.J.length;++b)for(var c=this.I.J[b],d=0;d<c.N.length;++d)for(var e=c.N[d],f=0;f<e.j.length;++f){var g=e.j[f];g.enabled=!0;a.maxWidth&&g.width>a.maxWidth&&(g.enabled=!1);a.maxHeight&&g.height>a.maxHeight&&(g.enabled=!1)}};
function Oc(a,b,c,d){if(!a.s[b])return!1;for(var e=0;e<a.s[b].length;++e)for(var f=a.s[b][e],g=0;g<f.j.length;++g){var k=f.j[g];if(k.Y==c)return Ga(a.L,k),a.C[b].Qb(k,d),!0}return!1}function Nc(a,b){for(var c=0;2>=c;++c)for(var d=0;d<b.length;++d){var e=b[d];if(Oa(c,a.sa,e.lang)){b.splice(d,1);b.splice(0,0,e);return}}for(d=0;d<b.length;++d)if(e=b[d],e.Va){b.splice(d,1);b.splice(0,0,e);break}}
h.Fa=function(){if(!this.s.text)return[];for(var a=this.C.text,b=a?a.M:null,b=b?b.Y:0,c=[],d=0;d<this.s.text.length;++d)for(var e=this.s.text[d],f=e.lang,g=0;g<e.j.length;++g){var k=e.j[g].Y,l=new ka(k,f);k==b&&(l.active=!0,l.enabled=a.Eb());c.push(l)}return c};h.mb=function(){return this.hc};h.lb=function(){return 0==this.I.J.length?[]:this.I.J[0].Db()};
h.$a=function(a){for(var b={},c=this.I.J[0],d=0;d<c.N.length;++d){var e=c.N[d];b[e.Y]=e}this.s={};c=a.keys();for(d=0;d<c.length;++d){var e=c[d],f=a.get(e);this.s[e]=[];if("video"==e){var g=f[0].id;this.s[e].push(b[g])}else if("audio"==e)for(var g=f[0].ma.split(";")[0],k=0;k<f.length;++k){var l=f[k];l.ma.split(";")[0]==g&&this.s[e].push(b[l.id])}else for(k=0;k<f.length;++k)g=f[k].id,this.s[e].push(b[g])}this.yb=!0;if(a=this.s.audio)Nc(this,a),a=a[0].lang||this.ia,Oa(2,this.ia,a)&&(this.yb=!1);if(a=
this.s.text)Nc(this,a),a=a[0].lang||this.ia,Oa(2,this.ia,a)||(this.yb=!1)};h.za=function(a,b){return Oc(this,"video",a,b)};h.Na=function(a,b){return Oc(this,"audio",a,b)};h.Oa=function(a,b){return Oc(this,"text",a,b)};h.pa=function(a){var b=this.C.text;b&&b.wb(a)};h.ka=function(a){this.eb.enable(a)};
h.xb=function(a){for(var b=0;b<this.I.J.length;++b)for(var c=this.I.J[b],d=0;d<c.N.length;++d)for(var e=c.N[d],f=0;f<e.j.length;++f){var g=e.j[f];g.enabled=!0;a.maxWidth&&g.width>a.maxWidth&&(g.enabled=!1);a.maxHeight&&g.height>a.maxHeight&&(g.enabled=!1)}};function Oc(a,b,c,d){if(!a.s[b])return!1;for(var e=0;e<a.s[b].length;++e)for(var f=a.s[b][e],g=0;g<f.j.length;++g){var k=f.j[g];if(k.Y==c)return Ga(a.L,k),a.C[b].Qb(k,d),!0}return!1}
function Nc(a,b){for(var c=0;2>=c;++c)for(var d=0;d<b.length;++d){var e=b[d];if(Oa(c,a.ia,e.lang)){b.splice(d,1);b.splice(0,0,e);return}}for(d=0;d<b.length;++d)if(e=b[d],e.Va){b.splice(d,1);b.splice(0,0,e);break}}
h.Kc=function(){this.b.ab(this.R,"sourceopen");this.R.duration=this.I.J[0].duration;for(var a=[],b=["audio","video","text"],c=0;c<b.length;++c){var d=b[c];this.s[d]&&a.push(this.s[d][0])}b={};for(c=d=0;c<a.length;++c){var e=a[c],f=e.j[0];if("video"==e.contentType){var g;g=(g=ac(this.eb))?g.id:null;for(var k=0;k<e.j.length&&(f=e.j[k],f.Y!=g);++k);}else"audio"==e.contentType&&(f=e.j[Math.floor(e.j.length/2)]);Ga(this.L,f);if("text"==e.contentType)g=new Cc(this,this.a);else a:{g=f;var k=da(g),l=void 0;
try{l=this.R.addSourceBuffer(k)}catch(p){Mc(this);g=Error("Failed to create stream for "+k+".");g.type="stream";g.jd=p;this.gb.reject(g);g=null;break a}l.timestampOffset=this.I.J[0].start-g.timestampOffset;g=new Dc(this,this.a,this.R,l,this.A)}if(!g)return;this.C[e.contentType]=g;b[e.contentType]=f;f.Ma&&(e=Jb(f.Ma,0))&&(d=Math.max(d,e.startTime))}this.a.currentTime=d;for(var n in this.C)g=this.C[n],I(this.b,g,"ended",this.Qc.bind(this)),g.start(b[n]);this.oa(this.Pb);this.gb.resolve()};
function Mc(a){for(var b in a.C)a.C[b].u();a.C={}}h.Qc=function(){if("open"==this.R.readyState){for(var a in this.C)if(!this.C[a].Xb())return;this.R.endOfStream()}};h.Kb=function(){for(var a in this.C)this.C[a].ic()};h.Ib=function(){var a=this.L,b=Ua(this.A);a.estimatedBandwidth=b;a.bandwidthHistory.push(new Ia(b))};function Pc(a){N.call(this,a);this.o.responseType="text"}q(Pc,N);Pc.prototype.send=function(){var a=this.url;return this.ub().then(function(b){b=b.responseText;if(b=(new DOMParser).parseFromString(b,"text/xml")){var c={c:new L(a)};b=V(c,b,kc)}else b=null;if(b)return Promise.resolve(b);b=Error("MPD parse failure.");b.type="mpd";return Promise.reject(b)})};function Qc(a){this.Ua=a;this.ob=new ja}
Qc.prototype.Mb=function(a){this.ob=new ja;for(var b=0;b<a.p.length;++b)for(var c=a.p[b],d=0;d<c.P.length;++d){var e=c.P[d];if("text"!=e.contentType)for(var f=0;f<e.m.length;++f){var g=e.m[f],k=0,k=k+(g.q?1:0),k=k+(g.r?1:0),k=k+(g.w?1:0);0==k?(e.m.splice(f,1),--f):1!=k&&(g.q?(g.r=null,g.w=null):g.r&&(g.w=null));!g.q||g.q.S&&g.q.S.$&&g.q.D||(e.m.splice(f,1),--f)}}Rc(a);for(b=0;b<a.p.length;++b)for(c=a.p[b],d=0;d<c.P.length;++d)for(e=c.P[d],f=0;f<e.m.length;++f)if(g=e.m[f],g.w)if(k=g.w,k.nb){a:{var k=
g,l=k.w,p=new R,n;n=k;var r=n.w;if(r.nb){var w=new sc;(r=Sc(r.nb,n.id,null,n.bandwidth,null))?(w.url=n.c&&r?n.c.resolve(r):r,n=w):n=null}else n=null;p.S=n;if(p.S){p.ma=Tc(k);n=void 0;if(l.ta){l=Sc(l.ta,k.id,1,k.bandwidth,0);if(!l)break a;n=k.c?k.c.resolve(l):l}else n=k.c;p.D=n;k.q=p}}g.q||(e.m.splice(f,1),--f)}else if(k.Rb){a:if(k=g,p=k.w,p.ta){l=new S;l.F=p.F;l.W=p.W;l.ca=p.ca;l.ma=Tc(k);l.B=[];n=p.Rb.pc;for(var w=1,r=-1,u=0;u<n.length;++u)for(var C=n[u].repeat||0,Ca=0;Ca<=C;++Ca){if(!n[u].duration)break a;
var Z;Z=n[u].startTime&&0==Ca?n[u].startTime:0==u&&0==Ca?0:r;if(0<=r&&Z!=r){var M=l.B[l.B.length-1];M.duration+=Z-r}r=Z+n[u].duration;M=Sc(p.ta,k.id,w-1+p.ca,k.bandwidth,Z);if(!M)break a;var M=k.c?k.c.resolve(M):M,Da=new uc;Da.D=M;Da.startTime=Z;Da.duration=n[u].duration;l.B.push(Da);++w}k.r=l}g.r||(e.m.splice(f,1),--f)}else if(k.T)if(null!=c.duration){a:if(k=g,n=c.duration,p=k.w,p.ta){l=new S;l.F=p.F;l.W=p.W;l.T=p.T;l.ca=p.ca;l.ma=Tc(k);l.B=[];n=Math.floor(n/(p.T/p.F));for(w=1;w<=n;++w){r=(w-1+(p.ca-
try{l=this.R.addSourceBuffer(k)}catch(p){Mc(this);g=Error("Failed to create stream for "+k+".");g.type="stream";g.jd=p;this.gb.reject(g);g=null;break a}l.timestampOffset=this.I.J[0].start-g.timestampOffset;g=new Dc(this,this.a,this.R,l,this.A)}if(!g)return;this.C[e.contentType]=g;b[e.contentType]=f;f.Ma&&(e=Jb(f.Ma,0))&&(d=Math.max(d,e.startTime))}this.a.currentTime=d;for(var n in this.C)g=this.C[n],I(this.b,g,"ended",this.Qc.bind(this)),g.start(b[n]);this.pa(this.yb);this.gb.resolve()};
function Mc(a){for(var b in a.C)a.C[b].u();a.C={}}h.Qc=function(){if("open"==this.R.readyState){for(var a in this.C)if(!this.C[a].Xb())return;this.R.endOfStream()}};h.Lb=function(){for(var a in this.C)this.C[a].ic()};h.Jb=function(){var a=this.L,b=Ua(this.A);a.estimatedBandwidth=b;a.bandwidthHistory.push(new Ia(b))};function Pc(a){N.call(this,a);this.o.responseType="text"}q(Pc,N);Pc.prototype.send=function(){var a=this.url;return this.ub().then(function(b){b=b.responseText;if(b=(new DOMParser).parseFromString(b,"text/xml")){var c={c:new L(a)};b=V(c,b,kc)}else b=null;if(b)return Promise.resolve(b);b=Error("MPD parse failure.");b.type="mpd";return Promise.reject(b)})};function Qc(a){this.Ua=a;this.ob=new ja}
Qc.prototype.Nb=function(a){this.ob=new ja;for(var b=0;b<a.p.length;++b)for(var c=a.p[b],d=0;d<c.P.length;++d){var e=c.P[d];if("text"!=e.contentType)for(var f=0;f<e.m.length;++f){var g=e.m[f],k=0,k=k+(g.q?1:0),k=k+(g.r?1:0),k=k+(g.w?1:0);0==k?(e.m.splice(f,1),--f):1!=k&&(g.q?(g.r=null,g.w=null):g.r&&(g.w=null));!g.q||g.q.S&&g.q.S.$&&g.q.D||(e.m.splice(f,1),--f)}}Rc(a);for(b=0;b<a.p.length;++b)for(c=a.p[b],d=0;d<c.P.length;++d)for(e=c.P[d],f=0;f<e.m.length;++f)if(g=e.m[f],g.w)if(k=g.w,k.nb){a:{var k=
g,l=k.w,p=new R,n;n=k;var r=n.w;if(r.nb){var w=new sc;(r=Sc(r.nb,n.id,null,n.bandwidth,null))?(w.url=n.c&&r?n.c.resolve(r):r,n=w):n=null}else n=null;p.S=n;if(p.S){p.na=Tc(k);n=void 0;if(l.ta){l=Sc(l.ta,k.id,1,k.bandwidth,0);if(!l)break a;n=k.c?k.c.resolve(l):l}else n=k.c;p.D=n;k.q=p}}g.q||(e.m.splice(f,1),--f)}else if(k.Rb){a:if(k=g,p=k.w,p.ta){l=new S;l.F=p.F;l.W=p.W;l.ca=p.ca;l.na=Tc(k);l.B=[];n=p.Rb.pc;for(var w=1,r=-1,u=0;u<n.length;++u)for(var C=n[u].repeat||0,Ca=0;Ca<=C;++Ca){if(!n[u].duration)break a;
var Z;Z=n[u].startTime&&0==Ca?n[u].startTime:0==u&&0==Ca?0:r;if(0<=r&&Z!=r){var M=l.B[l.B.length-1];M.duration+=Z-r}r=Z+n[u].duration;M=Sc(p.ta,k.id,w-1+p.ca,k.bandwidth,Z);if(!M)break a;var M=k.c?k.c.resolve(M):M,Da=new uc;Da.D=M;Da.startTime=Z;Da.duration=n[u].duration;l.B.push(Da);++w}k.r=l}g.r||(e.m.splice(f,1),--f)}else if(k.T)if(null!=c.duration){a:if(k=g,n=c.duration,p=k.w,p.ta){l=new S;l.F=p.F;l.W=p.W;l.T=p.T;l.ca=p.ca;l.na=Tc(k);l.B=[];n=Math.floor(n/(p.T/p.F));for(w=1;w<=n;++w){r=(w-1+(p.ca-
1))*p.T;u=Sc(p.ta,k.id,w-1+p.ca,k.bandwidth,r);if(!u)break a;u=k.c?k.c.resolve(u):u;C=new uc;C.D=u;C.startTime=r;C.duration=p.T;l.B.push(C)}k.r=l}g.r||(e.m.splice(f,1),--f)}else e.m.splice(f,1),--f;else e.m.splice(f,1),--f;Rc(a);for(b=0;b<a.p.length;++b)for(c=a.p[b],d=0;d<c.P.length;++d){f=e=c.P[d];g=null;for(k=0;k<f.m.length;++k)(p=f.m[k].l||"",g)?p!=g&&(f.m.splice(k,1),--k):g=p;0==e.m.length&&(c.P.splice(d,1),--d)}this.ob.t=a.t||0;for(b=0;b<a.p.length;++b){c=a.p[b];d=new ia;d.start=c.start||0;d.duration=
c.duration||0;for(e=0;e<c.P.length;++e){f=c.P[e];g=new fa;g.Va=f.Va;g.contentType=f.contentType||"";g.lang=f.lang||"";for(k=0;k<f.m.length;++k){l=f.m[k];n=p=g.Sa.slice(0);w=l;r=[];if(0==w.fa.length)r.push(Ka());else if(this.Ua)for(u=0;u<w.fa.length;++u)(C=this.Ua(w.fa[u]))&&r.push(C);w=r;if(0==n.length)Array.prototype.push.apply(n,w);else for(r=0;r<n.length;++r){u=!1;for(C=0;C<w.length;++C)if(n[r].key()==w[C].key()){u=!0;break}u||(n.splice(r,1),--r)}if(!(0==p.length&&0<g.Sa.length)){a:{n=new ba;n.id=
l.id;n.t=l.t;n.bandwidth=l.bandwidth;n.width=l.width;n.height=l.height;n.l=l.l||"";n.ea=l.ea||"";n.D=l.c;if(l.q)n.timestampOffset=l.q.W/l.q.F,n.D=l.q.D,n.Za=Uc(l.q.S),n.Ob=Uc(l.q.ma);else if(l.r&&(n.timestampOffset=l.r.W/l.r.F,n.Ob=Uc(l.r.ma),n.Ma=this.jb(l.r),!n.Ma)){l=null;break a}l=n}l&&(g.j.push(l),g.Sa=p)}}d.N.push(g)}this.ob.J.push(d)}};
l.id;n.t=l.t;n.bandwidth=l.bandwidth;n.width=l.width;n.height=l.height;n.l=l.l||"";n.ea=l.ea||"";n.D=l.c;if(l.q)n.timestampOffset=l.q.W/l.q.F,n.D=l.q.D,n.Za=Uc(l.q.S),n.Pb=Uc(l.q.na);else if(l.r&&(n.timestampOffset=l.r.W/l.r.F,n.Pb=Uc(l.r.na),n.Ma=this.jb(l.r),!n.Ma)){l=null;break a}l=n}l&&(g.j.push(l),g.Sa=p)}}d.N.push(g)}this.ob.J.push(d)}};
function Rc(a){if(a.p.length){"static"==a.type&&null==a.p[0].start&&(a.p[0].start=0);var b=function(a){return 0==a||!!a};1==a.p.length&&!b(a.p[0].duration)&&b(a.duration)&&(a.p[0].duration=a.duration);for(var c=0;c<a.p.length;++c){var d=a.p[c-1],e=a.p[c];Vc(e);var f=a.p[c+1]||{start:a.duration};!b(e.start)&&d&&b(d.duration)&&(e.start=d.start+d.duration);!b(e.duration)&&b(f.start)&&(e.duration=f.start-e.start)}c=a.p[a.p.length-1];!b(a.duration)&&b(c.start)&&b(c.duration)&&(a.duration=c.start+c.duration)}}
function Vc(a){if(null==a.duration){for(var b=null,c=0;c<a.P.length;++c)for(var d=a.P[c],e=0;e<d.m.length;++e){var f=d.m[e];if(f.r){f=f.r;if(0==f.B.length)f=0;else if(f.T)f=f.T/f.F*f.B.length;else{for(var g=f.B[0].startTime,k=0;k<f.B.length;++k)g+=f.B[k].duration;f=g/f.F}b=Math.max(b,f)}}a.duration=b}}function Tc(a){var b=a.w;if(!b.Fb)return null;var c=new tc,b=Sc(b.Fb,a.id,null,a.bandwidth,null);if(!b)return null;c.url=a.c&&b?a.c.resolve(b):b;return c}
function Vc(a){if(null==a.duration){for(var b=null,c=0;c<a.P.length;++c)for(var d=a.P[c],e=0;e<d.m.length;++e){var f=d.m[e];if(f.r){f=f.r;if(0==f.B.length)f=0;else if(f.T)f=f.T/f.F*f.B.length;else{for(var g=f.B[0].startTime,k=0;k<f.B.length;++k)g+=f.B[k].duration;f=g/f.F}b=Math.max(b,f)}}a.duration=b}}function Tc(a){var b=a.w;if(!b.Gb)return null;var c=new tc,b=Sc(b.Gb,a.id,null,a.bandwidth,null);if(!b)return null;c.url=a.c&&b?a.c.resolve(b):b;return c}
function Sc(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};a=a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)d)?\$/g,function(a,b,c){if("$$"==a)return"$";var d=f[b];if(null==d)return a;"RepresentationID"==b&&c&&(c=void 0);a=d.toString();c=window.parseInt(c,10)||1;c=Math.max(0,c-a.length);return Array(c+1).join("0")+a});try{return new L(a)}catch(g){if(g instanceof URIError)return null;throw g;}}
function Uc(a){if(!a)return null;var b=new ea;b.url=a.url;a.$&&(b.Pa=a.$.hb,b.Ta=a.$.end);return b}Qc.prototype.jb=function(a){for(var b=a.F,c=a.T,d=[],e=0;e<a.B.length;++e){var f=a.B[e],g=0,k=null,l=0,p=null;if(null!=f.startTime)0<e&&null!=a.B[e-1].startTime&&(g=a.B[e-1].startTime),g=f.startTime/b,k=g+f.duration/b;else{if(!c)return null;0==e?g=0:(g=d[e-1].startTime,g+=c/b);k=g+c/b;f.qb&&(l=f.qb.hb,p=f.qb.end)}d.push(new Eb(e,g,k,l,p,f.D))}return new Ib(d)};function Wc(a,b){F.call(this,null);this.Ec=a;this.Ua=b;this.g=null;this.Ca=!0}q(Wc,F);m("shaka.player.DashVideoSource",Wc);h=Wc.prototype;h.u=function(){this.g&&(this.g.u(),this.g=null);this.parent=this.Ua=null};h.fb=function(a,b){if(!this.g){var c=Error("Manifest has not been loaded.");c.type="stream";return Promise.reject(c)}return this.g.fb(a,b)};h.load=function(a){return(new Pc(this.Ec)).send().then(t(this,function(b){var c=new Qc(this.Ua);c.Mb(b);this.g=new Lc(c.ob);this.g.ja(this.Ca);return this.g.load(a)}))};
h.getVideoTracks=function(){return this.g?this.g.getVideoTracks():[]};h.getAudioTracks=function(){return this.g?this.g.getAudioTracks():[]};h.Fa=function(){return this.g?this.g.Fa():[]};h.mb=function(){return this.g?this.g.mb():0};h.lb=function(){return this.g?this.g.lb():[]};h.$a=function(a){return this.g.$a(a)};h.za=function(a,b){return this.g?this.g.za(a,b):!1};h.Na=function(a,b){return this.g?this.g.Na(a,b):!1};h.Oa=function(a,b){return this.g?this.g.Oa(a,b):!1};h.oa=function(a){this.g&&this.g.oa(a)};
h.ja=function(a){this.Ca=a;this.g&&this.g.ja(a)};h.xb=function(a){this.g&&this.g.xb(a)};}.bind((typeof(module)!="undefined"&&module.exports)?module.exports:window))()
function Uc(a){if(!a)return null;var b=new ea;b.url=a.url;a.$&&(b.Pa=a.$.hb,b.Ta=a.$.end);return b}Qc.prototype.jb=function(a){for(var b=a.F,c=a.T,d=[],e=0;e<a.B.length;++e){var f=a.B[e],g=0,k=null,l=0,p=null;if(null!=f.startTime)0<e&&null!=a.B[e-1].startTime&&(g=a.B[e-1].startTime),g=f.startTime/b,k=g+f.duration/b;else{if(!c)return null;0==e?g=0:(g=d[e-1].startTime,g+=c/b);k=g+c/b;f.qb&&(l=f.qb.hb,p=f.qb.end)}d.push(new Eb(e,g,k,l,p,f.D))}return new Ib(d)};function Wc(a,b){F.call(this,null);this.Ec=a;this.Ua=b;this.g=null;this.Ca=!0}q(Wc,F);m("shaka.player.DashVideoSource",Wc);h=Wc.prototype;h.u=function(){this.g&&(this.g.u(),this.g=null);this.parent=this.Ua=null};h.fb=function(a,b){if(!this.g){var c=Error("Manifest has not been loaded.");c.type="stream";return Promise.reject(c)}return this.g.fb(a,b)};h.load=function(a){return(new Pc(this.Ec)).send().then(t(this,function(b){var c=new Qc(this.Ua);c.Nb(b);this.g=new Lc(c.ob);this.g.ka(this.Ca);return this.g.load(a)}))};
h.getVideoTracks=function(){return this.g?this.g.getVideoTracks():[]};h.getAudioTracks=function(){return this.g?this.g.getAudioTracks():[]};h.Fa=function(){return this.g?this.g.Fa():[]};h.mb=function(){return this.g?this.g.mb():0};h.lb=function(){return this.g?this.g.lb():[]};h.$a=function(a){return this.g.$a(a)};h.za=function(a,b){return this.g?this.g.za(a,b):!1};h.Na=function(a,b){return this.g?this.g.Na(a,b):!1};h.Oa=function(a,b){return this.g?this.g.Oa(a,b):!1};h.pa=function(a){this.g&&this.g.pa(a)};
h.ka=function(a){this.Ca=a;this.g&&this.g.ka(a)};h.xb=function(a){this.g&&this.g.xb(a)};}.bind(g,this))();
if (typeof(module)!="undefined"&&module.exports)module.exports=g.shaka;
else if (typeof(define)!="undefined")define(function(){return g.shaka});
else this.shaka=g.shaka;
})();

@@ -39,3 +39,2 @@ // This file was autogenerated by third_party/closure/deps/depswriter.py.

goog.addDependency('../../../lib/util/array_utils.js', ['shaka.util.ArrayUtils'], []);
goog.addDependency('../../../lib/util/content_database.js', ['shaka.util.ContentDatabase'], ['shaka.media.SegmentIndex', 'shaka.media.SegmentReference', 'shaka.util.FakeEvent', 'shaka.util.FakeEventTarget', 'shaka.util.IBandwidthEstimator', 'shaka.util.PublicPromise', 'shaka.util.RangeRequest', 'shaka.util.TypedBind']);
goog.addDependency('../../../lib/util/data_view_reader.js', ['shaka.util.DataViewReader'], ['shaka.asserts']);

@@ -42,0 +41,0 @@ goog.addDependency('../../../lib/util/ebml_parser.js', ['shaka.util.EbmlElement', 'shaka.util.EbmlParser'], []);

@@ -76,2 +76,3 @@ /**

} else {
meta.index = Object.keys(conf).length;
conf[name] = meta;

@@ -173,2 +174,3 @@ }

item = conf[name];
current.index = item.index;

@@ -175,0 +177,0 @@ // set title

@@ -307,2 +307,7 @@ /*global env: true */

if (members.tutorials.length) {
members.tutorials.sort(function(a, b) {
if (a.index < b.index) return -1;
if (a.index > b.index) return 1;
return 0;
});
nav += '<h3>Tutorials</h3><ul>';

@@ -309,0 +314,0 @@ members.tutorials.forEach(function(t) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc