From b7c3d998aae8336d295b2bf82d68c9f8fa7275e6 Mon Sep 17 00:00:00 2001 From: peaBerberian Date: Tue, 27 Jun 2017 17:43:20 +0200 Subject: [PATCH] update builds --- dist/rx-player.js | 40 +-- dist/rx-player.min.js | 712 +++++++++++++++++++++--------------------- 2 files changed, 377 insertions(+), 375 deletions(-) diff --git a/dist/rx-player.js b/dist/rx-player.js index e2844319d6..ba7512c69e 100644 --- a/dist/rx-player.js +++ b/dist/rx-player.js @@ -3330,7 +3330,8 @@ var BufferedRanges = function () { assert(end - start > 0, 4); } this.intersect(new BufferedRanges([new Range(0, start, 0), // from 0 to start - new Range(end, Infinity, 0)])); + new Range(end, Infinity, 0)]) // from end to Infinity + ); }; /** @@ -6567,10 +6568,10 @@ function createTimingsSampler(video, _ref) { function seekingsSampler(timingsSampling) { return timingsSampling.filter(function (t) { return t.name == "seeking" && (t.gap === Infinity || t.gap < -SEEK_GAP); - } + }) // skip the first seeking event generated by the set of the // initial seeking time in the video - ).skip(1).startWith(true); + .skip(1).startWith(true); } function toWallClockTime(ts, manifest) { @@ -8902,14 +8903,14 @@ function ema(a) { /* harmony default export */ __webpack_exports__["a"] = (function (metrics, options) { return metrics.map(function (metric) { return metric.value.response; - } + }) // do not take into account small chunks < 2KB. filters out init // segments and small manifests in particular, but keep loading errors (timeout). - ).filter(function (response) { + .filter(function (response) { return !response || response.size > 2000; - } + }) // converts response metadata in bits-per-seconds - ).map(function (response) { + .map(function (response) { return response ? response.size / response.duration * 8000 : 0; }).scan(ema(options.alpha)); }); @@ -9028,18 +9029,19 @@ function getMaxUsefulBitrateforWidth(representations, width) { var sortedRepsByWidth = representations.sort(function (a, b) { return a.width - b.width; }); - var maxWidth = sortedRepsByWidth.find(function (r) { + var firstSuperiorRepresentation = sortedRepsByWidth.find(function (r) { return r.width >= width; }); - if (maxWidth) { + if (firstSuperiorRepresentation) { var filteredAdaptations = representations.filter(function (r) { - return r.width <= maxWidth; + return r.width <= firstSuperiorRepresentation.width; }); if (filteredAdaptations.length) { return filteredAdaptations[filteredAdaptations.length - 1].bitrate; } else { - return representations[0]; + var firstRepresentation = representations[0]; + return firstRepresentation && firstRepresentation.bitrate || 0; } } @@ -10082,8 +10084,8 @@ var pixelRatio = window.devicePixelRatio || 1; * @returns {Object} */ function DeviceEvents(videoElement) { - var isVisible = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__compat__["u" /* visibilityChange */]) // emit false when visible - ().filter(function (x) { + var isVisible = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__compat__["u" /* visibilityChange */])() // emit false when visible + .filter(function (x) { return x === false; }); @@ -10703,7 +10705,7 @@ var Player = function (_EventEmitter) { // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624 videoElement.preload = "auto"; - _this.version = /*PLAYER_VERSION*/"2.2.0"; + _this.version = /*PLAYER_VERSION*/"2.2.1"; _this.video = videoElement; // fullscreen change subscription. @@ -13406,9 +13408,9 @@ function temporalMediaFragmentParser(value) { var end = components[1] ? components[1] : ""; __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__utils_assert__["a" /* default */])((start || end) && (!start || end || value.indexOf(",") === -1), errMessage); - start = start.replace(/^smpte(-25|-30|-30-drop)?:/, "" // remove smpte prefix - ).replace(/^npt[:=]/, "" // remove npt prefix - ).replace("clock:", ""); // remove clock prefix + start = start.replace(/^smpte(-25|-30|-30-drop)?:/, "") // remove smpte prefix + .replace(/^npt[:=]/, "") // remove npt prefix + .replace("clock:", ""); // remove clock prefix // Normal Play Time, as specified in the RFC2326 // Examples: @@ -16594,8 +16596,8 @@ var atoms = { [1, 0], 10, // we assume volume = 100%; [0, 1], 14, // default matrix [0, 1], 14, // default matrix - [64, 0, 0, 0], 26, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_bytes__["m" /* itobe2 */])(trackId + 1 // next trackId (=trackId + 1); - ))); + [64, 0, 0, 0], 26, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_bytes__["m" /* itobe2 */])(trackId + 1) // next trackId (=trackId + 1); + )); }, diff --git a/dist/rx-player.min.js b/dist/rx-player.min.js index 212eea6e04..4e107988e4 100644 --- a/dist/rx-player.min.js +++ b/dist/rx-player.min.js @@ -1,218 +1,218 @@ -var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(d,g,a){if(a.get||a.set)throw new TypeError("ES3 does not support getters and setters.");d!=Array.prototype&&d!=Object.prototype&&(d[g]=a.value)};$jscomp.getGlobal=function(d){return"undefined"!=typeof window&&window===d?d:"undefined"!=typeof global&&null!=global?global:d};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_"; -$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(d){return $jscomp.SYMBOL_PREFIX+(d||"")+$jscomp.symbolCounter_++}; -$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var d=$jscomp.global.Symbol.iterator;d||(d=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[d]&&$jscomp.defineProperty(Array.prototype,d,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(d){var g=0;return $jscomp.iteratorPrototype(function(){return g=k.ERROR?console.error.bind(console):h;l.warn=a>=k.WARNING?console.warn.bind(console):h;l.info=a>=k.INFO?console.info.bind(console):h;l.debug=a>=k.DEBUG?console.log.bind(console):h};g.a=l},function(d,g,a){function l(a){return a.reduce(function(a,c){return a.concat(c instanceof b.UnsubscriptionError?c.errors:c)},[])}var k=a(21),h=a(61),f= -a(37),e=a(38),c=a(25),b=a(173);d=function(){function a(a){this.closed=!1;this._subscriptions=this._parents=this._parent=null;a&&(this._unsubscribe=a)}a.prototype.unsubscribe=function(){var a=!1,m;if(!this.closed){var d=this._parent,g=this._parents,v=this._unsubscribe,t=this._subscriptions;this.closed=!0;this._subscriptions=this._parents=this._parent=null;for(var u=-1,w=g?g.length:0;d;)d.remove(this),d=++u=k.ERROR?console.error.bind(console):h;l.warn=a>=k.WARNING?console.warn.bind(console):h;l.info=a>=k.INFO?console.info.bind(console):h;l.debug=a>=k.DEBUG?console.log.bind(console):h};g.a=l},function(e,g,a){function l(a){return a.reduce(function(a,c){return a.concat(c instanceof b.UnsubscriptionError?c.errors:c)},[])}var k=a(21),h=a(61),f= +a(37),d=a(38),c=a(25),b=a(173);e=function(){function a(a){this.closed=!1;this._subscriptions=this._parents=this._parent=null;a&&(this._unsubscribe=a)}a.prototype.unsubscribe=function(){var a=!1,m;if(!this.closed){var e=this._parent,g=this._parents,v=this._unsubscribe,t=this._subscriptions;this.closed=!0;this._subscriptions=this._parents=this._parent=null;for(var u=-1,w=g?g.length:0;e;)e.remove(this),e=++u=V?G.Observable.of(null):W(a).take(1)}function m(b){return b.readyState>=X?G.Observable.of(null):a.i(E.a)(b,"canplay").take(1)}function n(b,c){function e(){var a=0=V?G.Observable.of(null):W(a).take(1)}function m(b){return b.readyState>=X?G.Observable.of(null):a.i(E.a)(b,"canplay").take(1)}function n(b,c){function d(){var a=0>>4).toString(16),c+=(a[e]&15).toString(16),b.length&&e>>4).toString(16),c+=(a[d]&15).toString(16),b.length&&d>>8&255,a&255])}function r(a){return new Uint8Array([a>>>24&255,a>>>16&255,a>>>8&255,a&255])}function q(a){var b=a%4294967296;a=(a-b)/4294967296;return new Uint8Array([a>>>24&255,a>>>16&255,a>>>8&255,a&255,b>>>24&255,b>>>16&255,b>>>8&255,b&255])}function v(a,b){return(a[0+b]<<0)+(a[1+b]<<8)}function t(a,b){return a[0+b]+256*a[1+b]+65536*a[2+b]+ -16777216*a[3+b]}function u(a){w.a.equal(a.length,16,"UUID length should be 16");var b=l(a);a=b[0];var c=b[1],f=b[2],m=b[3],h=b[4],n=b[5],d=b[6],k=b[7],p=b.subarray(8,10),b=b.subarray(10,16),g=new Uint8Array(16);g[0]=m;g[1]=f;g[2]=c;g[3]=a;g[4]=n;g[5]=h;g[6]=k;g[7]=d;g.set(p,8);g.set(b,10);return e(g)}a.d(g,"b",function(){return l});a.d(g,"a",function(){return k});a.d(g,"k",function(){return h});a.d(g,"j",function(){return f});a.d(g,"o",function(){return e});a.d(g,"h",function(){return c});a.d(g,"g", -function(){return b});a.d(g,"e",function(){return m});a.d(g,"f",function(){return n});a.d(g,"d",function(){return v});a.d(g,"c",function(){return t});a.d(g,"m",function(){return p});a.d(g,"i",function(){return r});a.d(g,"n",function(){return q});a.d(g,"l",function(){return u});var w=a(1)},function(d,g,a){function l(a,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a, +16777216*a[3+b]}function u(a){w.a.equal(a.length,16,"UUID length should be 16");var b=l(a);a=b[0];var c=b[1],f=b[2],m=b[3],h=b[4],n=b[5],e=b[6],k=b[7],p=b.subarray(8,10),b=b.subarray(10,16),g=new Uint8Array(16);g[0]=m;g[1]=f;g[2]=c;g[3]=a;g[4]=n;g[5]=h;g[6]=k;g[7]=e;g.set(p,8);g.set(b,10);return d(g)}a.d(g,"b",function(){return l});a.d(g,"a",function(){return k});a.d(g,"k",function(){return h});a.d(g,"j",function(){return f});a.d(g,"o",function(){return d});a.d(g,"h",function(){return c});a.d(g,"g", +function(){return b});a.d(g,"e",function(){return m});a.d(g,"f",function(){return n});a.d(g,"d",function(){return v});a.d(g,"c",function(){return t});a.d(g,"m",function(){return p});a.d(g,"i",function(){return r});a.d(g,"n",function(){return q});a.d(g,"l",function(){return u});var w=a(1)},function(e,g,a){function l(a,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a, enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function k(a,c){return Array.isArray(c)?b.merge.apply(null,c.map(function(b){return m(a,b)})):m(a,c)}function h(a){return a instanceof c.Observable?a:a&&"function"==typeof a.subscribe?new c.Observable(function(b){var c=a.subscribe(function(a){return b.next(a)},function(a){return b.error(a)},function(){return b.complete()});return function(){c&&c.dispose?c.dispose():c&&c.unsubscribe&&c.unsubscribe()}}): -a&&"function"==typeof a.then?n(a):c.Observable.of(a)}function f(a){return new p(a)}function e(a,b){try{return a(b)}catch(t){return c.Observable["throw"](t)}}a.d(g,"a",function(){return k});a.d(g,"e",function(){return f});a.d(g,"c",function(){return e});a.d(g,"b",function(){return h});a.d(g,"d",function(){return r});var c=a(0);a.n(c);var b=a(14);a.n(b);d=a(49);a.n(d);g=a(50);a.n(g);var m=d.FromEventObservable.create,n=g.PromiseObservable.create,p=function(a){function b(c){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function"); -var e;e=a.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");e=!e||"object"!==typeof e&&"function"!==typeof e?this:e;e.value=c;return e}l(b,a);b.prototype._subscribe=function(a){a.next(this.value)};return b}(c.Observable),r=function(a){var b=!1;return function(){if(b)return c.Observable.empty();b=!0;return h(a.apply(void 0,arguments))["do"](null,function(){return b=!1},function(){return b=!1})}}},function(d,g,a){var l=this&&this.__extends||function(a, -h){function f(){this.constructor=a}for(var e in h)h.hasOwnProperty(e)&&(a[e]=h[e]);a.prototype=null===h?Object.create(h):(f.prototype=h.prototype,new f)};d=function(a){function h(){a.apply(this,arguments)}l(h,a);h.prototype.notifyNext=function(a,e,c,b,m){this.destination.next(e)};h.prototype.notifyError=function(a,e){this.destination.error(a)};h.prototype.notifyComplete=function(a){this.destination.complete()};return h}(a(2).Subscriber);g.OuterSubscriber=d},function(d,g,a){var l=this&&this.__extends|| -function(a,c){function b(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};d=a(0);var k=a(31),h=a(8),f=a(16);a=function(a){function c(b,c){a.call(this);this.array=b;this.scheduler=c;c||1!==b.length||(this._isScalar=!0,this.value=b[0])}l(c,a);c.create=function(a,e){return new c(a,e)};c.of=function(){for(var a=[],e=0;e=a.count?e.complete():(e.next(b[c]),e.closed||(a.index=c+1,this.schedule(a)))};c.prototype._subscribe=function(a){var b=this.array,e=b.length,f=this.scheduler;if(f)return f.schedule(c.dispatch,0,{array:b,index:0,count:e,subscriber:a});for(f=0;fa){e=f;break}}return null!=e?e-a:Infinity};a.prototype.insert=function(a,e,f){var h=this.ranges;a=new r(e,f,a);if(!a.isNil()){for(e= -0;ef.start&&(f.start=m.start),m.end=e.BASE_LANG_MATCH&&d===k?!0:g>=e.OTHER_SUBLANG_MATCH&&p===k?!0:!1}if(d)return n}return-1}function f(a){if(null==a||""===a)return"";a=(""+a).toLowerCase().split("-");var b=a[0],c=void 0;2===b.length?c=m[b]:3===b.length&&(c=n[b]);(b= -c||b)&&(a[0]=b);return a.join("-")}a.d(g,"c",function(){return f});a.d(g,"a",function(){return k});a.d(g,"b",function(){return l});a.d(g,"d",function(){return h});var e={PERFECT_MATCH:0,BASE_LANG_MATCH:1,OTHER_SUBLANG_MATCH:2},c=e.PERFECT_MATCH,b=e.OTHER_SUBLANG_MATCH,m={aa:"aar",ab:"abk",ae:"ave",af:"afr",ak:"aka",am:"amh",an:"arg",ar:"ara",as:"asm",av:"ava",ay:"aym",az:"aze",ba:"bak",be:"bel",bg:"bul",bh:"bih",bi:"bis",bm:"bam",bn:"ben",bo:"bod",br:"bre",bs:"bos",ca:"cat",ce:"che",ch:"cha",co:"cos", +a&&"function"==typeof a.then?n(a):c.Observable.of(a)}function f(a){return new p(a)}function d(a,b){try{return a(b)}catch(t){return c.Observable["throw"](t)}}a.d(g,"a",function(){return k});a.d(g,"e",function(){return f});a.d(g,"c",function(){return d});a.d(g,"b",function(){return h});a.d(g,"d",function(){return r});var c=a(0);a.n(c);var b=a(14);a.n(b);e=a(49);a.n(e);g=a(50);a.n(g);var m=e.FromEventObservable.create,n=g.PromiseObservable.create,p=function(a){function b(c){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function"); +var d;d=a.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");d=!d||"object"!==typeof d&&"function"!==typeof d?this:d;d.value=c;return d}l(b,a);b.prototype._subscribe=function(a){a.next(this.value)};return b}(c.Observable),r=function(a){var b=!1;return function(){if(b)return c.Observable.empty();b=!0;return h(a.apply(void 0,arguments))["do"](null,function(){return b=!1},function(){return b=!1})}}},function(e,g,a){var l=this&&this.__extends||function(a, +h){function f(){this.constructor=a}for(var d in h)h.hasOwnProperty(d)&&(a[d]=h[d]);a.prototype=null===h?Object.create(h):(f.prototype=h.prototype,new f)};e=function(a){function h(){a.apply(this,arguments)}l(h,a);h.prototype.notifyNext=function(a,d,c,b,m){this.destination.next(d)};h.prototype.notifyError=function(a,d){this.destination.error(a)};h.prototype.notifyComplete=function(a){this.destination.complete()};return h}(a(2).Subscriber);g.OuterSubscriber=e},function(e,g,a){var l=this&&this.__extends|| +function(a,c){function b(){this.constructor=a}for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};e=a(0);var k=a(31),h=a(8),f=a(16);a=function(a){function c(b,c){a.call(this);this.array=b;this.scheduler=c;c||1!==b.length||(this._isScalar=!0,this.value=b[0])}l(c,a);c.create=function(a,d){return new c(a,d)};c.of=function(){for(var a=[],d=0;d=a.count?d.complete():(d.next(b[c]),d.closed||(a.index=c+1,this.schedule(a)))};c.prototype._subscribe=function(a){var b=this.array,d=b.length,f=this.scheduler;if(f)return f.schedule(c.dispatch,0,{array:b,index:0,count:d,subscriber:a});for(f=0;fa){d=f;break}}return null!=d?d-a:Infinity};a.prototype.insert=function(a,d,f){var h=this.ranges;a=new r(d,f,a);if(!a.isNil()){for(d= +0;df.start&&(f.start=m.start),m.end=d.BASE_LANG_MATCH&&e===k?!0:g>=d.OTHER_SUBLANG_MATCH&&p===k?!0:!1}if(e)return n}return-1}function f(a){if(null==a||""===a)return"";a=(""+a).toLowerCase().split("-");var b=a[0],c=void 0;2===b.length?c=m[b]:3===b.length&&(c=n[b]);(b= +c||b)&&(a[0]=b);return a.join("-")}a.d(g,"c",function(){return f});a.d(g,"a",function(){return k});a.d(g,"b",function(){return l});a.d(g,"d",function(){return h});var d={PERFECT_MATCH:0,BASE_LANG_MATCH:1,OTHER_SUBLANG_MATCH:2},c=d.PERFECT_MATCH,b=d.OTHER_SUBLANG_MATCH,m={aa:"aar",ab:"abk",ae:"ave",af:"afr",ak:"aka",am:"amh",an:"arg",ar:"ara",as:"asm",av:"ava",ay:"aym",az:"aze",ba:"bak",be:"bel",bg:"bul",bh:"bih",bi:"bis",bm:"bam",bn:"ben",bo:"bod",br:"bre",bs:"bos",ca:"cat",ce:"che",ch:"cha",co:"cos", cr:"cre",cs:"ces",cu:"chu",cv:"chv",cy:"cym",da:"dan",de:"deu",dv:"div",dz:"dzo",ee:"ewe",el:"ell",en:"eng",eo:"epo",es:"spa",et:"est",eu:"baq",fa:"fas",ff:"ful",fi:"fin",fj:"fij",fo:"fao",fr:"fre",fy:"fry",ga:"gle",gd:"gla",gl:"glg",gn:"grn",gu:"guj",gv:"glv",ha:"hau",he:"heb",hi:"hin",ho:"hmo",hr:"hrv",ht:"hat",hu:"hun",hy:"arm",hz:"her",ia:"ina",id:"ind",ie:"ile",ig:"ibo",ii:"iii",ik:"ipk",io:"ido",is:"ice",it:"ita",iu:"iku",ja:"jpn",jv:"jav",ka:"geo",kg:"kon",ki:"kik",kj:"kua",kk:"kaz",kl:"kal", km:"khm",kn:"kan",ko:"kor",kr:"kau",ks:"kas",ku:"kur",kv:"kom",kw:"cor",ky:"kir",la:"lat",lb:"ltz",lg:"lug",li:"lim",ln:"lin",lo:"lao",lt:"lit",lu:"lub",lv:"lav",mg:"mlg",mh:"mah",mi:"mao",mk:"mac",ml:"mal",mn:"mon",mr:"mar",ms:"may",mt:"mlt",my:"bur",na:"nau",nb:"nob",nd:"nde",ne:"nep",ng:"ndo",nl:"dut",nn:"nno",no:"nor",nr:"nbl",nv:"nav",ny:"nya",oc:"oci",oj:"oji",om:"orm",or:"ori",os:"oss",pa:"pan",pi:"pli",pl:"pol",ps:"pus",pt:"por",qu:"que",rm:"roh",rn:"run",ro:"ron",ru:"rus",rw:"kin",sa:"san", sc:"srd",sd:"snd",se:"sme",sg:"sag",si:"sin",sk:"slk",sl:"slv",sm:"smo",sn:"sna",so:"som",sq:"alb",sr:"srp",ss:"ssw",st:"sot",su:"sun",sv:"swe",sw:"swa",ta:"tam",te:"tel",tg:"tgk",th:"tha",ti:"tir",tk:"tuk",tl:"tgl",tn:"tsn",to:"ton",tr:"tur",ts:"tso",tt:"tat",tw:"twi",ty:"tah",ug:"uig",uk:"ukr",ur:"urd",uz:"uzb",ve:"ven",vi:"vie",vo:"vol",wa:"wln",wo:"wol",xh:"xho",yi:"yid",yo:"yor",za:"zha",zh:"chi",zu:"zul"},n={tib:"bod",cze:"ces",wel:"cym",ger:"deu",gre:"ell",eus:"baq",per:"fas",fra:"fre",hye:"arm", -isl:"ice",kat:"geo",mri:"mao",mkd:"mac",msa:"may",mya:"bur",nld:"dut",rum:"ron",slo:"slk",sqi:"alb",zho:"chi"}},function(d,g,a){var l=a(16),k=a(21),h=a(13),f=a(145);g.combineLatest=function(){for(var a=[],c=0;c>>1;c[h].ts=q);){var t=m[e],u=t.d,w=t.ts,y=t.range,v=Math.max(v,u);if(0>u){w+vA&&(A=Math.ceil(((x?x.t:Infinity)-t.ts)/t.d)-1);t=A;x=c-w;x=0c.d&&(c={ts:c.ts,d:0,r:c.r});return!(b*e-(void 0===f?0:f)<=a.i(k.d)(c))},getFirstPosition:function(a){if(a.timeline.length)return a.timeline[0].ts/a.timescale},getLastPosition:function(f){if(f.timeline.length){var e=f.timeline[f.timeline.length-1];return a.i(k.d)(e)/f.timescale}},checkDiscontinuity:function(f,e){var c=f.timeline,b=f.timescale,b=void 0===b?1:b,m=e*b;if(0>=m)return-1;var d=h(f,m);if(0>d||d>= -c.length-1)return-1;var g=c[d];if(-1===g.d)return-1;var l=g.ts,g=a.i(k.d)(g),c=c[d+1];return g!==c.ts&&m>=l&&m<=g&&g-m=c)return!1;-1===h.d&&((m=b[m-2])&&m.d===c?(m.r++,b.pop()):h.d=c);f.timeline.push({d:-1,ts:e,r:0});return!0}return e.ts>=a.i(k.d)(h)?(h.d===e.d?h.r++:f.timeline.push({d:e.d,ts:e.ts,r:0}),!0):!1}}},function(d,g,a){function l(){this.__listeners={}} -var k=a(1);l.prototype.addEventListener=function(h,f){a.i(k.a)("function"==typeof f,"eventemitter: second argument should be a function");this.__listeners[h]||(this.__listeners[h]=[]);this.__listeners[h].push(f)};l.prototype.removeEventListener=function(a,f){if(0===arguments.length)this.__listeners={};else if(this.__listeners.hasOwnProperty(a))if(1===arguments.length)delete this.__listeners[a];else{var e=this.__listeners[a],c=e.indexOf(f);~c&&e.splice(c,1);e.length||delete this.__listeners[a]}};l.prototype.trigger= -function(a,f){this.__listeners.hasOwnProperty(a)&&this.__listeners[a].slice().forEach(function(a){try{a(f)}catch(c){console.error(c,c.stack)}})};l.prototype.on=l.prototype.addEventListener;l.prototype.off=l.prototype.removeEventListener;g.a=l},function(d,g,a){var l=0;g.a=function(){var a=0;l=d){if(q)throw q(b,t);throw b;}v&&v(b,t);var m=a.i(f.a)(h,t);return e(m).mergeMap(function(){u&&u();return c})})}function h(c,b){var h=b.retryDelay,d=b.totalRetry,k=b.shouldRetry,g=b.resetDelay,q=b.errorSelector,v=b.onRetry,t=0,u=void 0;0=d){if(q)throw q(b,t);throw b;}v&&v(b,t);b=a.i(f.a)(h,t);return e(b).mergeMap(function(){u&&u();return y.apply(void 0,m)})})}}a.d(g,"a",function(){return k});a.d(g,"b",function(){return h});var f=a(99);d=a(51);a.n(d);var e=d.TimerObservable.create},function(d,g,a){var l=this&&this.__extends||function(a,f){function e(){this.constructor=a}for(var c in f)f.hasOwnProperty(c)&&(a[c]=f[c]);a.prototype=null===f?Object.create(f):(e.prototype=f.prototype,new e)};d= -a(7);var k=a(56);a=function(a){function f(e){a.call(this);this._value=e}l(f,a);Object.defineProperty(f.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0});f.prototype._subscribe=function(e){var c=a.prototype._subscribe.call(this,e);c&&!c.closed&&e.next(this._value);return c};f.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new k.ObjectUnsubscribedError;return this._value};f.prototype.next=function(e){a.prototype.next.call(this, -this._value=e)};return f}(d.Subject);g.BehaviorSubject=a},function(d,g,a){var l=this&&this.__extends||function(a,h){function f(){this.constructor=a}for(var e in h)h.hasOwnProperty(e)&&(a[e]=h[e]);a.prototype=null===h?Object.create(h):(f.prototype=h.prototype,new f)};d=function(a){function h(f,e){a.call(this);this.value=f;this.scheduler=e;this._isScalar=!0;e&&(this._isScalar=!1)}l(h,a);h.create=function(a,e){return new h(a,e)};h.dispatch=function(a){var e=a.value,c=a.subscriber;a.done?c.complete(): -(c.next(e),c.closed||(a.done=!0,this.schedule(a)))};h.prototype._subscribe=function(a){var e=this.value,c=this.scheduler;if(c)return c.schedule(h.dispatch,0,{done:!1,value:e,subscriber:a});a.next(e);a.closed||a.complete()};return h}(a(0).Observable);g.ScalarObservable=d},function(d,g,a){var l=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};d=a(12);var k=a(15); +var h=/^(?:[a-z]+:)?\/\//i,f=/\/\.{1,2}\//},function(e,g,a){e=a(54);a=a(55);g.async=new a.AsyncScheduler(e.AsyncAction)},function(e,g,a){g.errorObject={e:{}}},function(e,g,a){var l=a(22),k=a(18),h=function(a,d){for(var c=a.timeline,b=0,f=c.length;b>>1;c[h].ts=q);){var t=m[d],u=t.d,w=t.ts,y=t.range,v=Math.max(v,u);if(0>u){w+vA&&(A=Math.ceil(((x?x.t:Infinity)-t.ts)/t.d)-1);t=A;x=c-w;x=0c.d&&(c={ts:c.ts,d:0,r:c.r});return!(b*d-(void 0===f?0:f)<=a.i(k.d)(c))},getFirstPosition:function(a){if(a.timeline.length)return a.timeline[0].ts/a.timescale},getLastPosition:function(f){if(f.timeline.length){var d=f.timeline[f.timeline.length-1];return a.i(k.d)(d)/f.timescale}},checkDiscontinuity:function(f,d){var c=f.timeline,b=f.timescale,b=void 0===b?1:b,m=d*b;if(0>=m)return-1;var e=h(f,m);if(0>e||e>= +c.length-1)return-1;var g=c[e];if(-1===g.d)return-1;var l=g.ts,g=a.i(k.d)(g),c=c[e+1];return g!==c.ts&&m>=l&&m<=g&&g-m=c)return!1;-1===h.d&&((m=b[m-2])&&m.d===c?(m.r++,b.pop()):h.d=c);f.timeline.push({d:-1,ts:d,r:0});return!0}return d.ts>=a.i(k.d)(h)?(h.d===d.d?h.r++:f.timeline.push({d:d.d,ts:d.ts,r:0}),!0):!1}}},function(e,g,a){function l(){this.__listeners={}} +var k=a(1);l.prototype.addEventListener=function(h,f){a.i(k.a)("function"==typeof f,"eventemitter: second argument should be a function");this.__listeners[h]||(this.__listeners[h]=[]);this.__listeners[h].push(f)};l.prototype.removeEventListener=function(a,f){if(0===arguments.length)this.__listeners={};else if(this.__listeners.hasOwnProperty(a))if(1===arguments.length)delete this.__listeners[a];else{var d=this.__listeners[a],c=d.indexOf(f);~c&&d.splice(c,1);d.length||delete this.__listeners[a]}};l.prototype.trigger= +function(a,f){this.__listeners.hasOwnProperty(a)&&this.__listeners[a].slice().forEach(function(a){try{a(f)}catch(c){console.error(c,c.stack)}})};l.prototype.on=l.prototype.addEventListener;l.prototype.off=l.prototype.removeEventListener;g.a=l},function(e,g,a){var l=0;g.a=function(){var a=0;l=e){if(q)throw q(b,t);throw b;}v&&v(b,t);var m=a.i(f.a)(h,t);return d(m).mergeMap(function(){u&&u();return c})})}function h(c,b){var h=b.retryDelay,e=b.totalRetry,k=b.shouldRetry,g=b.resetDelay,q=b.errorSelector,v=b.onRetry,t=0,u=void 0;0=e){if(q)throw q(b,t);throw b;}v&&v(b,t);b=a.i(f.a)(h,t);return d(b).mergeMap(function(){u&&u();return y.apply(void 0,m)})})}}a.d(g,"a",function(){return k});a.d(g,"b",function(){return h});var f=a(99);e=a(51);a.n(e);var d=e.TimerObservable.create},function(e,g,a){var l=this&&this.__extends||function(a,f){function d(){this.constructor=a}for(var c in f)f.hasOwnProperty(c)&&(a[c]=f[c]);a.prototype=null===f?Object.create(f):(d.prototype=f.prototype,new d)};e= +a(7);var k=a(56);a=function(a){function f(d){a.call(this);this._value=d}l(f,a);Object.defineProperty(f.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0});f.prototype._subscribe=function(d){var c=a.prototype._subscribe.call(this,d);c&&!c.closed&&d.next(this._value);return c};f.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new k.ObjectUnsubscribedError;return this._value};f.prototype.next=function(d){a.prototype.next.call(this, +this._value=d)};return f}(e.Subject);g.BehaviorSubject=a},function(e,g,a){var l=this&&this.__extends||function(a,h){function f(){this.constructor=a}for(var d in h)h.hasOwnProperty(d)&&(a[d]=h[d]);a.prototype=null===h?Object.create(h):(f.prototype=h.prototype,new f)};e=function(a){function h(f,d){a.call(this);this.value=f;this.scheduler=d;this._isScalar=!0;d&&(this._isScalar=!1)}l(h,a);h.create=function(a,d){return new h(a,d)};h.dispatch=function(a){var d=a.value,c=a.subscriber;a.done?c.complete(): +(c.next(d),c.closed||(a.done=!0,this.schedule(a)))};h.prototype._subscribe=function(a){var d=this.value,c=this.scheduler;if(c)return c.schedule(h.dispatch,0,{done:!1,value:d,subscriber:a});a.next(d);a.closed||a.complete()};return h}(a(0).Observable);g.ScalarObservable=e},function(e,g,a){var l=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};e=a(12);var k=a(15); g.mergeAll=function(a){void 0===a&&(a=Number.POSITIVE_INFINITY);return this.lift(new h(a))};var h=function(){function a(a){this.concurrent=a}a.prototype.call=function(a,b){return b.subscribe(new f(a,this.concurrent))};return a}();g.MergeAllOperator=h;var f=function(a){function c(b,c){a.call(this,b);this.concurrent=c;this.hasCompleted=!1;this.buffer=[];this.active=0}l(c,a);c.prototype._next=function(a){this.active=m.length)c.error(new K.c("INCOMPATIBLE_KEYSYSTEMS",null,!0));else{var n=m[d],k=n.keyType,g=n.keySystem,p=[b(g)];x.a.debug("eme: request keysystem access "+k+","+(d+1+" of "+m.length),p);h=a.i(E.i)(k,p).subscribe(function(a){x.a.info("eme: found compatible keysystem",k,p);c.next({keySystem:g,keySystemAccess:a}); -c.complete()},function(){x.a.debug("eme: rejected access to keysystem",k,p);h=null;e(d+1)})}}var f=!1,h=null;e(0);return function(){f=!0;h&&h.unsubscribe()}})}function n(b,c,e){var f=X,m=M;return a.i(z.b)(e.createMediaKeys()).mergeMap(function(h){M=h;L=e.getConfiguration();V=c;X=b;if(b.mediaKeys===h)return J.Observable.of(h);m&&m!==M&&H.dispose();var d;f&&f!==X?(x.a.debug("eme: unlink old video element and set mediakeys"),d=a.i(E.j)(f,null).concat(a.i(E.j)(X,h))):(x.a.debug("eme: set mediakeys"), -d=a.i(E.j)(X,h));return d.mapTo(h)})}function p(a,b,c,e,f){x.a.debug("eme: create a new "+b+" session");var m=a.createSession(b);a=t(m,c,f)["finally"](function(){H.deleteAndClose(m);O["delete"](e)}).publish();return{session:m,sessionEvents:a}}function r(b,c,f,m,h,d){b=p(b,f,c,h,d);var n=b.session;b=b.sessionEvents;H.add(h,n,b);x.a.debug("eme: generate request",m,h);m=a.i(z.b)(n.generateRequest(m,h))["catch"](function(a){throw new K.c("KEY_GENERATE_REQUEST_ERROR",a,!1);})["do"](function(){"persistent-license"== -f&&O.add(h,n)}).mapTo(e("generated-request",n,{initData:h,initDataType:m}));return a.i(N.merge)(b,m)}function q(a,b,c,e,f,m){return r(a,b,c,e,f,m)["catch"](function(h){if(h.code!==K.b.KEY_GENERATE_REQUEST_ERROR)throw h;var d=H.getFirst();if(!d)throw h;x.a.warn("eme: could not create a new session, retry after closing a currently loaded session",h);return H.deleteAndClose(d).mergeMap(function(){return r(a,b,c,e,f,m)})})}function v(b,c,f,m,h,d){x.a.debug("eme: load persisted session",f);var n=p(b,"persistent-license", -c,h,d),k=n.session,g=n.sessionEvents;return a.i(z.b)(k.load(f))["catch"](function(){return J.Observable.of(!1)}).mergeMap(function(a){if(a)return H.add(h,k,g),O.add(h,k),g.startWith(e("loaded-session",k,{storedSessionId:f}));x.a.warn("eme: no data stored for the loaded session, do fallback",f);H.deleteById(f);O["delete"](h);k.sessionId&&k.remove();return q(b,c,"persistent-license",m,h,d).startWith(e("loaded-session-failed",k,{storedSessionId:f}))})}function t(b,c,f){function h(a,b){return a.type=== -K.a.ENCRYPTED_MEDIA_ERROR?(a.fatal=b,a):new K.c("KEY_LOAD_ERROR",a,b)}x.a.debug("eme: handle message events",b);var m=void 0,d={totalRetry:2,retryDelay:200,errorSelector:function(a){return h(a,!0)},onRetry:function(a){return f.next(h(a,!1))}},n=U(b).map(function(a){throw new K.c("KEY_ERROR",a,!0);}),k=S(b).mergeMap(function(e){m=e.sessionId;x.a.debug("eme: keystatuseschange event",m,b,e);b.keyStatuses.forEach(function(a,b){if(R[b]||R[a])throw new K.c("KEY_STATUS_CHANGE_ERROR",b,!0);});return c.onKeyStatusesChange? -a.i(z.c)(function(){return a.i(z.b)(c.onKeyStatusesChange(e,b))})["catch"](function(a){throw new K.c("KEY_STATUS_CHANGE_ERROR",a,!0);}):(x.a.info("eme: keystatuseschange event not handled"),C())}),g=Y(b).mergeMap(function(e){m=e.sessionId;var f=new Uint8Array(e.message),h=e.messageType||"license-request";x.a.debug("eme: event message type "+h,b,e);e=I(function(){return a.i(z.b)(c.getLicense(f,h)).timeout(1E4)["catch"](function(a){if(a instanceof F.TimeoutError)throw new K.c("KEY_LOAD_TIMEOUT",null, -!1);throw a;})});return a.i(D.a)(e,d)}),k=a.i(N.merge)(g,k).concatMap(function(c){x.a.debug("eme: update session",m,c);return a.i(z.b)(b.update(c,m))["catch"](function(a){throw new K.c("KEY_UPDATE_ERROR",a,!0);}).mapTo(e("session-update",b,{updatedWith:c}))}),n=a.i(N.merge)(k,n);return b.closed?n.takeUntil(a.i(z.b)(b.closed)):n}function u(b,c,f){function h(a,c){var h=c.keySystem,m=c.keySystemAccess;h.persistentLicense&&O.setStorage(h.licenseStorage);x.a.info("eme: encrypted event",a);return n(b,h, -m).mergeMap(function(b){a:{var c=m.getConfiguration(),d=a.initDataType,n=new Uint8Array(a.initData),k=H.get(n);if(k&&k.sessionId)x.a.debug("eme: reuse loaded session",k.sessionId),b=J.Observable.of(e("reuse-session",k));else{c=(k=(c=c.sessionTypes)&&0<=c.indexOf("persistent-license"))&&h.persistentLicense?"persistent-license":"temporary";if(k&&h.persistentLicense&&(k=O.get(n))){b=v(b,h,k.sessionId,d,n,f);break a}b=q(b,h,c,d,n,f)}}return b})}return a.i(G.combineLatest)(T(b),m(c)).take(1).mergeMap(function(a){return h(a[0], -a[1])})}function w(){return V&&V.type}function y(){X&&a.i(E.j)(X,null).subscribe(function(){});X=V=M=null;H.dispose()}a.d(g,"c",function(){return u});a.d(g,"b",function(){return w});a.d(g,"d",function(){return T});a.d(g,"a",function(){return y});var x=a(3),A=a(1),z=a(11),D=a(29),J=a(0);a.n(J);d=a(8);a.n(d);g=a(48);a.n(g);var G=a(20);a.n(G);var N=a(14);a.n(N);var F=a(57);a.n(F);var E=a(9),K=a(6),T=E.f.onEncrypted,Y=E.f.onKeyMessage,U=E.f.onKeyError,S=E.f.onKeyStatusesChange,C=d.EmptyObservable.create, -I=g.DeferObservable.create,P={clearkey:["webkit-org.w3.clearkey","org.w3.clearkey"],widevine:["com.widevine.alpha"],playready:["com.microsoft.playready","com.chromecast.playready","com.youtube.playready"]},Q=["HW_SECURE_ALL","HW_SECURE_DECODE","HW_SECURE_CRYPTO","SW_SECURE_DECODE","SW_SECURE_CRYPTO"],R={expired:!0,"internal-error":!0};d=function(){function a(){h(this,a);this._entries=[]}a.prototype.find=function(a){for(var b=0;b=m.length)c.error(new K.c("INCOMPATIBLE_KEYSYSTEMS",null,!0));else{var n=m[e],k=n.keyType,g=n.keySystem,p=[b(g)];x.a.debug("eme: request keysystem access "+k+","+(e+1+" of "+m.length),p);h=a.i(E.i)(k,p).subscribe(function(a){x.a.info("eme: found compatible keysystem",k,p);c.next({keySystem:g,keySystemAccess:a}); +c.complete()},function(){x.a.debug("eme: rejected access to keysystem",k,p);h=null;d(e+1)})}}var f=!1,h=null;d(0);return function(){f=!0;h&&h.unsubscribe()}})}function n(b,c,d){var f=X,m=M;return a.i(z.b)(d.createMediaKeys()).mergeMap(function(h){M=h;L=d.getConfiguration();V=c;X=b;if(b.mediaKeys===h)return J.Observable.of(h);m&&m!==M&&H.dispose();var e;f&&f!==X?(x.a.debug("eme: unlink old video element and set mediakeys"),e=a.i(E.j)(f,null).concat(a.i(E.j)(X,h))):(x.a.debug("eme: set mediakeys"), +e=a.i(E.j)(X,h));return e.mapTo(h)})}function p(a,b,c,d,f){x.a.debug("eme: create a new "+b+" session");var m=a.createSession(b);a=t(m,c,f)["finally"](function(){H.deleteAndClose(m);O["delete"](d)}).publish();return{session:m,sessionEvents:a}}function r(b,c,f,m,h,e){b=p(b,f,c,h,e);var n=b.session;b=b.sessionEvents;H.add(h,n,b);x.a.debug("eme: generate request",m,h);m=a.i(z.b)(n.generateRequest(m,h))["catch"](function(a){throw new K.c("KEY_GENERATE_REQUEST_ERROR",a,!1);})["do"](function(){"persistent-license"== +f&&O.add(h,n)}).mapTo(d("generated-request",n,{initData:h,initDataType:m}));return a.i(N.merge)(b,m)}function q(a,b,c,d,f,m){return r(a,b,c,d,f,m)["catch"](function(h){if(h.code!==K.b.KEY_GENERATE_REQUEST_ERROR)throw h;var e=H.getFirst();if(!e)throw h;x.a.warn("eme: could not create a new session, retry after closing a currently loaded session",h);return H.deleteAndClose(e).mergeMap(function(){return r(a,b,c,d,f,m)})})}function v(b,c,f,m,h,e){x.a.debug("eme: load persisted session",f);var n=p(b,"persistent-license", +c,h,e),k=n.session,g=n.sessionEvents;return a.i(z.b)(k.load(f))["catch"](function(){return J.Observable.of(!1)}).mergeMap(function(a){if(a)return H.add(h,k,g),O.add(h,k),g.startWith(d("loaded-session",k,{storedSessionId:f}));x.a.warn("eme: no data stored for the loaded session, do fallback",f);H.deleteById(f);O["delete"](h);k.sessionId&&k.remove();return q(b,c,"persistent-license",m,h,e).startWith(d("loaded-session-failed",k,{storedSessionId:f}))})}function t(b,c,f){function h(a,b){return a.type=== +K.a.ENCRYPTED_MEDIA_ERROR?(a.fatal=b,a):new K.c("KEY_LOAD_ERROR",a,b)}x.a.debug("eme: handle message events",b);var m=void 0,e={totalRetry:2,retryDelay:200,errorSelector:function(a){return h(a,!0)},onRetry:function(a){return f.next(h(a,!1))}},n=U(b).map(function(a){throw new K.c("KEY_ERROR",a,!0);}),k=S(b).mergeMap(function(d){m=d.sessionId;x.a.debug("eme: keystatuseschange event",m,b,d);b.keyStatuses.forEach(function(a,b){if(R[b]||R[a])throw new K.c("KEY_STATUS_CHANGE_ERROR",b,!0);});return c.onKeyStatusesChange? +a.i(z.c)(function(){return a.i(z.b)(c.onKeyStatusesChange(d,b))})["catch"](function(a){throw new K.c("KEY_STATUS_CHANGE_ERROR",a,!0);}):(x.a.info("eme: keystatuseschange event not handled"),C())}),g=Y(b).mergeMap(function(d){m=d.sessionId;var f=new Uint8Array(d.message),h=d.messageType||"license-request";x.a.debug("eme: event message type "+h,b,d);d=I(function(){return a.i(z.b)(c.getLicense(f,h)).timeout(1E4)["catch"](function(a){if(a instanceof F.TimeoutError)throw new K.c("KEY_LOAD_TIMEOUT",null, +!1);throw a;})});return a.i(D.a)(d,e)}),k=a.i(N.merge)(g,k).concatMap(function(c){x.a.debug("eme: update session",m,c);return a.i(z.b)(b.update(c,m))["catch"](function(a){throw new K.c("KEY_UPDATE_ERROR",a,!0);}).mapTo(d("session-update",b,{updatedWith:c}))}),n=a.i(N.merge)(k,n);return b.closed?n.takeUntil(a.i(z.b)(b.closed)):n}function u(b,c,f){function h(a,c){var h=c.keySystem,m=c.keySystemAccess;h.persistentLicense&&O.setStorage(h.licenseStorage);x.a.info("eme: encrypted event",a);return n(b,h, +m).mergeMap(function(b){a:{var c=m.getConfiguration(),e=a.initDataType,n=new Uint8Array(a.initData),k=H.get(n);if(k&&k.sessionId)x.a.debug("eme: reuse loaded session",k.sessionId),b=J.Observable.of(d("reuse-session",k));else{c=(k=(c=c.sessionTypes)&&0<=c.indexOf("persistent-license"))&&h.persistentLicense?"persistent-license":"temporary";if(k&&h.persistentLicense&&(k=O.get(n))){b=v(b,h,k.sessionId,e,n,f);break a}b=q(b,h,c,e,n,f)}}return b})}return a.i(G.combineLatest)(T(b),m(c)).take(1).mergeMap(function(a){return h(a[0], +a[1])})}function w(){return V&&V.type}function y(){X&&a.i(E.j)(X,null).subscribe(function(){});X=V=M=null;H.dispose()}a.d(g,"c",function(){return u});a.d(g,"b",function(){return w});a.d(g,"d",function(){return T});a.d(g,"a",function(){return y});var x=a(3),A=a(1),z=a(11),D=a(29),J=a(0);a.n(J);e=a(8);a.n(e);g=a(48);a.n(g);var G=a(20);a.n(G);var N=a(14);a.n(N);var F=a(57);a.n(F);var E=a(9),K=a(6),T=E.f.onEncrypted,Y=E.f.onKeyMessage,U=E.f.onKeyError,S=E.f.onKeyStatusesChange,C=e.EmptyObservable.create, +I=g.DeferObservable.create,P={clearkey:["webkit-org.w3.clearkey","org.w3.clearkey"],widevine:["com.widevine.alpha"],playready:["com.microsoft.playready","com.chromecast.playready","com.youtube.playready"]},Q=["HW_SECURE_ALL","HW_SECURE_DECODE","HW_SECURE_CRYPTO","SW_SECURE_DECODE","SW_SECURE_CRYPTO"],R={expired:!0,"internal-error":!0};e=function(){function a(){h(this,a);this._entries=[]}a.prototype.find=function(a){for(var b=0;bD.indexOf(a.type)?(q.a.info("not supported adaptation type",a.type),!1):!0});if(0===h.length)throw new u.d("MANIFEST_PARSE_ERROR",null,!0);c={};for(e=0;eD.indexOf(a.type)?(q.a.info("not supported adaptation type",a.type),!1):!0});if(0===h.length)throw new u.d("MANIFEST_PARSE_ERROR",null,!0);c={};for(d=0;dd&&(d>("seeking"==l.name?w:y)||r)):(n=u&&(!n&&"timeupdate"==h&&"timeupdate"==t&&m===z||"seeking"==h&&Infinity===d),m=l&&("seeking"!=h&&m!==z||"canplay"==h||Infinity>d&&(d>("seeking"==l.name?w:y)||r)));e.stalled=n?{name:h,playback:p}:m?null:l;f=e;b.next(f)}var f=k(a,"init"),h=setInterval(e,c?t:u);z.forEach(function(b){return a.addEventListener(b, -e)});b.next(f);return function(){clearInterval(h);z.forEach(function(b){return a.removeEventListener(b,e)})}}).multicast(function(){return new q.BehaviorSubject({name:"init",stalled:null})}).refCount()}function f(a){return a.filter(function(a){return"seeking"==a.name&&(Infinity===a.gap||a.gap<-x)}).skip(1).startWith(!0)}function e(a,b){return new Date(1E3*(a+b.availabilityStartTime))}function c(a,b){var c=a,e=b.suggestedPresentationDelay,f=b.presentationLiveGap,h=b.timeShiftBufferDepth;"number"!= -typeof c&&(c=c.getTime());var m=Date.now();return Math.max(Math.min(c,m-1E3*(f+e)),m-1E3*h)/1E3-b.availabilityStartTime}function b(a){return p(a)[0]}function m(a){if(!a.isLive)return a.getDuration();var b=a.availabilityStartTime;a=a.presentationLiveGap;return Date.now()/1E3-b-a}function n(a){var b=m(a);return a.isLive?b-A:b}function p(a){if(!a.isLive)return[0,a.getDuration()];var b=a.availabilityStartTime,c=a.presentationLiveGap;a=a.timeShiftBufferDepth;b=Date.now()/1E3-b-c;return[Math.min(b,b-a+ -5),b]}a.d(g,"b",function(){return l});a.d(g,"a",function(){return h});a.d(g,"i",function(){return f});a.d(g,"c",function(){return e});a.d(g,"f",function(){return c});a.d(g,"g",function(){return b});a.d(g,"d",function(){return m});a.d(g,"e",function(){return n});a.d(g,"h",function(){return p});var r=a(0);a.n(r);var q=a(30);a.n(q);var v=a(17),t=1E3,u=500,w=.5,y=5,x=2,A=10,z="canplay play progress seeking seeked loadedmetadata".split(" "),D=function(){function a(b,c,e,f,h,m,d,n,k,g){if(!(this instanceof -a))throw new TypeError("Cannot call a class as a function");this.ts=b;this.buffered=c;this.duration=e;this.gap=f;this.name=h;this.playback=m;this.range=d;this.readyState=n;this.stalled=k;this.paused=g}a.prototype.clone=function(){return new a(this.ts,this.buffered,this.duration,this.gap,this.name,this.playback,this.range,this.readyState,this.stalled,this.paused)};return a}()},function(d,g,a){function l(a){if("timeline"===a.indexType){var b=a.timeline[a.timeline.length-1];return(b.ts+(b.r+1)*b.d)/ -a.timescale}return Date.now()/1E3}function k(a){return a}function h(a){return"true"==a}function f(a){return"true"==a?!0:"false"==a?!1:parseInt(a)}function e(a){return new Date(Date.parse(a))}function c(b){if(!b)return 0;var c=u.exec(b);a.i(t.a)(c,b+" is not a valid ISO8601 duration");return 31536E3*parseFloat(c[2]||0)+2592E3*parseFloat(c[4]||0)+86400*parseFloat(c[6]||0)+3600*parseFloat(c[8]||0)+60*parseFloat(c[10]||0)+parseFloat(c[12]||0)}function b(a){var b=y.exec(a);if(!b)return-1;a=parseInt(b[1])|| +!1;this.trigger(a,b);this.trigger("updateend")};return b}(e.a)},function(e,g,a){function l(){return new D(0,new v.a,0,Infinity,"timeupdate",1,null,0,null,null)}function k(a,b){var c=a.currentTime,d=a.paused,f=new v.a(a.buffered);return new D(c,f,a.duration,f.getGap(c),b,a.playbackRate,f.getRange(c),a.readyState,null,d)}function h(a,b){var c=b.requiresMediaSource;return r.Observable.create(function(b){function d(d){d=k(a,d&&d.type||"timeupdate");var h=d.name,m=d.ts,e=d.gap,n=d.paused,g=d.readyState, +p=d.playback,l=f.stalled,t=f.name,z=f.ts,r;r=(r=d.range)?d.duration-(e+r.end)<=w:!1;var u=1<=g&&"loadedmetadata"!=h&&!l&&!r;c?(n=u&&(e<=w||Infinity===e||1===g),m=l&&1e&&(e>("seeking"==l.name?w:y)||r)):(n=u&&(!n&&"timeupdate"==h&&"timeupdate"==t&&m===z||"seeking"==h&&Infinity===e),m=l&&("seeking"!=h&&m!==z||"canplay"==h||Infinity>e&&(e>("seeking"==l.name?w:y)||r)));d.stalled=n?{name:h,playback:p}:m?null:l;f=d;b.next(f)}var f=k(a,"init"),h=setInterval(d,c?t:u);z.forEach(function(b){return a.addEventListener(b, +d)});b.next(f);return function(){clearInterval(h);z.forEach(function(b){return a.removeEventListener(b,d)})}}).multicast(function(){return new q.BehaviorSubject({name:"init",stalled:null})}).refCount()}function f(a){return a.filter(function(a){return"seeking"==a.name&&(Infinity===a.gap||a.gap<-x)}).skip(1).startWith(!0)}function d(a,b){return new Date(1E3*(a+b.availabilityStartTime))}function c(a,b){var c=a,d=b.suggestedPresentationDelay,f=b.presentationLiveGap,h=b.timeShiftBufferDepth;"number"!= +typeof c&&(c=c.getTime());var m=Date.now();return Math.max(Math.min(c,m-1E3*(f+d)),m-1E3*h)/1E3-b.availabilityStartTime}function b(a){return p(a)[0]}function m(a){if(!a.isLive)return a.getDuration();var b=a.availabilityStartTime;a=a.presentationLiveGap;return Date.now()/1E3-b-a}function n(a){var b=m(a);return a.isLive?b-A:b}function p(a){if(!a.isLive)return[0,a.getDuration()];var b=a.availabilityStartTime,c=a.presentationLiveGap;a=a.timeShiftBufferDepth;b=Date.now()/1E3-b-c;return[Math.min(b,b-a+ +5),b]}a.d(g,"b",function(){return l});a.d(g,"a",function(){return h});a.d(g,"i",function(){return f});a.d(g,"c",function(){return d});a.d(g,"f",function(){return c});a.d(g,"g",function(){return b});a.d(g,"d",function(){return m});a.d(g,"e",function(){return n});a.d(g,"h",function(){return p});var r=a(0);a.n(r);var q=a(30);a.n(q);var v=a(17),t=1E3,u=500,w=.5,y=5,x=2,A=10,z="canplay play progress seeking seeked loadedmetadata".split(" "),D=function(){function a(b,c,d,f,h,m,e,n,k,g){if(!(this instanceof +a))throw new TypeError("Cannot call a class as a function");this.ts=b;this.buffered=c;this.duration=d;this.gap=f;this.name=h;this.playback=m;this.range=e;this.readyState=n;this.stalled=k;this.paused=g}a.prototype.clone=function(){return new a(this.ts,this.buffered,this.duration,this.gap,this.name,this.playback,this.range,this.readyState,this.stalled,this.paused)};return a}()},function(e,g,a){function l(a){if("timeline"===a.indexType){var b=a.timeline[a.timeline.length-1];return(b.ts+(b.r+1)*b.d)/ +a.timescale}return Date.now()/1E3}function k(a){return a}function h(a){return"true"==a}function f(a){return"true"==a?!0:"false"==a?!1:parseInt(a)}function d(a){return new Date(Date.parse(a))}function c(b){if(!b)return 0;var c=u.exec(b);a.i(t.a)(c,b+" is not a valid ISO8601 duration");return 31536E3*parseFloat(c[2]||0)+2592E3*parseFloat(c[4]||0)+86400*parseFloat(c[6]||0)+3600*parseFloat(c[8]||0)+60*parseFloat(c[10]||0)+parseFloat(c[12]||0)}function b(a){var b=y.exec(a);if(!b)return-1;a=parseInt(b[1])|| 0;b=parseInt(b[2])||0;return 0 tag");a=k(a.querySelector("body"),0);for(b=0;b/gm,c=/^(([0-9]+):)?([0-9]+):([0-9]+)(\.([0-9]+))?$/,b=/(([0-9]+)(\.[0-9]+)?)(ms|h|m|s)/,m={h:3600,m:60,s:1,ms:.001}},function(d,g,a){function l(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!==typeof b&&"function"!==typeof b?a:b} -function k(a,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function h(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function");}function f(){return new XMLHttpRequest}function e(a){return new n(a)}d=a(0);a.n(d);var c=a(2); -a.n(c);var b=a(6),m=function q(a,b,c,e,f,m,d){h(this,q);this.status=a;this.url=b;this.responseType=c;this.sentTime=e;this.receivedTime=f;this.duration=this.receivedTime-this.sentTime;this.size=m;this.responseData=d},n=function(a){function b(c){h(this,b);var e=l(this,a.call(this)),m={url:"",createXHR:f,headers:null,method:"GET",responseType:"json",timeout:1E4,resultSelector:null,body:null},d;for(d in c)m[d]=c[d];e.request=m;return e}k(b,a);b.prototype._subscribe=function(a){return new p(a,this.request)}; -return b}(d.Observable),p=function(a){function c(b,e){h(this,c);var f=l(this,a.call(this,b));f.request=e;f.sentTime=Date.now();f.receivedTime=0;f.xhr=null;f.done=!1;f.resultSelector=e.resultSelector;f.send();return f}k(c,a);c.prototype.next=function(){this.done=!0;var a=this.resultSelector,c=this.xhr,e=this.request,f=this.destination,h=c.status,d=this.responseType,k=this.totalSize,n=this.sentTime,g=this.receivedTime,p=c.responseURL||e.url,l=void 0;if("json"==e.responseType)if("string"!=typeof c.response)l= -c.response;else try{l=JSON.parse(c.responseText)}catch(F){l=null}else l=c.response;null==l?f.error(new b.h(this,e,b.i.PARSE_ERROR)):(c=new m(h,p,d,n,g,k,l),a?f.next(a(c)):f.next(c))};c.prototype.setHeaders=function(a,b){for(var c in b)a.setRequestHeader(c,b[c])};c.prototype.setupEvents=function(a,c){a.ontimeout=function y(){y.subscriber.error(new b.h(this,y.request,b.i.TIMEOUT))};a.ontimeout.request=c;a.ontimeout.subscriber=this;a.onerror=function x(){x.subscriber.error(new b.h(this,x.request,b.i.ERROR_EVENT))}; -a.onerror.request=c;a.onerror.subscriber=this;a.onload=function A(a){if(4===this.readyState){var c=A.subscriber,e=A.request;c.receivedTime=Date.now();c.totalSize=a.total;var f=this.status;200<=f&&300>f?(c.next(a),c.complete()):c.error(new b.h(this,e,b.i.ERROR_HTTP_CODE))}};a.onload.subscriber=this;a.onload.request=c};c.prototype.send=function(){var a=this.request,b=this.request,c=b.method,e=b.url,h=b.headers,m=b.body,d=b.responseType,b=b.timeout,k=(a.createXHR||f)(a);this.xhr=k;k.open(c,e,!0);k.timeout= -b;k.responseType=d;"document"==d&&k.overrideMimeType("text/xml");h&&this.setHeaders(k,h);this.setupEvents(k,a);m?k.send(m):k.send()};c.prototype.unsubscribe=function(){var b=this.xhr;!this.done&&b&&4!==b.readyState&&b.abort();b.ontimeout=null;b.onerror=null;b.onload=null;a.prototype.unsubscribe.call(this)};return c}(c.Subscriber);e.RequestObservable=n;e.RequestError=b.h;e.RequestResponse=m;e.RequestErrorTypes=b.i;g.a=e},function(d,g,a){g.empty={closed:!0,next:function(a){},error:function(a){throw a; -},complete:function(){}}},function(d,g,a){var l=this&&this.__extends||function(a,e){function c(){this.constructor=a}for(var b in e)e.hasOwnProperty(b)&&(a[b]=e[b]);a.prototype=null===e?Object.create(e):(c.prototype=e.prototype,new c)};d=a(0);var k=a(15);a=a(12);d=function(a){function e(c){a.call(this);this.observableFactory=c}l(e,a);e.create=function(a){return new e(a)};e.prototype._subscribe=function(a){return new h(a,this.observableFactory)};return e}(d.Observable);g.DeferObservable=d;var h=function(a){function e(c, -b){a.call(this,c);this.factory=b;this.tryDefer()}l(e,a);e.prototype.tryDefer=function(){try{this._callFactory()}catch(c){this._error(c)}};e.prototype._callFactory=function(){var a=this.factory();a&&this.add(k.subscribeToResult(this,a))};return e}(a.OuterSubscriber)},function(d,g,a){var l=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};d=a(0);var k=a(38),h=a(37), -f=a(25),e=a(4),c=Object.prototype.toString;a=function(a){function b(b,c,e,f){a.call(this);this.sourceObj=b;this.eventName=c;this.selector=e;this.options=f}l(b,a);b.create=function(a,c,e,f){h.isFunction(e)&&(f=e,e=void 0);return new b(a,c,f,e)};b.setupSubscription=function(a,f,h,d,m){var k;if(a&&"[object NodeList]"===c.call(a)||a&&"[object HTMLCollection]"===c.call(a))for(var n=0,g=a.length;nNumber(c)&&1||Number(c):f.isScheduler(c)&&(d=c);f.isScheduler(d)||(d=h.async);this.scheduler=d;this.dueTime=e.isDate(b)?+b-this.scheduler.now():b}l(b,a);b.create=function(a,c,e){void 0===a&&(a=0);return new b(a,c,e)};b.dispatch=function(a){var b=a.index, -c=a.period,e=a.subscriber;e.next(b);if(!e.closed){if(-1===c)return e.complete();a.index=b+1;this.schedule(a,c)}};b.prototype._subscribe=function(a){return this.scheduler.schedule(b.dispatch,this.dueTime,{index:0,period:this.period,subscriber:a})};return b}(d.Observable);g.TimerObservable=a},function(d,g,a){function l(){for(var a=[],b=0;b=b});if(c){var e=a.filter(function(a){return a.width<=c});return e.length?e[e.length-1].bitrate:a[0]}return Infinity}function e(b,c){var e=b.map(function(a){return a.language}),e=a.i(v.d)(e,c);return 0<=e?b[e]:null}function c(a,b){var c=2 tag");a=k(a.querySelector("body"),0);for(b=0;b/gm,c=/^(([0-9]+):)?([0-9]+):([0-9]+)(\.([0-9]+))?$/,b=/(([0-9]+)(\.[0-9]+)?)(ms|h|m|s)/,m={h:3600,m:60,s:1,ms:.001}},function(e,g,a){function l(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!==typeof b&&"function"!==typeof b?a:b} +function k(a,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function h(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function");}function f(){return new XMLHttpRequest}function d(a){return new n(a)}e=a(0);a.n(e);var c=a(2); +a.n(c);var b=a(6),m=function q(a,b,c,d,f,m,e){h(this,q);this.status=a;this.url=b;this.responseType=c;this.sentTime=d;this.receivedTime=f;this.duration=this.receivedTime-this.sentTime;this.size=m;this.responseData=e},n=function(a){function b(c){h(this,b);var d=l(this,a.call(this)),m={url:"",createXHR:f,headers:null,method:"GET",responseType:"json",timeout:1E4,resultSelector:null,body:null},e;for(e in c)m[e]=c[e];d.request=m;return d}k(b,a);b.prototype._subscribe=function(a){return new p(a,this.request)}; +return b}(e.Observable),p=function(a){function c(b,d){h(this,c);var f=l(this,a.call(this,b));f.request=d;f.sentTime=Date.now();f.receivedTime=0;f.xhr=null;f.done=!1;f.resultSelector=d.resultSelector;f.send();return f}k(c,a);c.prototype.next=function(){this.done=!0;var a=this.resultSelector,c=this.xhr,d=this.request,f=this.destination,h=c.status,e=this.responseType,k=this.totalSize,n=this.sentTime,g=this.receivedTime,p=c.responseURL||d.url,l=void 0;if("json"==d.responseType)if("string"!=typeof c.response)l= +c.response;else try{l=JSON.parse(c.responseText)}catch(F){l=null}else l=c.response;null==l?f.error(new b.h(this,d,b.i.PARSE_ERROR)):(c=new m(h,p,e,n,g,k,l),a?f.next(a(c)):f.next(c))};c.prototype.setHeaders=function(a,b){for(var c in b)a.setRequestHeader(c,b[c])};c.prototype.setupEvents=function(a,c){a.ontimeout=function y(){y.subscriber.error(new b.h(this,y.request,b.i.TIMEOUT))};a.ontimeout.request=c;a.ontimeout.subscriber=this;a.onerror=function x(){x.subscriber.error(new b.h(this,x.request,b.i.ERROR_EVENT))}; +a.onerror.request=c;a.onerror.subscriber=this;a.onload=function A(a){if(4===this.readyState){var c=A.subscriber,d=A.request;c.receivedTime=Date.now();c.totalSize=a.total;var f=this.status;200<=f&&300>f?(c.next(a),c.complete()):c.error(new b.h(this,d,b.i.ERROR_HTTP_CODE))}};a.onload.subscriber=this;a.onload.request=c};c.prototype.send=function(){var a=this.request,b=this.request,c=b.method,d=b.url,h=b.headers,m=b.body,e=b.responseType,b=b.timeout,k=(a.createXHR||f)(a);this.xhr=k;k.open(c,d,!0);k.timeout= +b;k.responseType=e;"document"==e&&k.overrideMimeType("text/xml");h&&this.setHeaders(k,h);this.setupEvents(k,a);m?k.send(m):k.send()};c.prototype.unsubscribe=function(){var b=this.xhr;!this.done&&b&&4!==b.readyState&&b.abort();b.ontimeout=null;b.onerror=null;b.onload=null;a.prototype.unsubscribe.call(this)};return c}(c.Subscriber);d.RequestObservable=n;d.RequestError=b.h;d.RequestResponse=m;d.RequestErrorTypes=b.i;g.a=d},function(e,g,a){g.empty={closed:!0,next:function(a){},error:function(a){throw a; +},complete:function(){}}},function(e,g,a){var l=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};e=a(0);var k=a(15);a=a(12);e=function(a){function d(c){a.call(this);this.observableFactory=c}l(d,a);d.create=function(a){return new d(a)};d.prototype._subscribe=function(a){return new h(a,this.observableFactory)};return d}(e.Observable);g.DeferObservable=e;var h=function(a){function d(c, +b){a.call(this,c);this.factory=b;this.tryDefer()}l(d,a);d.prototype.tryDefer=function(){try{this._callFactory()}catch(c){this._error(c)}};d.prototype._callFactory=function(){var a=this.factory();a&&this.add(k.subscribeToResult(this,a))};return d}(a.OuterSubscriber)},function(e,g,a){var l=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};e=a(0);var k=a(38),h=a(37), +f=a(25),d=a(4),c=Object.prototype.toString;a=function(a){function b(b,c,d,f){a.call(this);this.sourceObj=b;this.eventName=c;this.selector=d;this.options=f}l(b,a);b.create=function(a,c,d,f){h.isFunction(d)&&(f=d,d=void 0);return new b(a,c,f,d)};b.setupSubscription=function(a,f,h,e,m){var k;if(a&&"[object NodeList]"===c.call(a)||a&&"[object HTMLCollection]"===c.call(a))for(var n=0,g=a.length;nNumber(c)&&1||Number(c):f.isScheduler(c)&&(e=c);f.isScheduler(e)||(e=h.async);this.scheduler=e;this.dueTime=d.isDate(b)?+b-this.scheduler.now():b}l(b,a);b.create=function(a,c,d){void 0===a&&(a=0);return new b(a,c,d)};b.dispatch=function(a){var b=a.index, +c=a.period,d=a.subscriber;d.next(b);if(!d.closed){if(-1===c)return d.complete();a.index=b+1;this.schedule(a,c)}};b.prototype._subscribe=function(a){return this.scheduler.schedule(b.dispatch,this.dueTime,{index:0,period:this.period,subscriber:a})};return b}(e.Observable);g.TimerObservable=a},function(e,g,a){function l(){for(var a=[],b=0;b=b});if(c){var d=a.filter(function(a){return a.width<=c.width});return d.length?d[d.length-1].bitrate:(d=a[0])&&d.bitrate||0}return Infinity}function d(b,c){var d=b.map(function(a){return a.language}),d=a.i(v.d)(d,c);return 0<=d?b[d]:null}function c(a,b){var c=2a?a:Infinity>b?Math.min(b,c):c;return l(e,function(a){return a.bitrate===h(d,f)})}).distinctUntilChanged(function(a,b){return a.id===b.id})}else b=a.i(q.e)(e[0]);return{representations:b, -bufferSizes:M[c]||new p.BehaviorSubject(v)}},getAdaptationsChoice:function(b,c){return"audio"==b?g(c):"text"==b?w(c):a.i(q.e)(c[0])},unsubscribe:function(){R&&(R.unsubscribe(),R=null)}}}},function(d,g,a){function l(d){function k(a,b){for(var c=a.ts,e=a.buffered,f=e.getRange(c),e=e.getOuterRanges(c),d=[],m=0;mk.start&&d.push(k)}f&&(h.a.debug("buffer: gc removing part of inner range",d),c-b>f.start&&d.push({start:f.start,end:c-b}),c+ba.time?!0:(a=Q.hasRange(a.time/a.timescale,a.duration/a.timescale))?a.bitrate*wC&&Infinity>r?Math.min(r,I):0,z=Q.getRange(t);if(z&&z.bitrate===b.bitrate){var w=Math.floor(z.end-t);w>m&&(m=w)}g=t+m; -r=t+u-g;if(b.index.shouldRefresh(t,g,t+u))throw new q.g("OUT_OF_INDEX_ERROR",b.index.getType(),!1);var P=b.index.getSegments(g,r);l&&P.unshift(l);n=P}n=n.filter(f)}catch(ba){if(ba.type===q.a.INDEX_ERROR&&ba.code===q.b.OUT_OF_INDEX_ERROR)return S.next({type:"out-of-index",value:ba}),v();throw ba;}for(t=0;ta?a:Infinity>b?Math.min(b,c):c;return l(d,function(a){return a.bitrate===h(e,f)})}).distinctUntilChanged(function(a,b){return a.id===b.id})}else b=a.i(q.e)(d[0]);return{representations:b, +bufferSizes:M[c]||new p.BehaviorSubject(v)}},getAdaptationsChoice:function(b,c){return"audio"==b?g(c):"text"==b?w(c):a.i(q.e)(c[0])},unsubscribe:function(){R&&(R.unsubscribe(),R=null)}}}},function(e,g,a){function l(e){function k(a,b){for(var c=a.ts,d=a.buffered,f=d.getRange(c),d=d.getOuterRanges(c),e=[],m=0;mk.start&&e.push(k)}f&&(h.a.debug("buffer: gc removing part of inner range",e),c-b>f.start&&e.push({start:f.start,end:c-b}),c+ba.time?!0:(a=Q.hasRange(a.time/a.timescale,a.duration/a.timescale))?a.bitrate*wC&&Infinity>r?Math.min(r,I):0,z=Q.getRange(t);if(z&&z.bitrate===b.bitrate){var w=Math.floor(z.end-t);w>m&&(m=w)}g=t+m; +r=t+u-g;if(b.index.shouldRefresh(t,g,t+u))throw new q.g("OUT_OF_INDEX_ERROR",b.index.getType(),!1);var P=b.index.getSegments(g,r);l&&P.unshift(l);n=P}n=n.filter(f)}catch(ba){if(ba.type===q.a.INDEX_ERROR&&ba.code===q.b.OUT_OF_INDEX_ERROR)return S.next({type:"out-of-index",value:ba}),v();throw ba;}for(t=0;t=c.length)break;d=c[f++]}else{f=c.next();if(f.done)break;d=f.value}if(!b.hasOwnProperty(d)||!h(a[d],b[d]))return!1}return!0}return!1}function f(a,b){return b?"seeking"==b.name?"SEEKING":"BUFFERING":a?"PLAYING":"PAUSED"}function e(){}function c(b){a.i(y.a)(b._manifest,"player: no manifest loaded")}function b(a,b){return a.filter(function(a){return a.type== -b}).map(function(a){return a.value})}var m=a(3),n=a(4);a.n(n);var p=a(103),r=a(7);a.n(r);var q=a(30);a.n(q);var v=a(20);a.n(v);var t=a(11),u=a(19);d=a(27);var w=a(101),y=a(1),x=a(9),A=a(42),z=a(6),D=a(69),J=a(17),G=a(76),N=a(70),F=a(40),E=a(94),K=a(72),T=a(66),Y=a(74),U=a(39),S=function(){function a(a,b){for(var c=0;c=c.length)break;e=c[f++]}else{f=c.next();if(f.done)break;e=f.value}if(!b.hasOwnProperty(e)||!h(a[e],b[e]))return!1}return!0}return!1}function f(a,b){return b?"seeking"==b.name?"SEEKING":"BUFFERING":a?"PLAYING":"PAUSED"}function d(){}function c(b){a.i(y.a)(b._manifest,"player: no manifest loaded")}function b(a,b){return a.filter(function(a){return a.type== +b}).map(function(a){return a.value})}var m=a(3),n=a(4);a.n(n);var p=a(103),r=a(7);a.n(r);var q=a(30);a.n(q);var v=a(20);a.n(v);var t=a(11),u=a(19);e=a(27);var w=a(101),y=a(1),x=a(9),A=a(42),z=a(6),D=a(69),J=a(17),G=a(76),N=a(70),F=a(40),E=a(94),K=a(72),T=a(66),Y=a(74),U=a(39),S=function(){function a(a,b){for(var c=0;c=b?d:Math.min(d+b,h);if(null!=c.fromLastPosition)return b=c.fromLastPosition,0<=b?h:Math.max(d,h+b)}else{"string"==typeof m&&k.test(m)&&(m=parseFloat(m)/100*h);"string"==typeof g&&k.test(g)&&(d.end=parseFloat(g)/100*h);if(Infinity===g||"100%"===g)g=h;if(b.isLive){if(m)return a.i(e.f)(m,b);c=b.suggestedPresentationDelay;return a.i(e.d)(b)-(null==c?15:c)}a.i(f.a)(me&&(d=c.ts+e+1/60,L.currentTime=d,h.a.warn("discontinuity seek",c.ts,e,d)));return m}).map(function(a){return{type:"stalled",value:a.stalled}})}function K(b){return aa({url:b.getUrl()}).map(function(c){c=c.parsed;return{type:"manifest", -value:a.i(y.d)(b,a.i(y.c)(c.url,c.manifest,I,Q))}})}function T(c,e,f,m){var g=Object.keys(e.adaptations).map(function(b){var h=e.adaptations[b],g=a.i(y.e)(h[0].representations[0]);l(b)&&d(c,b,g);return G(c,b,g,h,f,m,e)}),g=n.merge.apply(void 0,g);return e.isLive?g.concatMap(function(a){a:{switch(a.type){case "index-discontinuity":h.a.warn("explicit discontinuity seek",a.value.ts);L.currentTime=a.value.ts;break;case "precondition-failed":e.updateLiveGap(1);h.a.warn("precondition failed",e.presentationLiveGap); -break;case "out-of-index":h.a.info("out of index");a=K(e);break a}a=b.Observable.of(a)}return a}):g}function Y(){return a.i(m.a)(L,"error").mergeMap(function(){var a=void 0;switch(L.error.code){case 1:a="MEDIA_ERR_ABORTED";break;case 2:a="MEDIA_ERR_NETWORK";break;case 3:a="MEDIA_ERR_DECODE";break;case 4:a="MEDIA_ERR_SRC_NOT_SUPPORTED"}h.a.error("stream: video element MEDIA_ERR("+a+")");throw new w.d(a,null,!0);})}var U=f.url,S=f.errorStream,C=f.keySystems,I=f.supplementaryTextTracks,P=f.hideNativeSubtitle, -Q=f.supplementaryImageTracks,R=f.timings,O=f.timeFragment,H=f.adaptive,M=f.pipelines,L=f.videoElement,V=f.autoPlay,X=f.startAt,ca=Infinity>O.end,aa=a.i(m.d)(M.manifest),Z={},W={};f=R.filter(function(a){var b=a.ts;a=a.duration;return 0Math.min(a,O.end)-b});var ga=a.i(c.b)(function(c){var e=c.url,f=c.mediaSource;c=f?a.i(r.n)(f):b.Observable.of(null);return a.i(p.combineLatest)(aa({url:e}),c).mergeMap(function(c){c=c[0].parsed;c=a.i(y.c)(c.url,c.manifest,I,Q);if(f){var e=c.getDuration(),e=Infinity=== -e?Number.MAX_VALUE:e;f.duration!==e&&(f.duration=e,h.a.info("set duration",f.duration))}var e=J(c),d=e.timings,m=e.seekings,e=b.Observable.of({type:"manifest",value:c}),g=F(),k=E(d,{changePlaybackRate:M.requiresMediaSource()}),l=N(c);c=T(f,c,d,m);d=Y();return a.i(n.merge)(e,l,k,g,c,d)})},{totalRetry:3,retryDelay:250,resetDelay:6E4,shouldRetry:function(a){return!0!==a.fatal},errorSelector:function(b){a.i(w.e)(b)||(b=new w.f("NONE",b,!0));b.fatal=!0;return b},onRetry:function(a,b){h.a.warn("stream retry", -a,b);S.next(a)}});return function(c,e){return b.Observable.create(function(b){function f(){if(d&&"closed"!=d.readyState)for(var b=d,c=b.readyState,b=b.sourceBuffers,f=0;f=a&&h<=c&&m<=c&&b.removeCue(d)}this.buffered.remove(a,c)};c.prototype._abort=function(){var a=this.trackElement, -c=this.video;a&&c&&c.hasChildNodes(a)&&c.removeChild(a);this.track.mode="disabled";this.size=0;this.video=this.track=this.trackElement=null};return c}(d.a);g.a=d},function(d,g,a){function l(d){if("string"==typeof d){var g=d,m=g.split(",");a.i(c.a)(2>=m.length,b);d=m[0]?m[0]:"";m=m[1]?m[1]:"";a.i(c.a)((d||m)&&(!d||m||-1===g.indexOf(",")),b);d=d.replace(/^smpte(-25|-30|-30-drop)?:/,"").replace(/^npt[:=]/,"").replace("clock:","");var g=/(((\d+:)?(\d\d):(\d\d))|(\d+))(\.\d*)?$/,l=/^\d+:\d\d:\d\d(:\d\d(\.\d\d)?)?$/, -q=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|([-+]\d{2}:\d{2}))?$/,v=/^\d*(\.\d+)? ?%$/;if(g.test(d)&&g.test(m))g=k;else if(l.test(d)&&l.test(m))g=h;else if(q.test(d)&&q.test(m))g=f;else if(v.test(d)&&v.test(m))g=e;else throw Error(b);d=g(d);m=g(m);a.i(c.a)(!1!==d||!1!==m,b);d={start:!1===d?"":d,end:!1===m?"":m}}else d||(d={});"string"==typeof d.start&&"string"==typeof d.end?(d.start||(d.start="0%"),d.end||(d.end="100%")):(d.start||(d.start=0),d.end||(d.end=Infinity));"string"==typeof d.start&& -"string"==typeof d.end?(a.i(c.a)(0<=parseFloat(d.start)&&100>=parseFloat(d.start),"player: startTime should be between 0% and 100%"),a.i(c.a)(0<=parseFloat(d.end)&&100>=parseFloat(d.end),"player: endTime should be between 0% and 100%")):(a.i(c.a)(("number"==typeof d.start||d.start instanceof Date)&&("number"==typeof d.end||d.end instanceof Date),"player: timeFragment should have interface { start, end } where start and end are numbers or dates"),a.i(c.a)(d.start=f,b);a.i(c.a)(59>=d,b);a.i(c.a)(1>=h||60>e,b);return 3600*f+60*d+e}function h(e){if(!e)return!1;var f,d,h,g;e=e.split(":");switch(e.length){case 3:f= -parseInt(e[0],10);d=parseInt(e[1],10);h=parseInt(e[2],10);g=e=0;break;case 4:f=parseInt(e[0],10);d=parseInt(e[1],10);h=parseInt(e[2],10);-1===e[3].indexOf(".")?(e=parseInt(e[3],10),g=0):(g=e[3].split("."),e=parseInt(g[0],10),g=parseInt(g[1],10));break;default:return!1}a.i(c.a)(23>=f,b);a.i(c.a)(59>=d,b);a.i(c.a)(59>=h,b);return 3600*f+60*d+h+.001*e+1E-6*g}function f(a){return new Date(Date.parse(a))}function e(a){return a?a:!1}a.d(g,"a",function(){return l});var c=a(1),b="invalid MediaFragment"}, -function(d,g,a){d.exports=a(64)["default"]},function(d,g,a){var l=a(85),k=a(28);d=function(){function d(){var f=this,e=0f.d&&(f={ts:f.ts,d:0,r:f.r});return h*e-(void 0===c?0:c)>=a.i(l.d)(f)},getFirstPosition:function(a){if(a.timeline.length)return a.timeline[0].ts/ -a.timescale},getLastPosition:function(d){if(d.timeline.length){var h=d.timeline[d.timeline.length-1];return a.i(l.d)(h)/d.timescale}}}},function(d,g,a){var l=a(22),k=a(18);g.a={getInitSegment:k.a,setTimescale:k.b,scale:k.c,getSegments:function(d,f,e,c){var b=a.i(k.e)(f,e,c);e=b.to;c=f.duration;var h=f.startNumber,g=f.timescale;f=f.media;for(var p=[],b=b.up;b<=e;b+=c){var r=Math.floor(b/c)+(null==h?1:h),b=r*c;p.push(new l.a({id:""+d+"_"+r,number:r,time:b,init:!1,duration:c,range:null,indexRange:null, -timescale:g,media:f}))}return p},getFirstPosition:function(){},getLastPosition:function(){},shouldRefresh:function(){return!1},checkDiscontinuity:function(){return-1},_addSegmentInfos:function(){return!1}}},function(d,g,a){var l=a(78),k=a(28);d=function(){function d(){var f=0=b?c:(Array(b+1).join("0")+c).slice(-b);return b}}function h(a,b,c){return-1===a.indexOf("$")?a:a.replace(/\$\$/g,"$").replace(/\$RepresentationID\$/g,c.id).replace(/\$Bandwidth(|\%0(\d+)d)\$/g,k(c.bitrate)).replace(/\$Number(|\%0(\d+)d)\$/g,k(b.number)).replace(/\$Time(|\%0(\d+)d)\$/g,k(b.time))}var f=a(0);a.n(f);d=a(8);a.n(d);var e=a(14);a.n(e);a(1);var c=a(23),b=a(92),m=a(10),n=a(46),p=a(90),r=a(45),q=a(44),v=d.EmptyObservable.create;g.a=function(){var d= -0=b?e:Math.min(e+b,h);if(null!=c.fromLastPosition)return b=c.fromLastPosition,0<=b?h:Math.max(e,h+b)}else{"string"==typeof m&&k.test(m)&&(m=parseFloat(m)/100*h);"string"==typeof g&&k.test(g)&&(e.end=parseFloat(g)/100*h);if(Infinity===g||"100%"===g)g=h;if(b.isLive){if(m)return a.i(d.f)(m,b);c=b.suggestedPresentationDelay;return a.i(d.d)(b)-(null==c?15:c)}a.i(f.a)(md&&(e=c.ts+d+1/60,L.currentTime=e,h.a.warn("discontinuity seek",c.ts,d,e)));return m}).map(function(a){return{type:"stalled",value:a.stalled}})}function K(b){return aa({url:b.getUrl()}).map(function(c){c=c.parsed;return{type:"manifest", +value:a.i(y.d)(b,a.i(y.c)(c.url,c.manifest,I,Q))}})}function T(c,d,f,m){var g=Object.keys(d.adaptations).map(function(b){var h=d.adaptations[b],g=a.i(y.e)(h[0].representations[0]);l(b)&&e(c,b,g);return G(c,b,g,h,f,m,d)}),g=n.merge.apply(void 0,g);return d.isLive?g.concatMap(function(a){a:{switch(a.type){case "index-discontinuity":h.a.warn("explicit discontinuity seek",a.value.ts);L.currentTime=a.value.ts;break;case "precondition-failed":d.updateLiveGap(1);h.a.warn("precondition failed",d.presentationLiveGap); +break;case "out-of-index":h.a.info("out of index");a=K(d);break a}a=b.Observable.of(a)}return a}):g}function Y(){return a.i(m.a)(L,"error").mergeMap(function(){var a=void 0;switch(L.error.code){case 1:a="MEDIA_ERR_ABORTED";break;case 2:a="MEDIA_ERR_NETWORK";break;case 3:a="MEDIA_ERR_DECODE";break;case 4:a="MEDIA_ERR_SRC_NOT_SUPPORTED"}h.a.error("stream: video element MEDIA_ERR("+a+")");throw new w.d(a,null,!0);})}var U=f.url,S=f.errorStream,C=f.keySystems,I=f.supplementaryTextTracks,P=f.hideNativeSubtitle, +Q=f.supplementaryImageTracks,R=f.timings,O=f.timeFragment,H=f.adaptive,M=f.pipelines,L=f.videoElement,V=f.autoPlay,X=f.startAt,ca=Infinity>O.end,aa=a.i(m.d)(M.manifest),Z={},W={};f=R.filter(function(a){var b=a.ts;a=a.duration;return 0Math.min(a,O.end)-b});var ga=a.i(c.b)(function(c){var d=c.url,f=c.mediaSource;c=f?a.i(r.n)(f):b.Observable.of(null);return a.i(p.combineLatest)(aa({url:d}),c).mergeMap(function(c){c=c[0].parsed;c=a.i(y.c)(c.url,c.manifest,I,Q);if(f){var d=c.getDuration(),d=Infinity=== +d?Number.MAX_VALUE:d;f.duration!==d&&(f.duration=d,h.a.info("set duration",f.duration))}var d=J(c),e=d.timings,m=d.seekings,d=b.Observable.of({type:"manifest",value:c}),g=F(),k=E(e,{changePlaybackRate:M.requiresMediaSource()}),l=N(c);c=T(f,c,e,m);e=Y();return a.i(n.merge)(d,l,k,g,c,e)})},{totalRetry:3,retryDelay:250,resetDelay:6E4,shouldRetry:function(a){return!0!==a.fatal},errorSelector:function(b){a.i(w.e)(b)||(b=new w.f("NONE",b,!0));b.fatal=!0;return b},onRetry:function(a,b){h.a.warn("stream retry", +a,b);S.next(a)}});return function(c,d){return b.Observable.create(function(b){function f(){if(e&&"closed"!=e.readyState)for(var b=e,c=b.readyState,b=b.sourceBuffers,f=0;f=a&&h<=c&&m<=c&&b.removeCue(e)}this.buffered.remove(a,c)};c.prototype._abort=function(){var a=this.trackElement, +c=this.video;a&&c&&c.hasChildNodes(a)&&c.removeChild(a);this.track.mode="disabled";this.size=0;this.video=this.track=this.trackElement=null};return c}(e.a);g.a=e},function(e,g,a){function l(e){if("string"==typeof e){var g=e,m=g.split(",");a.i(c.a)(2>=m.length,b);e=m[0]?m[0]:"";m=m[1]?m[1]:"";a.i(c.a)((e||m)&&(!e||m||-1===g.indexOf(",")),b);e=e.replace(/^smpte(-25|-30|-30-drop)?:/,"").replace(/^npt[:=]/,"").replace("clock:","");var g=/(((\d+:)?(\d\d):(\d\d))|(\d+))(\.\d*)?$/,l=/^\d+:\d\d:\d\d(:\d\d(\.\d\d)?)?$/, +q=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|([-+]\d{2}:\d{2}))?$/,v=/^\d*(\.\d+)? ?%$/;if(g.test(e)&&g.test(m))g=k;else if(l.test(e)&&l.test(m))g=h;else if(q.test(e)&&q.test(m))g=f;else if(v.test(e)&&v.test(m))g=d;else throw Error(b);e=g(e);m=g(m);a.i(c.a)(!1!==e||!1!==m,b);e={start:!1===e?"":e,end:!1===m?"":m}}else e||(e={});"string"==typeof e.start&&"string"==typeof e.end?(e.start||(e.start="0%"),e.end||(e.end="100%")):(e.start||(e.start=0),e.end||(e.end=Infinity));"string"==typeof e.start&& +"string"==typeof e.end?(a.i(c.a)(0<=parseFloat(e.start)&&100>=parseFloat(e.start),"player: startTime should be between 0% and 100%"),a.i(c.a)(0<=parseFloat(e.end)&&100>=parseFloat(e.end),"player: endTime should be between 0% and 100%")):(a.i(c.a)(("number"==typeof e.start||e.start instanceof Date)&&("number"==typeof e.end||e.end instanceof Date),"player: timeFragment should have interface { start, end } where start and end are numbers or dates"),a.i(c.a)(e.start=f,b);a.i(c.a)(59>=e,b);a.i(c.a)(1>=h||60>d,b);return 3600*f+60*e+d}function h(d){if(!d)return!1;var f,e,h,g;d=d.split(":");switch(d.length){case 3:f= +parseInt(d[0],10);e=parseInt(d[1],10);h=parseInt(d[2],10);g=d=0;break;case 4:f=parseInt(d[0],10);e=parseInt(d[1],10);h=parseInt(d[2],10);-1===d[3].indexOf(".")?(d=parseInt(d[3],10),g=0):(g=d[3].split("."),d=parseInt(g[0],10),g=parseInt(g[1],10));break;default:return!1}a.i(c.a)(23>=f,b);a.i(c.a)(59>=e,b);a.i(c.a)(59>=h,b);return 3600*f+60*e+h+.001*d+1E-6*g}function f(a){return new Date(Date.parse(a))}function d(a){return a?a:!1}a.d(g,"a",function(){return l});var c=a(1),b="invalid MediaFragment"}, +function(e,g,a){e.exports=a(64)["default"]},function(e,g,a){var l=a(85),k=a(28);e=function(){function e(){var f=this,d=0f.d&&(f={ts:f.ts,d:0,r:f.r});return h*d-(void 0===c?0:c)>=a.i(l.d)(f)},getFirstPosition:function(a){if(a.timeline.length)return a.timeline[0].ts/ +a.timescale},getLastPosition:function(e){if(e.timeline.length){var h=e.timeline[e.timeline.length-1];return a.i(l.d)(h)/e.timescale}}}},function(e,g,a){var l=a(22),k=a(18);g.a={getInitSegment:k.a,setTimescale:k.b,scale:k.c,getSegments:function(e,f,d,c){var b=a.i(k.e)(f,d,c);d=b.to;c=f.duration;var h=f.startNumber,g=f.timescale;f=f.media;for(var p=[],b=b.up;b<=d;b+=c){var r=Math.floor(b/c)+(null==h?1:h),b=r*c;p.push(new l.a({id:""+e+"_"+r,number:r,time:b,init:!1,duration:c,range:null,indexRange:null, +timescale:g,media:f}))}return p},getFirstPosition:function(){},getLastPosition:function(){},shouldRefresh:function(){return!1},checkDiscontinuity:function(){return-1},_addSegmentInfos:function(){return!1}}},function(e,g,a){var l=a(78),k=a(28);e=function(){function e(){var f=0=b?c:(Array(b+1).join("0")+c).slice(-b);return b}}function h(a,b,c){return-1===a.indexOf("$")?a:a.replace(/\$\$/g,"$").replace(/\$RepresentationID\$/g,c.id).replace(/\$Bandwidth(|\%0(\d+)d)\$/g,k(c.bitrate)).replace(/\$Number(|\%0(\d+)d)\$/g,k(b.number)).replace(/\$Time(|\%0(\d+)d)\$/g,k(b.time))}var f=a(0);a.n(f);e=a(8);a.n(e);var d=a(14);a.n(d);a(1);var c=a(23),b=a(92),m=a(10),n=a(46),p=a(90),r=a(45),q=a(44),v=e.EmptyObservable.create;g.a=function(){var e= +0=f)return-1;a.i(c.a)(h+m<=f,"dash: atom out of range");return h}function k(e){for(var d=e.length,f=0,h,g=void 0;f+8>>31)throw Error("not implemented");m=a.i(b.e)(c,d);d+=4;d+=4;f.push({ts:h,d:m,r:0,range:[e,e+n-1]});h+=m;e+=n}return{segments:f,timescale:g}}function f(e){var d=e.systemId;e=e.privateData;d=d.replace(/-/g,"");a.i(c.a)(32===d.length);d=a.i(b.h)(4,a.i(b.j)(d),a.i(b.i)(e.length),e);e=d.length+8;return a.i(b.h)(a.i(b.i)(e),a.i(b.b)("pssh"),d)}function e(c,e){if(!e||!e.length)return c;var d= -l(c,1836019574);if(-1==d)return c;for(var h=a.i(b.e)(c,d),g=[c.subarray(d,d+h)],k=0;k]/ig,g=/]|<\/body>/ig,k=[],n=e.match(c)[1],p,w;g.exec(e);p=/\.(\S+)\s*{([^}]*)}/gi;w={};for(var y;y=p.exec(n);){var x=y[1];y=y[2].match(/\s*lang:\s*(\S+);/i)[1];x&&y&&(w[y]=x)}n=w[d];for(a.i(h.a)(n,"sami: could not find lang "+ -d+" in CSS");;){p=f.exec(e);w=g.exec(e);if(!p&&!w)break;if(!p||!w||p.index>=w.index)throw Error("parse error");w=e.slice(p.index,w.index);p=w.match(m);if(!p)throw Error("parse error (sync time attribute)");x=+p[1];if(isNaN(x))throw Error("parse error (sync time attribute NaN)");p=k;w=w.split("\n");x/=1E3;y=w.length;for(var A;0<=--y;)if(A=w[y].match(b)){var z=A[2];n===A[1]&&(" "===z?p[p.length-1].end=x:p.push({text:l(z),start:x}))}}return k}a.d(g,"a",function(){return k});var h=a(1),f=/&#([0-9]+);/g, -e=/
/gi,c=/]*>([\s\S]*?)<\/style[^>]*>/i,b=/\s*

]+)>(.*)/i,m=/]+?start="?([0-9]*)"?[^0-9]/i},function(d,g,a){function l(a){return a.responseData.getElementsByTagName("media")[0].getAttribute("src")}function k(a){return(a=a.match(F))&&a[1]||""}function h(a,b){return b?a.replace(F,"?token="+b):a.replace(F,"")}function f(a,b,c){return a.replace(/\{bitrate\}/g,b.bitrate).replace(/\{start time\}/g,c.time)}var e=a(0);a.n(e);var c=a(10),b=a(3),m=a(23),n=a(46),p=a(98);d=a(97); -var r=a(44),q=a(95),v=a(45),t=d.a.patchSegment,u=d.a.createVideoInitSegment,w=d.a.createAudioInitSegment,y=d.a.getMdat,x=d.a.getTraf,A=d.a.parseTfrf,z=d.a.parseTfxd,D={"application/x-sami":q.a,"application/smil":q.a,"application/ttml+xml":v.a,"application/ttml+xml+mp4":v.a,"text/vtt":function(a){return a}},J=n.a.RequestResponse,G=/\.(isml?)(\?token=\S+)?$/,N=/\.wsx?(\?token=\S+)?/,F=/\?token=(\S+)/;g.a=function(){function d(a,c,e){var d=void 0,f=void 0;e?(a=x(a))?(d=A(a),f=z(a)):b.a.warn("smooth: could not find traf atom"): -d=null;f||(f={d:c.duration,ts:c.time});return{nextSegments:d,currentSegment:f}}var g=0>3:2,b.codecs=c?"mp4a.40."+c:"");if("video"!=h||b.bitrate>x)b.id=t++,a.representations.push(b);break;case "c":b=a.index;var e=a.index.timeline,d=e.length,f=0=f)return-1;a.i(c.a)(h+m<=f,"dash: atom out of range");return h}function k(d){for(var e=d.length,f=0,h,g=void 0;f+8>>31)throw Error("not implemented");m=a.i(b.e)(c,e);e+=4;e+=4;f.push({ts:h,d:m,r:0,range:[d,d+n-1]});h+=m;d+=n}return{segments:f,timescale:g}}function f(d){var e=d.systemId;d=d.privateData;e=e.replace(/-/g,"");a.i(c.a)(32===e.length);e=a.i(b.h)(4,a.i(b.j)(e),a.i(b.i)(d.length),d);d=e.length+8;return a.i(b.h)(a.i(b.i)(d),a.i(b.b)("pssh"),e)}function d(c,d){if(!d||!d.length)return c;var e= +l(c,1836019574);if(-1==e)return c;for(var h=a.i(b.e)(c,e),g=[c.subarray(e,e+h)],k=0;k]/ig,g=/]|<\/body>/ig,k=[],n=d.match(c)[1],p,w;g.exec(d);p=/\.(\S+)\s*{([^}]*)}/gi;w={};for(var y;y=p.exec(n);){var x=y[1];y=y[2].match(/\s*lang:\s*(\S+);/i)[1];x&&y&&(w[y]=x)}n=w[e];for(a.i(h.a)(n,"sami: could not find lang "+ +e+" in CSS");;){p=f.exec(d);w=g.exec(d);if(!p&&!w)break;if(!p||!w||p.index>=w.index)throw Error("parse error");w=d.slice(p.index,w.index);p=w.match(m);if(!p)throw Error("parse error (sync time attribute)");x=+p[1];if(isNaN(x))throw Error("parse error (sync time attribute NaN)");p=k;w=w.split("\n");x/=1E3;y=w.length;for(var A;0<=--y;)if(A=w[y].match(b)){var z=A[2];n===A[1]&&(" "===z?p[p.length-1].end=x:p.push({text:l(z),start:x}))}}return k}a.d(g,"a",function(){return k});var h=a(1),f=/&#([0-9]+);/g, +d=/
/gi,c=/]*>([\s\S]*?)<\/style[^>]*>/i,b=/\s*

]+)>(.*)/i,m=/]+?start="?([0-9]*)"?[^0-9]/i},function(e,g,a){function l(a){return a.responseData.getElementsByTagName("media")[0].getAttribute("src")}function k(a){return(a=a.match(F))&&a[1]||""}function h(a,b){return b?a.replace(F,"?token="+b):a.replace(F,"")}function f(a,b,c){return a.replace(/\{bitrate\}/g,b.bitrate).replace(/\{start time\}/g,c.time)}var d=a(0);a.n(d);var c=a(10),b=a(3),m=a(23),n=a(46),p=a(98);e=a(97); +var r=a(44),q=a(95),v=a(45),t=e.a.patchSegment,u=e.a.createVideoInitSegment,w=e.a.createAudioInitSegment,y=e.a.getMdat,x=e.a.getTraf,A=e.a.parseTfrf,z=e.a.parseTfxd,D={"application/x-sami":q.a,"application/smil":q.a,"application/ttml+xml":v.a,"application/ttml+xml+mp4":v.a,"text/vtt":function(a){return a}},J=n.a.RequestResponse,G=/\.(isml?)(\?token=\S+)?$/,N=/\.wsx?(\?token=\S+)?/,F=/\?token=(\S+)/;g.a=function(){function e(a,c,d){var e=void 0,f=void 0;d?(a=x(a))?(e=A(a),f=z(a)):b.a.warn("smooth: could not find traf atom"): +e=null;f||(f={d:c.duration,ts:c.time});return{nextSegments:e,currentSegment:f}}var g=0>3:2,b.codecs=c?"mp4a.40."+c:"");if("video"!=h||b.bitrate>x)b.id=t++,a.representations.push(b);break;case "c":b=a.index;var d=a.index.timeline,e=d.length,f=0Player v"+e.version+" ("+e.state+")
";d&&f&&g&&(e+=["Container: "+l(d.transport),"Live: "+l(""+d.isLive),"Downloading bitrate (Kbit/s):\n "+(f.representation.bitrate/ -1E3).toFixed(3)+"/"+(g.representation.bitrate/1E3).toFixed(3),"Estimated bandwidth (Kbit/s):\n "+(f.avrBitrate/1E3).toFixed(3)+"/"+(g.avrBitrate/1E3).toFixed(3),"Location: "+d.uris[0]].join("
"));c.innerHTML=e}}function f(a,c){var d="\n

\n [x]\n

\n
', -f=c.parentNode,g=f.querySelector("#cp--debug-infos-container");g||(g=document.createElement("div"),g.setAttribute("id","cp--debug-infos-container"),f.appendChild(g));g.innerHTML=d;m||(m=f.querySelector("#cp--debug-hide-infos"),m.addEventListener("click",function(){return e(c)}));b&&clearInterval(b);b=setInterval(function(){return h(a,c)},1E3);h(a,c)}function e(a){(a=a.parentNode.querySelector("#cp--debug-infos-container"))&&a.parentNode.removeChild(a);b&&(clearInterval(b),b=null);m&&(m.removeEventListener("click", -e),m=null)}var c=a(17),b=void 0,m=void 0,n=/[&<>"']/g,p={"&":"&","<":"<",">":">",'"':""","'":"'"};g.a={getDebug:k,showDebug:f,hideDebug:e,toggleDebug:function(a,b){b.parentNode.querySelector("#cp--debug-infos-container")?e(b):f(a,b)}}},function(d,g,a){g.a=function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var d=Object(a),g=1;g=a.length?e.complete():(e.next(b[c]),a.index=c+1,this.schedule(a)))};e.prototype._subscribe=function(a){var b=this.arrayLike,c=this.scheduler,d=b.length;if(c)return c.schedule(e.dispatch,0,{arrayLike:b,index:0,length:d,subscriber:a});for(c= -0;c=b?this.connection=null:(a._refCount=b-1,1c)this.period=0;b&&"function"===typeof b.schedule||(this.scheduler=h.async)}l(e,a);e.create=function(a,b){void 0===a&&(a=0);void 0===b&&(b= -h.async);return new e(a,b)};e.dispatch=function(a){var b=a.subscriber,c=a.period;b.next(a.index);b.closed||(a.index+=1,this.schedule(a,c))};e.prototype._subscribe=function(a){var b=this.period;a.add(this.scheduler.schedule(e.dispatch,b,{index:0,subscriber:a,period:b}))};return e}(d.Observable);g.IntervalObservable=a},function(d,g,a){var l=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(b.prototype= -c.prototype,new b)},k=a(5);d=a(0);var h=a(34);a=function(a){function b(b,c){a.call(this);this.scheduler=c;if(null==b)throw Error("iterator cannot be null.");var d;if((d=b[h.iterator])||"string"!==typeof b)if(d||void 0===b.length){if(!d)throw new TypeError("object is not iterable");d=b[h.iterator]()}else d=new e(b);else d=new f(b);this.iterator=d}l(b,a);b.create=function(a,c){return new b(a,c)};b.dispatch=function(a){var b=a.index,c=a.iterator,e=a.subscriber;if(a.hasError)e.error(a.error);else{var d= -c.next();d.done?e.complete():(e.next(d.value),a.index=b+1,e.closed?"function"===typeof c["return"]&&c["return"]():this.schedule(a))}};b.prototype._subscribe=function(a){var c=this.iterator,e=this.scheduler;if(e)return e.schedule(b.dispatch,0,{index:0,iterator:c,subscriber:a});do{e=c.next();if(e.done){a.complete();break}else a.next(e.value);if(a.closed){"function"===typeof c["return"]&&c["return"]();break}}while(1)};return b}(d.Observable);g.IteratorObservable=a;var f=function(){function a(a,b,c){void 0=== -b&&(b=0);void 0===c&&(c=a.length);this.str=a;this.idx=b;this.len=c}a.prototype[h.iterator]=function(){return this};a.prototype.next=function(){return this.idxd?-1:1;e=d*Math.floor(Math.abs(e));e=0>=e?0:e>c?c:e}this.arr=a;this.idx= -b;this.len=e}a.prototype[h.iterator]=function(){return this};a.prototype.next=function(){return this.idxthis.total&&this.destination.next(a)};return e}(d.Subscriber)},function(d,g,a){var l=a(13),k=a(31),h=a(8),f=a(52),e=a(16);g.startWith=function(){for(var a= -[],b=0;bthis.total)throw new k.ArgumentOutOfRangeError;}a.prototype.call=function(a,c){return c.subscribe(new e(a,this.total))};return a}(),e=function(a){function b(b,c){a.call(this,b);this.total=c;this.count=0}l(b,a);b.prototype._next=function(a){var b=this.total,c=++this.count;c<=b&&(this.destination.next(a),c===b&&(this.destination.complete(),this.unsubscribe()))};return b}(d.Subscriber)},function(d,g,a){var l=this&&this.__extends|| -function(a,c){function b(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};d=a(12);var k=a(15);g.takeUntil=function(a){return this.lift(new h(a))};var h=function(){function a(a){this.notifier=a}a.prototype.call=function(a,b){return b.subscribe(new f(a,this.notifier))};return a}(),f=function(a){function c(b,c){a.call(this,b);this.notifier=c;this.add(k.subscribeToResult(this,c))}l(c,a);c.prototype.notifyNext=function(a, -c,e,d,f){this.complete()};c.prototype.notifyComplete=function(){};return c}(d.OuterSubscriber)},function(d,g,a){var l=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)},k=a(24),h=a(59);d=a(2);var f=a(57);g.timeout=function(a,c){void 0===c&&(c=k.async);var b=h.isDate(a),d=b?+a-c.now():Math.abs(a);return this.lift(new e(d,b,c,new f.TimeoutError))};var e=function(){function a(a, -b,c,e){this.waitFor=a;this.absoluteTimeout=b;this.scheduler=c;this.errorInstance=e}a.prototype.call=function(a,b){return b.subscribe(new c(a,this.absoluteTimeout,this.waitFor,this.scheduler,this.errorInstance))};return a}(),c=function(a){function b(b,c,e,d,f){a.call(this,b);this.absoluteTimeout=c;this.waitFor=e;this.scheduler=d;this.errorInstance=f;this.action=null;this.scheduleTimeout()}l(b,a);b.dispatchTimeout=function(a){a.error(a.errorInstance)};b.prototype.scheduleTimeout=function(){var a=this.action; -a?this.action=a.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(b.dispatchTimeout,this.waitFor,this))};b.prototype._next=function(b){this.absoluteTimeout||this.scheduleTimeout();a.prototype._next.call(this,b)};b.prototype._unsubscribe=function(){this.errorInstance=this.scheduler=this.action=null};return b}(d.Subscriber)},function(d,g,a){var l=this&&this.__extends||function(a,d){function f(){this.constructor=a}for(var e in d)d.hasOwnProperty(e)&&(a[e]=d[e]);a.prototype=null=== -d?Object.create(d):(f.prototype=d.prototype,new f)};d=function(a){function d(d,e){a.call(this)}l(d,a);d.prototype.schedule=function(a,e){return this};return d}(a(4).Subscription);g.Action=d},function(d,g,a){var l=this&&this.__extends||function(a,d){function e(){this.constructor=a}for(var c in d)d.hasOwnProperty(c)&&(a[c]=d[c]);a.prototype=null===d?Object.create(d):(e.prototype=d.prototype,new e)},k=a(172);d=function(a){function d(e,c){a.call(this,e,c);this.scheduler=e;this.work=c}l(d,a);d.prototype.requestAsyncId= -function(e,c,b){void 0===b&&(b=0);if(null!==b&&0Player v"+d.version+" ("+d.state+")
";e&&f&&g&&(d+=["Container: "+l(e.transport),"Live: "+l(""+e.isLive),"Downloading bitrate (Kbit/s):\n "+(f.representation.bitrate/ +1E3).toFixed(3)+"/"+(g.representation.bitrate/1E3).toFixed(3),"Estimated bandwidth (Kbit/s):\n "+(f.avrBitrate/1E3).toFixed(3)+"/"+(g.avrBitrate/1E3).toFixed(3),"Location: "+e.uris[0]].join("
"));c.innerHTML=d}}function f(a,c){var e="\n
\n [x]\n

\n
', +f=c.parentNode,g=f.querySelector("#cp--debug-infos-container");g||(g=document.createElement("div"),g.setAttribute("id","cp--debug-infos-container"),f.appendChild(g));g.innerHTML=e;m||(m=f.querySelector("#cp--debug-hide-infos"),m.addEventListener("click",function(){return d(c)}));b&&clearInterval(b);b=setInterval(function(){return h(a,c)},1E3);h(a,c)}function d(a){(a=a.parentNode.querySelector("#cp--debug-infos-container"))&&a.parentNode.removeChild(a);b&&(clearInterval(b),b=null);m&&(m.removeEventListener("click", +d),m=null)}var c=a(17),b=void 0,m=void 0,n=/[&<>"']/g,p={"&":"&","<":"<",">":">",'"':""","'":"'"};g.a={getDebug:k,showDebug:f,hideDebug:d,toggleDebug:function(a,b){b.parentNode.querySelector("#cp--debug-infos-container")?d(b):f(a,b)}}},function(e,g,a){g.a=function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(a),g=1;g=a.length?d.complete():(d.next(b[c]),a.index=c+1,this.schedule(a)))};d.prototype._subscribe=function(a){var b=this.arrayLike,c=this.scheduler,e=b.length;if(c)return c.schedule(d.dispatch,0,{arrayLike:b,index:0,length:e,subscriber:a});for(c= +0;c=b?this.connection=null:(a._refCount=b-1,1c)this.period=0;b&&"function"===typeof b.schedule||(this.scheduler=h.async)}l(d,a);d.create=function(a,b){void 0===a&&(a=0);void 0===b&&(b= +h.async);return new d(a,b)};d.dispatch=function(a){var b=a.subscriber,c=a.period;b.next(a.index);b.closed||(a.index+=1,this.schedule(a,c))};d.prototype._subscribe=function(a){var b=this.period;a.add(this.scheduler.schedule(d.dispatch,b,{index:0,subscriber:a,period:b}))};return d}(e.Observable);g.IntervalObservable=a},function(e,g,a){var l=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d]);a.prototype=null===c?Object.create(c):(b.prototype= +c.prototype,new b)},k=a(5);e=a(0);var h=a(34);a=function(a){function b(b,c){a.call(this);this.scheduler=c;if(null==b)throw Error("iterator cannot be null.");var e;if((e=b[h.iterator])||"string"!==typeof b)if(e||void 0===b.length){if(!e)throw new TypeError("object is not iterable");e=b[h.iterator]()}else e=new d(b);else e=new f(b);this.iterator=e}l(b,a);b.create=function(a,c){return new b(a,c)};b.dispatch=function(a){var b=a.index,c=a.iterator,d=a.subscriber;if(a.hasError)d.error(a.error);else{var e= +c.next();e.done?d.complete():(d.next(e.value),a.index=b+1,d.closed?"function"===typeof c["return"]&&c["return"]():this.schedule(a))}};b.prototype._subscribe=function(a){var c=this.iterator,d=this.scheduler;if(d)return d.schedule(b.dispatch,0,{index:0,iterator:c,subscriber:a});do{d=c.next();if(d.done){a.complete();break}else a.next(d.value);if(a.closed){"function"===typeof c["return"]&&c["return"]();break}}while(1)};return b}(e.Observable);g.IteratorObservable=a;var f=function(){function a(a,b,c){void 0=== +b&&(b=0);void 0===c&&(c=a.length);this.str=a;this.idx=b;this.len=c}a.prototype[h.iterator]=function(){return this};a.prototype.next=function(){return this.idxe?-1:1;d=e*Math.floor(Math.abs(d));d=0>=d?0:d>c?c:d}this.arr=a;this.idx= +b;this.len=d}a.prototype[h.iterator]=function(){return this};a.prototype.next=function(){return this.idxthis.total&&this.destination.next(a)};return d}(e.Subscriber)},function(e,g,a){var l=a(13),k=a(31),h=a(8),f=a(52),d=a(16);g.startWith=function(){for(var a= +[],b=0;bthis.total)throw new k.ArgumentOutOfRangeError;}a.prototype.call=function(a,c){return c.subscribe(new d(a,this.total))};return a}(),d=function(a){function b(b,c){a.call(this,b);this.total=c;this.count=0}l(b,a);b.prototype._next=function(a){var b=this.total,c=++this.count;c<=b&&(this.destination.next(a),c===b&&(this.destination.complete(),this.unsubscribe()))};return b}(e.Subscriber)},function(e,g,a){var l=this&&this.__extends|| +function(a,c){function b(){this.constructor=a}for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};e=a(12);var k=a(15);g.takeUntil=function(a){return this.lift(new h(a))};var h=function(){function a(a){this.notifier=a}a.prototype.call=function(a,b){return b.subscribe(new f(a,this.notifier))};return a}(),f=function(a){function c(b,c){a.call(this,b);this.notifier=c;this.add(k.subscribeToResult(this,c))}l(c,a);c.prototype.notifyNext=function(a, +c,d,e,f){this.complete()};c.prototype.notifyComplete=function(){};return c}(e.OuterSubscriber)},function(e,g,a){var l=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)},k=a(24),h=a(59);e=a(2);var f=a(57);g.timeout=function(a,c){void 0===c&&(c=k.async);var b=h.isDate(a),e=b?+a-c.now():Math.abs(a);return this.lift(new d(e,b,c,new f.TimeoutError))};var d=function(){function a(a, +b,c,d){this.waitFor=a;this.absoluteTimeout=b;this.scheduler=c;this.errorInstance=d}a.prototype.call=function(a,b){return b.subscribe(new c(a,this.absoluteTimeout,this.waitFor,this.scheduler,this.errorInstance))};return a}(),c=function(a){function b(b,c,d,e,f){a.call(this,b);this.absoluteTimeout=c;this.waitFor=d;this.scheduler=e;this.errorInstance=f;this.action=null;this.scheduleTimeout()}l(b,a);b.dispatchTimeout=function(a){a.error(a.errorInstance)};b.prototype.scheduleTimeout=function(){var a=this.action; +a?this.action=a.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(b.dispatchTimeout,this.waitFor,this))};b.prototype._next=function(b){this.absoluteTimeout||this.scheduleTimeout();a.prototype._next.call(this,b)};b.prototype._unsubscribe=function(){this.errorInstance=this.scheduler=this.action=null};return b}(e.Subscriber)},function(e,g,a){var l=this&&this.__extends||function(a,e){function f(){this.constructor=a}for(var d in e)e.hasOwnProperty(d)&&(a[d]=e[d]);a.prototype=null=== +e?Object.create(e):(f.prototype=e.prototype,new f)};e=function(a){function e(e,d){a.call(this)}l(e,a);e.prototype.schedule=function(a,d){return this};return e}(a(4).Subscription);g.Action=e},function(e,g,a){var l=this&&this.__extends||function(a,e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)},k=a(172);e=function(a){function e(d,c){a.call(this,d,c);this.scheduler=d;this.work=c}l(e,a);e.prototype.requestAsyncId= +function(d,c,b){void 0===b&&(b=0);if(null!==b&&0