From 78645e1c4d1a7d6fc3fd333c91c024e4e4f9de2c Mon Sep 17 00:00:00 2001 From: Anton Schubert Date: Sat, 2 May 2020 22:17:32 +0200 Subject: update voc-player --- assets/voc-player/player.js | 54 +++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 17 deletions(-) (limited to 'assets/voc-player/player.js') diff --git a/assets/voc-player/player.js b/assets/voc-player/player.js index a66094f..e990c45 100644 --- a/assets/voc-player/player.js +++ b/assets/voc-player/player.js @@ -1,4 +1,4 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VOCPlayer=t():e.VOCPlayer=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=16)}([function(e,t,r){var n;window,n=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="dist/",r(r.s="./src/main.js")}({"./node_modules/babel-runtime/core-js/array/from.js": +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VOCPlayer=t():e.VOCPlayer=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8)}([function(e,t,r){var n;window,n=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="dist/",r(r.s="./src/main.js")}({"./node_modules/babel-runtime/core-js/array/from.js": /*!**********************************************************!*\ !*** ./node_modules/babel-runtime/core-js/array/from.js ***! \**********************************************************/ @@ -74,7 +74,7 @@ /*!********************************************!*\ !*** ./node_modules/clappr-zepto/zepto.js ***! \********************************************/ -/*! no static exports found */function(e,t){var r,n=function(){var e,t,r,n,i,o=[],a=o.concat,s=o.filter,l=o.slice,u=window.document,c={},d={},f={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},h=/^\s*<(\w+|!)[^>]*>/,p=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,m=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,g=/^(?:body|html)$/i,y=/([A-Z])/g,v=["val","css","html","text","data","width","height","offset"],b=u.createElement("table"),_=u.createElement("tr"),A={tr:u.createElement("tbody"),tbody:b,thead:b,tfoot:b,td:_,th:_,"*":u.createElement("div")},E=/complete|loaded|interactive/,T=/^[\w-]*$/,S={},w=S.toString,k={},x=u.createElement("div"),C={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},R=Array.isArray||function(e){return e instanceof Array};function j(e){return null==e?String(e):S[w.call(e)]||"object"}function L(e){return"function"==j(e)}function I(e){return null!=e&&e==e.window}function P(e){return null!=e&&e.nodeType==e.DOCUMENT_NODE}function O(e){return"object"==j(e)}function D(e){return O(e)&&!I(e)&&Object.getPrototypeOf(e)==Object.prototype}function M(e){var r=!!e&&"length"in e&&e.length,n=t.type(e);return"function"!=n&&!I(e)&&("array"==n||0===r||"number"==typeof r&&r>0&&r-1 in e)}function N(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function F(e){return e in d?d[e]:d[e]=new RegExp("(^|\\s)"+e+"(\\s|$)")}function U(e,t){return"number"!=typeof t||f[N(e)]?t:t+"px"}function B(e){return"children"in e?l.call(e.children):t.map(e.childNodes,(function(e){if(1==e.nodeType)return e}))}function K(e,t){var r,n=e?e.length:0;for(r=0;r")),void 0===r&&(r=h.test(e)&&RegExp.$1),r in A||(r="*"),(a=A[r]).innerHTML=""+e,i=t.each(l.call(a.childNodes),(function(){a.removeChild(this)}))),D(n)&&(o=t(i),t.each(n,(function(e,t){v.indexOf(e)>-1?o[e](t):o.attr(e,t)}))),i},k.Z=function(e,t){return new K(e,t)},k.isZ=function(e){return e instanceof k.Z},k.init=function(e,r){var n,i;if(!e)return k.Z();if("string"==typeof e)if("<"==(e=e.trim())[0]&&h.test(e))n=k.fragment(e,RegExp.$1,r),e=null;else{if(void 0!==r)return t(r).find(e);n=k.qsa(u,e)}else{if(L(e))return t(u).ready(e);if(k.isZ(e))return e;if(R(e))i=e,n=s.call(i,(function(e){return null!=e}));else if(O(e))n=[e],e=null;else if(h.test(e))n=k.fragment(e.trim(),RegExp.$1,r),e=null;else{if(void 0!==r)return t(r).find(e);n=k.qsa(u,e)}}return k.Z(n,e)},(t=function(e,t){return k.init(e,t)}).extend=function(e){var t,r=l.call(arguments,1);return"boolean"==typeof e&&(t=e,e=r.shift()),r.forEach((function(r){G(e,r,t)})),e},k.qsa=function(e,t){var r,n="#"==t[0],i=!n&&"."==t[0],o=n||i?t.slice(1):t,a=T.test(o);return e.getElementById&&a&&n?(r=e.getElementById(o))?[r]:[]:1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType?[]:l.call(a&&!n&&e.getElementsByClassName?i?e.getElementsByClassName(o):e.getElementsByTagName(t):e.querySelectorAll(t))},t.contains=u.documentElement.contains?function(e,t){return e!==t&&e.contains(t)}:function(e,t){for(;t&&(t=t.parentNode);)if(t===e)return!0;return!1},t.type=j,t.isFunction=L,t.isWindow=I,t.isArray=R,t.isPlainObject=D,t.isEmptyObject=function(e){var t;for(t in e)return!1;return!0},t.isNumeric=function(e){var t=Number(e),r=typeof e;return null!=e&&"boolean"!=r&&("string"!=r||e.length)&&!isNaN(t)&&isFinite(t)||!1},t.inArray=function(e,t,r){return o.indexOf.call(t,e,r)},t.camelCase=n,t.trim=function(e){return null==e?"":String.prototype.trim.call(e)},t.uuid=0,t.support={},t.expr={},t.noop=function(){},t.map=function(e,r){var n,i,o,a,s=[];if(M(e))for(i=0;i0?t.fn.concat.apply([],a):a},t.each=function(e,t){var r,n;if(M(e)){for(r=0;r=0?e:e+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each((function(){null!=this.parentNode&&this.parentNode.removeChild(this)}))},each:function(e){return o.every.call(this,(function(t,r){return!1!==e.call(t,r,t)})),this},filter:function(e){return L(e)?this.not(this.not(e)):t(s.call(this,(function(t){return k.matches(t,e)})))},add:function(e,r){return t(i(this.concat(t(e,r))))},is:function(e){return this.length>0&&k.matches(this[0],e)},not:function(e){var r=[];if(L(e)&&void 0!==e.call)this.each((function(t){e.call(this,t)||r.push(this)}));else{var n="string"==typeof e?this.filter(e):M(e)&&L(e.item)?l.call(e):t(e);this.forEach((function(e){n.indexOf(e)<0&&r.push(e)}))}return t(r)},has:function(e){return this.filter((function(){return O(e)?t.contains(this,e):t(this).find(e).size()}))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){var e=this[0];return e&&!O(e)?e:t(e)},last:function(){var e=this[this.length-1];return e&&!O(e)?e:t(e)},find:function(e){var r=this;return e?"object"==typeof e?t(e).filter((function(){var e=this;return o.some.call(r,(function(r){return t.contains(r,e)}))})):1==this.length?t(k.qsa(this[0],e)):this.map((function(){return k.qsa(this,e)})):t()},closest:function(e,r){var n=[],i="object"==typeof e&&t(e);return this.each((function(t,o){for(;o&&!(i?i.indexOf(o)>=0:k.matches(o,e));)o=o!==r&&!P(o)&&o.parentNode;o&&n.indexOf(o)<0&&n.push(o)})),t(n)},parents:function(e){for(var r=[],n=this;n.length>0;)n=t.map(n,(function(e){if((e=e.parentNode)&&!P(e)&&r.indexOf(e)<0)return r.push(e),e}));return V(r,e)},parent:function(e){return V(i(this.pluck("parentNode")),e)},children:function(e){return V(this.map((function(){return B(this)})),e)},contents:function(){return this.map((function(){return this.contentDocument||l.call(this.childNodes)}))},siblings:function(e){return V(this.map((function(e,t){return s.call(B(t.parentNode),(function(e){return e!==t}))})),e)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(e){return t.map(this,(function(t){return t[e]}))},show:function(){return this.each((function(){var e,t,r;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(e=this.nodeName,c[e]||(t=u.createElement(e),u.body.appendChild(t),r=getComputedStyle(t,"").getPropertyValue("display"),t.parentNode.removeChild(t),"none"==r&&(r="block"),c[e]=r),c[e]))}))},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){var r=L(e);if(this[0]&&!r)var n=t(e).get(0),i=n.parentNode||this.length>1;return this.each((function(o){t(this).wrapAll(r?e.call(this,o):i?n.cloneNode(!0):n)}))},wrapAll:function(e){if(this[0]){var r;for(t(this[0]).before(e=t(e));(r=e.children()).length;)e=r.first();t(e).append(this)}return this},wrapInner:function(e){var r=L(e);return this.each((function(n){var i=t(this),o=i.contents(),a=r?e.call(this,n):e;o.length?o.wrapAll(a):i.append(a)}))},unwrap:function(){return this.parent().each((function(){t(this).replaceWith(t(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(e){return this.each((function(){var r=t(this);(void 0===e?"none"==r.css("display"):e)?r.show():r.hide()}))},prev:function(e){return t(this.pluck("previousElementSibling")).filter(e||"*")},next:function(e){return t(this.pluck("nextElementSibling")).filter(e||"*")},html:function(e){return 0 in arguments?this.each((function(r){var n=this.innerHTML;t(this).empty().append(H(this,e,r,n))})):0 in this?this[0].innerHTML:null},text:function(e){return 0 in arguments?this.each((function(t){var r=H(this,e,t,this.textContent);this.textContent=null==r?"":""+r})):0 in this?this.pluck("textContent").join(""):null},attr:function(t,r){var n;return"string"!=typeof t||1 in arguments?this.each((function(n){if(1===this.nodeType)if(O(t))for(e in t)Y(this,e,t[e]);else Y(this,t,H(this,r,n,this.getAttribute(t)))})):0 in this&&1==this[0].nodeType&&null!=(n=this[0].getAttribute(t))?n:void 0},removeAttr:function(e){return this.each((function(){1===this.nodeType&&e.split(" ").forEach((function(e){Y(this,e)}),this)}))},prop:function(e,t){return e=C[e]||e,1 in arguments?this.each((function(r){this[e]=H(this,t,r,this[e])})):this[0]&&this[0][e]},removeProp:function(e){return e=C[e]||e,this.each((function(){delete this[e]}))},data:function(e,t){var r="data-"+e.replace(y,"-$1").toLowerCase(),n=1 in arguments?this.attr(r,t):this.attr(r);return null!==n?$(n):void 0},val:function(e){return 0 in arguments?(null==e&&(e=""),this.each((function(t){this.value=H(this,e,t,this.value)}))):this[0]&&(this[0].multiple?t(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each((function(r){var n=t(this),i=H(this,e,r,n.offset()),o=n.offsetParent().offset(),a={top:i.top-o.top,left:i.left-o.left};"static"==n.css("position")&&(a.position="relative"),n.css(a)}));if(!this.length)return null;if(u.documentElement!==this[0]&&!t.contains(u.documentElement,this[0]))return{top:0,left:0};var r=this[0].getBoundingClientRect();return{left:r.left+window.pageXOffset,top:r.top+window.pageYOffset,width:Math.round(r.width),height:Math.round(r.height)}},css:function(r,i){if(arguments.length<2){var o=this[0];if("string"==typeof r){if(!o)return;return o.style[n(r)]||getComputedStyle(o,"").getPropertyValue(r)}if(R(r)){if(!o)return;var a={},s=getComputedStyle(o,"");return t.each(r,(function(e,t){a[t]=o.style[n(t)]||s.getPropertyValue(t)})),a}}var l="";if("string"==j(r))i||0===i?l=N(r)+":"+U(r,i):this.each((function(){this.style.removeProperty(N(r))}));else for(e in r)r[e]||0===r[e]?l+=N(e)+":"+U(e,r[e])+";":this.each((function(){this.style.removeProperty(N(e))}));return this.each((function(){this.style.cssText+=";"+l}))},index:function(e){return e?this.indexOf(t(e)[0]):this.parent().children().indexOf(this[0])},hasClass:function(e){return!!e&&o.some.call(this,(function(e){return this.test(z(e))}),F(e))},addClass:function(e){return e?this.each((function(n){if("className"in this){r=[];var i=z(this);H(this,e,n,i).split(/\s+/g).forEach((function(e){t(this).hasClass(e)||r.push(e)}),this),r.length&&z(this,i+(i?" ":"")+r.join(" "))}})):this},removeClass:function(e){return this.each((function(t){if("className"in this){if(void 0===e)return z(this,"");r=z(this),H(this,e,t,r).split(/\s+/g).forEach((function(e){r=r.replace(F(e)," ")})),z(this,r.trim())}}))},toggleClass:function(e,r){return e?this.each((function(n){var i=t(this);H(this,e,n,z(this)).split(/\s+/g).forEach((function(e){(void 0===r?!i.hasClass(e):r)?i.addClass(e):i.removeClass(e)}))})):this},scrollTop:function(e){if(this.length){var t="scrollTop"in this[0];return void 0===e?t?this[0].scrollTop:this[0].pageYOffset:this.each(t?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var t="scrollLeft"in this[0];return void 0===e?t?this[0].scrollLeft:this[0].pageXOffset:this.each(t?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var e=this[0],r=this.offsetParent(),n=this.offset(),i=g.test(r[0].nodeName)?{top:0,left:0}:r.offset();return n.top-=parseFloat(t(e).css("margin-top"))||0,n.left-=parseFloat(t(e).css("margin-left"))||0,i.top+=parseFloat(t(r[0]).css("border-top-width"))||0,i.left+=parseFloat(t(r[0]).css("border-left-width"))||0,{top:n.top-i.top,left:n.left-i.left}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent||u.body;e&&!g.test(e.nodeName)&&"static"==t(e).css("position");)e=e.offsetParent;return e}))}},t.fn.detach=t.fn.remove,["width","height"].forEach((function(e){var r=e.replace(/./,(function(e){return e[0].toUpperCase()}));t.fn[e]=function(n){var i,o=this[0];return void 0===n?I(o)?o["inner"+r]:P(o)?o.documentElement["scroll"+r]:(i=this.offset())&&i[e]:this.each((function(r){(o=t(this)).css(e,H(this,n,r,o[e]()))}))}})),["after","prepend","before","append"].forEach((function(e,r){var n=r%2;t.fn[e]=function(){var e,i,o=t.map(arguments,(function(r){var n=[];return"array"==(e=j(r))?(r.forEach((function(e){return void 0!==e.nodeType?n.push(e):t.zepto.isZ(e)?n=n.concat(e.get()):void(n=n.concat(k.fragment(e)))})),n):"object"==e||null==r?r:k.fragment(r)})),a=this.length>1;return o.length<1?this:this.each((function(e,s){i=n?s:s.parentNode,s=0==r?s.nextSibling:1==r?s.firstChild:2==r?s:null;var l=t.contains(u.documentElement,i);o.forEach((function(e){if(a)e=e.cloneNode(!0);else if(!i)return t(e).remove();i.insertBefore(e,s),l&&W(e,(function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var t=e.ownerDocument?e.ownerDocument.defaultView:window;t.eval.call(t,e.innerHTML)}}))}))}))},t.fn[n?e+"To":"insert"+(r?"Before":"After")]=function(r){return t(r)[e](this),this}})),k.Z.prototype=K.prototype=t.fn,k.uniq=i,k.deserializeValue=$,t.zepto=k,t}();window.Zepto=n,void 0===window.$&&(window.$=n),function(e){var t,r,n=+new Date,i=window.document,o=/)<[^<]*)*<\/script>/gi,a=/^(?:text|application)\/javascript/i,s=/^(?:text|application)\/xml/i,l=/^\s*$/,u=i.createElement("a");function c(t,r,n,o){if(t.global)return function(t,r,n){var i=e.Event(r);return e(t).trigger(i,n),!i.isDefaultPrevented()}(r||i,n,o)}function d(e,t){var r=t.context;if(!1===t.beforeSend.call(r,e,t)||!1===c(t,r,"ajaxBeforeSend",[e,t]))return!1;c(t,r,"ajaxSend",[e,t])}function f(e,t,r,n){var i=r.context;r.success.call(i,e,"success",t),n&&n.resolveWith(i,[e,"success",t]),c(r,i,"ajaxSuccess",[t,r,e]),p("success",t,r)}function h(e,t,r,n,i){var o=n.context;n.error.call(o,r,t,e),i&&i.rejectWith(o,[r,t,e]),c(n,o,"ajaxError",[r,n,e||t]),p(t,r,n)}function p(t,r,n){var i=n.context;n.complete.call(i,r,t),c(n,i,"ajaxComplete",[r,n]),function(t){t.global&&!--e.active&&c(t,null,"ajaxStop")}(n)}function m(){}function g(e,t){return""==t?e:(e+"&"+t).replace(/[&?]{1,2}/,"?")}function y(t,r,n,i){return e.isFunction(r)&&(i=n,n=r,r=void 0),e.isFunction(n)||(i=n,n=void 0),{url:t,data:r,success:n,dataType:i}}u.href=window.location.href,e.active=0,e.ajaxJSONP=function(t,r){if(!("type"in t))return e.ajax(t);var o,a,s=t.jsonpCallback,l=(e.isFunction(s)?s():s)||"Zepto"+n++,u=i.createElement("script"),c=window[l],p=function(t){e(u).triggerHandler("error",t||"abort")},m={abort:p};return r&&r.promise(m),e(u).on("load error",(function(n,i){clearTimeout(a),e(u).off().remove(),"error"!=n.type&&o?f(o[0],m,t,r):h(null,i||"error",m,t,r),window[l]=c,o&&e.isFunction(c)&&c(o[0]),c=o=void 0})),!1===d(m,t)?(p("abort"),m):(window[l]=function(){o=arguments},u.src=t.url.replace(/\?(.+)=\?/,"?$1="+l),i.head.appendChild(u),t.timeout>0&&(a=setTimeout((function(){p("timeout")}),t.timeout)),m)},e.ajaxSettings={type:"GET",beforeSend:m,success:m,error:m,complete:m,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:"application/json",xml:"application/xml, text/xml",html:"text/html",text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:m},e.ajax=function(n){var o,p,y=e.extend({},n||{}),v=e.Deferred&&e.Deferred();for(t in e.ajaxSettings)void 0===y[t]&&(y[t]=e.ajaxSettings[t]);!function(t){t.global&&0==e.active++&&c(t,null,"ajaxStart")}(y),y.crossDomain||((o=i.createElement("a")).href=y.url,o.href=o.href,y.crossDomain=u.protocol+"//"+u.host!=o.protocol+"//"+o.host),y.url||(y.url=window.location.toString()),(p=y.url.indexOf("#"))>-1&&(y.url=y.url.slice(0,p)),function(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=g(t.url,t.data),t.data=void 0)}(y);var b=y.dataType,_=/\?.+=\?/.test(y.url);if(_&&(b="jsonp"),!1!==y.cache&&(n&&!0===n.cache||"script"!=b&&"jsonp"!=b)||(y.url=g(y.url,"_="+Date.now())),"jsonp"==b)return _||(y.url=g(y.url,y.jsonp?y.jsonp+"=?":!1===y.jsonp?"":"callback=?")),e.ajaxJSONP(y,v);var A,E=y.accepts[b],T={},S=function(e,t){T[e.toLowerCase()]=[e,t]},w=/^([\w-]+:)\/\//.test(y.url)?RegExp.$1:window.location.protocol,k=y.xhr(),x=k.setRequestHeader;if(v&&v.promise(k),y.crossDomain||S("X-Requested-With","XMLHttpRequest"),S("Accept",E||"*/*"),(E=y.mimeType||E)&&(E.indexOf(",")>-1&&(E=E.split(",",2)[0]),k.overrideMimeType&&k.overrideMimeType(E)),(y.contentType||!1!==y.contentType&&y.data&&"GET"!=y.type.toUpperCase())&&S("Content-Type",y.contentType||"application/x-www-form-urlencoded"),y.headers)for(r in y.headers)S(r,y.headers[r]);if(k.setRequestHeader=S,k.onreadystatechange=function(){if(4==k.readyState){k.onreadystatechange=m,clearTimeout(A);var t,r=!1;if(k.status>=200&&k.status<300||304==k.status||0==k.status&&"file:"==w){if(b=b||function(e){return e&&(e=e.split(";",2)[0]),e&&("text/html"==e?"html":"application/json"==e?"json":a.test(e)?"script":s.test(e)&&"xml")||"text"}(y.mimeType||k.getResponseHeader("content-type")),"arraybuffer"==k.responseType||"blob"==k.responseType)t=k.response;else{t=k.responseText;try{t=function(e,t,r){if(r.dataFilter==m)return e;var n=r.context;return r.dataFilter.call(n,e,t)}(t,b,y),"script"==b?(0,eval)(t):"xml"==b?t=k.responseXML:"json"==b&&(t=l.test(t)?null:e.parseJSON(t))}catch(e){r=e}if(r)return h(r,"parsererror",k,y,v)}f(t,k,y,v)}else h(k.statusText||null,k.status?"error":"abort",k,y,v)}},!1===d(k,y))return k.abort(),h(null,"abort",k,y,v),k;var C=!("async"in y)||y.async;if(k.open(y.type,y.url,C,y.username,y.password),y.xhrFields)for(r in y.xhrFields)k[r]=y.xhrFields[r];for(r in T)x.apply(k,T[r]);return y.timeout>0&&(A=setTimeout((function(){k.onreadystatechange=m,k.abort(),h(null,"timeout",k,y,v)}),y.timeout)),k.send(y.data?y.data:null),k},e.get=function(){return e.ajax(y.apply(null,arguments))},e.post=function(){var t=y.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=y.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,r,n){if(!this.length)return this;var i,a=this,s=t.split(/\s/),l=y(t,r,n),u=l.success;return s.length>1&&(l.url=s[0],i=s[1]),l.success=function(t){a.html(i?e("
").html(t.replace(o,"")).find(i):t),u&&u.apply(a,arguments)},e.ajax(l),this};var v=encodeURIComponent;e.param=function(t,r){var n=[];return n.add=function(t,r){e.isFunction(r)&&(r=r()),null==r&&(r=""),this.push(v(t)+"="+v(r))},function t(r,n,i,o){var a,s=e.isArray(n),l=e.isPlainObject(n);e.each(n,(function(n,u){a=e.type(u),o&&(n=i?o:o+"["+(l||"object"==a||"array"==a?n:"")+"]"),!o&&s?r.add(u.name,u.value):"array"==a||!i&&"object"==a?t(r,u,i,n):r.add(n,u)}))}(n,t,r),n.join("&").replace(/%20/g,"+")}}(n),(r=n).Callbacks=function(e){e=r.extend({},e);var t,n,i,o,a,s,l=[],u=!e.once&&[],c=function(r){for(t=e.memory&&r,n=!0,s=o||0,o=0,a=l.length,i=!0;l&&s-1;)l.splice(n,1),i&&(n<=a&&--a,n<=s&&--s)})),this},has:function(e){return!(!l||!(e?r.inArray(e,l)>-1:l.length))},empty:function(){return a=l.length=0,this},disable:function(){return l=u=t=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,t||d.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||n&&!u||(t=[e,(t=t||[]).slice?t.slice():t],i?u.push(t):c(t)),this},fire:function(){return d.fireWith(this,arguments)},fired:function(){return!!n}};return d},function(e){var t=Array.prototype.slice;function r(t){var n=[["resolve","done",e.Callbacks({once:1,memory:1}),"resolved"],["reject","fail",e.Callbacks({once:1,memory:1}),"rejected"],["notify","progress",e.Callbacks({memory:1})]],i="pending",o={state:function(){return i},always:function(){return a.done(arguments).fail(arguments),this},then:function(){var t=arguments;return r((function(r){e.each(n,(function(n,i){var s=e.isFunction(t[n])&&t[n];a[i[1]]((function(){var t=s&&s.apply(this,arguments);if(t&&e.isFunction(t.promise))t.promise().done(r.resolve).fail(r.reject).progress(r.notify);else{var n=this===o?r.promise():this,a=s?[t]:arguments;r[i[0]+"With"](n,a)}}))})),t=null})).promise()},promise:function(t){return null!=t?e.extend(t,o):o}},a={};return e.each(n,(function(e,t){var r=t[2],s=t[3];o[t[1]]=r.add,s&&r.add((function(){i=s}),n[1^e][2].disable,n[2][2].lock),a[t[0]]=function(){return a[t[0]+"With"](this===a?o:this,arguments),this},a[t[0]+"With"]=r.fireWith})),o.promise(a),t&&t.call(a,a),a}e.when=function(n){var i,o,a,s=t.call(arguments),l=s.length,u=0,c=1!==l||n&&e.isFunction(n.promise)?l:0,d=1===c?n:r(),f=function(e,r,n){return function(o){r[e]=this,n[e]=arguments.length>1?t.call(arguments):o,n===i?d.notifyWith(r,n):--c||d.resolveWith(r,n)}};if(l>1)for(i=new Array(l),o=new Array(l),a=new Array(l);u-1)return this},has:function(e,r,n){if(t.qsa(this,n).length)return this}},a=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),s=/^\s*>/,l="Zepto"+ +new Date;function u(e,t){e=e.replace(/=#\]/g,'="#"]');var r,n,i=a.exec(e);if(i&&i[2]in o&&(r=o[i[2]],n=i[3],e=i[1],n)){var s=Number(n);n=isNaN(s)?n.replace(/^["']|["']$/g,""):s}return t(e,r,n)}t.qsa=function(n,i){return u(i,(function(o,a,u){try{var c;!o&&a?o="*":s.test(o)&&(c=e(n).addClass(l),o="."+l+" "+o);var d=r(n,o)}catch(e){throw console.error("error performing selector: %o",i),e}finally{c&&c.removeClass(l)}return a?t.uniq(e.map(d,(function(e,t){return a.call(e,t,d,u)}))):d}))},t.matches=function(e,t){return u(t,(function(t,r,i){return(!t||n(e,t))&&(!r||r.call(e,null,i)===e)}))}}(n),e.exports=n},"./node_modules/core-js/library/fn/array/from.js": +/*! no static exports found */function(e,t){var r,n=function(){var e,t,r,n,i,o=[],a=o.concat,s=o.filter,l=o.slice,u=window.document,c={},d={},f={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},h=/^\s*<(\w+|!)[^>]*>/,p=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,m=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,g=/^(?:body|html)$/i,y=/([A-Z])/g,v=["val","css","html","text","data","width","height","offset"],b=u.createElement("table"),_=u.createElement("tr"),A={tr:u.createElement("tbody"),tbody:b,thead:b,tfoot:b,td:_,th:_,"*":u.createElement("div")},E=/complete|loaded|interactive/,T=/^[\w-]*$/,S={},w=S.toString,k={},x=u.createElement("div"),C={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},R=Array.isArray||function(e){return e instanceof Array};function L(e){return null==e?String(e):S[w.call(e)]||"object"}function j(e){return"function"==L(e)}function P(e){return null!=e&&e==e.window}function I(e){return null!=e&&e.nodeType==e.DOCUMENT_NODE}function O(e){return"object"==L(e)}function D(e){return O(e)&&!P(e)&&Object.getPrototypeOf(e)==Object.prototype}function M(e){var r=!!e&&"length"in e&&e.length,n=t.type(e);return"function"!=n&&!P(e)&&("array"==n||0===r||"number"==typeof r&&r>0&&r-1 in e)}function N(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function U(e){return e in d?d[e]:d[e]=new RegExp("(^|\\s)"+e+"(\\s|$)")}function F(e,t){return"number"!=typeof t||f[N(e)]?t:t+"px"}function B(e){return"children"in e?l.call(e.children):t.map(e.childNodes,(function(e){if(1==e.nodeType)return e}))}function K(e,t){var r,n=e?e.length:0;for(r=0;r")),void 0===r&&(r=h.test(e)&&RegExp.$1),r in A||(r="*"),(a=A[r]).innerHTML=""+e,i=t.each(l.call(a.childNodes),(function(){a.removeChild(this)}))),D(n)&&(o=t(i),t.each(n,(function(e,t){v.indexOf(e)>-1?o[e](t):o.attr(e,t)}))),i},k.Z=function(e,t){return new K(e,t)},k.isZ=function(e){return e instanceof k.Z},k.init=function(e,r){var n,i;if(!e)return k.Z();if("string"==typeof e)if("<"==(e=e.trim())[0]&&h.test(e))n=k.fragment(e,RegExp.$1,r),e=null;else{if(void 0!==r)return t(r).find(e);n=k.qsa(u,e)}else{if(j(e))return t(u).ready(e);if(k.isZ(e))return e;if(R(e))i=e,n=s.call(i,(function(e){return null!=e}));else if(O(e))n=[e],e=null;else if(h.test(e))n=k.fragment(e.trim(),RegExp.$1,r),e=null;else{if(void 0!==r)return t(r).find(e);n=k.qsa(u,e)}}return k.Z(n,e)},(t=function(e,t){return k.init(e,t)}).extend=function(e){var t,r=l.call(arguments,1);return"boolean"==typeof e&&(t=e,e=r.shift()),r.forEach((function(r){G(e,r,t)})),e},k.qsa=function(e,t){var r,n="#"==t[0],i=!n&&"."==t[0],o=n||i?t.slice(1):t,a=T.test(o);return e.getElementById&&a&&n?(r=e.getElementById(o))?[r]:[]:1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType?[]:l.call(a&&!n&&e.getElementsByClassName?i?e.getElementsByClassName(o):e.getElementsByTagName(t):e.querySelectorAll(t))},t.contains=u.documentElement.contains?function(e,t){return e!==t&&e.contains(t)}:function(e,t){for(;t&&(t=t.parentNode);)if(t===e)return!0;return!1},t.type=L,t.isFunction=j,t.isWindow=P,t.isArray=R,t.isPlainObject=D,t.isEmptyObject=function(e){var t;for(t in e)return!1;return!0},t.isNumeric=function(e){var t=Number(e),r=typeof e;return null!=e&&"boolean"!=r&&("string"!=r||e.length)&&!isNaN(t)&&isFinite(t)||!1},t.inArray=function(e,t,r){return o.indexOf.call(t,e,r)},t.camelCase=n,t.trim=function(e){return null==e?"":String.prototype.trim.call(e)},t.uuid=0,t.support={},t.expr={},t.noop=function(){},t.map=function(e,r){var n,i,o,a,s=[];if(M(e))for(i=0;i0?t.fn.concat.apply([],a):a},t.each=function(e,t){var r,n;if(M(e)){for(r=0;r=0?e:e+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each((function(){null!=this.parentNode&&this.parentNode.removeChild(this)}))},each:function(e){return o.every.call(this,(function(t,r){return!1!==e.call(t,r,t)})),this},filter:function(e){return j(e)?this.not(this.not(e)):t(s.call(this,(function(t){return k.matches(t,e)})))},add:function(e,r){return t(i(this.concat(t(e,r))))},is:function(e){return this.length>0&&k.matches(this[0],e)},not:function(e){var r=[];if(j(e)&&void 0!==e.call)this.each((function(t){e.call(this,t)||r.push(this)}));else{var n="string"==typeof e?this.filter(e):M(e)&&j(e.item)?l.call(e):t(e);this.forEach((function(e){n.indexOf(e)<0&&r.push(e)}))}return t(r)},has:function(e){return this.filter((function(){return O(e)?t.contains(this,e):t(this).find(e).size()}))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){var e=this[0];return e&&!O(e)?e:t(e)},last:function(){var e=this[this.length-1];return e&&!O(e)?e:t(e)},find:function(e){var r=this;return e?"object"==typeof e?t(e).filter((function(){var e=this;return o.some.call(r,(function(r){return t.contains(r,e)}))})):1==this.length?t(k.qsa(this[0],e)):this.map((function(){return k.qsa(this,e)})):t()},closest:function(e,r){var n=[],i="object"==typeof e&&t(e);return this.each((function(t,o){for(;o&&!(i?i.indexOf(o)>=0:k.matches(o,e));)o=o!==r&&!I(o)&&o.parentNode;o&&n.indexOf(o)<0&&n.push(o)})),t(n)},parents:function(e){for(var r=[],n=this;n.length>0;)n=t.map(n,(function(e){if((e=e.parentNode)&&!I(e)&&r.indexOf(e)<0)return r.push(e),e}));return V(r,e)},parent:function(e){return V(i(this.pluck("parentNode")),e)},children:function(e){return V(this.map((function(){return B(this)})),e)},contents:function(){return this.map((function(){return this.contentDocument||l.call(this.childNodes)}))},siblings:function(e){return V(this.map((function(e,t){return s.call(B(t.parentNode),(function(e){return e!==t}))})),e)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(e){return t.map(this,(function(t){return t[e]}))},show:function(){return this.each((function(){var e,t,r;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(e=this.nodeName,c[e]||(t=u.createElement(e),u.body.appendChild(t),r=getComputedStyle(t,"").getPropertyValue("display"),t.parentNode.removeChild(t),"none"==r&&(r="block"),c[e]=r),c[e]))}))},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){var r=j(e);if(this[0]&&!r)var n=t(e).get(0),i=n.parentNode||this.length>1;return this.each((function(o){t(this).wrapAll(r?e.call(this,o):i?n.cloneNode(!0):n)}))},wrapAll:function(e){if(this[0]){var r;for(t(this[0]).before(e=t(e));(r=e.children()).length;)e=r.first();t(e).append(this)}return this},wrapInner:function(e){var r=j(e);return this.each((function(n){var i=t(this),o=i.contents(),a=r?e.call(this,n):e;o.length?o.wrapAll(a):i.append(a)}))},unwrap:function(){return this.parent().each((function(){t(this).replaceWith(t(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(e){return this.each((function(){var r=t(this);(void 0===e?"none"==r.css("display"):e)?r.show():r.hide()}))},prev:function(e){return t(this.pluck("previousElementSibling")).filter(e||"*")},next:function(e){return t(this.pluck("nextElementSibling")).filter(e||"*")},html:function(e){return 0 in arguments?this.each((function(r){var n=this.innerHTML;t(this).empty().append(H(this,e,r,n))})):0 in this?this[0].innerHTML:null},text:function(e){return 0 in arguments?this.each((function(t){var r=H(this,e,t,this.textContent);this.textContent=null==r?"":""+r})):0 in this?this.pluck("textContent").join(""):null},attr:function(t,r){var n;return"string"!=typeof t||1 in arguments?this.each((function(n){if(1===this.nodeType)if(O(t))for(e in t)Y(this,e,t[e]);else Y(this,t,H(this,r,n,this.getAttribute(t)))})):0 in this&&1==this[0].nodeType&&null!=(n=this[0].getAttribute(t))?n:void 0},removeAttr:function(e){return this.each((function(){1===this.nodeType&&e.split(" ").forEach((function(e){Y(this,e)}),this)}))},prop:function(e,t){return e=C[e]||e,1 in arguments?this.each((function(r){this[e]=H(this,t,r,this[e])})):this[0]&&this[0][e]},removeProp:function(e){return e=C[e]||e,this.each((function(){delete this[e]}))},data:function(e,t){var r="data-"+e.replace(y,"-$1").toLowerCase(),n=1 in arguments?this.attr(r,t):this.attr(r);return null!==n?W(n):void 0},val:function(e){return 0 in arguments?(null==e&&(e=""),this.each((function(t){this.value=H(this,e,t,this.value)}))):this[0]&&(this[0].multiple?t(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each((function(r){var n=t(this),i=H(this,e,r,n.offset()),o=n.offsetParent().offset(),a={top:i.top-o.top,left:i.left-o.left};"static"==n.css("position")&&(a.position="relative"),n.css(a)}));if(!this.length)return null;if(u.documentElement!==this[0]&&!t.contains(u.documentElement,this[0]))return{top:0,left:0};var r=this[0].getBoundingClientRect();return{left:r.left+window.pageXOffset,top:r.top+window.pageYOffset,width:Math.round(r.width),height:Math.round(r.height)}},css:function(r,i){if(arguments.length<2){var o=this[0];if("string"==typeof r){if(!o)return;return o.style[n(r)]||getComputedStyle(o,"").getPropertyValue(r)}if(R(r)){if(!o)return;var a={},s=getComputedStyle(o,"");return t.each(r,(function(e,t){a[t]=o.style[n(t)]||s.getPropertyValue(t)})),a}}var l="";if("string"==L(r))i||0===i?l=N(r)+":"+F(r,i):this.each((function(){this.style.removeProperty(N(r))}));else for(e in r)r[e]||0===r[e]?l+=N(e)+":"+F(e,r[e])+";":this.each((function(){this.style.removeProperty(N(e))}));return this.each((function(){this.style.cssText+=";"+l}))},index:function(e){return e?this.indexOf(t(e)[0]):this.parent().children().indexOf(this[0])},hasClass:function(e){return!!e&&o.some.call(this,(function(e){return this.test(z(e))}),U(e))},addClass:function(e){return e?this.each((function(n){if("className"in this){r=[];var i=z(this);H(this,e,n,i).split(/\s+/g).forEach((function(e){t(this).hasClass(e)||r.push(e)}),this),r.length&&z(this,i+(i?" ":"")+r.join(" "))}})):this},removeClass:function(e){return this.each((function(t){if("className"in this){if(void 0===e)return z(this,"");r=z(this),H(this,e,t,r).split(/\s+/g).forEach((function(e){r=r.replace(U(e)," ")})),z(this,r.trim())}}))},toggleClass:function(e,r){return e?this.each((function(n){var i=t(this);H(this,e,n,z(this)).split(/\s+/g).forEach((function(e){(void 0===r?!i.hasClass(e):r)?i.addClass(e):i.removeClass(e)}))})):this},scrollTop:function(e){if(this.length){var t="scrollTop"in this[0];return void 0===e?t?this[0].scrollTop:this[0].pageYOffset:this.each(t?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var t="scrollLeft"in this[0];return void 0===e?t?this[0].scrollLeft:this[0].pageXOffset:this.each(t?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var e=this[0],r=this.offsetParent(),n=this.offset(),i=g.test(r[0].nodeName)?{top:0,left:0}:r.offset();return n.top-=parseFloat(t(e).css("margin-top"))||0,n.left-=parseFloat(t(e).css("margin-left"))||0,i.top+=parseFloat(t(r[0]).css("border-top-width"))||0,i.left+=parseFloat(t(r[0]).css("border-left-width"))||0,{top:n.top-i.top,left:n.left-i.left}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent||u.body;e&&!g.test(e.nodeName)&&"static"==t(e).css("position");)e=e.offsetParent;return e}))}},t.fn.detach=t.fn.remove,["width","height"].forEach((function(e){var r=e.replace(/./,(function(e){return e[0].toUpperCase()}));t.fn[e]=function(n){var i,o=this[0];return void 0===n?P(o)?o["inner"+r]:I(o)?o.documentElement["scroll"+r]:(i=this.offset())&&i[e]:this.each((function(r){(o=t(this)).css(e,H(this,n,r,o[e]()))}))}})),["after","prepend","before","append"].forEach((function(e,r){var n=r%2;t.fn[e]=function(){var e,i,o=t.map(arguments,(function(r){var n=[];return"array"==(e=L(r))?(r.forEach((function(e){return void 0!==e.nodeType?n.push(e):t.zepto.isZ(e)?n=n.concat(e.get()):void(n=n.concat(k.fragment(e)))})),n):"object"==e||null==r?r:k.fragment(r)})),a=this.length>1;return o.length<1?this:this.each((function(e,s){i=n?s:s.parentNode,s=0==r?s.nextSibling:1==r?s.firstChild:2==r?s:null;var l=t.contains(u.documentElement,i);o.forEach((function(e){if(a)e=e.cloneNode(!0);else if(!i)return t(e).remove();i.insertBefore(e,s),l&&$(e,(function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var t=e.ownerDocument?e.ownerDocument.defaultView:window;t.eval.call(t,e.innerHTML)}}))}))}))},t.fn[n?e+"To":"insert"+(r?"Before":"After")]=function(r){return t(r)[e](this),this}})),k.Z.prototype=K.prototype=t.fn,k.uniq=i,k.deserializeValue=W,t.zepto=k,t}();window.Zepto=n,void 0===window.$&&(window.$=n),function(e){var t,r,n=+new Date,i=window.document,o=/)<[^<]*)*<\/script>/gi,a=/^(?:text|application)\/javascript/i,s=/^(?:text|application)\/xml/i,l=/^\s*$/,u=i.createElement("a");function c(t,r,n,o){if(t.global)return function(t,r,n){var i=e.Event(r);return e(t).trigger(i,n),!i.isDefaultPrevented()}(r||i,n,o)}function d(e,t){var r=t.context;if(!1===t.beforeSend.call(r,e,t)||!1===c(t,r,"ajaxBeforeSend",[e,t]))return!1;c(t,r,"ajaxSend",[e,t])}function f(e,t,r,n){var i=r.context;r.success.call(i,e,"success",t),n&&n.resolveWith(i,[e,"success",t]),c(r,i,"ajaxSuccess",[t,r,e]),p("success",t,r)}function h(e,t,r,n,i){var o=n.context;n.error.call(o,r,t,e),i&&i.rejectWith(o,[r,t,e]),c(n,o,"ajaxError",[r,n,e||t]),p(t,r,n)}function p(t,r,n){var i=n.context;n.complete.call(i,r,t),c(n,i,"ajaxComplete",[r,n]),function(t){t.global&&!--e.active&&c(t,null,"ajaxStop")}(n)}function m(){}function g(e,t){return""==t?e:(e+"&"+t).replace(/[&?]{1,2}/,"?")}function y(t,r,n,i){return e.isFunction(r)&&(i=n,n=r,r=void 0),e.isFunction(n)||(i=n,n=void 0),{url:t,data:r,success:n,dataType:i}}u.href=window.location.href,e.active=0,e.ajaxJSONP=function(t,r){if(!("type"in t))return e.ajax(t);var o,a,s=t.jsonpCallback,l=(e.isFunction(s)?s():s)||"Zepto"+n++,u=i.createElement("script"),c=window[l],p=function(t){e(u).triggerHandler("error",t||"abort")},m={abort:p};return r&&r.promise(m),e(u).on("load error",(function(n,i){clearTimeout(a),e(u).off().remove(),"error"!=n.type&&o?f(o[0],m,t,r):h(null,i||"error",m,t,r),window[l]=c,o&&e.isFunction(c)&&c(o[0]),c=o=void 0})),!1===d(m,t)?(p("abort"),m):(window[l]=function(){o=arguments},u.src=t.url.replace(/\?(.+)=\?/,"?$1="+l),i.head.appendChild(u),t.timeout>0&&(a=setTimeout((function(){p("timeout")}),t.timeout)),m)},e.ajaxSettings={type:"GET",beforeSend:m,success:m,error:m,complete:m,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:"application/json",xml:"application/xml, text/xml",html:"text/html",text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:m},e.ajax=function(n){var o,p,y=e.extend({},n||{}),v=e.Deferred&&e.Deferred();for(t in e.ajaxSettings)void 0===y[t]&&(y[t]=e.ajaxSettings[t]);!function(t){t.global&&0==e.active++&&c(t,null,"ajaxStart")}(y),y.crossDomain||((o=i.createElement("a")).href=y.url,o.href=o.href,y.crossDomain=u.protocol+"//"+u.host!=o.protocol+"//"+o.host),y.url||(y.url=window.location.toString()),(p=y.url.indexOf("#"))>-1&&(y.url=y.url.slice(0,p)),function(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=g(t.url,t.data),t.data=void 0)}(y);var b=y.dataType,_=/\?.+=\?/.test(y.url);if(_&&(b="jsonp"),!1!==y.cache&&(n&&!0===n.cache||"script"!=b&&"jsonp"!=b)||(y.url=g(y.url,"_="+Date.now())),"jsonp"==b)return _||(y.url=g(y.url,y.jsonp?y.jsonp+"=?":!1===y.jsonp?"":"callback=?")),e.ajaxJSONP(y,v);var A,E=y.accepts[b],T={},S=function(e,t){T[e.toLowerCase()]=[e,t]},w=/^([\w-]+:)\/\//.test(y.url)?RegExp.$1:window.location.protocol,k=y.xhr(),x=k.setRequestHeader;if(v&&v.promise(k),y.crossDomain||S("X-Requested-With","XMLHttpRequest"),S("Accept",E||"*/*"),(E=y.mimeType||E)&&(E.indexOf(",")>-1&&(E=E.split(",",2)[0]),k.overrideMimeType&&k.overrideMimeType(E)),(y.contentType||!1!==y.contentType&&y.data&&"GET"!=y.type.toUpperCase())&&S("Content-Type",y.contentType||"application/x-www-form-urlencoded"),y.headers)for(r in y.headers)S(r,y.headers[r]);if(k.setRequestHeader=S,k.onreadystatechange=function(){if(4==k.readyState){k.onreadystatechange=m,clearTimeout(A);var t,r=!1;if(k.status>=200&&k.status<300||304==k.status||0==k.status&&"file:"==w){if(b=b||function(e){return e&&(e=e.split(";",2)[0]),e&&("text/html"==e?"html":"application/json"==e?"json":a.test(e)?"script":s.test(e)&&"xml")||"text"}(y.mimeType||k.getResponseHeader("content-type")),"arraybuffer"==k.responseType||"blob"==k.responseType)t=k.response;else{t=k.responseText;try{t=function(e,t,r){if(r.dataFilter==m)return e;var n=r.context;return r.dataFilter.call(n,e,t)}(t,b,y),"script"==b?(0,eval)(t):"xml"==b?t=k.responseXML:"json"==b&&(t=l.test(t)?null:e.parseJSON(t))}catch(e){r=e}if(r)return h(r,"parsererror",k,y,v)}f(t,k,y,v)}else h(k.statusText||null,k.status?"error":"abort",k,y,v)}},!1===d(k,y))return k.abort(),h(null,"abort",k,y,v),k;var C=!("async"in y)||y.async;if(k.open(y.type,y.url,C,y.username,y.password),y.xhrFields)for(r in y.xhrFields)k[r]=y.xhrFields[r];for(r in T)x.apply(k,T[r]);return y.timeout>0&&(A=setTimeout((function(){k.onreadystatechange=m,k.abort(),h(null,"timeout",k,y,v)}),y.timeout)),k.send(y.data?y.data:null),k},e.get=function(){return e.ajax(y.apply(null,arguments))},e.post=function(){var t=y.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=y.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,r,n){if(!this.length)return this;var i,a=this,s=t.split(/\s/),l=y(t,r,n),u=l.success;return s.length>1&&(l.url=s[0],i=s[1]),l.success=function(t){a.html(i?e("
").html(t.replace(o,"")).find(i):t),u&&u.apply(a,arguments)},e.ajax(l),this};var v=encodeURIComponent;e.param=function(t,r){var n=[];return n.add=function(t,r){e.isFunction(r)&&(r=r()),null==r&&(r=""),this.push(v(t)+"="+v(r))},function t(r,n,i,o){var a,s=e.isArray(n),l=e.isPlainObject(n);e.each(n,(function(n,u){a=e.type(u),o&&(n=i?o:o+"["+(l||"object"==a||"array"==a?n:"")+"]"),!o&&s?r.add(u.name,u.value):"array"==a||!i&&"object"==a?t(r,u,i,n):r.add(n,u)}))}(n,t,r),n.join("&").replace(/%20/g,"+")}}(n),(r=n).Callbacks=function(e){e=r.extend({},e);var t,n,i,o,a,s,l=[],u=!e.once&&[],c=function(r){for(t=e.memory&&r,n=!0,s=o||0,o=0,a=l.length,i=!0;l&&s-1;)l.splice(n,1),i&&(n<=a&&--a,n<=s&&--s)})),this},has:function(e){return!(!l||!(e?r.inArray(e,l)>-1:l.length))},empty:function(){return a=l.length=0,this},disable:function(){return l=u=t=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,t||d.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||n&&!u||(t=[e,(t=t||[]).slice?t.slice():t],i?u.push(t):c(t)),this},fire:function(){return d.fireWith(this,arguments)},fired:function(){return!!n}};return d},function(e){var t=Array.prototype.slice;function r(t){var n=[["resolve","done",e.Callbacks({once:1,memory:1}),"resolved"],["reject","fail",e.Callbacks({once:1,memory:1}),"rejected"],["notify","progress",e.Callbacks({memory:1})]],i="pending",o={state:function(){return i},always:function(){return a.done(arguments).fail(arguments),this},then:function(){var t=arguments;return r((function(r){e.each(n,(function(n,i){var s=e.isFunction(t[n])&&t[n];a[i[1]]((function(){var t=s&&s.apply(this,arguments);if(t&&e.isFunction(t.promise))t.promise().done(r.resolve).fail(r.reject).progress(r.notify);else{var n=this===o?r.promise():this,a=s?[t]:arguments;r[i[0]+"With"](n,a)}}))})),t=null})).promise()},promise:function(t){return null!=t?e.extend(t,o):o}},a={};return e.each(n,(function(e,t){var r=t[2],s=t[3];o[t[1]]=r.add,s&&r.add((function(){i=s}),n[1^e][2].disable,n[2][2].lock),a[t[0]]=function(){return a[t[0]+"With"](this===a?o:this,arguments),this},a[t[0]+"With"]=r.fireWith})),o.promise(a),t&&t.call(a,a),a}e.when=function(n){var i,o,a,s=t.call(arguments),l=s.length,u=0,c=1!==l||n&&e.isFunction(n.promise)?l:0,d=1===c?n:r(),f=function(e,r,n){return function(o){r[e]=this,n[e]=arguments.length>1?t.call(arguments):o,n===i?d.notifyWith(r,n):--c||d.resolveWith(r,n)}};if(l>1)for(i=new Array(l),o=new Array(l),a=new Array(l);u-1)return this},has:function(e,r,n){if(t.qsa(this,n).length)return this}},a=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),s=/^\s*>/,l="Zepto"+ +new Date;function u(e,t){e=e.replace(/=#\]/g,'="#"]');var r,n,i=a.exec(e);if(i&&i[2]in o&&(r=o[i[2]],n=i[3],e=i[1],n)){var s=Number(n);n=isNaN(s)?n.replace(/^["']|["']$/g,""):s}return t(e,r,n)}t.qsa=function(n,i){return u(i,(function(o,a,u){try{var c;!o&&a?o="*":s.test(o)&&(c=e(n).addClass(l),o="."+l+" "+o);var d=r(n,o)}catch(e){throw console.error("error performing selector: %o",i),e}finally{c&&c.removeClass(l)}return a?t.uniq(e.map(d,(function(e,t){return a.call(e,t,d,u)}))):d}))},t.matches=function(e,t){return u(t,(function(t,r,i){return(!t||n(e,t))&&(!r||r.call(e,null,i)===e)}))}}(n),e.exports=n},"./node_modules/core-js/library/fn/array/from.js": /*!*******************************************************!*\ !*** ./node_modules/core-js/library/fn/array/from.js ***! \*******************************************************/ @@ -230,7 +230,7 @@ /*!**************************************************************!*\ !*** ./node_modules/core-js/library/modules/_iter-define.js ***! \**************************************************************/ -/*! no static exports found */function(e,t,r){"use strict";var n=r(/*! ./_library */"./node_modules/core-js/library/modules/_library.js"),i=r(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),o=r(/*! ./_redefine */"./node_modules/core-js/library/modules/_redefine.js"),a=r(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js"),s=r(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),l=r(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js"),u=r(/*! ./_iter-create */"./node_modules/core-js/library/modules/_iter-create.js"),c=r(/*! ./_set-to-string-tag */"./node_modules/core-js/library/modules/_set-to-string-tag.js"),d=r(/*! ./_object-gpo */"./node_modules/core-js/library/modules/_object-gpo.js"),f=r(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,r,m,g,y,v){u(r,t,m);var b,_,A,E=function(e){if(!h&&e in k)return k[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},T=t+" Iterator",S="values"==g,w=!1,k=e.prototype,x=k[f]||k["@@iterator"]||g&&k[g],C=x||E(g),R=g?S?E("entries"):C:void 0,j="Array"==t&&k.entries||x;if(j&&(A=d(j.call(new e)))!==Object.prototype&&(c(A,T,!0),n||s(A,f)||a(A,f,p)),S&&x&&"values"!==x.name&&(w=!0,C=function(){return x.call(this)}),n&&!v||!h&&!w&&k[f]||a(k,f,C),l[t]=C,l[T]=p,g)if(b={values:S?C:E("values"),keys:y?C:E("keys"),entries:R},v)for(_ in b)_ in k||o(k,_,b[_]);else i(i.P+i.F*(h||w),t,b);return b}},"./node_modules/core-js/library/modules/_iter-detect.js": +/*! no static exports found */function(e,t,r){"use strict";var n=r(/*! ./_library */"./node_modules/core-js/library/modules/_library.js"),i=r(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),o=r(/*! ./_redefine */"./node_modules/core-js/library/modules/_redefine.js"),a=r(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js"),s=r(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),l=r(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js"),u=r(/*! ./_iter-create */"./node_modules/core-js/library/modules/_iter-create.js"),c=r(/*! ./_set-to-string-tag */"./node_modules/core-js/library/modules/_set-to-string-tag.js"),d=r(/*! ./_object-gpo */"./node_modules/core-js/library/modules/_object-gpo.js"),f=r(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,r,m,g,y,v){u(r,t,m);var b,_,A,E=function(e){if(!h&&e in k)return k[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},T=t+" Iterator",S="values"==g,w=!1,k=e.prototype,x=k[f]||k["@@iterator"]||g&&k[g],C=x||E(g),R=g?S?E("entries"):C:void 0,L="Array"==t&&k.entries||x;if(L&&(A=d(L.call(new e)))!==Object.prototype&&(c(A,T,!0),n||s(A,f)||a(A,f,p)),S&&x&&"values"!==x.name&&(w=!0,C=function(){return x.call(this)}),n&&!v||!h&&!w&&k[f]||a(k,f,C),l[t]=C,l[T]=p,g)if(b={values:S?C:E("values"),keys:y?C:E("keys"),entries:R},v)for(_ in b)_ in k||o(k,_,b[_]);else i(i.P+i.F*(h||w),t,b);return b}},"./node_modules/core-js/library/modules/_iter-detect.js": /*!**************************************************************!*\ !*** ./node_modules/core-js/library/modules/_iter-detect.js ***! \**************************************************************/ @@ -426,7 +426,7 @@ /*!************************************************************!*\ !*** ./node_modules/core-js/library/modules/es6.symbol.js ***! \************************************************************/ -/*! no static exports found */function(e,t,r){"use strict";var n=r(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),i=r(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),o=r(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js"),a=r(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),s=r(/*! ./_redefine */"./node_modules/core-js/library/modules/_redefine.js"),l=r(/*! ./_meta */"./node_modules/core-js/library/modules/_meta.js").KEY,u=r(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js"),c=r(/*! ./_shared */"./node_modules/core-js/library/modules/_shared.js"),d=r(/*! ./_set-to-string-tag */"./node_modules/core-js/library/modules/_set-to-string-tag.js"),f=r(/*! ./_uid */"./node_modules/core-js/library/modules/_uid.js"),h=r(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js"),p=r(/*! ./_wks-ext */"./node_modules/core-js/library/modules/_wks-ext.js"),m=r(/*! ./_wks-define */"./node_modules/core-js/library/modules/_wks-define.js"),g=r(/*! ./_keyof */"./node_modules/core-js/library/modules/_keyof.js"),y=r(/*! ./_enum-keys */"./node_modules/core-js/library/modules/_enum-keys.js"),v=r(/*! ./_is-array */"./node_modules/core-js/library/modules/_is-array.js"),b=r(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),_=r(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),A=r(/*! ./_to-primitive */"./node_modules/core-js/library/modules/_to-primitive.js"),E=r(/*! ./_property-desc */"./node_modules/core-js/library/modules/_property-desc.js"),T=r(/*! ./_object-create */"./node_modules/core-js/library/modules/_object-create.js"),S=r(/*! ./_object-gopn-ext */"./node_modules/core-js/library/modules/_object-gopn-ext.js"),w=r(/*! ./_object-gopd */"./node_modules/core-js/library/modules/_object-gopd.js"),k=r(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js"),x=r(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js"),C=w.f,R=k.f,j=S.f,L=n.Symbol,I=n.JSON,P=I&&I.stringify,O=h("_hidden"),D=h("toPrimitive"),M={}.propertyIsEnumerable,N=c("symbol-registry"),F=c("symbols"),U=c("op-symbols"),B=Object.prototype,K="function"==typeof L,G=n.QObject,V=!G||!G.prototype||!G.prototype.findChild,H=o&&u((function(){return 7!=T(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=C(B,t);n&&delete B[t],R(e,t,r),n&&e!==B&&R(B,t,n)}:R,Y=function(e){var t=F[e]=T(L.prototype);return t._k=e,t},z=K&&"symbol"==typeof L.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof L},$=function(e,t,r){return e===B&&$(U,t,r),b(e),t=A(t,!0),b(r),i(F,t)?(r.enumerable?(i(e,O)&&e[O][t]&&(e[O][t]=!1),r=T(r,{enumerable:E(0,!1)})):(i(e,O)||R(e,O,E(1,{})),e[O][t]=!0),H(e,t,r)):R(e,t,r)},W=function(e,t){b(e);for(var r,n=y(t=_(t)),i=0,o=n.length;o>i;)$(e,r=n[i++],t[r]);return e},q=function(e){var t=M.call(this,e=A(e,!0));return!(this===B&&i(F,e)&&!i(U,e))&&(!(t||!i(this,e)||!i(F,e)||i(this,O)&&this[O][e])||t)},X=function(e,t){if(e=_(e),t=A(t,!0),e!==B||!i(F,t)||i(U,t)){var r=C(e,t);return!r||!i(F,t)||i(e,O)&&e[O][t]||(r.enumerable=!0),r}},J=function(e){for(var t,r=j(_(e)),n=[],o=0;r.length>o;)i(F,t=r[o++])||t==O||t==l||n.push(t);return n},Z=function(e){for(var t,r=e===B,n=j(r?U:_(e)),o=[],a=0;n.length>a;)!i(F,t=n[a++])||r&&!i(B,t)||o.push(F[t]);return o};K||(s((L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(r){this===B&&t.call(U,r),i(this,O)&&i(this[O],e)&&(this[O][e]=!1),H(this,e,E(1,r))};return o&&V&&H(B,e,{configurable:!0,set:t}),Y(e)}).prototype,"toString",(function(){return this._k})),w.f=X,k.f=$,r(/*! ./_object-gopn */"./node_modules/core-js/library/modules/_object-gopn.js").f=S.f=J,r(/*! ./_object-pie */"./node_modules/core-js/library/modules/_object-pie.js").f=q,r(/*! ./_object-gops */"./node_modules/core-js/library/modules/_object-gops.js").f=Z,o&&!r(/*! ./_library */"./node_modules/core-js/library/modules/_library.js")&&s(B,"propertyIsEnumerable",q,!0),p.f=function(e){return Y(h(e))}),a(a.G+a.W+a.F*!K,{Symbol:L});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Q.length>ee;)h(Q[ee++]);for(Q=x(h.store),ee=0;Q.length>ee;)m(Q[ee++]);a(a.S+a.F*!K,"Symbol",{for:function(e){return i(N,e+="")?N[e]:N[e]=L(e)},keyFor:function(e){if(z(e))return g(N,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){V=!0},useSimple:function(){V=!1}}),a(a.S+a.F*!K,"Object",{create:function(e,t){return void 0===t?T(e):W(T(e),t)},defineProperty:$,defineProperties:W,getOwnPropertyDescriptor:X,getOwnPropertyNames:J,getOwnPropertySymbols:Z}),I&&a(a.S+a.F*(!K||u((function(){var e=L();return"[null]"!=P([e])||"{}"!=P({a:e})||"{}"!=P(Object(e))}))),"JSON",{stringify:function(e){if(void 0!==e&&!z(e)){for(var t,r,n=[e],i=1;arguments.length>i;)n.push(arguments[i++]);return"function"==typeof(t=n[1])&&(r=t),!r&&v(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!z(t))return t}),n[1]=t,P.apply(I,n)}}}),L.prototype[D]||r(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js")(L.prototype,D,L.prototype.valueOf),d(L,"Symbol"),d(Math,"Math",!0),d(n.JSON,"JSON",!0)},"./node_modules/core-js/library/modules/es7.symbol.async-iterator.js": +/*! no static exports found */function(e,t,r){"use strict";var n=r(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),i=r(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),o=r(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js"),a=r(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),s=r(/*! ./_redefine */"./node_modules/core-js/library/modules/_redefine.js"),l=r(/*! ./_meta */"./node_modules/core-js/library/modules/_meta.js").KEY,u=r(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js"),c=r(/*! ./_shared */"./node_modules/core-js/library/modules/_shared.js"),d=r(/*! ./_set-to-string-tag */"./node_modules/core-js/library/modules/_set-to-string-tag.js"),f=r(/*! ./_uid */"./node_modules/core-js/library/modules/_uid.js"),h=r(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js"),p=r(/*! ./_wks-ext */"./node_modules/core-js/library/modules/_wks-ext.js"),m=r(/*! ./_wks-define */"./node_modules/core-js/library/modules/_wks-define.js"),g=r(/*! ./_keyof */"./node_modules/core-js/library/modules/_keyof.js"),y=r(/*! ./_enum-keys */"./node_modules/core-js/library/modules/_enum-keys.js"),v=r(/*! ./_is-array */"./node_modules/core-js/library/modules/_is-array.js"),b=r(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),_=r(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),A=r(/*! ./_to-primitive */"./node_modules/core-js/library/modules/_to-primitive.js"),E=r(/*! ./_property-desc */"./node_modules/core-js/library/modules/_property-desc.js"),T=r(/*! ./_object-create */"./node_modules/core-js/library/modules/_object-create.js"),S=r(/*! ./_object-gopn-ext */"./node_modules/core-js/library/modules/_object-gopn-ext.js"),w=r(/*! ./_object-gopd */"./node_modules/core-js/library/modules/_object-gopd.js"),k=r(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js"),x=r(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js"),C=w.f,R=k.f,L=S.f,j=n.Symbol,P=n.JSON,I=P&&P.stringify,O=h("_hidden"),D=h("toPrimitive"),M={}.propertyIsEnumerable,N=c("symbol-registry"),U=c("symbols"),F=c("op-symbols"),B=Object.prototype,K="function"==typeof j,G=n.QObject,V=!G||!G.prototype||!G.prototype.findChild,H=o&&u((function(){return 7!=T(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=C(B,t);n&&delete B[t],R(e,t,r),n&&e!==B&&R(B,t,n)}:R,Y=function(e){var t=U[e]=T(j.prototype);return t._k=e,t},z=K&&"symbol"==typeof j.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof j},W=function(e,t,r){return e===B&&W(F,t,r),b(e),t=A(t,!0),b(r),i(U,t)?(r.enumerable?(i(e,O)&&e[O][t]&&(e[O][t]=!1),r=T(r,{enumerable:E(0,!1)})):(i(e,O)||R(e,O,E(1,{})),e[O][t]=!0),H(e,t,r)):R(e,t,r)},$=function(e,t){b(e);for(var r,n=y(t=_(t)),i=0,o=n.length;o>i;)W(e,r=n[i++],t[r]);return e},q=function(e){var t=M.call(this,e=A(e,!0));return!(this===B&&i(U,e)&&!i(F,e))&&(!(t||!i(this,e)||!i(U,e)||i(this,O)&&this[O][e])||t)},X=function(e,t){if(e=_(e),t=A(t,!0),e!==B||!i(U,t)||i(F,t)){var r=C(e,t);return!r||!i(U,t)||i(e,O)&&e[O][t]||(r.enumerable=!0),r}},J=function(e){for(var t,r=L(_(e)),n=[],o=0;r.length>o;)i(U,t=r[o++])||t==O||t==l||n.push(t);return n},Z=function(e){for(var t,r=e===B,n=L(r?F:_(e)),o=[],a=0;n.length>a;)!i(U,t=n[a++])||r&&!i(B,t)||o.push(U[t]);return o};K||(s((j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(r){this===B&&t.call(F,r),i(this,O)&&i(this[O],e)&&(this[O][e]=!1),H(this,e,E(1,r))};return o&&V&&H(B,e,{configurable:!0,set:t}),Y(e)}).prototype,"toString",(function(){return this._k})),w.f=X,k.f=W,r(/*! ./_object-gopn */"./node_modules/core-js/library/modules/_object-gopn.js").f=S.f=J,r(/*! ./_object-pie */"./node_modules/core-js/library/modules/_object-pie.js").f=q,r(/*! ./_object-gops */"./node_modules/core-js/library/modules/_object-gops.js").f=Z,o&&!r(/*! ./_library */"./node_modules/core-js/library/modules/_library.js")&&s(B,"propertyIsEnumerable",q,!0),p.f=function(e){return Y(h(e))}),a(a.G+a.W+a.F*!K,{Symbol:j});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Q.length>ee;)h(Q[ee++]);for(Q=x(h.store),ee=0;Q.length>ee;)m(Q[ee++]);a(a.S+a.F*!K,"Symbol",{for:function(e){return i(N,e+="")?N[e]:N[e]=j(e)},keyFor:function(e){if(z(e))return g(N,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){V=!0},useSimple:function(){V=!1}}),a(a.S+a.F*!K,"Object",{create:function(e,t){return void 0===t?T(e):$(T(e),t)},defineProperty:W,defineProperties:$,getOwnPropertyDescriptor:X,getOwnPropertyNames:J,getOwnPropertySymbols:Z}),P&&a(a.S+a.F*(!K||u((function(){var e=j();return"[null]"!=I([e])||"{}"!=I({a:e})||"{}"!=I(Object(e))}))),"JSON",{stringify:function(e){if(void 0!==e&&!z(e)){for(var t,r,n=[e],i=1;arguments.length>i;)n.push(arguments[i++]);return"function"==typeof(t=n[1])&&(r=t),!r&&v(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!z(t))return t}),n[1]=t,I.apply(P,n)}}}),j.prototype[D]||r(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js")(j.prototype,D,j.prototype.valueOf),d(j,"Symbol"),d(Math,"Math",!0),d(n.JSON,"JSON",!0)},"./node_modules/core-js/library/modules/es7.symbol.async-iterator.js": /*!***************************************************************************!*\ !*** ./node_modules/core-js/library/modules/es7.symbol.async-iterator.js ***! \***************************************************************************/ @@ -541,7 +541,7 @@ !*** ./src/controller/audio-stream-controller.js ***! \***************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";(function(e){var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(/*! ../utils/binary-search */"./src/utils/binary-search.js"),a=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.js"),s=r(/*! ../demux/demuxer */"./src/demux/demuxer.js"),l=r(/*! ../events */"./src/events.js"),u=r(/*! ./level-helper */"./src/controller/level-helper.js"),c=r(/*! ../utils/time-ranges */"./src/utils/time-ranges.js"),d=r(/*! ../errors */"./src/errors.js"),f=r(/*! ../utils/logger */"./src/utils/logger.js"),h=r(/*! ../utils/discontinuities */"./src/utils/discontinuities.js"),p=r(/*! ./fragment-tracker */"./src/controller/fragment-tracker.js"),m=r(/*! ../loader/fragment */"./src/loader/fragment.js"),g=r(/*! ./base-stream-controller */"./src/controller/base-stream-controller.js"),y=window.performance,v=function(t){function r(e,r){var n=t.call(this,e,l.default.MEDIA_ATTACHED,l.default.MEDIA_DETACHING,l.default.AUDIO_TRACKS_UPDATED,l.default.AUDIO_TRACK_SWITCHING,l.default.AUDIO_TRACK_LOADED,l.default.KEY_LOADED,l.default.FRAG_LOADED,l.default.FRAG_PARSING_INIT_SEGMENT,l.default.FRAG_PARSING_DATA,l.default.FRAG_PARSED,l.default.ERROR,l.default.BUFFER_RESET,l.default.BUFFER_CREATED,l.default.BUFFER_APPENDED,l.default.BUFFER_FLUSHED,l.default.INIT_PTS_FOUND)||this;return n.fragmentTracker=r,n.config=e.config,n.audioCodecSwap=!1,n._state=g.State.STOPPED,n.initPTS=[],n.waitingFragment=null,n.videoTrackCC=null,n}return i(r,t),r.prototype.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},r.prototype.onHandlerDestroyed=function(){this.state=g.State.STOPPED,this.fragmentTracker=null,t.prototype.onHandlerDestroyed.call(this)},r.prototype.onInitPtsFound=function(e){var t=e.id,r=e.frag.cc,n=e.initPTS;"main"===t&&(this.initPTS[r]=n,this.videoTrackCC=r,f.logger.log("InitPTS for cc: "+r+" found from video track: "+n),this.state===g.State.WAITING_INIT_PTS&&this.tick())},r.prototype.startLoad=function(e){if(this.tracks){var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,t>0&&-1===e?(f.logger.log("audio:override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=g.State.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=g.State.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=g.State.STOPPED},r.prototype.stopLoad=function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragmentTracker.removeFragment(e),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=g.State.STOPPED},Object.defineProperty(r.prototype,"state",{get:function(){return this._state},set:function(e){if(this.state!==e){var t=this.state;this._state=e,f.logger.log("audio stream:"+t+"->"+e)}},enumerable:!0,configurable:!0}),r.prototype.doTick=function(){var t,r,n,i=this.hls,s=i.config;switch(this.state){case g.State.ERROR:case g.State.PAUSED:case g.State.BUFFER_FLUSHING:break;case g.State.STARTING:this.state=g.State.WAITING_TRACK,this.loadedmetadata=!1;break;case g.State.IDLE:var u=this.tracks;if(!u)break;if(!this.media&&(this.startFragRequested||!s.startFragPrefetch))break;if(this.loadedmetadata)t=this.media.currentTime;else if(void 0===(t=this.nextLoadPosition))break;var c=this.mediaBuffer?this.mediaBuffer:this.media,d=this.videoBuffer?this.videoBuffer:this.media,m=a.BufferHelper.bufferInfo(c,t,s.maxBufferHole),v=a.BufferHelper.bufferInfo(d,t,s.maxBufferHole),b=m.len,_=m.end,A=this.fragPrevious,E=Math.min(s.maxBufferLength,s.maxMaxBufferLength),T=Math.max(E,v.len),S=this.audioSwitch,w=this.trackId;if((bC||m.nextStart))return;f.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=C+.05}if(n.initSegment&&!n.initSegment.data)j=n.initSegment;else if(_<=C){if(j=k[0],null!==this.videoTrackCC&&j.cc!==this.videoTrackCC&&(j=h.findFragWithCC(k,this.videoTrackCC)),n.live&&j.loadIdx&&j.loadIdx===this.fragLoadIdx){var L=m.nextStart?m.nextStart:C;return f.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(L+.05)),void(this.media.currentTime=L+.05)}}else{var I=void 0,P=s.maxFragLookUpTolerance,O=A?k[A.sn-k[0].sn+1]:void 0,D=function(e){var t=Math.min(P,e.duration);return e.start+e.duration-t<=_?1:e.start-t>_&&e.start?-1:0};_R-P&&(P=0),I=O&&!D(O)?O:o.default.search(k,D)):I=k[x-1],I&&(j=I,C=I.start,A&&j.level===A.level&&j.sn===A.sn&&(j.sn=N||F)&&(f.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=g.State.IDLE);break;case g.State.WAITING_INIT_PTS:var U=this.videoTrackCC;if(void 0===this.initPTS[U])break;var B=this.waitingFragment;if(B){var K=B.frag.cc;U!==K?(r=this.tracks[this.trackId]).details&&r.details.live&&(f.logger.warn("Waiting fragment CC ("+K+") does not match video track CC ("+U+")"),this.waitingFragment=null,this.state=g.State.IDLE):(this.state=g.State.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=g.State.IDLE;break;case g.State.STOPPED:case g.State.FRAG_LOADING:case g.State.PARSING:case g.State.PARSED:case g.State.ENDED:}},r.prototype.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended);var r=this.config;this.tracks&&r.autoStartLoad&&this.startLoad(r.startPosition)},r.prototype.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(f.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.stopLoad()},r.prototype.onAudioTracksUpdated=function(e){f.logger.log("audio tracks updated"),this.tracks=e.audioTracks},r.prototype.onAudioTrackSwitching=function(e){var t=!!e.url;this.trackId=e.id,this.fragCurrent=null,this.state=g.State.PAUSED,this.waitingFragment=null,t?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),t&&(this.audioSwitch=!0,this.state=g.State.IDLE),this.tick()},r.prototype.onAudioTrackLoaded=function(t){var r=t.details,n=t.id,i=this.tracks[n],o=r.totalduration,a=0;if(f.logger.log("track "+n+" loaded ["+r.startSN+","+r.endSN+"],duration:"+o),r.live){var s=i.details;s&&r.fragments.length>0?(u.mergeDetails(s,r),a=r.fragments[0].start,r.PTSKnown?f.logger.log("live audio playlist sliding:"+a.toFixed(3)):f.logger.log("live audio playlist - outdated PTS, unknown sliding")):(r.PTSKnown=!1,f.logger.log("live audio playlist - first load, unknown sliding"))}else r.PTSKnown=!1;if(i.details=r,!this.startFragRequested){if(-1===this.startPosition){var l=r.startTimeOffset;e.isFinite(l)?(f.logger.log("start time offset found in playlist, adjust startPosition to "+l),this.startPosition=l):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===g.State.WAITING_TRACK&&(this.state=g.State.IDLE),this.tick()},r.prototype.onKeyLoaded=function(){this.state===g.State.KEY_LOADING&&(this.state=g.State.IDLE,this.tick())},r.prototype.onFragLoaded=function(e){var t=this.fragCurrent,r=e.frag;if(this.state===g.State.FRAG_LOADING&&t&&"audio"===r.type&&r.level===t.level&&r.sn===t.sn){var n=this.tracks[this.trackId],i=n.details,o=i.totalduration,a=t.level,u=t.sn,c=t.cc,d=this.config.defaultAudioCodec||n.audioCodec||"mp4a.40.2",h=this.stats=e.stats;if("initSegment"===u)this.state=g.State.IDLE,h.tparsed=h.tbuffered=y.now(),i.initSegment.data=e.payload,this.hls.trigger(l.default.FRAG_BUFFERED,{stats:h,frag:t,id:"audio"}),this.tick();else{this.state=g.State.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new s.default(this.hls,"audio"));var p=this.initPTS[c],m=i.initSegment?i.initSegment.data:[];i.initSegment||void 0!==p?(this.pendingBuffering=!0,f.logger.log("Demuxing "+u+" of ["+i.startSN+" ,"+i.endSN+"],track "+a),this.demuxer.push(e.payload,m,d,null,t,o,!1,p)):(f.logger.log("unknown video PTS for continuity counter "+c+", waiting for video PTS before demuxing audio frag "+u+" of ["+i.startSN+" ,"+i.endSN+"],track "+a),this.waitingFragment=e,this.state=g.State.WAITING_INIT_PTS)}}this.fragLoadError=0},r.prototype.onFragParsingInitSegment=function(e){var t=this.fragCurrent,r=e.frag;if(t&&"audio"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===g.State.PARSING){var n=e.tracks,i=void 0;if(n.video&&delete n.video,i=n.audio){i.levelCodec=i.codec,i.id=e.id,this.hls.trigger(l.default.BUFFER_CODECS,n),f.logger.log("audio track:audio,container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var o=i.initSegment;if(o){var a={type:"audio",data:o,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[a]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,a))}this.tick()}}},r.prototype.onFragParsingData=function(t){var r=this,n=this.fragCurrent,i=t.frag;if(n&&"audio"===t.id&&"audio"===t.type&&i.sn===n.sn&&i.level===n.level&&this.state===g.State.PARSING){var o=this.trackId,a=this.tracks[o],s=this.hls;e.isFinite(t.endPTS)||(t.endPTS=t.startPTS+n.duration,t.endDTS=t.startDTS+n.duration),n.addElementaryStream(m.default.ElementaryStreamTypes.AUDIO),f.logger.log("parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb),u.updateFragPTSDTS(a.details,n,t.startPTS,t.endPTS);var c=this.audioSwitch,h=this.media,p=!1;if(c&&h)if(h.readyState){var y=h.currentTime;f.logger.log("switching audio track : currentTime:"+y),y>=t.startPTS&&(f.logger.log("switching audio track : flushing all audio"),this.state=g.State.BUFFER_FLUSHING,s.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:e.POSITIVE_INFINITY,type:"audio"}),p=!0,this.audioSwitch=!1,s.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:o}))}else this.audioSwitch=!1,s.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:o});var v=this.pendingData;if(!v)return f.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void s.trigger(l.default.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([t.data1,t.data2].forEach((function(e){e&&e.length&&v.push({type:t.type,data:e,parent:"audio",content:"data"})})),!p&&v.length&&(v.forEach((function(e){r.state===g.State.PARSING&&(r.pendingBuffering=!0,r.hls.trigger(l.default.BUFFER_APPENDING,e))})),this.pendingData=[],this.appended=!0)),this.tick()}},r.prototype.onFragParsed=function(e){var t=this.fragCurrent,r=e.frag;t&&"audio"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===g.State.PARSING&&(this.stats.tparsed=y.now(),this.state=g.State.PARSED,this._checkAppendedParsed())},r.prototype.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},r.prototype.onBufferCreated=function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},r.prototype.onBufferAppended=function(e){if("audio"===e.parent){var t=this.state;t!==g.State.PARSING&&t!==g.State.PARSED||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},r.prototype._checkAppendedParsed=function(){if(!(this.state!==g.State.PARSED||this.appended&&this.pendingBuffering)){var e=this.fragCurrent,t=this.stats,r=this.hls;if(e){this.fragPrevious=e,t.tbuffered=y.now(),r.trigger(l.default.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var n=this.mediaBuffer?this.mediaBuffer:this.media;f.logger.log("audio buffered : "+c.default.toString(n.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,r.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=g.State.IDLE}this.tick()}},r.prototype.onError=function(t){var r=t.frag;if(!r||"audio"===r.type)switch(t.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:var n=t.frag;if(n&&"audio"!==n.type)break;if(!t.fatal){var i=this.fragLoadError;if(i?i++:i=1,i<=(s=this.config).fragLoadingMaxRetry){this.fragLoadError=i;var o=Math.min(Math.pow(2,i-1)*s.fragLoadingRetryDelay,s.fragLoadingMaxRetryTimeout);f.logger.warn("AudioStreamController: frag loading failed, retry in "+o+" ms"),this.retryDate=y.now()+o,this.state=g.State.FRAG_LOADING_WAITING_RETRY}else f.logger.error("AudioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=g.State.ERROR}break;case d.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case d.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case d.ErrorDetails.KEY_LOAD_ERROR:case d.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==g.State.ERROR&&(this.state=t.fatal?g.State.ERROR:g.State.IDLE,f.logger.warn("AudioStreamController: "+t.details+" while loading frag, now switching to "+this.state+" state ..."));break;case d.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===t.parent&&(this.state===g.State.PARSING||this.state===g.State.PARSED)){var s,u=this.mediaBuffer,c=this.media.currentTime;u&&a.BufferHelper.isBuffered(u,c)&&a.BufferHelper.isBuffered(u,c+.5)?((s=this.config).maxMaxBufferLength>=s.maxBufferLength&&(s.maxMaxBufferLength/=2,f.logger.warn("AudioStreamController: reduce max buffer length to "+s.maxMaxBufferLength+"s")),this.state=g.State.IDLE):(f.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=g.State.BUFFER_FLUSHING,this.hls.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:e.POSITIVE_INFINITY,type:"audio"}))}}},r.prototype.onBufferFlushed=function(){var e=this,t=this.pendingData;t&&t.length?(f.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),t.forEach((function(t){e.hls.trigger(l.default.BUFFER_APPENDING,t)})),this.appended=!0,this.pendingData=[],this.state=g.State.PARSED):(this.state=g.State.IDLE,this.fragPrevious=null,this.tick())},r}(g.default);t.default=v}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/audio-track-controller.js": +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";(function(e){var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(/*! ../utils/binary-search */"./src/utils/binary-search.js"),a=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.js"),s=r(/*! ../demux/demuxer */"./src/demux/demuxer.js"),l=r(/*! ../events */"./src/events.js"),u=r(/*! ./level-helper */"./src/controller/level-helper.js"),c=r(/*! ../utils/time-ranges */"./src/utils/time-ranges.js"),d=r(/*! ../errors */"./src/errors.js"),f=r(/*! ../utils/logger */"./src/utils/logger.js"),h=r(/*! ../utils/discontinuities */"./src/utils/discontinuities.js"),p=r(/*! ./fragment-tracker */"./src/controller/fragment-tracker.js"),m=r(/*! ../loader/fragment */"./src/loader/fragment.js"),g=r(/*! ./base-stream-controller */"./src/controller/base-stream-controller.js"),y=window.performance,v=function(t){function r(e,r){var n=t.call(this,e,l.default.MEDIA_ATTACHED,l.default.MEDIA_DETACHING,l.default.AUDIO_TRACKS_UPDATED,l.default.AUDIO_TRACK_SWITCHING,l.default.AUDIO_TRACK_LOADED,l.default.KEY_LOADED,l.default.FRAG_LOADED,l.default.FRAG_PARSING_INIT_SEGMENT,l.default.FRAG_PARSING_DATA,l.default.FRAG_PARSED,l.default.ERROR,l.default.BUFFER_RESET,l.default.BUFFER_CREATED,l.default.BUFFER_APPENDED,l.default.BUFFER_FLUSHED,l.default.INIT_PTS_FOUND)||this;return n.fragmentTracker=r,n.config=e.config,n.audioCodecSwap=!1,n._state=g.State.STOPPED,n.initPTS=[],n.waitingFragment=null,n.videoTrackCC=null,n}return i(r,t),r.prototype.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},r.prototype.onHandlerDestroyed=function(){this.state=g.State.STOPPED,this.fragmentTracker=null,t.prototype.onHandlerDestroyed.call(this)},r.prototype.onInitPtsFound=function(e){var t=e.id,r=e.frag.cc,n=e.initPTS;"main"===t&&(this.initPTS[r]=n,this.videoTrackCC=r,f.logger.log("InitPTS for cc: "+r+" found from video track: "+n),this.state===g.State.WAITING_INIT_PTS&&this.tick())},r.prototype.startLoad=function(e){if(this.tracks){var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,t>0&&-1===e?(f.logger.log("audio:override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=g.State.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=g.State.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=g.State.STOPPED},r.prototype.stopLoad=function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragmentTracker.removeFragment(e),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=g.State.STOPPED},Object.defineProperty(r.prototype,"state",{get:function(){return this._state},set:function(e){if(this.state!==e){var t=this.state;this._state=e,f.logger.log("audio stream:"+t+"->"+e)}},enumerable:!0,configurable:!0}),r.prototype.doTick=function(){var t,r,n,i=this.hls,s=i.config;switch(this.state){case g.State.ERROR:case g.State.PAUSED:case g.State.BUFFER_FLUSHING:break;case g.State.STARTING:this.state=g.State.WAITING_TRACK,this.loadedmetadata=!1;break;case g.State.IDLE:var u=this.tracks;if(!u)break;if(!this.media&&(this.startFragRequested||!s.startFragPrefetch))break;if(this.loadedmetadata)t=this.media.currentTime;else if(void 0===(t=this.nextLoadPosition))break;var c=this.mediaBuffer?this.mediaBuffer:this.media,d=this.videoBuffer?this.videoBuffer:this.media,m=a.BufferHelper.bufferInfo(c,t,s.maxBufferHole),v=a.BufferHelper.bufferInfo(d,t,s.maxBufferHole),b=m.len,_=m.end,A=this.fragPrevious,E=Math.min(s.maxBufferLength,s.maxMaxBufferLength),T=Math.max(E,v.len),S=this.audioSwitch,w=this.trackId;if((bC||m.nextStart))return;f.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=C+.05}if(n.initSegment&&!n.initSegment.data)L=n.initSegment;else if(_<=C){if(L=k[0],null!==this.videoTrackCC&&L.cc!==this.videoTrackCC&&(L=h.findFragWithCC(k,this.videoTrackCC)),n.live&&L.loadIdx&&L.loadIdx===this.fragLoadIdx){var j=m.nextStart?m.nextStart:C;return f.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(j+.05)),void(this.media.currentTime=j+.05)}}else{var P=void 0,I=s.maxFragLookUpTolerance,O=A?k[A.sn-k[0].sn+1]:void 0,D=function(e){var t=Math.min(I,e.duration);return e.start+e.duration-t<=_?1:e.start-t>_&&e.start?-1:0};_R-I&&(I=0),P=O&&!D(O)?O:o.default.search(k,D)):P=k[x-1],P&&(L=P,C=P.start,A&&L.level===A.level&&L.sn===A.sn&&(L.sn=N||U)&&(f.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=g.State.IDLE);break;case g.State.WAITING_INIT_PTS:var F=this.videoTrackCC;if(void 0===this.initPTS[F])break;var B=this.waitingFragment;if(B){var K=B.frag.cc;F!==K?(r=this.tracks[this.trackId]).details&&r.details.live&&(f.logger.warn("Waiting fragment CC ("+K+") does not match video track CC ("+F+")"),this.waitingFragment=null,this.state=g.State.IDLE):(this.state=g.State.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=g.State.IDLE;break;case g.State.STOPPED:case g.State.FRAG_LOADING:case g.State.PARSING:case g.State.PARSED:case g.State.ENDED:}},r.prototype.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended);var r=this.config;this.tracks&&r.autoStartLoad&&this.startLoad(r.startPosition)},r.prototype.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(f.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.stopLoad()},r.prototype.onAudioTracksUpdated=function(e){f.logger.log("audio tracks updated"),this.tracks=e.audioTracks},r.prototype.onAudioTrackSwitching=function(e){var t=!!e.url;this.trackId=e.id,this.fragCurrent=null,this.state=g.State.PAUSED,this.waitingFragment=null,t?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),t&&(this.audioSwitch=!0,this.state=g.State.IDLE),this.tick()},r.prototype.onAudioTrackLoaded=function(t){var r=t.details,n=t.id,i=this.tracks[n],o=r.totalduration,a=0;if(f.logger.log("track "+n+" loaded ["+r.startSN+","+r.endSN+"],duration:"+o),r.live){var s=i.details;s&&r.fragments.length>0?(u.mergeDetails(s,r),a=r.fragments[0].start,r.PTSKnown?f.logger.log("live audio playlist sliding:"+a.toFixed(3)):f.logger.log("live audio playlist - outdated PTS, unknown sliding")):(r.PTSKnown=!1,f.logger.log("live audio playlist - first load, unknown sliding"))}else r.PTSKnown=!1;if(i.details=r,!this.startFragRequested){if(-1===this.startPosition){var l=r.startTimeOffset;e.isFinite(l)?(f.logger.log("start time offset found in playlist, adjust startPosition to "+l),this.startPosition=l):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===g.State.WAITING_TRACK&&(this.state=g.State.IDLE),this.tick()},r.prototype.onKeyLoaded=function(){this.state===g.State.KEY_LOADING&&(this.state=g.State.IDLE,this.tick())},r.prototype.onFragLoaded=function(e){var t=this.fragCurrent,r=e.frag;if(this.state===g.State.FRAG_LOADING&&t&&"audio"===r.type&&r.level===t.level&&r.sn===t.sn){var n=this.tracks[this.trackId],i=n.details,o=i.totalduration,a=t.level,u=t.sn,c=t.cc,d=this.config.defaultAudioCodec||n.audioCodec||"mp4a.40.2",h=this.stats=e.stats;if("initSegment"===u)this.state=g.State.IDLE,h.tparsed=h.tbuffered=y.now(),i.initSegment.data=e.payload,this.hls.trigger(l.default.FRAG_BUFFERED,{stats:h,frag:t,id:"audio"}),this.tick();else{this.state=g.State.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new s.default(this.hls,"audio"));var p=this.initPTS[c],m=i.initSegment?i.initSegment.data:[];i.initSegment||void 0!==p?(this.pendingBuffering=!0,f.logger.log("Demuxing "+u+" of ["+i.startSN+" ,"+i.endSN+"],track "+a),this.demuxer.push(e.payload,m,d,null,t,o,!1,p)):(f.logger.log("unknown video PTS for continuity counter "+c+", waiting for video PTS before demuxing audio frag "+u+" of ["+i.startSN+" ,"+i.endSN+"],track "+a),this.waitingFragment=e,this.state=g.State.WAITING_INIT_PTS)}}this.fragLoadError=0},r.prototype.onFragParsingInitSegment=function(e){var t=this.fragCurrent,r=e.frag;if(t&&"audio"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===g.State.PARSING){var n=e.tracks,i=void 0;if(n.video&&delete n.video,i=n.audio){i.levelCodec=i.codec,i.id=e.id,this.hls.trigger(l.default.BUFFER_CODECS,n),f.logger.log("audio track:audio,container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var o=i.initSegment;if(o){var a={type:"audio",data:o,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[a]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,a))}this.tick()}}},r.prototype.onFragParsingData=function(t){var r=this,n=this.fragCurrent,i=t.frag;if(n&&"audio"===t.id&&"audio"===t.type&&i.sn===n.sn&&i.level===n.level&&this.state===g.State.PARSING){var o=this.trackId,a=this.tracks[o],s=this.hls;e.isFinite(t.endPTS)||(t.endPTS=t.startPTS+n.duration,t.endDTS=t.startDTS+n.duration),n.addElementaryStream(m.default.ElementaryStreamTypes.AUDIO),f.logger.log("parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb),u.updateFragPTSDTS(a.details,n,t.startPTS,t.endPTS);var c=this.audioSwitch,h=this.media,p=!1;if(c&&h)if(h.readyState){var y=h.currentTime;f.logger.log("switching audio track : currentTime:"+y),y>=t.startPTS&&(f.logger.log("switching audio track : flushing all audio"),this.state=g.State.BUFFER_FLUSHING,s.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:e.POSITIVE_INFINITY,type:"audio"}),p=!0,this.audioSwitch=!1,s.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:o}))}else this.audioSwitch=!1,s.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:o});var v=this.pendingData;if(!v)return f.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void s.trigger(l.default.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([t.data1,t.data2].forEach((function(e){e&&e.length&&v.push({type:t.type,data:e,parent:"audio",content:"data"})})),!p&&v.length&&(v.forEach((function(e){r.state===g.State.PARSING&&(r.pendingBuffering=!0,r.hls.trigger(l.default.BUFFER_APPENDING,e))})),this.pendingData=[],this.appended=!0)),this.tick()}},r.prototype.onFragParsed=function(e){var t=this.fragCurrent,r=e.frag;t&&"audio"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===g.State.PARSING&&(this.stats.tparsed=y.now(),this.state=g.State.PARSED,this._checkAppendedParsed())},r.prototype.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},r.prototype.onBufferCreated=function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},r.prototype.onBufferAppended=function(e){if("audio"===e.parent){var t=this.state;t!==g.State.PARSING&&t!==g.State.PARSED||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},r.prototype._checkAppendedParsed=function(){if(!(this.state!==g.State.PARSED||this.appended&&this.pendingBuffering)){var e=this.fragCurrent,t=this.stats,r=this.hls;if(e){this.fragPrevious=e,t.tbuffered=y.now(),r.trigger(l.default.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var n=this.mediaBuffer?this.mediaBuffer:this.media;f.logger.log("audio buffered : "+c.default.toString(n.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,r.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=g.State.IDLE}this.tick()}},r.prototype.onError=function(t){var r=t.frag;if(!r||"audio"===r.type)switch(t.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:var n=t.frag;if(n&&"audio"!==n.type)break;if(!t.fatal){var i=this.fragLoadError;if(i?i++:i=1,i<=(s=this.config).fragLoadingMaxRetry){this.fragLoadError=i;var o=Math.min(Math.pow(2,i-1)*s.fragLoadingRetryDelay,s.fragLoadingMaxRetryTimeout);f.logger.warn("AudioStreamController: frag loading failed, retry in "+o+" ms"),this.retryDate=y.now()+o,this.state=g.State.FRAG_LOADING_WAITING_RETRY}else f.logger.error("AudioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=g.State.ERROR}break;case d.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case d.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case d.ErrorDetails.KEY_LOAD_ERROR:case d.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==g.State.ERROR&&(this.state=t.fatal?g.State.ERROR:g.State.IDLE,f.logger.warn("AudioStreamController: "+t.details+" while loading frag, now switching to "+this.state+" state ..."));break;case d.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===t.parent&&(this.state===g.State.PARSING||this.state===g.State.PARSED)){var s,u=this.mediaBuffer,c=this.media.currentTime;u&&a.BufferHelper.isBuffered(u,c)&&a.BufferHelper.isBuffered(u,c+.5)?((s=this.config).maxMaxBufferLength>=s.maxBufferLength&&(s.maxMaxBufferLength/=2,f.logger.warn("AudioStreamController: reduce max buffer length to "+s.maxMaxBufferLength+"s")),this.state=g.State.IDLE):(f.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=g.State.BUFFER_FLUSHING,this.hls.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:e.POSITIVE_INFINITY,type:"audio"}))}}},r.prototype.onBufferFlushed=function(){var e=this,t=this.pendingData;t&&t.length?(f.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),t.forEach((function(t){e.hls.trigger(l.default.BUFFER_APPENDING,t)})),this.appended=!0,this.pendingData=[],this.state=g.State.PARSED):(this.state=g.State.IDLE,this.fragPrevious=null,this.tick())},r}(g.default);t.default=v}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/audio-track-controller.js": /*!**************************************************!*\ !*** ./src/controller/audio-track-controller.js ***! \**************************************************/ @@ -631,7 +631,7 @@ !*** ./src/crypt/aes-decryptor.js ***! \************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";function n(e){var t=e.byteLength,r=t&&new DataView(e).getUint8(t-1);return r?e.slice(0,t-r):e}Object.defineProperty(t,"__esModule",{value:!0}),t.removePadding=n;var i=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}return e.prototype.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),r=new Uint32Array(4),n=0;n<4;n++)r[n]=t.getUint32(4*n);return r},e.prototype.initTable=function(){var e=this.sBox,t=this.invSBox,r=this.subMix,n=r[0],i=r[1],o=r[2],a=r[3],s=this.invSubMix,l=s[0],u=s[1],c=s[2],d=s[3],f=new Uint32Array(256),h=0,p=0,m=0;for(m=0;m<256;m++)f[m]=m<128?m<<1:m<<1^283;for(m=0;m<256;m++){var g=p^p<<1^p<<2^p<<3^p<<4;g=g>>>8^255&g^99,e[h]=g,t[g]=h;var y=f[h],v=f[y],b=f[v],_=257*f[g]^16843008*g;n[h]=_<<24|_>>>8,i[h]=_<<16|_>>>16,o[h]=_<<8|_>>>24,a[h]=_,_=16843009*b^65537*v^257*y^16843008*h,l[g]=_<<24|_>>>8,u[g]=_<<16|_>>>16,c[g]=_<<8|_>>>24,d[g]=_,h?(h=y^f[f[f[b^y]]],p^=f[f[p]]):h=p=1}},e.prototype.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),r=!0,n=0;n>>8^255&g^99,e[h]=g,t[g]=h;var y=f[h],v=f[y],b=f[v],_=257*f[g]^16843008*g;n[h]=_<<24|_>>>8,i[h]=_<<16|_>>>16,o[h]=_<<8|_>>>24,a[h]=_,_=16843009*b^65537*v^257*y^16843008*h,l[g]=_<<24|_>>>8,u[g]=_<<16|_>>>16,c[g]=_<<8|_>>>24,d[g]=_,h?(h=y^f[f[f[b^y]]],p^=f[f[p]]):h=p=1}},e.prototype.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),r=!0,n=0;n0&&null!=t&&null!=t.key&&"AES-128"===t.method){var g=this.decrypter;null==g&&(g=this.decrypter=new a.default(this.observer,this.config));var y=n();g.decrypt(e,t.key.buffer,t.iv.buffer,(function(e){var a=n();m.observer.trigger(i.default.FRAG_DECRYPTED,{stats:{tstart:y,tdecrypt:a}}),m.pushDecrypted(new Uint8Array(e),t,new Uint8Array(r),o,s,l,u,c,d,f,h,p)}))}else this.pushDecrypted(new Uint8Array(e),t,new Uint8Array(r),o,s,l,u,c,d,f,h,p)},e.prototype.pushDecrypted=function(e,t,r,n,a,h,p,m,g,y,v,b){var _=this.demuxer;if(!_||(p||m)&&!this.probe(e)){for(var A=this.observer,E=this.typeSupported,T=this.config,S=[{demux:u.default,remux:d.default},{demux:l.default,remux:f.default},{demux:s.default,remux:d.default},{demux:c.default,remux:d.default}],w=0,k=S.length;w0&&null!=t&&null!=t.key&&"AES-128"===t.method){var g=this.decrypter;null==g&&(g=this.decrypter=new a.default(this.observer,this.config));var y=n();g.decrypt(e,t.key.buffer,t.iv.buffer,(function(e){var a=n();m.observer.trigger(i.default.FRAG_DECRYPTED,{stats:{tstart:y,tdecrypt:a}}),m.pushDecrypted(new Uint8Array(e),t,new Uint8Array(r),o,s,l,u,c,d,f,h,p)}))}else this.pushDecrypted(new Uint8Array(e),t,new Uint8Array(r),o,s,l,u,c,d,f,h,p)},e.prototype.pushDecrypted=function(e,t,r,n,a,h,p,m,g,y,v,b){var _=this.demuxer;if(!_||(p||m)&&!this.probe(e)){for(var A=this.observer,E=this.typeSupported,T=this.config,S=[{demux:u.default,remux:d.default},{demux:l.default,remux:f.default},{demux:s.default,remux:d.default},{demux:c.default,remux:d.default}],w=0,k=S.length;w>4>1){if((d=a+5+t[a+4])===a+188)continue}else d=a+4;switch(c){case b:s&&(T&&(f=C(T))&&void 0!==f.pts&&R(f,!1),T={data:[],size:0}),T&&(T.data.push(t.subarray(d,a+188)),T.size+=a+188-d);break;case _:s&&(S&&(f=C(S))&&void 0!==f.pts&&(y.isAAC?j(f):L(f)),S={data:[],size:0}),S&&(S.data.push(t.subarray(d,a+188)),S.size+=a+188-d);break;case A:s&&(w&&(f=C(w))&&void 0!==f.pts&&I(f),w={data:[],size:0}),w&&(w.data.push(t.subarray(d,a+188)),w.size+=a+188-d);break;case 0:s&&(d+=t[d]+1),E=this._pmtId=k(t,d);break;case E:s&&(d+=t[d]+1);var O=x(t,d,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(b=O.avc)>0&&(g.pid=b),(_=O.audio)>0&&(y.pid=_,y.isAAC=O.isAAC),(A=O.id3)>0&&(v.pid=A),p&&!m&&(l.logger.log("reparse from beginning"),p=!1,a=P-188),m=this.pmtParsed=!0;break;case 17:case 8191:break;default:p=!0}}else this.observer.trigger(o.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});T&&(f=C(T))&&void 0!==f.pts?(R(f,!0),g.pesData=null):g.pesData=T,S&&(f=C(S))&&void 0!==f.pts?(y.isAAC?j(f):L(f),y.pesData=null):(S&&S.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=S),w&&(f=C(w))&&void 0!==f.pts?(I(f),v.pesData=null):v.pesData=w,null==this.sampleAes?this.remuxer.remux(y,g,v,this._txtTrack,r,n,i):this.decryptAndRemux(y,g,v,this._txtTrack,r,n,i)},e.prototype.decryptAndRemux=function(e,t,r,n,i,o,a){if(e.samples&&e.isAAC){var s=this;this.sampleAes.decryptAacSamples(e.samples,0,(function(){s.decryptAndRemuxAvc(e,t,r,n,i,o,a)}))}else this.decryptAndRemuxAvc(e,t,r,n,i,o,a)},e.prototype.decryptAndRemuxAvc=function(e,t,r,n,i,o,a){if(t.samples){var s=this;this.sampleAes.decryptAvcSamples(t.samples,0,0,(function(){s.remuxer.remux(e,t,r,n,i,o,a)}))}else this.remuxer.remux(e,t,r,n,i,o,a)},e.prototype.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},e.prototype._parsePAT=function(e,t){return(31&e[t+10])<<8|e[t+11]},e.prototype._parsePMT=function(e,t,r,n){var i,o,a={audio:-1,avc:-1,id3:-1,isAAC:!0};for(i=t+3+((15&e[t+1])<<8|e[t+2])-4,t+=12+((15&e[t+10])<<8|e[t+11]);t1;){var f=new Uint8Array(d[0].length+d[1].length);f.set(d[0]),f.set(d[1],d[0].length),d[0]=f,d.splice(1,1)}if(1===((t=d[0])[0]<<16)+(t[1]<<8)+t[2]){if((n=(t[4]<<8)+t[5])&&n>e.size-6)return null;192&(r=t[7])&&((a=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2)>4294967295&&(a-=8589934592),64&r?((s=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>4294967295&&(s-=8589934592),a-s>54e5&&(l.logger.warn(Math.round((a-s)/9e4)+"s delta between PTS and DTS, align them"),a=s)):s=a),u=(i=t[8])+9,e.size-=u,o=new Uint8Array(e.size);for(var h=0,p=d.length;hm){u-=m;continue}t=t.subarray(u),m-=u,u=0}o.set(t,c),c+=m}return n&&(n-=i+3),{data:o,pts:a,dts:s,len:n}}return null},e.prototype.pushAccesUnit=function(e,t){if(e.units.length&&e.frame){var r=t.samples,n=r.length;!this.config.forceKeyFrameOnDiscontinuity||!0===e.key||t.sps&&(n||this.contiguous)?(e.id=n,r.push(e)):t.dropped++}e.debug.length&&l.logger.log(e.pts+"/"+e.dts+":"+e.debug)},e.prototype._parseAVCPES=function(e,t){var r,n,i,o=this,s=this._avcTrack,l=this._parseAVCNALu(e.data),u=this.avcSample,c=!1,d=this.pushAccesUnit.bind(this),f=function(e,t,r,n){return{key:e,pts:t,dts:r,units:[],debug:n}};e.data=null,u&&l.length&&!s.audFound&&(d(u,s),u=this.avcSample=f(!1,e.pts,e.dts,"")),l.forEach((function(t){switch(t.type){case 1:n=!0,u||(u=o.avcSample=f(!0,e.pts,e.dts,"")),u.frame=!0;var l=t.data;if(c&&l.length>4){var h=new a.default(l).readSliceType();2!==h&&4!==h&&7!==h&&9!==h||(u.key=!0)}break;case 5:n=!0,u||(u=o.avcSample=f(!0,e.pts,e.dts,"")),u.key=!0,u.frame=!0;break;case 6:n=!0,(r=new a.default(o.discardEPB(t.data))).readUByte();for(var p=0,m=0,g=!1,y=0;!g&&r.bytesAvailable>1;){p=0;do{p+=y=r.readUByte()}while(255===y);m=0;do{m+=y=r.readUByte()}while(255===y);if(4===p&&0!==r.bytesAvailable){if(g=!0,181===r.readUByte()&&49===r.readUShort()&&1195456820===r.readUInt()&&3===r.readUByte()){var v=r.readUByte(),b=31&v,_=[v,r.readUByte()];for(i=0;i0){if(t.pts>=e[r-1].pts)e.push(t);else for(var n=r-1;n>=0;n--)if(t.pts=0?(n={data:e.subarray(d,o-l-1),type:i},c.push(n)):(f=this._getLastNalUnit())&&(u&&o<=4-u&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-u)),(r=o-l-1)>0&&((h=new Uint8Array(f.data.byteLength+r)).set(f.data,0),h.set(e.subarray(0,r),f.data.byteLength),f.data=h)),o=0&&l>=0&&(n={data:e.subarray(d,a),type:i,state:l},c.push(n)),0===c.length&&(f=this._getLastNalUnit())&&((h=new Uint8Array(f.data.byteLength+e.byteLength)).set(f.data,0),h.set(e,f.data.byteLength),f.data=h),s.naluState=l,c},e.prototype.discardEPB=function(e){for(var t,r,n=e.byteLength,i=[],o=1;o1&&(l.logger.log("AAC: align PTS for overlapping frames by "+Math.round((v-f)/90)),f=v)}for(;i>4>1){if((d=a+5+t[a+4])===a+188)continue}else d=a+4;switch(c){case b:s&&(T&&(f=C(T))&&void 0!==f.pts&&R(f,!1),T={data:[],size:0}),T&&(T.data.push(t.subarray(d,a+188)),T.size+=a+188-d);break;case _:s&&(S&&(f=C(S))&&void 0!==f.pts&&(y.isAAC?L(f):j(f)),S={data:[],size:0}),S&&(S.data.push(t.subarray(d,a+188)),S.size+=a+188-d);break;case A:s&&(w&&(f=C(w))&&void 0!==f.pts&&P(f),w={data:[],size:0}),w&&(w.data.push(t.subarray(d,a+188)),w.size+=a+188-d);break;case 0:s&&(d+=t[d]+1),E=this._pmtId=k(t,d);break;case E:s&&(d+=t[d]+1);var O=x(t,d,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(b=O.avc)>0&&(g.pid=b),(_=O.audio)>0&&(y.pid=_,y.isAAC=O.isAAC),(A=O.id3)>0&&(v.pid=A),p&&!m&&(l.logger.log("reparse from beginning"),p=!1,a=I-188),m=this.pmtParsed=!0;break;case 17:case 8191:break;default:p=!0}}else this.observer.trigger(o.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});T&&(f=C(T))&&void 0!==f.pts?(R(f,!0),g.pesData=null):g.pesData=T,S&&(f=C(S))&&void 0!==f.pts?(y.isAAC?L(f):j(f),y.pesData=null):(S&&S.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=S),w&&(f=C(w))&&void 0!==f.pts?(P(f),v.pesData=null):v.pesData=w,null==this.sampleAes?this.remuxer.remux(y,g,v,this._txtTrack,r,n,i):this.decryptAndRemux(y,g,v,this._txtTrack,r,n,i)},e.prototype.decryptAndRemux=function(e,t,r,n,i,o,a){if(e.samples&&e.isAAC){var s=this;this.sampleAes.decryptAacSamples(e.samples,0,(function(){s.decryptAndRemuxAvc(e,t,r,n,i,o,a)}))}else this.decryptAndRemuxAvc(e,t,r,n,i,o,a)},e.prototype.decryptAndRemuxAvc=function(e,t,r,n,i,o,a){if(t.samples){var s=this;this.sampleAes.decryptAvcSamples(t.samples,0,0,(function(){s.remuxer.remux(e,t,r,n,i,o,a)}))}else this.remuxer.remux(e,t,r,n,i,o,a)},e.prototype.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},e.prototype._parsePAT=function(e,t){return(31&e[t+10])<<8|e[t+11]},e.prototype._parsePMT=function(e,t,r,n){var i,o,a={audio:-1,avc:-1,id3:-1,isAAC:!0};for(i=t+3+((15&e[t+1])<<8|e[t+2])-4,t+=12+((15&e[t+10])<<8|e[t+11]);t1;){var f=new Uint8Array(d[0].length+d[1].length);f.set(d[0]),f.set(d[1],d[0].length),d[0]=f,d.splice(1,1)}if(1===((t=d[0])[0]<<16)+(t[1]<<8)+t[2]){if((n=(t[4]<<8)+t[5])&&n>e.size-6)return null;192&(r=t[7])&&((a=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2)>4294967295&&(a-=8589934592),64&r?((s=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>4294967295&&(s-=8589934592),a-s>54e5&&(l.logger.warn(Math.round((a-s)/9e4)+"s delta between PTS and DTS, align them"),a=s)):s=a),u=(i=t[8])+9,e.size-=u,o=new Uint8Array(e.size);for(var h=0,p=d.length;hm){u-=m;continue}t=t.subarray(u),m-=u,u=0}o.set(t,c),c+=m}return n&&(n-=i+3),{data:o,pts:a,dts:s,len:n}}return null},e.prototype.pushAccesUnit=function(e,t){if(e.units.length&&e.frame){var r=t.samples,n=r.length;!this.config.forceKeyFrameOnDiscontinuity||!0===e.key||t.sps&&(n||this.contiguous)?(e.id=n,r.push(e)):t.dropped++}e.debug.length&&l.logger.log(e.pts+"/"+e.dts+":"+e.debug)},e.prototype._parseAVCPES=function(e,t){var r,n,i,o=this,s=this._avcTrack,l=this._parseAVCNALu(e.data),u=this.avcSample,c=!1,d=this.pushAccesUnit.bind(this),f=function(e,t,r,n){return{key:e,pts:t,dts:r,units:[],debug:n}};e.data=null,u&&l.length&&!s.audFound&&(d(u,s),u=this.avcSample=f(!1,e.pts,e.dts,"")),l.forEach((function(t){switch(t.type){case 1:n=!0,u||(u=o.avcSample=f(!0,e.pts,e.dts,"")),u.frame=!0;var l=t.data;if(c&&l.length>4){var h=new a.default(l).readSliceType();2!==h&&4!==h&&7!==h&&9!==h||(u.key=!0)}break;case 5:n=!0,u||(u=o.avcSample=f(!0,e.pts,e.dts,"")),u.key=!0,u.frame=!0;break;case 6:n=!0,(r=new a.default(o.discardEPB(t.data))).readUByte();for(var p=0,m=0,g=!1,y=0;!g&&r.bytesAvailable>1;){p=0;do{p+=y=r.readUByte()}while(255===y);m=0;do{m+=y=r.readUByte()}while(255===y);if(4===p&&0!==r.bytesAvailable){if(g=!0,181===r.readUByte()&&49===r.readUShort()&&1195456820===r.readUInt()&&3===r.readUByte()){var v=r.readUByte(),b=31&v,_=[v,r.readUByte()];for(i=0;i0){if(t.pts>=e[r-1].pts)e.push(t);else for(var n=r-1;n>=0;n--)if(t.pts=0?(n={data:e.subarray(d,o-l-1),type:i},c.push(n)):(f=this._getLastNalUnit())&&(u&&o<=4-u&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-u)),(r=o-l-1)>0&&((h=new Uint8Array(f.data.byteLength+r)).set(f.data,0),h.set(e.subarray(0,r),f.data.byteLength),f.data=h)),o=0&&l>=0&&(n={data:e.subarray(d,a),type:i,state:l},c.push(n)),0===c.length&&(f=this._getLastNalUnit())&&((h=new Uint8Array(f.data.byteLength+e.byteLength)).set(f.data,0),h.set(e,f.data.byteLength),f.data=h),s.naluState=l,c},e.prototype.discardEPB=function(e){for(var t,r,n=e.byteLength,i=[],o=1;o1&&(l.logger.log("AAC: align PTS for overlapping frames by "+Math.round((v-f)/90)),f=v)}for(;i2?(t=r.shift()+".",t+=parseInt(r.shift()).toString(16),t+=("000"+parseInt(r.shift()).toString(16)).substr(-4)):t=e,t},t.resolve=function(e,t){return n.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,r){var n,i=[];function o(e,t){["video","audio"].forEach((function(r){var n=e.filter((function(e){return u.isCodecType(e,r)}));if(n.length){var i=n.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[r+"Codec"]=i.length>0?i[0]:n[0],e=e.filter((function(e){return-1===n.indexOf(e)}))}})),t.unknownCodecs=e}for(c.lastIndex=0;null!=(n=c.exec(e));){var a={},l=a.attrs=new s.default(n[1]);a.url=t.resolve(n[2],r);var d=l.decimalResolution("RESOLUTION");d&&(a.width=d.width,a.height=d.height),a.bitrate=l.decimalInteger("AVERAGE-BANDWIDTH")||l.decimalInteger("BANDWIDTH"),a.name=l.NAME,o([].concat((l.CODECS||"").split(/[ ,]+/)),a),a.videoCodec&&-1!==a.videoCodec.indexOf("avc1")&&(a.videoCodec=t.convertAVC1ToAVCOTI(a.videoCodec)),i.push(a)}return i},t.parseMasterPlaylistMedia=function(e,r,n,i){var o;void 0===i&&(i=[]);var a=[],l=0;for(d.lastIndex=0;null!==(o=d.exec(e));){var u={},c=new s.default(o[1]);if(c.TYPE===n){if(u.groupId=c["GROUP-ID"],u.name=c.NAME,u.type=n,u.default="YES"===c.DEFAULT,u.autoselect="YES"===c.AUTOSELECT,u.forced="YES"===c.FORCED,c.URI&&(u.url=t.resolve(c.URI,r)),u.lang=c.LANGUAGE,u.name||(u.name=u.lang),i.length){var f=t.findGroup(i,u.groupId);u.audioCodec=f?f.codec:i[0].codec}u.id=l++,a.push(u)}}return a},t.parseLevelPlaylist=function(t,r,n,u,c){var d,m,y=0,v=0,b=new o.default(r),_=new a.default,A=0,E=null,T=new i.default,S=null;for(f.lastIndex=0;null!==(d=f.exec(t));){var w=d[1];if(w){T.duration=parseFloat(w);var k=(" "+d[2]).slice(1);T.title=k||null,T.tagList.push(k?["INF",w,k]:["INF",w])}else if(d[3]){if(e.isFinite(T.duration)){var x=y++;T.type=u,T.start=v,T.levelkey=_,T.sn=x,T.level=n,T.cc=A,T.urlId=c,T.baseurl=r,T.relurl=(" "+d[3]).slice(1),g(T,E),b.fragments.push(T),E=T,v+=T.duration,T=new i.default}}else if(d[4]){if(T.rawByteRange=(" "+d[4]).slice(1),E){var C=E.byteRangeEndOffset;C&&(T.lastByteRangeEndOffset=C)}}else if(d[5])T.rawProgramDateTime=(" "+d[5]).slice(1),T.tagList.push(["PROGRAM-DATE-TIME",T.rawProgramDateTime]),null===S&&(S=b.fragments.length);else{for(d=d[0].match(h),m=1;m=0&&(_.method=P,_.baseuri=r,_.reluri=O,_.key=null,_.iv=D));break;case"START":var M=R,N=new s.default(M).decimalFloatingPoint("TIME-OFFSET");e.isFinite(N)&&(b.startTimeOffset=N);break;case"MAP":var F=new s.default(R);T.relurl=F.URI,T.rawByteRange=F.BYTERANGE,T.baseurl=r,T.level=n,T.type=u,T.sn="initSegment",b.initSegment=T,(T=new i.default).rawProgramDateTime=b.initSegment.rawProgramDateTime;break;default:l.logger.warn("line parsed but not handled: "+d)}}}return(T=E)&&!T.relurl&&(b.fragments.pop(),v-=T.duration),b.totalduration=v,b.averagetargetduration=v/b.fragments.length,b.endSN=y-1,b.startCC=b.fragments[0]?b.fragments[0].cc:0,b.endCC=A,!b.initSegment&&b.fragments.length&&b.fragments.every((function(e){return p.test(e.relurl)}))&&(l.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(T=new i.default).relurl=b.fragments[0].relurl,T.baseurl=r,T.level=n,T.type=u,T.sn="initSegment",b.initSegment=T,b.needSidxRanges=!0),S&&function(e,t){for(var r=e[t],n=t-1;n>=0;n--){var i=e[n];i.programDateTime=r.programDateTime-1e3*i.duration,r=i}}(b.fragments,S),b},t}();function g(t,r){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):r&&r.programDateTime&&(t.programDateTime=r.endProgramDateTime),e.isFinite(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}t.default=m}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/loader/playlist-loader.js": +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=r(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),i=r(/*! ./fragment */"./src/loader/fragment.js"),o=r(/*! ./level */"./src/loader/level.js"),a=r(/*! ./level-key */"./src/loader/level-key.js"),s=r(/*! ../utils/attr-list */"./src/utils/attr-list.js"),l=r(/*! ../utils/logger */"./src/utils/logger.js"),u=r(/*! ../utils/codecs */"./src/utils/codecs.js"),c=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,d=/#EXT-X-MEDIA:(.*)/g,f=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),h=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,p=/\.(mp4|m4s|m4v|m4a)$/i,m=function(){function t(){}return t.findGroup=function(e,t){if(!e)return null;for(var r=null,n=0;n2?(t=r.shift()+".",t+=parseInt(r.shift()).toString(16),t+=("000"+parseInt(r.shift()).toString(16)).substr(-4)):t=e,t},t.resolve=function(e,t){return n.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,r){var n,i=[];function o(e,t){["video","audio"].forEach((function(r){var n=e.filter((function(e){return u.isCodecType(e,r)}));if(n.length){var i=n.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[r+"Codec"]=i.length>0?i[0]:n[0],e=e.filter((function(e){return-1===n.indexOf(e)}))}})),t.unknownCodecs=e}for(c.lastIndex=0;null!=(n=c.exec(e));){var a={},l=a.attrs=new s.default(n[1]);a.url=t.resolve(n[2],r);var d=l.decimalResolution("RESOLUTION");d&&(a.width=d.width,a.height=d.height),a.bitrate=l.decimalInteger("AVERAGE-BANDWIDTH")||l.decimalInteger("BANDWIDTH"),a.name=l.NAME,o([].concat((l.CODECS||"").split(/[ ,]+/)),a),a.videoCodec&&-1!==a.videoCodec.indexOf("avc1")&&(a.videoCodec=t.convertAVC1ToAVCOTI(a.videoCodec)),i.push(a)}return i},t.parseMasterPlaylistMedia=function(e,r,n,i){var o;void 0===i&&(i=[]);var a=[],l=0;for(d.lastIndex=0;null!==(o=d.exec(e));){var u={},c=new s.default(o[1]);if(c.TYPE===n){if(u.groupId=c["GROUP-ID"],u.name=c.NAME,u.type=n,u.default="YES"===c.DEFAULT,u.autoselect="YES"===c.AUTOSELECT,u.forced="YES"===c.FORCED,c.URI&&(u.url=t.resolve(c.URI,r)),u.lang=c.LANGUAGE,u.name||(u.name=u.lang),i.length){var f=t.findGroup(i,u.groupId);u.audioCodec=f?f.codec:i[0].codec}u.id=l++,a.push(u)}}return a},t.parseLevelPlaylist=function(t,r,n,u,c){var d,m,y=0,v=0,b=new o.default(r),_=new a.default,A=0,E=null,T=new i.default,S=null;for(f.lastIndex=0;null!==(d=f.exec(t));){var w=d[1];if(w){T.duration=parseFloat(w);var k=(" "+d[2]).slice(1);T.title=k||null,T.tagList.push(k?["INF",w,k]:["INF",w])}else if(d[3]){if(e.isFinite(T.duration)){var x=y++;T.type=u,T.start=v,T.levelkey=_,T.sn=x,T.level=n,T.cc=A,T.urlId=c,T.baseurl=r,T.relurl=(" "+d[3]).slice(1),g(T,E),b.fragments.push(T),E=T,v+=T.duration,T=new i.default}}else if(d[4]){if(T.rawByteRange=(" "+d[4]).slice(1),E){var C=E.byteRangeEndOffset;C&&(T.lastByteRangeEndOffset=C)}}else if(d[5])T.rawProgramDateTime=(" "+d[5]).slice(1),T.tagList.push(["PROGRAM-DATE-TIME",T.rawProgramDateTime]),null===S&&(S=b.fragments.length);else{for(d=d[0].match(h),m=1;m=0&&(_.method=I,_.baseuri=r,_.reluri=O,_.key=null,_.iv=D));break;case"START":var M=R,N=new s.default(M).decimalFloatingPoint("TIME-OFFSET");e.isFinite(N)&&(b.startTimeOffset=N);break;case"MAP":var U=new s.default(R);T.relurl=U.URI,T.rawByteRange=U.BYTERANGE,T.baseurl=r,T.level=n,T.type=u,T.sn="initSegment",b.initSegment=T,(T=new i.default).rawProgramDateTime=b.initSegment.rawProgramDateTime;break;default:l.logger.warn("line parsed but not handled: "+d)}}}return(T=E)&&!T.relurl&&(b.fragments.pop(),v-=T.duration),b.totalduration=v,b.averagetargetduration=v/b.fragments.length,b.endSN=y-1,b.startCC=b.fragments[0]?b.fragments[0].cc:0,b.endCC=A,!b.initSegment&&b.fragments.length&&b.fragments.every((function(e){return p.test(e.relurl)}))&&(l.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(T=new i.default).relurl=b.fragments[0].relurl,T.baseurl=r,T.level=n,T.type=u,T.sn="initSegment",b.initSegment=T,b.needSidxRanges=!0),S&&function(e,t){for(var r=e[t],n=t-1;n>=0;n--){var i=e[n];i.programDateTime=r.programDateTime-1e3*i.duration,r=i}}(b.fragments,S),b},t}();function g(t,r){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):r&&r.programDateTime&&(t.programDateTime=r.endProgramDateTime),e.isFinite(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}t.default=m}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/loader/playlist-loader.js": /*!***************************************!*\ !*** ./src/loader/playlist-loader.js ***! \***************************************/ @@ -786,7 +786,7 @@ !*** ./src/remux/mp4-remuxer.js ***! \**********************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(/*! ./aac-helper */"./src/remux/aac-helper.js"),i=r(/*! ./mp4-generator */"./src/remux/mp4-generator.js"),o=r(/*! ../events */"./src/events.js"),a=r(/*! ../errors */"./src/errors.js"),s=r(/*! ../utils/logger */"./src/utils/logger.js"),l=function(){function e(e,t,r,n){this.observer=e,this.config=t,this.typeSupported=r;var i=navigator.userAgent;this.isSafari=n&&n.indexOf("Apple")>-1&&i&&!i.match("CriOS"),this.ISGenerated=!1}return e.prototype.destroy=function(){},e.prototype.resetTimeStamp=function(e){this._initPTS=this._initDTS=e},e.prototype.resetInitSegment=function(){this.ISGenerated=!1},e.prototype.remux=function(e,t,r,n,i,a,l){if(this.ISGenerated||this.generateIS(e,t,i),this.ISGenerated){var u=e.samples.length,c=t.samples.length,d=i,f=i;if(u&&c){var h=(e.samples[0].pts-t.samples[0].pts)/t.inputTimeScale;d+=Math.max(0,h),f+=Math.max(0,-h)}if(u){e.timescale||(s.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(e,t,i));var p=this.remuxAudio(e,d,a,l);if(c){var m=void 0;p&&(m=p.endPTS-p.startPTS),t.timescale||(s.logger.warn("regenerate InitSegment as video detected"),this.generateIS(e,t,i)),this.remuxVideo(t,f,a,m,l)}}else if(c){var g=this.remuxVideo(t,f,a,0,l);g&&e.codec&&this.remuxEmptyAudio(e,d,a,g)}}r.samples.length&&this.remuxID3(r,i),n.samples.length&&this.remuxText(n,i),this.observer.trigger(o.default.FRAG_PARSED)},e.prototype.generateIS=function(e,t,r){var n,l,u=this.observer,c=e.samples,d=t.samples,f=this.typeSupported,h="audio/mp4",p={},m={tracks:p},g=void 0===this._initPTS;if(g&&(n=l=1/0),e.config&&c.length&&(e.timescale=e.samplerate,s.logger.log("audio sampling rate : "+e.samplerate),e.isAAC||(f.mpeg?(h="audio/mpeg",e.codec=""):f.mp3&&(e.codec="mp3")),p.audio={container:h,codec:e.codec,initSegment:!e.isAAC&&f.mpeg?new Uint8Array:i.default.initSegment([e]),metadata:{channelCount:e.channelCount}},g&&(n=l=c[0].pts-e.inputTimeScale*r)),t.sps&&t.pps&&d.length){var y=t.inputTimeScale;t.timescale=y,p.video={container:"video/mp4",codec:t.codec,initSegment:i.default.initSegment([t]),metadata:{width:t.width,height:t.height}},g&&(n=Math.min(n,d[0].pts-y*r),l=Math.min(l,d[0].dts-y*r),this.observer.trigger(o.default.INIT_PTS_FOUND,{initPTS:n}))}Object.keys(p).length?(u.trigger(o.default.FRAG_PARSING_INIT_SEGMENT,m),this.ISGenerated=!0,g&&(this._initPTS=n,this._initDTS=l)):u.trigger(o.default.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},e.prototype.remuxVideo=function(e,t,r,n,l){var u,c,d,f,h,p,m,g=8,y=e.timescale,v=e.samples,b=[],_=v.length,A=this._PTSNormalize,E=this._initPTS,T=this.nextAvcDts,S=this.isSafari;if(0!==_){S&&(r|=v.length&&T&&(l&&Math.abs(t-T/y)<.1||Math.abs(v[0].pts-T-E)1?s.logger.log("AVC:"+C+" ms hole between fragments detected,filling it"):C<-1&&s.logger.log("AVC:"+-C+" ms overlapping between fragments detected"),h=T,v[0].dts=h,f=Math.max(f-C,T),v[0].pts=f,s.logger.log("Video/PTS/DTS adjusted: "+Math.round(f/90)+"/"+Math.round(h/90)+",delta:"+C+" ms")),x=v[v.length-1],m=Math.max(x.dts,0),p=Math.max(x.pts,0,m),S&&(u=Math.round((m-h)/(v.length-1)));var R=0,j=0;for(k=0;k<_;k++){for(var L=v[k],I=L.units,P=I.length,O=0,D=0;D0?k-1:k].dts;if(Y.stretchShortVideoTrack){var $=Y.maxBufferHole,W=Math.floor($*y),q=(n?f+n*y:this.nextAudioPts)-F.pts;q>W?((u=q-z)<0&&(u=z),s.logger.log("It is approximately "+q/90+" ms to the next segment; using duration "+u/90+" ms for the last video frame.")):u=z}else u=z}K=Math.round(F.pts-F.dts)}b.push({size:B,duration:u,cts:K,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:F.key?2:1,isNonSync:F.key?0:1}})}this.nextAvcDts=m+u;var X=e.dropped;if(e.len=0,e.nbNalu=0,e.dropped=0,b.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var J=b[0].flags;J.dependsOn=2,J.isNonSync=0}e.samples=b,d=i.default.moof(e.sequenceNumber++,h,e),e.samples=[];var Z={data1:d,data2:c,startPTS:f/y,endPTS:(p+u)/y,startDTS:h/y,endDTS:this.nextAvcDts/y,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:X};return this.observer.trigger(o.default.FRAG_PARSING_DATA,Z),Z}},e.prototype.remuxAudio=function(e,t,r,l){var u,c,d,f,h,p,m,g=e.inputTimeScale,y=e.timescale,v=g/y,b=(e.isAAC?1024:1152)*v,_=this._PTSNormalize,A=this._initPTS,E=!e.isAAC&&this.typeSupported.mpeg,T=e.samples,S=[],w=this.nextAudioPts;if(r|=T.length&&w&&(l&&Math.abs(t-w/g)<.1||Math.abs(T[0].pts-w-A)<20*b),T.forEach((function(e){e.pts=e.dts=_(e.pts-A,t*g)})),0!==(T=T.filter((function(e){return e.pts>=0}))).length){if(r||(w=l?t*g:T[0].pts),e.isAAC)for(var k=this.config.maxAudioFramesDrift,x=0,C=w;x=k*b&&L<1e4&&C){var I=Math.round(R/b);s.logger.warn("Injecting "+I+" audio frame @ "+(C/g).toFixed(3)+"s due to "+Math.round(1e3*R/g)+" ms gap.");for(var P=0;P0&&U<1e4)B=Math.round((F-w)/b),s.logger.log(U+" ms hole between AAC samples detected,filling it"),B>0&&((d=n.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(d=N.subarray()),e.len+=B*d.length);else if(U<-12){s.logger.log("drop overlapping AAC sample, expected/parsed/delta:"+(w/g).toFixed(3)+"s/"+(F/g).toFixed(3)+"s/"+-U+"ms"),e.len-=N.byteLength;continue}F=w}if(p=F,!(e.len>0))return;var K=E?e.len:e.len+8;u=E?0:8;try{f=new Uint8Array(K)}catch(e){return void this.observer.trigger(o.default.ERROR,{type:a.ErrorTypes.MUX_ERROR,details:a.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:K,reason:"fail allocating audio mdat "+K})}for(E||(new DataView(f.buffer).setUint32(0,K),f.set(i.default.types.mdat,4)),x=0;x=2&&(V=S[H-2].duration,c.duration=V),H){this.nextAudioPts=w=m+v*V,e.len=0,e.samples=S,h=E?new Uint8Array:i.default.moof(e.sequenceNumber++,p/v,e),e.samples=[];var Y=p/g,z=w/g,$={data1:h,data2:f,startPTS:Y,endPTS:z,startDTS:Y,endDTS:z,type:"audio",hasAudio:!0,hasVideo:!1,nb:H};return this.observer.trigger(o.default.FRAG_PARSING_DATA,$),$}return null}},e.prototype.remuxEmptyAudio=function(e,t,r,i){var o=e.inputTimeScale,a=o/(e.samplerate?e.samplerate:o),l=this.nextAudioPts,u=(void 0!==l?l:i.startDTS*o)+this._initDTS,c=i.endDTS*o+this._initDTS,d=1024*a,f=Math.ceil((c-u)/d),h=n.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(s.logger.warn("remux empty Audio"),h){for(var p=[],m=0;m4294967296;)e+=r;return e},e}();t.default=l},"./src/remux/passthrough-remuxer.js": +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(/*! ./aac-helper */"./src/remux/aac-helper.js"),i=r(/*! ./mp4-generator */"./src/remux/mp4-generator.js"),o=r(/*! ../events */"./src/events.js"),a=r(/*! ../errors */"./src/errors.js"),s=r(/*! ../utils/logger */"./src/utils/logger.js"),l=function(){function e(e,t,r,n){this.observer=e,this.config=t,this.typeSupported=r;var i=navigator.userAgent;this.isSafari=n&&n.indexOf("Apple")>-1&&i&&!i.match("CriOS"),this.ISGenerated=!1}return e.prototype.destroy=function(){},e.prototype.resetTimeStamp=function(e){this._initPTS=this._initDTS=e},e.prototype.resetInitSegment=function(){this.ISGenerated=!1},e.prototype.remux=function(e,t,r,n,i,a,l){if(this.ISGenerated||this.generateIS(e,t,i),this.ISGenerated){var u=e.samples.length,c=t.samples.length,d=i,f=i;if(u&&c){var h=(e.samples[0].pts-t.samples[0].pts)/t.inputTimeScale;d+=Math.max(0,h),f+=Math.max(0,-h)}if(u){e.timescale||(s.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(e,t,i));var p=this.remuxAudio(e,d,a,l);if(c){var m=void 0;p&&(m=p.endPTS-p.startPTS),t.timescale||(s.logger.warn("regenerate InitSegment as video detected"),this.generateIS(e,t,i)),this.remuxVideo(t,f,a,m,l)}}else if(c){var g=this.remuxVideo(t,f,a,0,l);g&&e.codec&&this.remuxEmptyAudio(e,d,a,g)}}r.samples.length&&this.remuxID3(r,i),n.samples.length&&this.remuxText(n,i),this.observer.trigger(o.default.FRAG_PARSED)},e.prototype.generateIS=function(e,t,r){var n,l,u=this.observer,c=e.samples,d=t.samples,f=this.typeSupported,h="audio/mp4",p={},m={tracks:p},g=void 0===this._initPTS;if(g&&(n=l=1/0),e.config&&c.length&&(e.timescale=e.samplerate,s.logger.log("audio sampling rate : "+e.samplerate),e.isAAC||(f.mpeg?(h="audio/mpeg",e.codec=""):f.mp3&&(e.codec="mp3")),p.audio={container:h,codec:e.codec,initSegment:!e.isAAC&&f.mpeg?new Uint8Array:i.default.initSegment([e]),metadata:{channelCount:e.channelCount}},g&&(n=l=c[0].pts-e.inputTimeScale*r)),t.sps&&t.pps&&d.length){var y=t.inputTimeScale;t.timescale=y,p.video={container:"video/mp4",codec:t.codec,initSegment:i.default.initSegment([t]),metadata:{width:t.width,height:t.height}},g&&(n=Math.min(n,d[0].pts-y*r),l=Math.min(l,d[0].dts-y*r),this.observer.trigger(o.default.INIT_PTS_FOUND,{initPTS:n}))}Object.keys(p).length?(u.trigger(o.default.FRAG_PARSING_INIT_SEGMENT,m),this.ISGenerated=!0,g&&(this._initPTS=n,this._initDTS=l)):u.trigger(o.default.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},e.prototype.remuxVideo=function(e,t,r,n,l){var u,c,d,f,h,p,m,g=8,y=e.timescale,v=e.samples,b=[],_=v.length,A=this._PTSNormalize,E=this._initPTS,T=this.nextAvcDts,S=this.isSafari;if(0!==_){S&&(r|=v.length&&T&&(l&&Math.abs(t-T/y)<.1||Math.abs(v[0].pts-T-E)1?s.logger.log("AVC:"+C+" ms hole between fragments detected,filling it"):C<-1&&s.logger.log("AVC:"+-C+" ms overlapping between fragments detected"),h=T,v[0].dts=h,f=Math.max(f-C,T),v[0].pts=f,s.logger.log("Video/PTS/DTS adjusted: "+Math.round(f/90)+"/"+Math.round(h/90)+",delta:"+C+" ms")),x=v[v.length-1],m=Math.max(x.dts,0),p=Math.max(x.pts,0,m),S&&(u=Math.round((m-h)/(v.length-1)));var R=0,L=0;for(k=0;k<_;k++){for(var j=v[k],P=j.units,I=P.length,O=0,D=0;D0?k-1:k].dts;if(Y.stretchShortVideoTrack){var W=Y.maxBufferHole,$=Math.floor(W*y),q=(n?f+n*y:this.nextAudioPts)-U.pts;q>$?((u=q-z)<0&&(u=z),s.logger.log("It is approximately "+q/90+" ms to the next segment; using duration "+u/90+" ms for the last video frame.")):u=z}else u=z}K=Math.round(U.pts-U.dts)}b.push({size:B,duration:u,cts:K,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:U.key?2:1,isNonSync:U.key?0:1}})}this.nextAvcDts=m+u;var X=e.dropped;if(e.len=0,e.nbNalu=0,e.dropped=0,b.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var J=b[0].flags;J.dependsOn=2,J.isNonSync=0}e.samples=b,d=i.default.moof(e.sequenceNumber++,h,e),e.samples=[];var Z={data1:d,data2:c,startPTS:f/y,endPTS:(p+u)/y,startDTS:h/y,endDTS:this.nextAvcDts/y,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:X};return this.observer.trigger(o.default.FRAG_PARSING_DATA,Z),Z}},e.prototype.remuxAudio=function(e,t,r,l){var u,c,d,f,h,p,m,g=e.inputTimeScale,y=e.timescale,v=g/y,b=(e.isAAC?1024:1152)*v,_=this._PTSNormalize,A=this._initPTS,E=!e.isAAC&&this.typeSupported.mpeg,T=e.samples,S=[],w=this.nextAudioPts;if(r|=T.length&&w&&(l&&Math.abs(t-w/g)<.1||Math.abs(T[0].pts-w-A)<20*b),T.forEach((function(e){e.pts=e.dts=_(e.pts-A,t*g)})),0!==(T=T.filter((function(e){return e.pts>=0}))).length){if(r||(w=l?t*g:T[0].pts),e.isAAC)for(var k=this.config.maxAudioFramesDrift,x=0,C=w;x=k*b&&j<1e4&&C){var P=Math.round(R/b);s.logger.warn("Injecting "+P+" audio frame @ "+(C/g).toFixed(3)+"s due to "+Math.round(1e3*R/g)+" ms gap.");for(var I=0;I0&&F<1e4)B=Math.round((U-w)/b),s.logger.log(F+" ms hole between AAC samples detected,filling it"),B>0&&((d=n.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(d=N.subarray()),e.len+=B*d.length);else if(F<-12){s.logger.log("drop overlapping AAC sample, expected/parsed/delta:"+(w/g).toFixed(3)+"s/"+(U/g).toFixed(3)+"s/"+-F+"ms"),e.len-=N.byteLength;continue}U=w}if(p=U,!(e.len>0))return;var K=E?e.len:e.len+8;u=E?0:8;try{f=new Uint8Array(K)}catch(e){return void this.observer.trigger(o.default.ERROR,{type:a.ErrorTypes.MUX_ERROR,details:a.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:K,reason:"fail allocating audio mdat "+K})}for(E||(new DataView(f.buffer).setUint32(0,K),f.set(i.default.types.mdat,4)),x=0;x=2&&(V=S[H-2].duration,c.duration=V),H){this.nextAudioPts=w=m+v*V,e.len=0,e.samples=S,h=E?new Uint8Array:i.default.moof(e.sequenceNumber++,p/v,e),e.samples=[];var Y=p/g,z=w/g,W={data1:h,data2:f,startPTS:Y,endPTS:z,startDTS:Y,endDTS:z,type:"audio",hasAudio:!0,hasVideo:!1,nb:H};return this.observer.trigger(o.default.FRAG_PARSING_DATA,W),W}return null}},e.prototype.remuxEmptyAudio=function(e,t,r,i){var o=e.inputTimeScale,a=o/(e.samplerate?e.samplerate:o),l=this.nextAudioPts,u=(void 0!==l?l:i.startDTS*o)+this._initDTS,c=i.endDTS*o+this._initDTS,d=1024*a,f=Math.ceil((c-u)/d),h=n.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(s.logger.warn("remux empty Audio"),h){for(var p=[],m=0;m4294967296;)e+=r;return e},e}();t.default=l},"./src/remux/passthrough-remuxer.js": /*!******************************************!*\ !*** ./src/remux/passthrough-remuxer.js ***! \******************************************/ @@ -968,7 +968,7 @@ /*!***************************!*\ !*** ./src/base/utils.js ***! \***************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SvgIcons=t.DoubleEventHandler=t.DomRecycler=t.cancelAnimationFrame=t.requestAnimationFrame=t.QueryString=t.Config=t.Fullscreen=void 0;var n=p(r(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=p(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=p(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=p(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=p(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=p(r(/*! babel-runtime/core-js/object/define-property */"./node_modules/babel-runtime/core-js/object/define-property.js")),u=p(r(/*! babel-runtime/core-js/object/get-own-property-descriptor */"./node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js"));t.assign=m,t.extend=g,t.formatTime=y,t.seekStringToSeconds=A,t.uniqueId=T,t.isNumber=S,t.currentScriptUrl=w,t.getBrowserLanguage=C,t.now=R,t.removeArrayItem=j,t.listContainsIgnoreCase=function(e,t){return void 0!==e&&void 0!==t&&void 0!==t.find((function(t){return e.toLowerCase()===t.toLowerCase()}))},t.canAutoPlayMedia=L,r(/*! ./polyfills */"./src/base/polyfills.js");var c=p(r(/*! ../components/browser */"./src/components/browser/index.js")),d=p(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),f=p(r(/*! ./media */"./src/base/media.js")),h=p(r(/*! ./svg_icons */"./src/base/svg_icons.js"));function p(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(t)for(var r in t){var n=(0,u.default)(t,r);n?(0,l.default)(e,r,n):e[r]=t[r]}return e}function g(e,t){var r=function(e){function r(){(0,o.default)(this,r);for(var n=arguments.length,i=Array(n),s=0;s0&&(a+=o+":",i<1&&(a+="00:")),(i&&i>0||t)&&(a+=("0"+i).slice(-2)+":"),a+=("0"+n).slice(-2)+":",(a+=("0"+r).slice(-2)).trim()}var v=t.Fullscreen={fullscreenElement:function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},requestFullscreen:function(e){e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():e.querySelector&&e.querySelector("video")&&e.querySelector("video").webkitEnterFullScreen?e.querySelector("video").webkitEnterFullScreen():e.webkitEnterFullScreen&&e.webkitEnterFullScreen()},cancelFullscreen:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;e.exitFullscreen?e.exitFullscreen():e.webkitCancelFullScreen?e.webkitCancelFullScreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen()},fullscreenEnabled:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},b=t.Config=function(){function e(){(0,o.default)(this,e)}return e._defaultConfig=function(){return{volume:{value:100,parse:parseInt}}},e._defaultValueFor=function(e){try{return this._defaultConfig()[e].parse(this._defaultConfig()[e].value)}catch(e){return}},e._createKeyspace=function(e){return"clappr."+document.domain+"."+e},e.restore=function(e){return c.default.hasLocalstorage&&localStorage[this._createKeyspace(e)]?this._defaultConfig()[e].parse(localStorage[this._createKeyspace(e)]):this._defaultValueFor(e)},e.persist=function(e,t){if(c.default.hasLocalstorage)try{return localStorage[this._createKeyspace(e)]=t,!0}catch(e){return!1}},e}(),_=t.QueryString=function(){function e(){(0,o.default)(this,e)}return e.parse=function(e){for(var t=void 0,r=/\+/g,n=/([^&=]+)=?([^&]*)/g,i=function(e){return decodeURIComponent(e.replace(r," "))},o={};t=n.exec(e);)o[i(t[1]).toLowerCase()]=i(t[2]);return o},(0,i.default)(e,null,[{key:"params",get:function(){var e=window.location.search.substring(1);return e!==this.query&&(this._urlParams=this.parse(e),this.query=e),this._urlParams}},{key:"hashParams",get:function(){var e=window.location.hash.substring(1);return e!==this.hash&&(this._hashParams=this.parse(e),this.hash=e),this._hashParams}}]),e}();function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"t",t=0,r=_.params[e]||_.hashParams[e]||"",n=r.match(/[0-9]+[hms]+/g)||[];if(n.length>0){var i={h:3600,m:60,s:1};n.forEach((function(e){if(e){var r=e[e.length-1],n=parseInt(e.slice(0,e.length-1),10);t+=n*i[r]}}))}else r&&(t=parseInt(r,10));return t}var E={};function T(e){return E[e]||(E[e]=0),e+ ++E[e]}function S(e){return e-parseFloat(e)+1>=0}function w(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}var k=t.requestAnimationFrame=(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}).bind(window),x=t.cancelAnimationFrame=(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout).bind(window);function C(){return window.navigator&&window.navigator.language}function R(){return window.performance&&window.performance.now?performance.now():Date.now()}function j(e,t){var r=e.indexOf(t);r>=0&&e.splice(r,1)}function L(e,t){var r=(t=(0,n.default)({inline:!1,muted:!1,timeout:250,type:"video",source:f.default.mp4,element:null},t)).element?t.element:document.createElement(t.type);r.muted=t.muted,!0===t.muted&&r.setAttribute("muted","muted"),!0===t.inline&&r.setAttribute("playsinline","playsinline"),r.src=t.source;var i=r.play(),o=setTimeout((function(){a(!1,new Error("Timeout "+t.timeout+" ms has been reached"))}),t.timeout),a=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;clearTimeout(o),e(t,r)};void 0!==i?i.then((function(){return a(!0)})).catch((function(e){return a(!1,e)})):a(!0)}var I=[],P=t.DomRecycler=function(){function e(){(0,o.default)(this,e)}return e.configure=function(e){this.options=d.default.extend(this.options,e)},e.create=function(e){return this.options.recycleVideo&&"video"===e&&I.length>0?I.shift():(0,d.default)("<"+e+">")},e.garbage=function(e){this.options.recycleVideo&&"VIDEO"===e[0].tagName.toUpperCase()&&(e.children().remove(),I.push(e))},e}();P.options={recycleVideo:!1};var O=t.DoubleEventHandler=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;(0,o.default)(this,e),this.delay=t,this.lastTime=0}return e.prototype.handle=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=(new Date).getTime(),i=n-this.lastTime;i0&&(t(),r&&e.preventDefault()),this.lastTime=n},e}();t.SvgIcons=h.default,t.default={Config:b,Fullscreen:v,QueryString:_,DomRecycler:P,extend:g,formatTime:y,seekStringToSeconds:A,uniqueId:T,currentScriptUrl:w,isNumber:S,requestAnimationFrame:k,cancelAnimationFrame:x,getBrowserLanguage:C,now:R,removeArrayItem:j,canAutoPlayMedia:L,Media:f.default,DoubleEventHandler:O,SvgIcons:h.default}},"./src/components/browser/browser.js": +/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SvgIcons=t.DoubleEventHandler=t.DomRecycler=t.cancelAnimationFrame=t.requestAnimationFrame=t.QueryString=t.Config=t.Fullscreen=void 0;var n=p(r(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=p(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=p(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=p(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=p(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=p(r(/*! babel-runtime/core-js/object/define-property */"./node_modules/babel-runtime/core-js/object/define-property.js")),u=p(r(/*! babel-runtime/core-js/object/get-own-property-descriptor */"./node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js"));t.assign=m,t.extend=g,t.formatTime=y,t.seekStringToSeconds=A,t.uniqueId=T,t.isNumber=S,t.currentScriptUrl=w,t.getBrowserLanguage=C,t.now=R,t.removeArrayItem=L,t.listContainsIgnoreCase=function(e,t){return void 0!==e&&void 0!==t&&void 0!==t.find((function(t){return e.toLowerCase()===t.toLowerCase()}))},t.canAutoPlayMedia=j,r(/*! ./polyfills */"./src/base/polyfills.js");var c=p(r(/*! ../components/browser */"./src/components/browser/index.js")),d=p(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),f=p(r(/*! ./media */"./src/base/media.js")),h=p(r(/*! ./svg_icons */"./src/base/svg_icons.js"));function p(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(t)for(var r in t){var n=(0,u.default)(t,r);n?(0,l.default)(e,r,n):e[r]=t[r]}return e}function g(e,t){var r=function(e){function r(){(0,o.default)(this,r);for(var n=arguments.length,i=Array(n),s=0;s0&&(a+=o+":",i<1&&(a+="00:")),(i&&i>0||t)&&(a+=("0"+i).slice(-2)+":"),a+=("0"+n).slice(-2)+":",(a+=("0"+r).slice(-2)).trim()}var v=t.Fullscreen={fullscreenElement:function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},requestFullscreen:function(e){e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():e.querySelector&&e.querySelector("video")&&e.querySelector("video").webkitEnterFullScreen?e.querySelector("video").webkitEnterFullScreen():e.webkitEnterFullScreen&&e.webkitEnterFullScreen()},cancelFullscreen:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;e.exitFullscreen?e.exitFullscreen():e.webkitCancelFullScreen?e.webkitCancelFullScreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen()},fullscreenEnabled:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},b=t.Config=function(){function e(){(0,o.default)(this,e)}return e._defaultConfig=function(){return{volume:{value:100,parse:parseInt}}},e._defaultValueFor=function(e){try{return this._defaultConfig()[e].parse(this._defaultConfig()[e].value)}catch(e){return}},e._createKeyspace=function(e){return"clappr."+document.domain+"."+e},e.restore=function(e){return c.default.hasLocalstorage&&localStorage[this._createKeyspace(e)]?this._defaultConfig()[e].parse(localStorage[this._createKeyspace(e)]):this._defaultValueFor(e)},e.persist=function(e,t){if(c.default.hasLocalstorage)try{return localStorage[this._createKeyspace(e)]=t,!0}catch(e){return!1}},e}(),_=t.QueryString=function(){function e(){(0,o.default)(this,e)}return e.parse=function(e){for(var t=void 0,r=/\+/g,n=/([^&=]+)=?([^&]*)/g,i=function(e){return decodeURIComponent(e.replace(r," "))},o={};t=n.exec(e);)o[i(t[1]).toLowerCase()]=i(t[2]);return o},(0,i.default)(e,null,[{key:"params",get:function(){var e=window.location.search.substring(1);return e!==this.query&&(this._urlParams=this.parse(e),this.query=e),this._urlParams}},{key:"hashParams",get:function(){var e=window.location.hash.substring(1);return e!==this.hash&&(this._hashParams=this.parse(e),this.hash=e),this._hashParams}}]),e}();function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"t",t=0,r=_.params[e]||_.hashParams[e]||"",n=r.match(/[0-9]+[hms]+/g)||[];if(n.length>0){var i={h:3600,m:60,s:1};n.forEach((function(e){if(e){var r=e[e.length-1],n=parseInt(e.slice(0,e.length-1),10);t+=n*i[r]}}))}else r&&(t=parseInt(r,10));return t}var E={};function T(e){return E[e]||(E[e]=0),e+ ++E[e]}function S(e){return e-parseFloat(e)+1>=0}function w(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}var k=t.requestAnimationFrame=(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}).bind(window),x=t.cancelAnimationFrame=(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout).bind(window);function C(){return window.navigator&&window.navigator.language}function R(){return window.performance&&window.performance.now?performance.now():Date.now()}function L(e,t){var r=e.indexOf(t);r>=0&&e.splice(r,1)}function j(e,t){var r=(t=(0,n.default)({inline:!1,muted:!1,timeout:250,type:"video",source:f.default.mp4,element:null},t)).element?t.element:document.createElement(t.type);r.muted=t.muted,!0===t.muted&&r.setAttribute("muted","muted"),!0===t.inline&&r.setAttribute("playsinline","playsinline"),r.src=t.source;var i=r.play(),o=setTimeout((function(){a(!1,new Error("Timeout "+t.timeout+" ms has been reached"))}),t.timeout),a=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;clearTimeout(o),e(t,r)};void 0!==i?i.then((function(){return a(!0)})).catch((function(e){return a(!1,e)})):a(!0)}var P=[],I=t.DomRecycler=function(){function e(){(0,o.default)(this,e)}return e.configure=function(e){this.options=d.default.extend(this.options,e)},e.create=function(e){return this.options.recycleVideo&&"video"===e&&P.length>0?P.shift():(0,d.default)("<"+e+">")},e.garbage=function(e){this.options.recycleVideo&&"VIDEO"===e[0].tagName.toUpperCase()&&(e.children().remove(),P.push(e))},e}();I.options={recycleVideo:!1};var O=t.DoubleEventHandler=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;(0,o.default)(this,e),this.delay=t,this.lastTime=0}return e.prototype.handle=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=(new Date).getTime(),i=n-this.lastTime;i0&&(t(),r&&e.preventDefault()),this.lastTime=n},e}();t.SvgIcons=h.default,t.default={Config:b,Fullscreen:v,QueryString:_,DomRecycler:I,extend:g,formatTime:y,seekStringToSeconds:A,uniqueId:T,currentScriptUrl:w,isNumber:S,requestAnimationFrame:k,cancelAnimationFrame:x,getBrowserLanguage:C,now:R,removeArrayItem:L,canAutoPlayMedia:j,Media:f.default,DoubleEventHandler:O,SvgIcons:h.default}},"./src/components/browser/browser.js": /*!*******************************************!*\ !*** ./src/components/browser/browser.js ***! \*******************************************/ @@ -1048,7 +1048,7 @@ /*!*****************************************!*\ !*** ./src/components/loader/loader.js ***! \*****************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=I(r(/*! babel-runtime/core-js/object/create */"./node_modules/babel-runtime/core-js/object/create.js")),i=I(r(/*! babel-runtime/helpers/toConsumableArray */"./node_modules/babel-runtime/helpers/toConsumableArray.js")),o=I(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=I(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=I(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=I(r(/*! ../../base/base_object */"./src/base/base_object.js")),u=I(r(/*! ../player_info */"./src/components/player_info.js")),c=I(r(/*! ../../playbacks/html5_video */"./src/playbacks/html5_video/index.js")),d=I(r(/*! ../../playbacks/flash */"./src/playbacks/flash/index.js")),f=I(r(/*! ../../playbacks/html5_audio */"./src/playbacks/html5_audio/index.js")),h=I(r(/*! ../../playbacks/flashls */"./src/playbacks/flashls/index.js")),p=I(r(/*! ../../playbacks/hls */"./src/playbacks/hls/index.js")),m=I(r(/*! ../../playbacks/html_img */"./src/playbacks/html_img/index.js")),g=I(r(/*! ../../playbacks/no_op */"./src/playbacks/no_op/index.js")),y=I(r(/*! ../../plugins/spinner_three_bounce */"./src/plugins/spinner_three_bounce/index.js")),v=I(r(/*! ../../plugins/stats */"./src/plugins/stats/index.js")),b=I(r(/*! ../../plugins/watermark */"./src/plugins/watermark/index.js")),_=I(r(/*! ../../plugins/poster */"./src/plugins/poster/index.js")),A=I(r(/*! ../../plugins/google_analytics */"./src/plugins/google_analytics/index.js")),E=I(r(/*! ../../plugins/click_to_pause */"./src/plugins/click_to_pause/index.js")),T=I(r(/*! ../../plugins/media_control */"./src/plugins/media_control/index.js")),S=I(r(/*! ../../plugins/dvr_controls */"./src/plugins/dvr_controls/index.js")),w=I(r(/*! ../../plugins/closed_captions */"./src/plugins/closed_captions/index.js")),k=I(r(/*! ../../plugins/favicon */"./src/plugins/favicon/index.js")),x=I(r(/*! ../../plugins/seek_time */"./src/plugins/seek_time/index.js")),C=I(r(/*! ../../plugins/sources */"./src/plugins/sources.js")),R=I(r(/*! ../../plugins/end_video */"./src/plugins/end_video.js")),j=I(r(/*! ../../plugins/strings */"./src/plugins/strings.js")),L=I(r(/*! ../../plugins/error_screen */"./src/plugins/error_screen/index.js"));function I(e){return e&&e.__esModule?e:{default:e}}var P=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,o.default)(this,t);var l=(0,a.default)(this,e.call(this));return l.playerId=n,l.playbackPlugins=[],s||(l.playbackPlugins=[].concat((0,i.default)(l.playbackPlugins),[p.default])),l.playbackPlugins=[].concat((0,i.default)(l.playbackPlugins),[c.default,f.default]),s||(l.playbackPlugins=[].concat((0,i.default)(l.playbackPlugins),[d.default,h.default])),l.playbackPlugins=[].concat((0,i.default)(l.playbackPlugins),[m.default,g.default]),l.containerPlugins=[y.default,b.default,_.default,v.default,A.default,E.default],l.corePlugins=[T.default,S.default,w.default,k.default,x.default,C.default,R.default,L.default,j.default],Array.isArray(r)||l.validateExternalPluginsType(r),l.addExternalPlugins(r),l}return(0,s.default)(t,e),t.prototype.groupPluginsByType=function(e){return Array.isArray(e)&&(e=e.reduce((function(e,t){return e[t.type]||(e[t.type]=[]),e[t.type].push(t),e}),{})),e},t.prototype.removeDups=function(e){var t=e.reduceRight((function(e,t){return e[t.prototype.name]&&delete e[t.prototype.name],e[t.prototype.name]=t,e}),(0,n.default)(null)),r=[];for(var i in t)r.unshift(t[i]);return r},t.prototype.addExternalPlugins=function(e){(e=this.groupPluginsByType(e)).playback&&(this.playbackPlugins=this.removeDups(e.playback.concat(this.playbackPlugins))),e.container&&(this.containerPlugins=this.removeDups(e.container.concat(this.containerPlugins))),e.core&&(this.corePlugins=this.removeDups(e.core.concat(this.corePlugins))),u.default.getInstance(this.playerId).playbackPlugins=this.playbackPlugins},t.prototype.validateExternalPluginsType=function(e){["playback","container","core"].forEach((function(t){(e[t]||[]).forEach((function(e){var r="external "+e.type+" plugin on "+t+" array";if(e.type!==t)throw new ReferenceError(r)}))}))},t}(l.default);t.default=P,e.exports=t.default},"./src/components/mediator.js": +/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=P(r(/*! babel-runtime/core-js/object/create */"./node_modules/babel-runtime/core-js/object/create.js")),i=P(r(/*! babel-runtime/helpers/toConsumableArray */"./node_modules/babel-runtime/helpers/toConsumableArray.js")),o=P(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=P(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=P(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=P(r(/*! ../../base/base_object */"./src/base/base_object.js")),u=P(r(/*! ../player_info */"./src/components/player_info.js")),c=P(r(/*! ../../playbacks/html5_video */"./src/playbacks/html5_video/index.js")),d=P(r(/*! ../../playbacks/flash */"./src/playbacks/flash/index.js")),f=P(r(/*! ../../playbacks/html5_audio */"./src/playbacks/html5_audio/index.js")),h=P(r(/*! ../../playbacks/flashls */"./src/playbacks/flashls/index.js")),p=P(r(/*! ../../playbacks/hls */"./src/playbacks/hls/index.js")),m=P(r(/*! ../../playbacks/html_img */"./src/playbacks/html_img/index.js")),g=P(r(/*! ../../playbacks/no_op */"./src/playbacks/no_op/index.js")),y=P(r(/*! ../../plugins/spinner_three_bounce */"./src/plugins/spinner_three_bounce/index.js")),v=P(r(/*! ../../plugins/stats */"./src/plugins/stats/index.js")),b=P(r(/*! ../../plugins/watermark */"./src/plugins/watermark/index.js")),_=P(r(/*! ../../plugins/poster */"./src/plugins/poster/index.js")),A=P(r(/*! ../../plugins/google_analytics */"./src/plugins/google_analytics/index.js")),E=P(r(/*! ../../plugins/click_to_pause */"./src/plugins/click_to_pause/index.js")),T=P(r(/*! ../../plugins/media_control */"./src/plugins/media_control/index.js")),S=P(r(/*! ../../plugins/dvr_controls */"./src/plugins/dvr_controls/index.js")),w=P(r(/*! ../../plugins/closed_captions */"./src/plugins/closed_captions/index.js")),k=P(r(/*! ../../plugins/favicon */"./src/plugins/favicon/index.js")),x=P(r(/*! ../../plugins/seek_time */"./src/plugins/seek_time/index.js")),C=P(r(/*! ../../plugins/sources */"./src/plugins/sources.js")),R=P(r(/*! ../../plugins/end_video */"./src/plugins/end_video.js")),L=P(r(/*! ../../plugins/strings */"./src/plugins/strings.js")),j=P(r(/*! ../../plugins/error_screen */"./src/plugins/error_screen/index.js"));function P(e){return e&&e.__esModule?e:{default:e}}var I=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,o.default)(this,t);var l=(0,a.default)(this,e.call(this));return l.playerId=n,l.playbackPlugins=[],s||(l.playbackPlugins=[].concat((0,i.default)(l.playbackPlugins),[p.default])),l.playbackPlugins=[].concat((0,i.default)(l.playbackPlugins),[c.default,f.default]),s||(l.playbackPlugins=[].concat((0,i.default)(l.playbackPlugins),[d.default,h.default])),l.playbackPlugins=[].concat((0,i.default)(l.playbackPlugins),[m.default,g.default]),l.containerPlugins=[y.default,b.default,_.default,v.default,A.default,E.default],l.corePlugins=[T.default,S.default,w.default,k.default,x.default,C.default,R.default,j.default,L.default],Array.isArray(r)||l.validateExternalPluginsType(r),l.addExternalPlugins(r),l}return(0,s.default)(t,e),t.prototype.groupPluginsByType=function(e){return Array.isArray(e)&&(e=e.reduce((function(e,t){return e[t.type]||(e[t.type]=[]),e[t.type].push(t),e}),{})),e},t.prototype.removeDups=function(e){var t=e.reduceRight((function(e,t){return e[t.prototype.name]&&delete e[t.prototype.name],e[t.prototype.name]=t,e}),(0,n.default)(null)),r=[];for(var i in t)r.unshift(t[i]);return r},t.prototype.addExternalPlugins=function(e){(e=this.groupPluginsByType(e)).playback&&(this.playbackPlugins=this.removeDups(e.playback.concat(this.playbackPlugins))),e.container&&(this.containerPlugins=this.removeDups(e.container.concat(this.containerPlugins))),e.core&&(this.corePlugins=this.removeDups(e.core.concat(this.corePlugins))),u.default.getInstance(this.playerId).playbackPlugins=this.playbackPlugins},t.prototype.validateExternalPluginsType=function(e){["playback","container","core"].forEach((function(t){(e[t]||[]).forEach((function(e){var r="external "+e.type+" plugin on "+t+" array";if(e.type!==t)throw new ReferenceError(r)}))}))},t}(l.default);t.default=I,e.exports=t.default},"./src/components/mediator.js": /*!************************************!*\ !*** ./src/components/mediator.js ***! \************************************/ @@ -1104,7 +1104,7 @@ /*!*********************!*\ !*** ./src/main.js ***! \*********************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=B(r(/*! ./components/player */"./src/components/player.js")),i=B(r(/*! ./base/utils */"./src/base/utils.js")),o=B(r(/*! ./base/events */"./src/base/events.js")),a=B(r(/*! ./base/playback */"./src/base/playback.js")),s=B(r(/*! ./base/container_plugin */"./src/base/container_plugin.js")),l=B(r(/*! ./base/core_plugin */"./src/base/core_plugin.js")),u=B(r(/*! ./base/ui_core_plugin */"./src/base/ui_core_plugin.js")),c=B(r(/*! ./base/ui_container_plugin */"./src/base/ui_container_plugin.js")),d=B(r(/*! ./base/base_object */"./src/base/base_object.js")),f=B(r(/*! ./base/ui_object */"./src/base/ui_object.js")),h=B(r(/*! ./components/browser */"./src/components/browser/index.js")),p=B(r(/*! ./components/container */"./src/components/container/index.js")),m=B(r(/*! ./components/core */"./src/components/core/index.js")),g=B(r(/*! ./components/error */"./src/components/error/index.js")),y=B(r(/*! ./components/loader */"./src/components/loader/index.js")),v=B(r(/*! ./components/mediator */"./src/components/mediator.js")),b=B(r(/*! ./components/player_info */"./src/components/player_info.js")),_=B(r(/*! ./playbacks/base_flash_playback */"./src/playbacks/base_flash_playback/index.js")),A=B(r(/*! ./playbacks/flash */"./src/playbacks/flash/index.js")),E=B(r(/*! ./playbacks/flashls */"./src/playbacks/flashls/index.js")),T=B(r(/*! ./playbacks/hls */"./src/playbacks/hls/index.js")),S=B(r(/*! ./playbacks/html5_audio */"./src/playbacks/html5_audio/index.js")),w=B(r(/*! ./playbacks/html5_video */"./src/playbacks/html5_video/index.js")),k=B(r(/*! ./playbacks/html_img */"./src/playbacks/html_img/index.js")),x=B(r(/*! ./playbacks/no_op */"./src/playbacks/no_op/index.js")),C=B(r(/*! ./plugins/media_control */"./src/plugins/media_control/index.js")),R=B(r(/*! ./plugins/click_to_pause */"./src/plugins/click_to_pause/index.js")),j=B(r(/*! ./plugins/dvr_controls */"./src/plugins/dvr_controls/index.js")),L=B(r(/*! ./plugins/favicon */"./src/plugins/favicon/index.js")),I=B(r(/*! ./plugins/log */"./src/plugins/log/index.js")),P=B(r(/*! ./plugins/poster */"./src/plugins/poster/index.js")),O=B(r(/*! ./plugins/spinner_three_bounce */"./src/plugins/spinner_three_bounce/index.js")),D=B(r(/*! ./plugins/watermark */"./src/plugins/watermark/index.js")),M=B(r(/*! ./base/styler */"./src/base/styler.js")),N=B(r(/*! ./vendor */"./src/vendor/index.js")),F=B(r(/*! ./base/template */"./src/base/template.js")),U=B(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function B(e){return e&&e.__esModule?e:{default:e}}t.default={Player:n.default,Mediator:v.default,Events:o.default,Browser:h.default,PlayerInfo:b.default,MediaControl:C.default,ContainerPlugin:s.default,UIContainerPlugin:c.default,CorePlugin:l.default,UICorePlugin:u.default,Playback:a.default,Container:p.default,Core:m.default,PlayerError:g.default,Loader:y.default,BaseObject:d.default,UIObject:f.default,Utils:i.default,BaseFlashPlayback:_.default,Flash:A.default,FlasHLS:E.default,HLS:T.default,HTML5Audio:S.default,HTML5Video:w.default,HTMLImg:k.default,NoOp:x.default,ClickToPausePlugin:R.default,DVRControls:j.default,Favicon:L.default,Log:I.default,Poster:P.default,SpinnerThreeBouncePlugin:O.default,WaterMarkPlugin:D.default,Styler:M.default,Vendor:N.default,version:"0.3.12",template:F.default,$:U.default},e.exports=t.default},"./src/playbacks/base_flash_playback/base_flash_playback.js": +/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=B(r(/*! ./components/player */"./src/components/player.js")),i=B(r(/*! ./base/utils */"./src/base/utils.js")),o=B(r(/*! ./base/events */"./src/base/events.js")),a=B(r(/*! ./base/playback */"./src/base/playback.js")),s=B(r(/*! ./base/container_plugin */"./src/base/container_plugin.js")),l=B(r(/*! ./base/core_plugin */"./src/base/core_plugin.js")),u=B(r(/*! ./base/ui_core_plugin */"./src/base/ui_core_plugin.js")),c=B(r(/*! ./base/ui_container_plugin */"./src/base/ui_container_plugin.js")),d=B(r(/*! ./base/base_object */"./src/base/base_object.js")),f=B(r(/*! ./base/ui_object */"./src/base/ui_object.js")),h=B(r(/*! ./components/browser */"./src/components/browser/index.js")),p=B(r(/*! ./components/container */"./src/components/container/index.js")),m=B(r(/*! ./components/core */"./src/components/core/index.js")),g=B(r(/*! ./components/error */"./src/components/error/index.js")),y=B(r(/*! ./components/loader */"./src/components/loader/index.js")),v=B(r(/*! ./components/mediator */"./src/components/mediator.js")),b=B(r(/*! ./components/player_info */"./src/components/player_info.js")),_=B(r(/*! ./playbacks/base_flash_playback */"./src/playbacks/base_flash_playback/index.js")),A=B(r(/*! ./playbacks/flash */"./src/playbacks/flash/index.js")),E=B(r(/*! ./playbacks/flashls */"./src/playbacks/flashls/index.js")),T=B(r(/*! ./playbacks/hls */"./src/playbacks/hls/index.js")),S=B(r(/*! ./playbacks/html5_audio */"./src/playbacks/html5_audio/index.js")),w=B(r(/*! ./playbacks/html5_video */"./src/playbacks/html5_video/index.js")),k=B(r(/*! ./playbacks/html_img */"./src/playbacks/html_img/index.js")),x=B(r(/*! ./playbacks/no_op */"./src/playbacks/no_op/index.js")),C=B(r(/*! ./plugins/media_control */"./src/plugins/media_control/index.js")),R=B(r(/*! ./plugins/click_to_pause */"./src/plugins/click_to_pause/index.js")),L=B(r(/*! ./plugins/dvr_controls */"./src/plugins/dvr_controls/index.js")),j=B(r(/*! ./plugins/favicon */"./src/plugins/favicon/index.js")),P=B(r(/*! ./plugins/log */"./src/plugins/log/index.js")),I=B(r(/*! ./plugins/poster */"./src/plugins/poster/index.js")),O=B(r(/*! ./plugins/spinner_three_bounce */"./src/plugins/spinner_three_bounce/index.js")),D=B(r(/*! ./plugins/watermark */"./src/plugins/watermark/index.js")),M=B(r(/*! ./base/styler */"./src/base/styler.js")),N=B(r(/*! ./vendor */"./src/vendor/index.js")),U=B(r(/*! ./base/template */"./src/base/template.js")),F=B(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function B(e){return e&&e.__esModule?e:{default:e}}t.default={Player:n.default,Mediator:v.default,Events:o.default,Browser:h.default,PlayerInfo:b.default,MediaControl:C.default,ContainerPlugin:s.default,UIContainerPlugin:c.default,CorePlugin:l.default,UICorePlugin:u.default,Playback:a.default,Container:p.default,Core:m.default,PlayerError:g.default,Loader:y.default,BaseObject:d.default,UIObject:f.default,Utils:i.default,BaseFlashPlayback:_.default,Flash:A.default,FlasHLS:E.default,HLS:T.default,HTML5Audio:S.default,HTML5Video:w.default,HTMLImg:k.default,NoOp:x.default,ClickToPausePlugin:R.default,DVRControls:L.default,Favicon:j.default,Log:P.default,Poster:I.default,SpinnerThreeBouncePlugin:O.default,WaterMarkPlugin:D.default,Styler:M.default,Vendor:N.default,version:"0.3.12",template:U.default,$:F.default},e.exports=t.default},"./src/playbacks/base_flash_playback/base_flash_playback.js": /*!******************************************************************!*\ !*** ./src/playbacks/base_flash_playback/base_flash_playback.js ***! \******************************************************************/ @@ -1404,14 +1404,14 @@ /*!*****************************************************************!*\ !*** ./node_modules/shaka-player/dist/shaka-player.compiled.js ***! \*****************************************************************/ -/*! no static exports found */function(e,t,r){(function(e,r){!function(){var n="undefined"!=typeof window?window:e,i={};for(var o in function(e,t){var n,i="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,r){e!=Array.prototype&&e!=Object.prototype&&(e[t]=r.value)},o=void 0!==e&&e===this?this:void 0!==t&&null!=t?t:this;function a(){a=function(){},o.Symbol||(o.Symbol=l)}var s,l=(s=0,function(e){return"jscomp_symbol_"+(e||"")+s++});function u(){a();var e=o.Symbol.iterator;e||(e=o.Symbol.iterator=o.Symbol("iterator")),"function"!=typeof Array.prototype[e]&&i(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return c(this)}}),u=function(){}}function c(e){var t=0;return d((function(){return ti&&(i=Math.max(i+n,0));i=i}})),h("Array.prototype.find",(function(e){return e||function(e,t){return F(this,e,t).ve}}));var B="function"==typeof Object.assign?Object.assign:function(e,t){for(var r=1;rthis.a?e:Math.min(z(this.b),z(this.c))},e.console&&e.console.log.bind&&(q=console.warn.bind(console),W=console.error.bind(console));var J=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function Z(e){var t;e instanceof Z?(Q(this,e.ta),this.bb=e.bb,this.sa=e.sa,ee(this,e.Ab),this.ja=e.ja,te(this,e.a.clone()),this.Sa=e.Sa):e&&(t=String(e).match(J))?(Q(this,t[1]||"",!0),this.bb=re(t[2]||""),this.sa=re(t[3]||"",!0),ee(this,t[4]),this.ja=re(t[5]||"",!0),te(this,t[6]||"",!0),this.Sa=re(t[7]||"")):this.a=new ce(null)}function Q(e,t,r){e.ta=r?re(t,!0):t,e.ta&&(e.ta=e.ta.replace(/:$/,""))}function ee(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.Ab=t}else e.Ab=null}function te(e,t,r){t instanceof ce?e.a=t:(r||(t=ne(t,le)),e.a=new ce(t))}function re(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function ne(e,t,r){return"string"==typeof e?(e=encodeURI(e).replace(t,ie),r&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function ie(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(n=Z.prototype).ta="",n.bb="",n.sa="",n.Ab=null,n.ja="",n.Sa="",n.toString=function(){var e=[],t=this.ta;if(t&&e.push(ne(t,oe,!0),":"),t=this.sa){e.push("//");var r=this.bb;r&&e.push(ne(r,oe,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Ab)&&e.push(":",String(t))}return(t=this.ja)&&(this.sa&&"/"!=t.charAt(0)&&e.push("/"),e.push(ne(t,"/"==t.charAt(0)?se:ae,!0))),(t=this.a.toString())&&e.push("?",t),(t=this.Sa)&&e.push("#",ne(t,ue)),e.join("")},n.resolve=function(e){var t=this.clone();"data"===t.ta&&(t=new Z);var r=!!e.ta;r?Q(t,e.ta):r=!!e.bb,r?t.bb=e.bb:r=!!e.sa,r?t.sa=e.sa:r=null!=e.Ab;var n=e.ja;if(r)ee(t,e.Ab);else if(r=!!e.ja){if("/"!=n.charAt(0))if(this.sa&&!this.ja)n="/"+n;else{var i=t.ja.lastIndexOf("/");-1!=i&&(n=t.ja.substr(0,i+1)+n)}if(".."==n||"."==n)n="";else if(-1!=n.indexOf("./")||-1!=n.indexOf("/.")){i=0==n.lastIndexOf("/",0),n=n.split("/");for(var o=[],a=0;a=e.i){if(!e.c)return t.return(Promise.reject());e.a=1,e.b=e.f}return r=e.a,e.a++,0==r?t.return():(n=e.b*(1+(2*Math.random()-1)*e.h),S(t,new Promise((function(e){new fe(e).R(n/1e3)})),2));case 2:e.b*=e.g,w(t)}}))}))}function me(e,t,r,n){for(var i=[],o=3;o=n.priority)&&(Oe[e]={priority:r,Rf:t})}function Me(e,t){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null}}function Ne(){this.a=0}function Fe(e,t,r){ye.call(this,e,t),this.b=r}function Ue(){}function Be(){this.a=new we}function Ke(e,t,r,n){this.target=e,this.type=t,this.listener=r,this.a=function(e,t){if(null==t)return!1;if("boolean"==typeof t)return t;var r=new Set(["passive","capture"]);return Object.keys(t).filter((function(e){return!r.has(e)})),function(e){var t=Ge;if(null==t){t=!1;try{var r={},n={get:function(){return t=!0,!1}};Object.defineProperty(r,"passive",n),Object.defineProperty(r,"capture",n),n=function(){},e.addEventListener("test",n,r),e.removeEventListener("test",n,r)}catch(e){t=!1}Ge=t}return t||!1}(e)?t:t.capture||!1}(e,n),this.target.addEventListener(t,r,this.a)}Pe.registerScheme=De,Pe.unregisterScheme=function(e){delete Oe[e]},Pe.prototype.Tf=function(e){this.a.add(e)},Pe.prototype.registerRequestFilter=Pe.prototype.Tf,Pe.prototype.vg=function(e){this.a.delete(e)},Pe.prototype.unregisterRequestFilter=Pe.prototype.vg,Pe.prototype.Ie=function(){this.a.clear()},Pe.prototype.clearAllRequestFilters=Pe.prototype.Ie,Pe.prototype.Uf=function(e){this.b.add(e)},Pe.prototype.registerResponseFilter=Pe.prototype.Uf,Pe.prototype.wg=function(e){this.b.delete(e)},Pe.prototype.unregisterResponseFilter=Pe.prototype.wg,Pe.prototype.Je=function(){this.b.clear()},Pe.prototype.clearAllResponseFilters=Pe.prototype.Je,Pe.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0}},Pe.makeRequest=Me,Pe.prototype.destroy=function(){return this.f=!0,this.a.clear(),this.b.clear(),this.g.destroy()},Pe.prototype.destroy=Pe.prototype.destroy,Pe.prototype.request=function(e,t){var r=this,n=new Ne;if(this.f){var i=Promise.reject(new me(2,7,7001));return i.catch((function(){})),new Fe(i,(function(){return Promise.resolve()}),n)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?xe(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},t.uris=xe(t.uris);var o=(i=function(e,t,r){for(var n=_e(void 0),i={},o=(e=f(e.a)).next();!o.done;i={qd:i.qd},o=e.next())i.qd=o.value,n=n.U(function(e){return function(){return e.qd(t,r)}}(i));return n.U(void 0,(function(e){if(e&&7001==e.code)throw e;throw new me(2,1,1006,e)}))}(this,e,t)).U((function(){return function e(t,r,n,i,o,a,s){var l=new Z(n.uris[o]),u=l.ta,c=!1;u||(u=(u=location.protocol).slice(0,-1),Q(l,u),n.uris[o]=l.toString()),u=u.toLowerCase();var d,f=(u=Oe[u])?u.Rf:null;return f?Ae(pe(i)).U((function(){return t.f?be():(d=Date.now(),f(n.uris[o],n,r,(function(e,n,i){t.c&&1==r&&(t.c(e,n),c=!0,s.a=i)})))})).U((function(e){return null==e.timeMs&&(e.timeMs=Date.now()-d),{response:e,qf:c}}),(function(l){if(l&&7001==l.code)throw l;if(t.f)return be();if(l&&1==l.severity)return t.dispatchEvent(new Se("retry",{error:l instanceof me?l:null})),o=(o+1)%n.uris.length,e(t,r,n,i,o,l,s);throw l||a})):ve(new me(2,1,1e3,l))}(r,e,t,new he(t.retryParameters,!1),0,null,n)})),a=o.U((function(t){return function(e,t,r){for(var n=_e(void 0),i=(e=f(e.b)).next();!i.done;i=e.next())n=n.U(i.value.bind(null,t,r.response));return n.U((function(){return r}),(function(e){if(e&&7001==e.code)throw e;var t=2;throw e instanceof me&&(t=e.severity),new me(t,1,1007,e)}))}(r,e,t)})),s=Date.now(),l=0;i.promise.then((function(){l=Date.now()-s}),(function(){}));var u=0;return o.promise.then((function(){u=Date.now()}),(function(){})),i=new Fe((i=a.U((function(t){var n=Date.now()-u,i=t.response;return i.timeMs+=l,i.timeMs+=n,t.qf||!r.c||i.fromCache||1!=e||r.c(i.timeMs,i.data.byteLength),i}),(function(e){throw e&&(e.severity=2),e}))).promise,i.Zd,n),Ie(this.g,i),i},Pe.prototype.request=Pe.prototype.request,Pe.NumBytesRemainingClass=Ne,_(Fe,ye),Pe.PendingRequest=Fe,Fe.all=Ee,Fe.notAbortable=Ae,Fe.completed=_e,Fe.aborted=be,Fe.failed=ve,G("shaka.util.IReleasable",Ue),Ue.prototype.release=function(){},G("shaka.util.EventManager",Be),Be.prototype.release=function(){this.$a(),this.a=null},Be.prototype.release=Be.prototype.release,Be.prototype.w=function(e,t,r,n){this.a&&(e=new Ke(e,t,r,n),this.a.push(t,e))},Be.prototype.listen=Be.prototype.w,Be.prototype.da=function(e,t,r,n){var i=this;this.w(e,t,(function n(o){i.ea(e,t,n),r(o)}),n)},Be.prototype.listenOnce=Be.prototype.da,Be.prototype.ea=function(e,t,r){if(this.a)for(var n=this.a.get(t)||[],i=(n=f(n)).next();!i.done;i=n.next())(i=i.value).target!=e||r!=i.listener&&r||(i.ea(),this.a.remove(t,i))},Be.prototype.unlisten=Be.prototype.ea,Be.prototype.$a=function(){if(this.a){for(var e=this.a.getAll(),t=(e=f(e)).next();!t.done;t=e.next())t.value.ea();this.a.a={}}},Be.prototype.removeAll=Be.prototype.$a,Ke.prototype.ea=function(){this.target.removeEventListener(this.type,this.listener,this.a),this.listener=this.target=null,this.a=!1},Ke.prototype.unlisten=Ke.prototype.ea;var Ge=void 0;function Ve(e){if(e=new Uint8Array(e),new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");return new Z(e=st(e.subarray(4),!0)).sa}function He(e,t,r){function n(e){new DataView(o.buffer).setUint32(a,e.byteLength,!0),a+=4,i(e)}function i(e){o.set(e,a),a+=e.byteLength}if(!r||!r.byteLength)throw new me(2,6,6015);t="string"==typeof t?new Uint8Array(ct(t,!0)):new Uint8Array(t);var o=new Uint8Array(8+e.byteLength+t.byteLength+r.byteLength),a=0;return i(new Uint8Array(e)),n(t),n(new Uint8Array(r)),o}function Ye(e,t){for(var r=[],n=f(e),i=n.next();!i.done;i=n.next())r.push(t(i.value));return r}function ze(e,t){for(var r=f(e),n=r.next();!n.done;n=r.next())if(!t(n.value))return!1;return!0}function $e(e){var t=new Map;return Object.keys(e).forEach((function(r){t.set(r,e[r])})),t}function We(e){var t={};return e.forEach((function(e,r){t[r]=e})),t}function qe(e,t){var r=e;return t&&(r+='; codecs="'+t+'"'),r}function Xe(e){var t=(e=e.split("."))[0];return e.pop(),[t,e.join(".")]}G("shaka.util.FairPlayUtils.defaultGetContentId",Ve),G("shaka.util.FairPlayUtils.initDataTransform",He);var Je=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Ze(){return!(!e.MediaSource||!MediaSource.isTypeSupported)}function Qe(e){return""!=nt().canPlayType(e)}function et(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!rt("Tizen")}function tt(){if(!et())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function rt(e){return(navigator.userAgent||"").includes(e)}function nt(){return ot||(it||(it=new fe((function(){ot=null}))),(ot=document.querySelector("video")||document.querySelector("audio"))||(ot=document.createElement("video")),it.R(1),ot)}var it=null,ot=null;function at(e){if(!e)return"";239==(e=new Uint8Array(e))[0]&&187==e[1]&&191==e[2]&&(e=e.subarray(3)),e=dt(e),e=escape(e);try{return decodeURIComponent(e)}catch(e){throw new me(2,2,2004)}}function st(e,t,r){if(!e)return"";if(!r&&0!=e.byteLength%2)throw new me(2,2,2004);if(e instanceof ArrayBuffer)var n=e;else(r=new Uint8Array(e.byteLength)).set(new Uint8Array(e)),n=r.buffer;e=Math.floor(e.byteLength/2),r=new Uint16Array(e),n=new DataView(n);for(var i=0;i=e[t]}.bind(null,t);if(0==t[0]&&0==t[2])return st(e,!1);if(0==t[1]&&0==t[3])return st(e,!0);if(r(0)&&r(1)&&r(2)&&r(3))return at(e);throw new me(2,2,2003)}function ut(e){e=encodeURIComponent(e),e=unescape(e);for(var t=new Uint8Array(e.length),r=0;rr&&(r+=Math.pow(2,32)),r="0x"+r.toString(16)}e.g(new me(2,6,6006,t.message,t,r))}}))}function kt(e,t){if(_t(t).startsWith("com.apple.fps")){var r=t.serverCertificate;e=He(e,Ve(e),r)}return e}function xt(e,t){var r=t.target,n=e.b.get(r),i=e.a.licenseServerUri,o=e.f.advanced[e.a.keySystem];"individualization-request"==t.messageType&&o&&o.individualizationServer&&(i=o.individualizationServer),(i=Me([i],e.f.retryParameters)).body=t.message,i.method="POST",i.licenseRequestType=t.messageType,i.sessionId=r.sessionId,"com.microsoft.playready"!=e.a.keySystem&&"com.chromecast.playready"!=e.a.keySystem||function(e){var t=st(e.body,!0,!0);if(t.includes("PlayReadyKeyMessage")){for(var r=(t=(new DOMParser).parseFromString(t,"application/xml")).getElementsByTagName("HttpHeader"),n=0;n"===(t=t.trim()).substr(0,5)&&""===t.substr(-6)&&(t=t.slice(5,-6));try{t=JSON.parse(t).ckc}catch(e){}e.data=ht.Ba(t).buffer}(e),this.K+=(Date.now()-a)/1e3,r.update(e.data).then(function(){var e=this;this.B.onEvent(new Se("drmsessionupdate")),n&&(n.ya&&n.ya.resolve(),new fe((function(){n.loaded=!0,It(e)&&e.m.resolve()})).R(Ot))}.bind(this)))}.bind(e),function(e){this.c||(e=new me(2,6,6007,e),this.g(e),n&&n.ya&&n.ya.reject(e))}.bind(e)).catch(function(e){this.c||(e=new me(2,6,6008,e.message),this.g(e),n&&n.ya&&n.ya.reject(e))}.bind(e))}function Ct(){var e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],t=[{videoCapabilities:e,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:e}],r=new Map;return e="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").map((function(e){return function(e){return p((function n(){var i,o,a;return M(n,(function(n){switch(n.j){case 1:return k(n,2),S(n,navigator.requestMediaKeySystemAccess(e,t),4);case 4:return i=n.o,a=!!(o=i.getConfiguration().sessionTypes)&&o.includes("persistent-license"),rt("Tizen 3")&&(a=!1),r.set(e,{persistentState:a}),S(n,i.createMediaKeys(),5);case 5:C(n,0);break;case 2:R(n),r.set(e,null),w(n)}}))}))}(e)})),Promise.all(e).then((function(){return We(r)}))}function Rt(e,t){var r=t.audio,n=t.video;if(r&&r.encrypted&&!At(e,qe(r.mimeType,r.codecs))||n&&n.encrypted&&!At(e,qe(n.mimeType,n.codecs)))return!1;var i=_t(e.a);return 0==t.drmInfos.length||t.drmInfos.some((function(e){return e.keySystem==i}))}function jt(e,t){if(!e.length)return t;if(!t.length)return e;for(var r=[],n=0;nn||r&&1e3>n)&&t&&!t.ya&&(this.b.delete(e),e.close().catch((function(){}))),It(this)&&(this.m.resolve(),this.O.R(Dt))};var Ot=5,Dt=.5;function Mt(){this.a=new muxjs.mp4.CaptionParser,this.g=[],this.f={}}function Nt(){}function Ft(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function Ut(e,t,r){return r=void 0===r?0:r,!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t+r>=e.start(0)}function Bt(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;for(var r=0,n=e.length-1;0<=n&&e.end(n)>t;--n)r+=e.end(n)-Math.max(e.start(n),t);return r}function Kt(e){if(!e)return[];for(var t=[],r=0;r>4).toString(16),i+=(15&a).toString(16),r=r.replace(n[0],i)}return r}function qt(e,t,r){this.startTime=e,this.direction=tr,this.endTime=t,this.payload=r,this.region=new ur,this.position=null,this.positionAlign=Xt,this.size=100,this.textAlign=Jt,this.writingMode=rr,this.lineInterpretation=nr,this.line=null,this.lineHeight="",this.lineAlign=ir,this.displayAlign=Qt,this.fontSize=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=ar,this.fontStyle=sr,this.fontFamily="",this.textDecoration=[],this.wrapLine=!0,this.id="",this.nestedCues=[],this.spacer=!1}zt.prototype.destroy=function(){return this.a.dispose(),this.a=null,Promise.resolve()},zt.prototype.i=function(e){this.c=e.captions;var t=new Uint8Array(e.data.byteLength+e.initSegment.byteLength);t.set(e.initSegment,0),t.set(e.data,e.initSegment.byteLength),this.g.push(t)},zt.prototype.h=function(){var e={data:ht.concat.apply(null,this.g),captions:this.c};this.b.resolve(e),this.f=!1},G("shaka.text.Cue",qt);var Xt="auto";qt.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Xt};var Jt="center",Zt={LEFT:"left",RIGHT:"right",CENTER:Jt,START:"start",END:"end"};qt.textAlign=Zt;var Qt="after",er={BEFORE:"before",CENTER:"center",AFTER:Qt};qt.displayAlign=er;var tr="ltr";qt.direction={HORIZONTAL_LEFT_TO_RIGHT:tr,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var rr="horizontal-tb";qt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:rr,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var nr=0;qt.lineInterpretation={LINE_NUMBER:nr,PERCENTAGE:1};var ir="start",or={CENTER:"center",START:ir,END:"end"};qt.lineAlign=or;var ar=400;qt.fontWeight={NORMAL:ar,BOLD:700};var sr="normal",lr={NORMAL:sr,ITALIC:"italic",OBLIQUE:"oblique"};function ur(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=cr,this.scroll=dr}qt.fontStyle=lr,qt.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},G("shaka.text.CueRegion",ur);var cr=1;ur.units={PX:0,PERCENTAGE:cr,LINES:2};var dr="";function fr(e){this.g=null,this.c=e,this.f=this.m=0,this.h=1/0,this.b=this.a=null,this.l="",this.i=new Map}ur.scrollMode={NONE:dr,UP:"up"};var hr={};function pr(t){return!!(hr[t]||e.muxjs&&"application/cea-608"==t)}function mr(e,t){"application/cea-608"!=t&&(e.g=new hr[t])}function gr(e,t,r,n,i){for(var o=r+" "+n,a=new Map,s=(t=f(t)).next();!s.done;s=t.next()){var l=s.value;s=l.stream,a.has(s)||a.set(s,new Map),a.get(s).has(o)||a.get(s).set(o,[]),l.startTime+=i,l.endTime+=i,l.startTime>=e.f&&l.startTime=this.b||(e<=this.a&&t>=this.b?this.a=this.b=null:e<=this.a&&tthis.a&&t>=this.b&&(this.b=e))}.bind(this))};var vr=e.URL.createObjectURL;function br(e){var t=qe(e.mimeType,e.codecs),r=function(e){var t=[e.mimeType];return Je.forEach((function(r,n){var i=e[n];i&&t.push(r+'="'+i+'"')})),t.join(";")}(e);return pr(t)||MediaSource.isTypeSupported(r)||$t(t,e.type)}function _r(e,t){e.a||(e.a=new fr(e.g)),mr(e.a,t)}function Ar(e){return!e.h||"ended"==e.h.readyState}function Er(e,t){if("text"==t)var r=e.a.a;else r=!(r=Sr(e,t))||1==r.length&&1e-6>r.end(0)-r.start(0)?null:1==r.length&&0>r.start(0)?0:r.length?r.start(0):null;return r}function Tr(e,t){return"text"==t?e.a.b:Ft(Sr(e,t))}function Sr(e,t){try{return e.b[t].buffered}catch(e){return null}}function wr(t,r,n,i,o,a){return"text"==r?function(e,t,r,n){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==r||null==n)this.g.parseInit(new Uint8Array(t));else{var e={periodStart:this.m,segmentStart:r,segmentEnd:n};e=this.g.parseMedia(new Uint8Array(t),e).filter(function(e){return e.startTime>=this.f&&e.startTimet&&(t+=.001),this.b[e].timestampOffset=t,this.xb(e)},n.hg=function(e,t,r){this.b[e].appendWindowStart=0,this.b[e].appendWindowEnd=r,this.b[e].appendWindowStart=t,this.xb(e)},n.lg=function(e){this.c[e][0].p.reject(new me(2,3,3014,this.f.error?this.f.error.code:0))},n.xb=function(e){var t=this.c[e][0];t&&(t.p.resolve(),jr(this,e))};var Mr=new Map([["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"]]),Nr={bd:function(e,t,r){function n(e,t,r){return e>=t&&e<=r}var i=e.video;return!(i&&i.width&&i.height&&(!n(i.width,t.minWidth,Math.min(t.maxWidth,r.width))||!n(i.height,t.minHeight,Math.min(t.maxHeight,r.height))||!n(i.width*i.height,t.minPixels,t.maxPixels))||e&&e.frameRate&&!n(e.frameRate,t.minFrameRate,t.maxFrameRate)||!n(e.bandwidth,t.minBandwidth,t.maxBandwidth))},Gd:function(e,t,r){var n=!1;return e.forEach((function(e){var i=e.allowedByApplication;e.allowedByApplication=Nr.bd(e,t,r),i!=e.allowedByApplication&&(n=!0)})),n},filterNewPeriod:function(e,t,r,n){n.variants=n.variants.filter((function(n){if(e&&e.S&&!Rt(e,n))return!1;var i=n.audio;return n=n.video,!(i&&!br(i)||n&&!br(n)||i&&t&&!Nr.Hd(i,t)||n&&r&&!Nr.Hd(n,r))})),n.textStreams=n.textStreams.filter((function(e){return pr(qe(e.mimeType,e.codecs))}))},Hd:function(e,t){return e.mimeType==t.mimeType&&e.codecs.split(".")[0]==t.codecs.split(".")[0]},Ed:function(e){var t=e.audio,r=e.video,n=t?t.codecs:null,i=r?r.codecs:null,o=[];i&&o.push(i),n&&o.push(n);var a=[];r&&a.push(r.mimeType),t&&a.push(t.mimeType),a=a[0]||null;var s=[];t&&s.push(t.kind),r&&s.push(r.kind),s=s[0]||null;var l=new Set;return t&&t.roles.forEach((function(e){return l.add(e)})),r&&r.roles.forEach((function(e){return l.add(e)})),e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:s,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:a,codecs:o.join(", "),audioCodec:n,videoCodec:i,primary:e.primary,roles:Array.from(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null},r&&(e.videoId=r.id,e.originalVideoId=r.originalId,e.width=r.width||null,e.height=r.height||null,e.frameRate=r.frameRate||null,e.pixelAspectRatio=r.pixelAspectRatio||null,e.videoBandwidth=r.bandwidth||null),t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.label=t.label,e.audioRoles=t.roles),e},xc:function(e){return{id:e.id,active:!1,type:"text",bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:e.mimeType,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId}},Wc:function(e){return e.__shaka_id||(e.__shaka_id=Nr.yf++),e.__shaka_id},yf:0,sf:function(e){var t=Nr.Sd(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="application/cea-608"),t},rf:function(e){var t=Nr.Sd(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,"main"==e.kind?(t.primary=!0,t.roles=["main"],t.audioRoles=["main"]):t.audioRoles=[],t},Sd:function(e){return{id:Nr.Wc(e),active:!1,type:"",bandwidth:0,language:Pr(e.language),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}},rb:function(e){return e.allowedByApplication&&e.allowedByKeySystem},df:function(e){return e.filter((function(e){return Nr.rb(e)}))},Nd:function(e,t){for(var r=e.filter((function(e){return e.audio&&e.audio.channelsCount})),n=new Map,i=(r=f(r)).next();!i.done;i=r.next()){var o=(i=i.value).audio.channelsCount;n.has(o)||n.set(o,[]),n.get(o).push(i)}return 0==(r=Array.from(n.keys())).length?e:(i=r.filter((function(e){return e<=t}))).length?n.get(Math.max.apply(null,i)):n.get(Math.min.apply(null,r))},Jb:function(e,t,r){var n=e,i=e.filter((function(e){return e.primary}));i.length&&(n=i);var o=n.length?n[0].language:"";if(n=n.filter((function(e){return e.language==o})),t){var a=Dr(Pr(t),e.map((function(e){return e.language})));a&&(n=e.filter((function(e){return Pr(e.language)==a})))}if(r){if((e=Nr.Md(n,r)).length)return e}else if((e=n.filter((function(e){return 0==e.roles.length}))).length)return e;return(e=n.map((function(e){return e.roles})).reduce(Gt.Gc,[])).length?Nr.Md(n,e[0]):n},Md:function(e,t){return e.filter((function(e){return e.roles.includes(t)}))},Qd:function(e,t,r){for(var n=0;n=i.bandwidth/this.a.bandwidthDowngradeTarget&&t<=o&&(r=i)}return this.g=Date.now(),r},Fr.prototype.chooseVariant=Fr.prototype.chooseVariant,Fr.prototype.enable=function(){this.f=!0},Fr.prototype.enable=Fr.prototype.enable,Fr.prototype.disable=function(){this.f=!1},Fr.prototype.disable=Fr.prototype.disable,Fr.prototype.segmentDownloaded=function(e,t){var r=this.b;if(!(16e3>t)){var n=8e3*t/e,i=e/1e3;r.a+=t,Y(r.b,i,n),Y(r.c,i,n)}if(null!=this.g&&this.f)e:{if(this.i){if(Date.now()-this.g<1e3*this.a.switchInterval)break e}else{if(!(128e3<=this.b.a))break e;this.i=!0}r=this.chooseVariant(),this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate),this.h(r)}},Fr.prototype.segmentDownloaded=Fr.prototype.segmentDownloaded,Fr.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)},Fr.prototype.getBandwidthEstimate=Fr.prototype.getBandwidthEstimate,Fr.prototype.setVariants=function(e){this.c=e},Fr.prototype.setVariants=Fr.prototype.setVariants,Fr.prototype.configure=function(e){this.a=e},Fr.prototype.configure=Fr.prototype.configure,Br.prototype.toString=function(){return"v"+this.a+"."+this.b};var Hr=null,Yr="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),zr="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),$r=["loop","playbackRate"],Wr=["pause","play"],qr="abrstatuschanged adaptation buffering drmsessionupdate emsg error expirationupdated largegap loading manifestparsed onstatechange onstateidle streaming textchanged texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged".split(" "),Xr={getAssetUri:2,getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},Jr={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Zr=[["getConfiguration","configure"]],Qr=[["isTextTrackVisible","setTextTrackVisibility"]],en="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),tn=["attach","detach","load","unload"];function rn(e){return JSON.stringify(e,(function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof Se){var r,n={};for(r in t){var i=t[r];i&&"object"==typeof i?"detail"==r&&(n[r]=i):r in Event||(n[r]=i)}return n}if(t instanceof TimeRanges)for(n={__type__:"TimeRanges",length:t.length,start:[],end:[]},r=0;rt?"-Infinity":"Infinity":t;return n}}))}function nn(e){return JSON.parse(e,(function(e,t){return"NaN"==t?NaN:"-Infinity"==t?-1/0:"Infinity"==t?1/0:t&&"object"==typeof t&&"TimeRanges"==t.__type__?function(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}(t):t&&"object"==typeof t&&"Uint8Array"==t.__type__?new Uint8Array(t.entries):t}))}function on(e,t,r,n,i,o){this.O=e,this.f=new fe(t),this.S=r,this.l=!1,this.F=n,this.K=i,this.B=o,this.b=this.h=!1,this.D="",this.i=null,this.m=this.ce.bind(this),this.s=this.Ff.bind(this),this.a={video:{},player:{}},this.u=0,this.c={},this.g=null,pn.add(this)}var an=!1,sn=null;function ln(e){for(var t=f(pn),r=t.next();!r.done;r=t.next())un(r.value,e)}function un(e,t){var r=e.B();e.g=new ge,e.l=!0,e.kd(r,t)}function cn(e){for(var t=f(pn),r=t.next();!r.done;r=t.next())r=r.value,an="available"==e,r.f.yc()}function dn(e){var t=sn;t.removeUpdateListener(e.m),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.s)}function fn(e){for(var t in e.c){var r=e.c[t];delete e.c[t],r.reject(new me(1,7,7e3))}}function hn(e){e=rn(e),sn.sendMessage("urn:x-cast:com.google.shaka.v2",e,(function(){}),X)}(n=on.prototype).destroy=function(){return pn.delete(this),fn(this),sn&&dn(this),this.f&&(this.f.stop(),this.f=null),this.K=this.F=null,this.b=this.h=!1,this.s=this.m=this.g=this.c=this.a=this.i=null,Promise.resolve()},n.ga=function(){return this.b},n.nd=function(){return this.D},n.init=function(){if(e.chrome&&chrome.cast&&chrome.cast.isAvailable&&this.O.length){this.h=!0,this.f.yc();var t=new chrome.cast.SessionRequest(this.O);t=new chrome.cast.ApiConfig(t,ln.bind(this),cn.bind(this),"origin_scoped"),chrome.cast.initialize(t,(function(){}),(function(){})),an&&this.f.R(.02),(t=sn)&&t.status!=chrome.cast.SessionStatus.STOPPED?un(this,t):sn=null}},n.ud=function(e){this.i=e,this.b&&hn({type:"appData",appData:this.i})},n.cast=function(e){return this.h?an?this.b?Promise.reject(new me(1,8,8002)):(this.g=new ge,chrome.cast.requestSession(this.kd.bind(this,e),this.be.bind(this)),this.g):Promise.reject(new me(1,8,8001)):Promise.reject(new me(1,8,8e3))},n.Kb=function(){this.b&&(fn(this),sn&&(dn(this),sn.stop((function(){}),(function(){})),sn=null))},n.get=function(e,t){if("video"==e){if(Wr.includes(t))return this.le.bind(this,e,t)}else if("player"==e){if(Jr[t]&&!this.get("player","isLive")())return function(){};if(en.includes(t))return this.le.bind(this,e,t);if(tn.includes(t))return this.Wf.bind(this,e,t);if(Xr[t])return this.ie.bind(this,e,t)}return this.ie(e,t)},n.set=function(e,t,r){this.a[e][t]=r,hn({type:"set",targetName:e,property:t,value:r})},n.kd=function(e,t){sn=t,t.addUpdateListener(this.m),t.addMessageListener("urn:x-cast:com.google.shaka.v2",this.s),this.ce(),hn({type:"init",initState:e,appData:this.i}),this.g.resolve()},n.be=function(e){var t=8003;switch(e.code){case"cancel":t=8004;break;case"timeout":t=8005;break;case"receiver_unavailable":t=8006}this.g.reject(new me(2,8,t,e))},n.ie=function(e,t){return this.a[e][t]},n.le=function(e,t,r){for(var n=[],i=2;i>24&255,e>>16&255,e>>8&255,255&e)}function Un(e){var t=this;this.a=[],this.b=[],this.data=[],(new Pn).H("moov",On).fa("pssh",(function(e){if(!(1this.J.byteLength&&In();var t=new Uint8Array(this.J.buffer,this.J.byteOffset+this.a,e);return this.a+=e,t},jn.prototype.readBytes=jn.prototype.Za,jn.prototype.M=function(e){this.a+e>this.J.byteLength&&In(),this.a+=e},jn.prototype.skip=jn.prototype.M,jn.prototype.me=function(e){this.ae||e>this.J.byteLength)&&In(),this.a=e},jn.prototype.seek=jn.prototype.seek,jn.prototype.md=function(){for(var e=this.a;this.ua()&&0!=this.J.getUint8(this.a);)this.a+=1;return e=new Uint8Array(this.J.buffer,this.J.byteOffset+e,this.a-e),this.a+=1,at(e)},jn.prototype.readTerminatedString=jn.prototype.md,G("shaka.util.Mp4Parser",Pn),Pn.prototype.H=function(e,t){var r=Nn(e);return this.c[r]=0,this.b[r]=t,this},Pn.prototype.box=Pn.prototype.H,Pn.prototype.fa=function(e,t){var r=Nn(e);return this.c[r]=1,this.b[r]=t,this},Pn.prototype.fullBox=Pn.prototype.fa,Pn.prototype.stop=function(){this.a=!0},Pn.prototype.stop=Pn.prototype.stop,Pn.prototype.parse=function(e,t){var r=new Uint8Array(e);for(r=new jn(new DataView(r.buffer,r.byteOffset,r.byteLength),0),this.a=!1;r.ua()&&!this.a;)this.sc(0,r,t)},Pn.prototype.parse=Pn.prototype.parse,Pn.prototype.sc=function(e,t,r){var n=t.ca(),i=t.G(),o=t.G();switch(i){case 0:i=t.J.byteLength-n;break;case 1:i=t.Bb()}var a=this.b[o];if(a){var s=null,l=null;1==this.c[o]&&(s=(l=t.G())>>>24,l&=16777215),o=n+i,r&&o>t.J.byteLength&&(o=t.J.byteLength),o-=t.ca(),t=0 LA_URL"))?e.textContent:""}(e):""):""}));function Yn(e){var t=e.getAttribute("schemeIdUri"),r=Bn.getAttributeNS(e,"urn:mpeg:cenc:2013","default_KID"),n=Bn.Od(e,"urn:mpeg:cenc:2013","pssh").map(Bn.ic);if(!t)return null;if(t=t.toLowerCase(),r&&(r=r.replace(/-/g,"").toLowerCase()).includes(" "))throw new me(2,4,4009);var i=[];try{i=n.map((function(e){return{initDataType:"cenc",initData:ht.Ba(e),keyId:null}}))}catch(e){throw new me(2,4,4007)}return{node:e,ne:t,keyId:r,init:0(f=f||0))if(d+1=f)break;f=Math.ceil((f-h)/p)-1}else{if(1/0==l)break;if(h/i>=l)break;f=Math.ceil((l*i-h)/p)-1}0>>31;u&=2147483647;var d=n.reader.G();if(n.reader.M(4),1==c)throw new me(2,3,3006);i.push(new Zn(i.length,a/o-t,(a+d)/o-t,(function(){return r}),e,e+u-1)),a+=d,e+=u}return n.parser.stop(),i}(t,n,r,e)}));if(e&&o.parse(e),i)return i;throw new me(2,3,3004)}function ei(e){this.a=e}function ti(e,t){for(;e.a.length&&e.a[e.a.length-1].startTime>=t;)e.a.pop();for(;e.a.length&&0>=e.a[0].endTime;)e.a.shift();if(0!=e.a.length){var r=e.a[e.a.length-1];e.a[e.a.length-1]=new Zn(r.position,r.startTime,t,r.c,r.b,r.a)}}function ri(e){this.b=e,this.a=new jn(e,0),Vn||(Vn=[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])])}function ni(e){var t=ii(e);if(7=t&&!(r&1<<8-t);t++);if(8e||r&&e>=r?null:Math.floor(e/n)},getSegmentReference:function(e){var t=e*n,c=t+n;return r&&(c=Math.min(c,r)),0>c||r&&t>=r?null:new Zn(e,t,c,(function(){var r=zn(a,l,e+i,s,t*o);return Vt(u,[r])}),0,null)}}}(e,o)):(a=t=null,e.ka.id&&e.C.id&&(t=r[a=e.ka.id+","+e.C.id]),s=function(e,t){for(var r=[],n=0;n=r.startTime&&e(e-=this.a[0].position)||e>=this.a.length?null:this.a[e]},ei.prototype.get=ei.prototype.get,ei.prototype.offset=function(e){for(var t=0;to.startTime?0==r&&t.push(o):(.1e)return void this.a.splice(0,t);this.a=[]},ei.prototype.evict=ei.prototype.Lc,ri.prototype.ua=function(){return this.a.ua()},si.prototype.parse=function(e,t,r,n){var i;if(440786851!=ni(t=new ri(new DataView(t))).id)throw new me(2,3,3008);var o=ni(t);if(408125543!=o.id)throw new me(2,3,3009);for(t=o.a.byteOffset,o=new ri(o.a),i=null;o.ua();){var a=ni(o);if(357149030==a.id){i=a;break}}if(!i)throw new me(2,3,3010);for(o=new ri(i.a),i=1e6,a=null;o.ua();){var s=ni(o);if(2807729==s.id)i=ai(s);else if(17545==s.id)if(4==(a=s).a.byteLength)a=a.a.getFloat32(0);else{if(8!=a.a.byteLength)throw new me(2,3,3003);a=a.a.getFloat64(0)}}if(null==a)throw new me(2,3,3011);if(i=a*(o=i/1e9),475249515!=(e=ni(new ri(new DataView(e)))).id)throw new me(2,3,3007);return function(e,t,r,n,i,o){function a(){return i}var s=[];e=new ri(e.a);for(var l=null,u=null;e.ua();){var c=ni(e);if(187==c.id){var d=li(c);d&&(c=r*d.yg,d=t+d.Vf,null!=l&&s.push(new Zn(s.length,l-o,c-o,a,u,d-1)),l=c,u=d)}}return null!=l&&s.push(new Zn(s.length,l-o,n-o,a,u,null)),s}(e,t,o,i,r,n)};var gi={zb:{},Sb:{},pd:function(e,t){gi.Sb[e]=t}};function yi(e,t,r){this.f=e,this.vc=t,this.h=this.g=1/0,this.a=1,this.b=this.c=null,this.l=0,this.m=!0,this.i=0,this.s=void 0===r||r}function vi(e,t,r,n){return e=Me(e,n),0==t&&null==r||(e.headers.Range=r?"bytes="+t+"-"+r:"bytes="+t+"-"),e}function bi(){var e=this;this.b=this.a=null,this.f=[],this.c=null,this.l=[],this.h=1,this.m={},this.s=0,this.u=new H(5),this.i=new fe((function(){!function(e){p((function t(){var r,n;return M(t,(function(t){switch(t.j){case 1:return r=0,k(t,2),S(t,_i(e),4);case 4:r=t.o,C(t,3);break;case 2:n=R(t),e.b&&(n.severity=1,e.b.onError(n));case 3:if(!e.b)return t.return();Si(e,r),w(t)}}))}))}(e)})),this.g=new Le}function _i(e){var t=Date.now(),r=e.b.networkingEngine.request(0,Me(e.f,e.a.retryParameters));return Ie(e.g,r),r.promise.then((function(t){if(e.b)return t.uri&&!e.f.includes(t.uri)&&e.f.unshift(t.uri),function(e,t,r){if(!(t=Bn.ge(t,"MPD")))throw new me(2,4,4001,r);return t=Xn(t,e.a.retryParameters,e.a.dash.xlinkFailGracefully,r,e.b.networkingEngine),Ie(e.g,t),t.promise.then((function(t){return function(e,t,r){return p((function n(){var i,o,a,s,l,u,c,d,f,h,p,m,g,y,v,b,_,A,E,T,k,x,C,R;return M(n,(function(n){switch(n.j){case 1:s=Gt,u=[r],0<(c=(l=Bn).P(t,"Location").map(l.ic).filter(s.Ia)).length&&(d=Vt(u,c),u=e.f=d),f=l.P(t,"BaseURL").map(l.ic),h=Vt(u,f),p=e.a.dash.ignoreMinBufferTime,m=0,p||(m=l.I(t,"minBufferTime",l.Ea)),e.s=l.I(t,"minimumUpdatePeriod",l.Ea,-1),g=l.I(t,"availabilityStartTime",l.Of),y=l.I(t,"timeShiftBufferDepth",l.Ea),v=l.I(t,"maxSegmentDuration",l.Ea),b=t.getAttribute("type")||"static",_=e.a.dash.ignoreSuggestedPresentationDelay,A=null,_||(A=l.I(t,"suggestedPresentationDelay",l.Ea)),e.c?E=e.c.presentationTimeline:(T=Math.max(e.a.dash.defaultPresentationDelay,1.5*m),E=new yi(g,null!=A?A:T,e.a.dash.autoCorrectDrift));for(var j={mb:"static"!=b,presentationTimeline:E,ka:null,T:null,aa:null,C:null,bandwidth:0,Vd:!1},L=h,I=Bn.I(t,"mediaPresentationDuration",Bn.Ea),P=[],O=0,D=Bn.P(t,"Period"),M=0;Me.s||e.i.R(Math.max(3,e.s-t,z(e.u)))}function wi(e,t,r){t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,gd:null,audioSamplingRate:null},r=r||t.qa;var n=Bn.yb,i=Bn.Me,o=Bn.P(e,"BaseURL").map(Bn.ic),a=e.getAttribute("contentType")||t.contentType,s=e.getAttribute("mimeType")||t.mimeType,l=e.getAttribute("codecs")||t.codecs;i=Bn.I(e,"frameRate",i)||t.frameRate;for(var u=e.getAttribute("par")||t.pixelAspectRatio,c=Bn.P(e,"InbandEventStream"),d=t.emsgSchemeIdUris.slice(),h=(c=f(c)).next();!h.done;h=c.next())h=h.value.getAttribute("schemeIdUri"),d.includes(h)||d.push(h);return c=function(e){for(var t=0;t>=1;return e}}}return null}(c=Bn.P(e,"AudioChannelConfiguration"))||t.gd,h=Bn.I(e,"audioSamplingRate",n)||t.audioSamplingRate,a||(a=xi(s,l)),{qa:Vt(r,o),Ub:Bn.gc(e,"SegmentBase")||t.Ub,La:Bn.gc(e,"SegmentList")||t.La,Wb:Bn.gc(e,"SegmentTemplate")||t.Wb,width:Bn.I(e,"width",n)||t.width,height:Bn.I(e,"height",n)||t.height,contentType:a,mimeType:s,codecs:l,frameRate:i,pixelAspectRatio:u,emsgSchemeIdUris:d,id:e.getAttribute("id"),gd:c,audioSamplingRate:h}}function ki(e,t,r,n){return(t=Me(t=Vt(t,[r]),e.a.retryParameters)).method=n,t=e.b.networkingEngine.request(4,t),Ie(e.g,t),t.promise.then((function(e){if("HEAD"==n){if(!e.headers||!e.headers.date)return 0;e=e.headers.date}else e=at(e.data);return e=Date.parse(e),isNaN(e)?0:e-Date.now()}))}function xi(e,t){return pr(qe(e,t))?"text":e.split("/")[0]}function Ci(e,t,r,n){this.b=e,this.type=t,this.a=r,this.segments=n||null}function Ri(e,t,r,n){this.id=e,this.name=t,this.a=r,this.value=void 0===n?null:n}function ji(e,t){this.name=e,this.value=t}function Li(e,t,r){return(e=e.getAttribute(t))?e.value:r||null}function Ii(e,t){this.b=t,this.a=e}G("shaka.media.ManifestParser.registerParserByExtension",gi.pd),gi.Cb=function(e,t){gi.zb[e]=t},G("shaka.media.ManifestParser.registerParserByMime",gi.Cb),gi.Sf=function(){var e={};if(Ze()){for(var t in gi.zb)e[t]=!0;for(var r in gi.Sb)e[r]=!0}t={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var n=(r=f(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!n.done;n=r.next())e[n=n.value]=Ze()?!!gi.zb[n]:Qe(n);for(var i in t)e[i]=Ze()?!!gi.Sb[i]:Qe(t[i]);return e},gi.create=function(e,t,r,n){return p((function i(){var o,a;return M(i,(function(i){switch(i.j){case 1:return k(i,2),S(i,gi.Ue(e,t,r,n),4);case 4:return o=i.o,i.return(new o);case 2:throw(a=R(i)).severity=2,a}}))}))},gi.Ue=function(e,t,r,n){return p((function i(){var o,a,s,l,u;return M(i,(function(i){switch(i.j){case 1:if(o=gi,n&&(a=o.zb[n.toLowerCase()]))return i.return(a);if((s=o.getExtension(e))&&(l=o.Sb[s]))return i.return(l);if(n){i.A(2);break}return S(i,o.bf(e,t,r),3);case 3:if((n=i.o)&&(u=gi.zb[n]))return i.return(u);case 2:throw new me(2,4,4e3,e)}}))}))},gi.bf=function(e,t,r){return p((function n(){var i,o,a;return M(n,(function(n){switch(n.j){case 1:return(i=Me([e],r)).method="HEAD",S(n,t.request(0,i).promise,2);case 2:return o=n.o,a=o.headers["content-type"],n.return(a?a.toLowerCase().split(";").shift():"")}}))}))},gi.getExtension=function(e){return 1==(e=new Z(e).ja.split("/").pop().split(".")).length?"":e.pop().toLowerCase()},gi.isSupported=function(e,t){return!!Ze()&&(t in gi.zb||gi.getExtension(e)in gi.Sb)},G("shaka.media.PresentationTimeline",yi),yi.prototype.Y=function(){return this.g},yi.prototype.getDuration=yi.prototype.Y,yi.prototype.$e=function(){return this.a},yi.prototype.getMaxSegmentDuration=yi.prototype.$e,yi.prototype.xa=function(e){this.g=e},yi.prototype.setDuration=yi.prototype.xa,yi.prototype.hf=function(){return this.f},yi.prototype.getPresentationStartTime=yi.prototype.hf,yi.prototype.pe=function(e){this.l=e},yi.prototype.setClockOffset=yi.prototype.pe,yi.prototype.Xb=function(e){this.m=e},yi.prototype.setStatic=yi.prototype.Xb,yi.prototype.xd=function(e){this.h=e},yi.prototype.setSegmentAvailabilityDuration=yi.prototype.xd,yi.prototype.ig=function(e){this.vc=e},yi.prototype.setDelay=yi.prototype.ig,yi.prototype.Se=function(){return this.vc},yi.prototype.getDelay=yi.prototype.Se,yi.prototype.vb=function(e,t){if(0!=e.length){var r=e[e.length-1].endTime+t;this.fd(e[0].startTime+t),this.a=e.reduce((function(e,t){return Math.max(e,t.endTime-t.startTime)}),this.a),this.b=Math.max(this.b,r),null!=this.f&&this.s&&(this.f=(Date.now()+this.l)/1e3-this.b-this.a)}},yi.prototype.notifySegments=yi.prototype.vb,yi.prototype.fd=function(e){this.c=null==this.c?e:Math.min(this.c,e)},yi.prototype.notifyMinSegmentStartTime=yi.prototype.fd,yi.prototype.ed=function(e){this.a=Math.max(this.a,e)},yi.prototype.notifyMaxSegmentDuration=yi.prototype.ed,yi.prototype.offset=function(e){null!=this.c&&(this.c+=e),null!=this.b&&(this.b+=e)},yi.prototype.offset=yi.prototype.offset,yi.prototype.V=function(){return 1/0==this.g&&!this.m},yi.prototype.isLive=yi.prototype.V,yi.prototype.Xa=function(){return 1/0!=this.g&&!this.m},yi.prototype.isInProgress=yi.prototype.Xa,yi.prototype.Ob=function(){if(1/0==this.h)return this.i;var e=this.pb()-this.h;return Math.max(this.i,e)},yi.prototype.getSegmentAvailabilityStart=yi.prototype.Ob,yi.prototype.qe=function(e){this.i=e},yi.prototype.setUserSeekStart=yi.prototype.qe,yi.prototype.pb=function(){return this.V()||this.Xa()?Math.min(Math.max(0,(Date.now()+this.l)/1e3-this.a-this.f),this.g):this.g},yi.prototype.getSegmentAvailabilityEnd=yi.prototype.pb,yi.prototype.Nb=function(e){var t=Math.max(this.c,this.i);if(1/0==this.h)return t;var r=this.pb()-this.h;return e=Math.min(r+e,this.Ca()),Math.max(t,e)},yi.prototype.getSafeSeekRangeStart=yi.prototype.Nb,yi.prototype.ob=function(){return this.Nb(0)},yi.prototype.getSeekRangeStart=yi.prototype.ob,yi.prototype.Ca=function(){var e=this.V()||this.Xa()?this.vc:0;return Math.max(0,this.pb()-e)},yi.prototype.getSeekRangeEnd=yi.prototype.Ca,yi.prototype.ue=function(){return!(null==this.f||null!=this.b&&this.s)},yi.prototype.usingPresentationStartTime=yi.prototype.ue,G("shaka.dash.DashParser",bi),(n=bi.prototype).configure=function(e){this.a=e},n.start=function(e,t){var r=this;return p((function n(){var i;return M(n,(function(n){switch(n.j){case 1:return r.f=[e],r.b=t,S(n,_i(r),2);case 2:if(i=n.o,r.b&&Si(r,i),!r.b)throw new me(2,7,7001);return n.return(r.c)}}))}))},n.stop=function(){return this.a=this.b=null,this.f=[],this.c=null,this.l=[],this.m={},null!=this.i&&(this.i.stop(),this.i=null),this.g.destroy()},n.update=function(){_i(this).catch(function(e){this.b&&this.b.onError(e)}.bind(this))},n.onExpirationUpdated=function(){},n.Nf=function(e,t){if(e.aa=wi(t,e.ka,null),"image"==e.aa.contentType)return null;var r=!1,n=Bn.P(t,"Role"),i=n.map((function(e){return e.getAttribute("value")})).filter(Gt.Ia),o=void 0,a="text"==e.aa.contentType;a&&(o="subtitle");for(var s=0;s>4)&&2!=o||n(),3==o&&(o=r.la(),r.M(o)),1==r.G()>>8)return r.M(3),0!=(i=r.la()>>6)&&1!=i||n(),0==r.la()&&n(),i=r.la(),o=r.Tb(),r=r.Tb(),(1073741824*((14&i)>>1)+((65534&o)<<14|(65534&r)>>1))/9e4;r.seek(i+188),71!=(o=r.la())&&(r.seek(i+192),o=r.la()),71!=o&&(r.seek(i+204),o=r.la()),71!=o&&n(),r.me(1)}}(t,p.uri,p.data));case 4:if("application/mp4"!=i&&!i.startsWith("text/")){a.A(6);break}return S(a,to(e,n),7);case 7:return m=a.o,a.return(function(e,t,r){return pr(e=qe(e,t))?(mr(t=new fr(null),e),t.kc(r)):0}(i,o,m.data));case 6:throw new me(2,4,4030,t)}}))}))}(e,t,d,c,i,o),2);case 2:f=a.o,u.split("/").pop();for(var v=0;vr.length||"data"!=r[0])throw new me(2,1,1004,t);if(2>(r=r.slice(1).join(":").split(",")).length)throw new me(2,1,1004,t);var n=r[0];r=e.decodeURIComponent(r.slice(1).join(","));var i=null;if(1<(n=n.split(";")).length&&(i=n[1]),"base64"==i)t=ht.Ba(r).buffer;else{if(i)throw new me(2,1,1005,t);t=ut(r)}return{data:t,contentType:n[0]}},De("data",Hi),G("shaka.hls.HlsParser",Yi),(n=Yi.prototype).configure=function(e){this.a=e},n.start=function(e,t){var r=this;return p((function n(){var i,o;return M(n,(function(n){switch(n.j){case 1:return r.f=t,S(n,uo(r,Me([e],r.a.retryParameters),0),2);case 2:return i=n.o,r.u=i.uri,S(n,function(e,t){return p((function r(){var n,i,o,a,s,l,u,c,d,h,m;return M(r,(function(r){switch(r.j){case 1:if(0!=(n=Ui(e.s,t,e.u)).type)throw new me(2,4,4022);return S(r,function(e,t){return p((function r(){var n,i,o,a,s,l,u,c,d,h,m,g;return M(r,(function(r){switch(r.j){case 1:return n=Pi,i=Gt,o=t.a,a=n.nb(t.a,"EXT-X-MEDIA"),s=a.filter(function(e){return"SUBTITLES"==no(e,"TYPE")}.bind(e)),l=s.map(function(e){var t=this;return p((function r(){var n;return M(r,(function(r){switch(r.j){case 1:return t.a.disableText?r.return(null):(k(r,2),S(r,function(e,t){return p((function r(){var n;return M(r,(function(r){switch(r.j){case 1:return no(t,"TYPE"),S(r,qi(e,t,[]),2);case 2:return n=r.o,r.return(n.stream)}}))}))}(t,e),4));case 4:return r.return(r.o);case 2:if(n=R(r),t.a.hls.ignoreTextStreamFailures)return r.return(null);throw n}}))}))}.bind(e)),u=a.filter((function(e){return"CLOSED-CAPTIONS"==no(e,"TYPE")})),function(e,t){for(var r=f(t),n=r.next();!n.done;n=r.next()){no(n=n.value,"TYPE");var i=Li(n,"LANGUAGE")||"und";i=Pr(i);var o=no(n,"GROUP-ID");n=no(n,"INSTREAM-ID"),e.l.get(o)||e.l.set(o,new Map),e.l.get(o).set(n,i)}}(e,u),S(r,Promise.all(l),2);case 2:return c=r.o,d=n.nb(o,"EXT-X-STREAM-INF"),h=d.map(function(e){return function(e,t,r){return p((function n(){var i,o,a,s,l,u,c,d,h,m,g,y,v,b,_,A,E,T,w,k,x,C,R,j,L,I,P;return M(n,(function(n){switch(n.j){case 1:return i=Yt,o=Pi,a=Li(t,"CODECS","avc1.42E01E,mp4a.40.2"),s=function(e){for(var t=new Set,r=[],n=(e=f(e)).next();!n.done;n=e.next()){var i=Xe(n=n.value)[0];t.has(i)||(r.push(n),t.add(i))}return r}(a.split(/\s*,\s*/)),l=t.getAttribute("RESOLUTION"),c=u=null,d=Li(t,"FRAME-RATE"),h=Number(no(t,"BANDWIDTH")),l&&(m=l.value.split("x"),u=m[0],c=m[1]),g=(g=(g=o.nb(r.a,"EXT-X-MEDIA")).filter((function(e){return"CLOSED-CAPTIONS"!=no(e,"TYPE")}))).filter((function(e){var t=Li(e,"URI")||"";return"SUBTITLES"==(Li(e,"TYPE")||"")||""!=t})),y=Li(t,"AUDIO"),v=Li(t,"VIDEO"),y?g=o.Pc(g,"AUDIO",y):v&&(g=o.Pc(g,"VIDEO",v)),(b=ro(i.ra,s))&&((_=Li(t,"SUBTITLES"))&&(A=o.Pc(g,"SUBTITLES",_)).length&&(E=e.D.get(A[0].id))&&(E.stream.codecs=b),Re(s,b)),T=g.map(function(e){return qi(this,e,s)}.bind(e)),w=[],k=[],S(n,Promise.all(T),2);case 2:if(C=(C=n.o).filter((function(e){return null!=e})),y?w=C:v&&(k=C),j=!1,w.length||k.length?w.length?(I=no(t,"URI"),P=w[0].Bc,I==P?(R=i.Eb,j=!0):R=i.Pa):R=i.Eb:1==s.length?(L=ro(i.Pa,s),R=l||d||L?i.Pa:i.Eb):(R=i.Pa,s=[s.join(",")]),j){n.A(3);break}return S(n,function(e,t,r,n){return p((function i(){var o,a,s,l,u;return M(i,(function(i){switch(i.j){case 1:return o=Yt,a=no(t,"URI"),e.b.has(a)?i.return(e.b.get(a)):(s=Li(t,"CLOSED-CAPTIONS"),l=null,n==o.Pa&&s&&"NONE"!=s&&(l=e.l.get(s)),S(i,Xi(e,a,r,n,"und",!1,null,null,l),2));case 2:return null==(u=i.o)?i.return(null):e.b.has(a)?i.return(e.b.get(a)):(e.b.set(a,u),i.return(u))}}))}))}(e,t,s,R),4);case 4:x=n.o;case 3:if(x)x.stream.type==i.Eb?w=[x]:k=[x];else if(null===x)return n.return([]);return k&&$i(k),w&&$i(w),n.return(function(e,t,r,n,i,o,a){r.forEach(function(e){(e=e.stream)&&(e.width=Number(i)||void 0,e.height=Number(o)||void 0,e.frameRate=Number(a)||void 0)}.bind(e));var s=!!e.a&&e.a.disableAudio;t.length&&!s||(t=[null]),s=!!e.a&&e.a.disableVideo,(!r.length||s)&&(r=[null]),s=[];for(var l=(t=f(t)).next();!l.done;l=t.next()){l=l.value;for(var u=f(r),c=u.next();!c.done;c=u.next()){var d=c.value;c=l?l.stream:null;var h=d?d.stream:null,p=l?l.drmInfos:null,m=d?d.drmInfos:null;d=(d?d.Bc:"")+" - "+(l?l.Bc:"");var g=void 0;if(c&&h){if(p.length&&m.length&&!(0(h=y.value).dd&&(h.stream.presentationTimeOffset=-d,h.Vb.offset(d))}else for(e.c.xa(s),e.c.offset(-o),y=(g=f(e.b.values())).next();!y.done;y=g.next())(m=y.value).stream.presentationTimeOffset=o,m.Vb.offset(-o),ti(m.Vb,s);e.m={presentationTimeline:e.c,periods:[i],offlineSessionIds:[],minBufferTime:0},w(r)}}))}))}(r,i.data),3);case 3:return 0<(o=r.O)&&r.h.R(o),n.return(r.m)}}))}))},n.stop=function(){this.h&&(this.h.stop(),this.h=null);var e=[];return this.i&&(e.push(this.i.destroy()),this.i=null),this.a=this.f=null,this.D.clear(),this.S.clear(),this.b.clear(),this.m=null,Promise.all(e)},n.update=function(){if(this.g!=ho.Qa){for(var e=[],t=f(this.b.values()),r=t.next();!r.done;r=t.next())e.push(zi(this,r.value));return Promise.all(e)}},n.onExpirationUpdated=function(){};var oo={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},ao=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],so={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};function lo(e,t){e.g=t,e.c&&e.c.Xb(e.g==ho.Qa),e.g!=ho.Qa||e.h.stop()}function uo(e,t,r){if(!e.i)throw new me(2,7,7001);return t=e.f.networkingEngine.request(r,t),Ie(e.i,t),t.promise}var co={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=no(e,"METHOD");return Kr("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227"),["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].includes(t)?(t=no(e,"URI"),t=Hi.parse(t),t=Ht("com.widevine.alpha",[{initDataType:"cenc",initData:t=new Uint8Array(t.data)}]),(e=Li(e,"KEYID"))&&(t.keyIds=[e.substr(2).toLowerCase()]),t):null}},fo="VOD",ho={Qa:fo,xe:"EVENT",Fd:"LIVE"};function po(){this.a=new Map}function mo(e,t,r){go(e,t).text=r}function go(e,t){return e.a.has(t)||e.a.set(t,new yo),e.a.get(t)}function yo(){this.text=this.variant=null}function vo(e,t){this.a=e,this.b=new Set([e]);for(var r=f(t=t||[]),n=r.next();!n.done;n=r.next())this.add(n.value)}function bo(e,t){var r;if(!(r=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(r=e.audio&&t.audio)){r=e.audio;var n=t.audio;r=!(r.channelsCount==n.channelsCount&&_o(r,n)&&Ao(r.roles,n.roles))}return!r&&(r=e.video&&t.video)&&(r=!(_o(r=e.video,n=t.video)&&Ao(r.roles,n.roles))),!r}function _o(e,t){if(e.mimeType!=t.mimeType)return!1;var r=e.codecs.split(",").map((function(e){return Xe(e)[0]})),n=t.codecs.split(",").map((function(e){return Xe(e)[0]}));if(r.length!=n.length)return!1;r.sort(),n.sort();for(var i=0;ii-.5)){t=!0;break e}}t=!1}return t}function Lo(e,t,r,n,i){var o=this;this.a=e,this.u=t,this.s=r,this.l=i,this.f=new Be,this.i=!1,this.m=e.readyState,this.c=!1,this.b=n,this.h=!1,this.f.w(e,"waiting",(function(){return Io(o)})),this.g=new fe((function(){Io(o)})).Na(.25)}function Io(e){if(0!=e.a.readyState){if(e.a.seeking){if(!e.i)return}else e.i=!1;if(!e.a.paused){e.a.readyState!=e.m&&(e.c=!1,e.m=e.a.readyState);var t=e.s.smallGapLimit,r=e.a.currentTime,n=e.a.buffered;e:{if(n&&n.length&&!(1==n.length&&1e-6>n.end(0)-n.start(0)))for(var i=rt("Edge/")||rt("Trident/")||rt("Tizen")||rt("CrKey")?.5:.1,o=0;or&&(0==o||n.end(o-1)-r<=i)){i=o;break e}i=null}if(null==i)e.b&&(r=jo(n=(e=e.b).g),i=n.a.currentTime,o=Date.now()/1e3,e.a==i&&e.h==r||(e.f=o,e.a=i,e.h=r,e.b=!1),(i=o-e.f)>=e.i&&r&&!e.b&&(e.c(e.a,i),e.b=!0,e.a=n.a.currentTime));else if(0!=i||e.h){o=n.start(i);var a=e.u.Ca();if(!(o>=a)){t=(a=o-r)<=t;var s=!1;.001>a||(t||e.c||(e.c=!0,(r=new Se("largegap",{currentTime:r,gapSize:a})).cancelable=!0,e.l(r),e.s.jumpLargeGaps&&!r.defaultPrevented&&(s=!0)),!t&&!s)||(0!=i&&n.end(i-1),e.a.currentTime=o)}}}}}function Po(e){var t=this;this.c=e,this.a=new Set,this.b=new fe((function(){Oo(t,!1)})).Na(.25)}function Oo(e,t){for(var r=f(e.a),n=r.next();!n.done;n=r.next())n.value.g(e.c.currentTime,t)}function Do(e){for(var t=[],r=(e=f(e)).next();!r.done;r=e.next())for(var n=(r=f(r.value.variants)).next();!n.done;n=r.next())t.push(n.value);return t}function Mo(e,t){for(var r=null,n=f(e),i=n.next();!i.done;i=n.next())t>=(i=i.value).startTime&&(r=i);return r}function No(e){this.c=e,this.a=null,this.b=function(){}}function Fo(e){var t=this;this.a=e,this.f=!1,this.c=this.a.jc(),this.b=new fe((function(){t.a.Yd(.25*t.c)}))}function Uo(e){e.b.stop();var t=e.f?0:e.c;if(0<=t)try{return void(e.a.jc()!=t&&e.a.wd(t))}catch(e){}e.b.Na(.25),0!=e.a.jc()&&e.a.wd(0)}function Bo(e,t,r){this.a=e,this.f=t,this.g=r,this.h=!1,this.b=new Be,this.c=new Yo(e),0Math.abs(e.a.currentTime-t)?Ho(e):(e.b.da(e.a,"seeking",(function(){Ho(e)})),zo(e.c,0==e.a.currentTime?t:e.a.currentTime))}function Ho(e){e.h=!0,e.b.w(e.a,"seeking",(function(){return e.f()}))}function Yo(e){var t=this;this.b=e,this.h=10,this.g=this.f=this.c=0,this.a=new fe((function(){0>=t.c||t.b.currentTime!=t.f?t.a.stop():(t.b.currentTime=t.g,t.c--)}))}function zo(e,t){e.f=e.b.currentTime,e.g=t,e.c=e.h,e.b.currentTime=t,e.a.Na(.1)}function $o(e){function t(){null==r.c?r.f=!0:(r.b.da(r.a,"seeking",(function(){r.f=!0})),r.a.currentTime=Math.max(0,r.a.currentTime+r.c))}var r=this;this.a=e,this.f=!1,this.c=null,this.b=new Be,0==this.a.readyState?this.b.da(this.a,"loadeddata",t):t()}function Wo(e,t,r,n,i,o){var a=this;this.b=e,this.a=t.presentationTimeline,this.B=t.minBufferTime||0,this.g=r,this.u=i,this.l=null,this.f=new Lo(e,t.presentationTimeline,r,function(e,t){if(!t.stallEnabled)return null;var r=t.stallSkip,n=new Co(new Ro(e),t.stallThreshold);return function(e,t){e.c=t}(n,(function(){e.currentTime+=r})),n}(e,r),o),this.c=new Bo(e,(function(){var e=a.f;e.i=!0,e.h=!1,e.c=!1;var t=Ko(a.c);return e=Xo(a,t),.001e.a.Y()?e.a.ob():e.a.Ca():0>t&&(t=e.a.Ca()+t),qo(e,Jo(e,t))}(this,n)),this.i=new fe((function(){if(0!=a.b.readyState&&!a.b.paused){var e=a.b.currentTime,t=a.a.ob(),r=a.a.Ca();3>r-t&&(t=r-3),e=r?r-e.g.durationBackoff:t}function Xo(e,t){var r=Ut.bind(null,e.b.buffered),n=Math.max(e.B,e.g.rebufferingGoal),i=e.g.safeSeekOffset,o=e.a.ob(),a=e.a.Ca(),s=e.a.Y();3>a-o&&(o=a-3);var l=e.a.Nb(n),u=e.a.Nb(i);return n=e.a.Nb(n+i),t>=s?qo(e,t):t>a?a:t=l||r(t)?t:n}function Jo(e,t){var r=e.a.ob();return t(r=e.a.Ca())?r:t}function Zo(){this.b=function(){},this.a=new Set}function Qo(e){var t=this;this.h=e,this.f=new Map,this.a=function(){},this.b=function(){},this.c=function(){},this.i=[{eb:null,cb:ta,Wa:function(e,r){return t.a(e,r)}},{eb:ea,cb:ta,Wa:function(e,r){return t.a(e,r)}},{eb:ra,cb:ta,Wa:function(e,r){return t.a(e,r)}},{eb:ta,cb:ea,Wa:function(e,r){return t.b(e,r)}},{eb:ta,cb:ra,Wa:function(e,r){return t.b(e,r)}},{eb:ea,cb:ra,Wa:function(e,r){return t.c(e,r)}},{eb:ra,cb:ea,Wa:function(e,r){return t.c(e,r)}}]}Co.prototype.release=function(){this.g=null,this.c=function(){}},Lo.prototype.release=function(){this.f&&(this.f.release(),this.f=null),null!=this.g&&(this.g.stop(),this.g=null),this.b&&(this.b.release(),this.b=null),this.a=this.u=this.l=null},Lo.prototype.jd=function(){this.h=!0,Io(this)},Po.prototype.release=function(){this.b.stop();for(var e=f(this.a),t=e.next();!t.done;t=e.next())t.value.release();this.a.clear()},No.prototype.release=function(){this.a=this.c=null,this.b=function(){}},No.prototype.g=function(e){var t=this.a,r=this.c.periods;t!=(e=Mo(r,e)||r[0])&&this.b(e),this.a=e},Fo.prototype.release=function(){this.b&&(this.b.stop(),this.b=null),this.a=null},Fo.prototype.set=function(e){this.c=e,Uo(this)},Bo.prototype.release=function(){this.b&&(this.b.release(),this.b=null),null!=this.c&&(this.c.release(),this.c=null),this.f=function(){},this.a=null},Yo.prototype.release=function(){this.a&&(this.a.stop(),this.a=null),this.b=null},$o.prototype.release=function(){this.b&&(this.b.release(),this.b=null),this.a=null},$o.prototype.m=function(e){this.c=this.f?this.c:e},$o.prototype.h=function(){return(this.f?this.a.currentTime:this.c)||0},$o.prototype.s=function(){},Wo.prototype.release=function(){this.c&&(this.c.release(),this.c=null),this.f&&(this.f.release(),this.f=null),this.i&&(this.i.stop(),this.i=null),this.b=this.c=this.a=this.g=null,this.u=function(){}},Wo.prototype.m=function(e){var t=this.c;0n.endTime?ra:ta;this.f.set(n,o);for(var a=f(this.i),s=a.next();!s.done;s=a.next())(s=s.value).eb==i&&s.cb==o&&s.Wa(n,t)}};var ea=1,ta=2,ra=3;function na(e,t){this.a=t,this.c=e,this.g=null,this.l=1,this.u=Promise.resolve(),this.h=[],this.i=new Map,this.b=new Map,this.s=!1,this.F=null,this.D=this.f=this.m=!1,this.B=0}function ia(e){return aa(e,"audio")}function oa(e){return aa(e,"video")}function aa(e,t){var r=e.b.get(t);return r?r.Ka||r.stream:null}function sa(e,t){return p((function r(){var n,i,o,a,s,l,u,c,d;return M(r,(function(r){switch(r.j){case 1:return n=Yt,S(r,xr(e.a.L,n.ra),2);case 2:return e.B++,e.D=!1,i=e.B,o=e.a.L,a=new Map,s=new Set,a.set(n.ra,t),s.add(t),S(r,o.init(a,!1),3);case 3:return e.f?r.return():S(r,ma(e,s),4);case 4:if(e.f)return r.return();l=e.a.L.g.isTextVisible()||e.g.alwaysStreamText,e.B!=i||e.b.has(n.ra)||e.D||!l||(u=e.a.Ua(),c=Ea(e,u),d=ha(t,c,0),e.b.set(n.ra,d),ka(e,d,0)),w(r)}}))}))}function la(e,t){var r=e.b.get("video");if(r){var n=r.stream;if(n)if(t){var i=n.trickModeVideo;i&&!r.Ka&&(ca(e,i,!1,0,!1),r.Ka=n)}else(n=r.Ka)&&(r.Ka=null,ca(e,n,!0,0,!1))}}function ua(e,t,r,n){var i=!1;if(t.video){var o=ca(e,t.video,r,n,!1);i=i||o}return t.audio&&(e=ca(e,t.audio,r,n,!1),i=i||e),i}function ca(e,t,r,n,i){var o=e.b.get(t.type);if(!o&&"text"==t.type&&e.g.ignoreTextStreamFailures)return sa(e,t),!0;if(!o)return!1;var a=Ta(e,t),s=Array.from(e.b.values()).every((function(e){return e.ia==o.ia}));return r&&a!=o.ia&&s?(e.b.forEach((function(t){da(e,t)})),!0):(o.Ka&&(t.trickModeVideo?(o.Ka=t,t=t.trickModeVideo):o.Ka=null),!(!(s=e.h[a])||!s.Db||!(s=e.i.get(t.id))||!s.Db||o.stream==t&&!i||("text"==t.type&&_r(e.a.L,qe(t.mimeType,t.codecs)),o.stream=t,o.nc=!0,function(e,t,r){if(!t.Rb)return!1;var n=e.a.Ua(),i=Tr(e.a.L,t.type),o=va(e,t,n,i,r);return r=o&&o.a?o.a-o.b:null,o&&!r&&(r=(o.endTime-o.kc())*t.stream.bandwidth/8),!isNaN(r)&&((o=t.stream.initSegmentReference)&&(r+=(o.a?o.a-o.b:null)||0),o=e.a.getBandwidthEstimate(),8*r/or)}(e,o,a)&&o.Rb.abort(),r&&(o.Ra?o.Cc=!0:o.Ja?(o.Oa=!0,o.dc=n,o.Cc=!0):(xa(o),wa(e,o,!0,n).catch((function(t){e.a&&e.a.onError(t)})))),0)))}function da(e,t){t.Ra||t.Oa||(t.Ja?(t.Oa=!0,t.dc=0):null==Er(e.a.L,t.type)?null==t.Ga&&ka(e,t,0):(xa(t),wa(e,t,!1,0).catch((function(t){e.a&&e.a.onError(t)}))))}function fa(e,t,r,n,i){return p((function o(){var a,s,l,u,c,d,f;return M(o,(function(o){switch(o.j){case 1:return a=e.a.Ua(),s=Ea(e,a),l=Yt,u=new Map,c=new Set,t&&(u.set(l.Eb,t),c.add(t)),r&&(u.set(l.Pa,r),c.add(r)),n&&(u.set(l.ra,n),c.add(n)),d=e.a.L,f=e.g.forceTransmuxTS,S(o,d.init(u,f),2);case 2:return e.f?o.return():(function(e){var t=e.c.presentationTimeline.Y();1/0>t?e.a.L.xa(t):e.a.L.xa(Math.pow(2,32))}(e),S(o,ma(e,c),3));case 3:if(e.f)return o.return();u.forEach((function(t,r){if(!e.b.has(r)){var n=ha(t,s,i);e.b.set(r,n),ka(e,n,0)}})),w(o)}}))}))}function ha(e,t,r){return{stream:e,type:e.type,sb:null,Da:null,Ka:null,nc:!0,ia:t,endOfStream:!1,Ja:!1,Ga:null,Oa:!1,dc:0,Cc:!1,Ra:!1,od:!1,Pb:!1,rd:r||0,Rb:null}}function pa(e,t){var r=e.h[t];if(r)return r.promise;r={promise:new ge,Db:!1},e.h[t]=r;for(var n=new Set,i=f(e.c.periods[t].variants),o=i.next();!o.done;o=i.next())(o=o.value).video&&n.add(o.video),o.video&&o.video.trickModeVideo&&n.add(o.video.trickModeVideo),o.audio&&n.add(o.audio);for(o=(i=f(e.c.periods[t].textStreams)).next();!o.done;o=i.next())n.add(o.value);return e.u=e.u.then(function(){if(!this.f)return ma(this,n)}.bind(e)).then(function(){this.f||(this.h[t].promise.resolve(),this.h[t].Db=!0)}.bind(e)).catch(function(e){this.f||(this.h[t].promise.catch((function(){})),this.h[t].promise.reject(),delete this.h[t],this.a.onError(e))}.bind(e)),r.promise}function ma(e,t){return p((function r(){var n,i,o,a,s,l,u;return M(r,(function(r){switch(r.j){case 1:n=[];for(var c=f(t),d=c.next();!d.done;d=c.next())i=d.value,(o=e.i.get(i.id))?n.push(o.promise):(e.i.set(i.id,{promise:new ge,Db:!1}),n.push(i.createSegmentIndex()));return k(r,2),S(r,Promise.all(n),4);case 4:if(e.f)return r.return();C(r,3);break;case 2:if(a=R(r),e.f)return r.return();for(d=(r=f(t)).next();!d.done;d=r.next())s=d.value,e.i.get(s.id).promise.catch((function(){})),e.i.get(s.id).promise.reject(),e.i.delete(s.id);throw a;case 3:for(d=(c=f(t)).next();!d.done;d=c.next())l=d.value,(u=e.i.get(l.id)).Db||(u.promise.resolve(),u.Db=!0);w(r)}}))}))}function ga(e,t){if(!e.f&&!t.Ja&&null!=t.Ga&&!t.Ra)if(t.Ga=null,t.Oa)wa(e,t,t.Cc,t.dc);else{try{var r=function(e,t){if(_a(t))return kr(e.a.L,t.stream.originalId||""),null;var r=e.a.Ua(),n=ya(e,t,r),i=Ta(e,t.stream),o=Ea(e,n),a=function(e,t,r){return"text"==t?null==(e=e.a).b||e.b=e.c.presentationTimeline.Y())return t.endOfStream=!0,"video"==t.type&&(n=e.b.get("text"))&&"application/cea-608"==n.stream.mimeType&&(n.endOfStream=!0),null;if(t.endOfStream=!1,t.ia=o,o!=i)return null;if(a>=s)return.5;if(o=Tr(e.a.L,t.type),!(o=va(e,t,r,o,i)))return 1;var l=1/0;return Array.from(e.b.values()).forEach((function(t){_a(t)||(t=ya(e,t,r),l=Math.min(l,t))})),n>=l+e.c.presentationTimeline.a?1:(t.rd=0,function(e,t,r,n,i){var o=e.c.periods[n],a=t.stream,s=e.c.presentationTimeline.Y(),l=e.c.periods[n+1];n=function(e,t,r,n,i){return t.nc?(r=function(e,t,r,n,i){return"text"==t?(e.a.m=r,(e=e.a).f=n,e.h=i,Promise.resolve()):Promise.all([Cr(e,t,e.Be.bind(e,t)),Cr(e,t,e.kg.bind(e,t,r)),Cr(e,t,e.hg.bind(e,t,n,i))])}(e.a.L,t.type,e.c.periods[r].startTime-t.stream.presentationTimeOffset,n,i),t.stream.initSegmentReference?(e=Sa(e,t,t.stream.initSegmentReference).then(function(e){if(!this.f)return wr(this.a.L,t.type,e,null,null,t.stream.closedCaptions&&0=(r=r-i-n)?Promise.resolve():e.a.L.remove(t.type,i,i+r).then(function(){}.bind(e))}(e,t,r).then(function(){if(!this.f)return wr(this.a.L,t.type,a,o.startTime+n.startTime,o.endTime+n.startTime,s)}.bind(e)).then(function(){if(!this.f)return t.sb=i,t.Da=o,Promise.resolve()}.bind(e))}(this,t,r,o,a,i,e[1])}.bind(e)).then(function(){this.f||this.m||(t.Ja=!1,t.od=!1,t.Oa||this.a.jd(),ka(this,t,0),function(e,t){if(!e.s){var r=Array.from(e.b.values());if(1==r.length&&"text"==r[0].type||(e.s=r.every((function(e){return"text"==e.type||!e.Oa&&!e.Ra&&e.Da}))),e.s){for(r=Ta(e,t),e.h[r]||pa(e,r).then(function(){this.f||this.a.$d()}.bind(e)).catch(Gt.oc),r=0;rn?null:t):null}function _a(e){return e&&"text"==e.type&&"application/cea-608"==e.stream.mimeType}function Aa(e){return!e.Ja&&null==e.Ga&&!e.Oa&&!e.Ra}function Ea(e,t){var r=Mo(e.c.periods,t+1/15);return r?e.c.periods.indexOf(r):0}function Ta(e,t){for(var r=e.c.periods,n=0;n=r&&202!=r)return{uri:i||n,ld:n,data:t,headers:e,fromCache:!!e["x-shaka-from-cache"]};i=null;try{i=lt(t)}catch(e){}throw new me(401==r||403==r?2:1,1,1001,n,r,i,e,o)}function ja(e,t,r,n){var i=new ja.b;$e(t.headers).forEach((function(e,t){i.append(t,e)}));var o=new ja.a,a={Id:!1,te:!1};if(e=new ye(e=ja.l(e,r,{body:t.body||void 0,headers:i,method:t.method,signal:o.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},a,n),(function(){return a.Id=!0,o.abort(),Promise.resolve()})),t=t.retryParameters.timeout){var s=new fe((function(){a.te=!0,o.abort()}));s.R(t/1e3),e.finally((function(){s.stop()}))}return e}function La(e,t,r,n){var i=new La.f,o=Date.now(),a=0;return new ye(new Promise((function(s,l){for(var u in i.open(t.method,e,!0),i.responseType="arraybuffer",i.timeout=t.retryParameters.timeout,i.withCredentials=t.allowCrossSiteCredentials,i.onabort=function(){l(new me(1,1,7001,e,r))},i.onload=function(t){for(var n=(t=t.target).getAllResponseHeaders().trim().split("\r\n"),i={},o=(n=f(n)).next();!o.done;o=n.next())i[(o=o.value.split(": "))[0].toLowerCase()]=o.slice(1).join(": ");try{var a=Ra(i,t.response,t.status,e,t.responseURL,r);s(a)}catch(e){l(e)}},i.onerror=function(t){l(new me(1,1,1002,e,t,r))},i.ontimeout=function(){l(new me(1,1,1003,e,r))},i.onprogress=function(e){var t=Date.now();(100=e.endTime)return null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,t.positionAlign=e.positionAlign,t.size=e.size;try{t.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),"vertical-lr"==e.writingMode?t.vertical="lr":"vertical-rl"==e.writingMode&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}function ys(e,t){var r=e.mode;e.mode="showing"==r?"showing":"hidden";for(var n=e.cues,i=n.length-1;0<=i;i--){var o=n[i];o&&t(o)&&e.removeCue(o)}e.mode=r}function vs(e,t,r,n,i){var o,a=i in n,s=!0;for(o in t){var l=i+"."+o,u=a?n[i]:r[o];a||o in r?void 0===t[o]?void 0===u||a?delete e[o]:e[o]=xe(u):u.constructor==Object&&t[o]&&t[o].constructor==Object?(e[o]||(e[o]=xe(u)),l=vs(e[o],t[o],u,n,l),s=s&&l):typeof t[o]!=typeof u||null==t[o]||"function"!=typeof t[o]&&t[o].constructor!=u.constructor?(W("Invalid config, wrong type for "+l),s=!1):("function"==typeof r[o]&&r[o].length!=t[o].length&&q("Unexpected number of arguments for "+l),e[o]=t[o]):(W("Invalid config, unrecognized key "+l),s=!1)}return s}function bs(e,t){for(var r={},n=r,i=0,o=0;!(0>(i=e.indexOf(".",i)));)0!=i&&"\\"==e[i-1]||(n[o=e.substring(o,i).replace(/\\\./g,".")]={},n=n[o],o=i+1),i+=1;return n[e.substring(o).replace(/\\\./g,".")]=t,r}function _s(){}function As(){var e=5e5,t=1/0;navigator.connection&&(e=1e6*navigator.connection.downlink,navigator.connection.saveData&&(t=360));var r={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:kt,fairPlayTransform:!0},n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,dash:{customScheme:function(e){if(e)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1},hls:{ignoreTextStreamFailures:!1}},i={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},failureCallback:function(e){return[e]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0};rt("Web0S")&&(i.stallEnabled=!1);var o={trackSelectionCallback:function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return t.return(e)}}))}))},progressCallback:function(e,t){return[e,t]},usePersistentLicense:!0},a={drm:r,manifest:n,streaming:i,offline:o,abrFactory:Fr,abr:{enabled:!0,defaultBandwidthEstimate:e,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:t,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null}};return o.trackSelectionCallback=function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return t.return(function(e,t){var r=e.filter((function(e){return"variant"==e.type})),n=[],i=Dr(t,r.map((function(e){return e.language})));i&&(n=r.filter((function(e){return Pr(e.language)==i}))),0==n.length&&(n=r.filter((function(e){return e.primary}))),0==n.length&&(r.map((function(e){return e.language})),n=r);var o=n.filter((function(e){return e.height&&480>=e.height}));if(o.length&&(o.sort((function(e,t){return t.height-e.height})),n=o.filter((function(e){return e.height==o[0].height}))),r=[],n.length){var a=Math.floor(n.length/2);n.sort((function(e,t){return e.bandwidth-t.bandwidth})),r.push(n[a])}for(n=f(e),a=n.next();!a.done;a=n.next())"text"==(a=a.value).type&&r.push(a);return r}(e,a.preferredAudioLanguage))}}))}))},a}function Es(e,t,r){var n={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return vs(e,t,r||As(),n,"")}function Ts(){this.a=null,this.b=[]}function Ss(e,t){if(null==e.a)e.a={timestamp:Date.now()/1e3,state:t,duration:0};else{var r=Date.now()/1e3;e.a.duration=r-e.a.timestamp,e.a.state!=t&&(e.b.push(e.a),e.a={timestamp:r,state:t,duration:0})}}function ws(e,t){var r=0;e.a&&e.a.state==t&&(r+=e.a.duration);for(var n=f(e.b),i=n.next();!i.done;i=n.next())r+=(i=i.value).state==t?i.duration:0;return r}function ks(){this.b=this.c=null,this.a=[]}function xs(){this.f=this.s=this.h=this.b=this.i=this.l=this.m=this.g=this.u=NaN,this.a=new Ts,this.c=new ks}function Cs(t,r){var n=this;ke.call(this),this.i=pl,this.a=null,this.gb=!1,this.g=new Be,this.Dc=this.l=this.Fb=this.b=this.s=this.f=this.Yb=this.B=this.Zb=this.W=this.ib=this.m=this.D=this.h=this.K=null,this.Xd=1e9,this.ac=new Set,this.kb=!0,this.pa=null,this.Ud=!1,this.Rd=0,this.oa=null,this.$=new po,this.c=Fs(this),this.bc={width:1/0,height:1/0},this.u=null,this.Gb=new To(this.c.preferredAudioLanguage,this.c.preferredVariantRole,this.c.preferredAudioChannelCount),this.na=this.c.preferredTextLanguage,this.fb=this.c.preferredTextRole,r&&r(this),this.K=function(e){return new Pe((function(t,r){e.l&&e.l.segmentDownloaded(t,r)}))}(this),this.g.w(e,"online",(function(){n.sd()})),this.F={name:"detach"},this.O={name:"attach"},this.Ha={name:"unload"},this.Mc={name:"manifest-parser"},this.Kc={name:"manifest"},this.hb={name:"media-source"},this.Ec={name:"drm-engine"},this.S={name:"load"},this.Rc={name:"src-equals-drm-engine"},this.jb={name:"src-equals"};var i=new Map;i.set(this.O,(function(e,t){return Ae(function(e,t,r){return null==t.v&&(t.v=r.v,e.g.w(t.v,"error",(function(){var t=el(e);t&&e.Ma(t)}))),e.a=t.v,Promise.resolve()}(n,e,t))})),i.set(this.F,(function(e){return e.v&&(n.g.ea(e.v,"error"),e.v=null),n.a=null,Ae(e=Promise.resolve())})),i.set(this.Ha,(function(e){return Ae(Is(n,e))})),i.set(this.hb,(function(t){return Ae(t=function(t,r){return p((function n(){var i,o,a,s;return M(n,(function(n){switch(n.j){case 1:return i=e.muxjs?new Mt:new Nt,o=t.c.textDisplayFactory,a=new o,t.Fc=o,S(n,(s=new yr(r.v,i,a)).s,2);case 2:t.D=s,w(n)}}))}))}(n,t))})),i.set(this.Mc,(function(e,t){return Ae(function(e,t,r){return p((function n(){var i,o,a,s;return M(n,(function(n){switch(n.j){case 1:if(t.Aa=r.Aa,t.mimeType=r.mimeType,t.uri=r.uri,i=t.uri,o=e.K,e.Fb=i,t.Aa){e.s=t.Aa(),n.A(2);break}return a=e,S(n,gi.create(i,o,e.c.manifest.retryParameters,t.mimeType),3);case 3:a.s=n.o;case 2:s=xe(e.c.manifest),r.v&&"AUDIO"===r.v.nodeName&&(s.disableVideo=!0),e.s.configure(s),w(n)}}))}))}(n,e,t))})),i.set(this.Kc,(function(e){return function(e,t){var r=t.uri,n=e.K;e.Yb=new Zo,function(e,t){e.b=t}(e.Yb,(function(t){Qs(e,"timelineregionadded",t)}));var i={networkingEngine:n,filterNewPeriod:function(t){return e.Nc(t)},filterAllPeriods:function(t){return Us(e,t)},onTimelineRegionAdded:function(t){var r=e.Yb;e:{for(var n=f(r.a),i=n.next();!i.done;i=n.next())if((i=i.value).schemeIdUri==t.schemeIdUri&&i.id==t.id&&i.startTime==t.startTime&&i.endTime==t.endTime){n=i;break e}n=null}null==n&&(r.a.add(t),r.b(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return e.Ma(t)}};return new ye(Promise.resolve().then((function(){return p((function t(){var n;return M(t,(function(t){switch(t.j){case 1:return n=e,S(t,e.s.start(r,i),2);case 2:if(n.b=t.o,e.dispatchEvent(new Se("manifestparsed")),0==e.b.periods.length)throw new me(2,4,4014);!function(e){function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}e.some((function(e){return e.variants.some(t)}))&&e.forEach((function(e){e.variants=e.variants.filter(t)}))}(e.b.periods),w(t)}}))}))})),(function(){return e.s.stop()}))}(n,e)})),i.set(this.Ec,(function(){return Ae(function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return e.h=new pt({ub:e.K,onError:function(t){e.Ma(t)},qc:function(t){tl(e,t)},onExpirationUpdated:function(t,r){rl(e,t,r)},onEvent:function(t){e.dispatchEvent(t)}}),e.h.configure(e.c.drm),S(t,mt(e.h,Do(e.b.periods),e.b.offlineSessionIds),2);case 2:Us(e,e.b.periods),w(t)}}))}))}(n))})),i.set(this.S,(function(e,t){return Ae(function(e,t,r){return p((function n(){var i,o,a,s,l,u,c,d,h;return M(n,(function(n){switch(n.j){case 1:return t.startTime=r.startTime,i=t.v,o=t.uri,e.Fb=o,e.u=new xs,a=function(){return Vs(e)},s=function(){var t=e.a.playbackRate;0!=t&&e.W.set(t)},e.g.w(i,"playing",a),e.g.w(i,"pause",a),e.g.w(i,"ended",a),e.g.w(i,"ratechange",s),l=e.c.abrFactory,e.l&&e.Dc==l||(e.Dc=l,e.l=new l,e.l.configure(e.c.abr)),function(e,t){for(var r=0;r=t.a&&r=HTMLMediaElement.HAVE_CURRENT_DATA?o.resolve():e.a.error?o.reject(el(e)):(e.g.da(e.a,"loadeddata",(function(){o.resolve()})),e.g.da(e.a,"error",(function(){o.reject(el(e))}))),new ye(o,(function(){return o.reject(new me(2,7,7001)),Promise.resolve()}))}(n,e,t)})),this.lb=new fs(this.F,{cf:function(e,t,r,i){var o=null;return e==n.F&&(o=r==n.F?n.F:n.O),e==n.O&&(o=r==n.F||t.v!=i.v?n.F:r==n.O?n.O:r==n.hb||r==n.S?n.hb:r==n.jb?n.Rc:null),e==n.hb&&(o=r==n.S&&t.v==i.v?n.Mc:n.Ha),e==n.Mc&&(o=dl(n.S,n.Kc,n.Ha,r,t,i)),e==n.Kc&&(o=dl(n.S,n.Ec,n.Ha,r,t,i)),e==n.Ec&&(o=dl(n.S,n.S,n.Ha,r,t,i)),e==n.Rc&&(o=r==n.jb&&t.v==i.v?n.jb:n.Ha),e!=n.S&&e!=n.jb||(o=n.Ha),e==n.Ha&&(o=i.v&&t.v==i.v?n.O:n.F),o},Le:function(e,t,r){return n.dispatchEvent(new Se("onstatechange",{state:e.name})),i.get(e)(t,r)},handleError:function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return S(t,Is(n,e),2);case 2:return t.return(e.v?n.O:n.F)}}))}))},Bf:function(e){n.dispatchEvent(new Se("onstateidle",{state:e.name}))}}),t&&this.Hb(t,!0)}_(qa,Ba),qa.prototype.updateManifestExpiration=function(e,t){var r=Fa(this.b,this.a),n=r.store(),i=new ge;return n.get(e).onsuccess=function(r){(r=r.target.result)?(r.expiration=t,n.put(r),i.resolve()):i.reject(new me(2,9,9012,"Could not find values for "+e))},r.promise().then((function(){return i}))},qa.prototype.ec=function(e){return{originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,periods:e.periods.map(Xa),sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata}},qa.prototype.Jd=function(e){return{data:e.data}},_(es,Ba),es.prototype.hasFixedKeySpace=function(){return this.f},es.prototype.addSegments=function(e){return this.f?Ka(this.c):this.add(this.c,e)},es.prototype.addManifests=function(e){return this.f?Ka(this.a):this.add(this.a,e)},es.prototype.ec=function(e){return null==e.expiration&&(e.expiration=1/0),e},(n=ts.prototype).init=function(){var t=this,r=new ge,n=e.indexedDB.open("shaka_offline_db",4);return n.onsuccess=function(e){e=e.target.result,t.f=e;var n=e.objectStoreNames;n=n.contains("manifest")&&n.contains("segment")?new qa(e,"segment","manifest"):null,t.a=n,n=(n=e.objectStoreNames).contains("manifest-v2")&&n.contains("segment-v2")?new es(e,"segment-v2","manifest-v2",!0):null,t.b=n,n=(n=e.objectStoreNames).contains("manifest-v3")&&n.contains("segment-v3")?new es(e,"segment-v3","manifest-v3",!1):null,t.c=n,e=e.objectStoreNames.contains("session-ids")?new Ha(e):null,t.g=e,r.resolve()},n.onupgradeneeded=function(e){e=e.target.result;for(var t=f(["segment-v3","manifest-v3","session-ids"]),r=t.next();!r.done;r=t.next())r=r.value,e.objectStoreNames.contains(r)||e.createObjectStore(r,{autoIncrement:!0})},n.onerror=function(e){r.reject(new me(2,9,9001,n.error)),e.preventDefault()},r},n.destroy=function(){var e=this;return p((function t(){return M(t,(function(t){switch(t.j){case 1:if(!e.a){t.A(2);break}return S(t,e.a.destroy(),2);case 2:if(!e.b){t.A(4);break}return S(t,e.b.destroy(),4);case 4:if(!e.c){t.A(6);break}return S(t,e.c.destroy(),6);case 6:if(!e.g){t.A(8);break}return S(t,e.g.destroy(),8);case 8:e.f&&e.f.close(),w(t)}}))}))},n.getCells=function(){var e=new Map;return this.a&&e.set("v1",this.a),this.b&&e.set("v2",this.b),this.c&&e.set("v3",this.c),e},n.getEmeSessionCell=function(){return this.g},n.erase=function(){var t=this;return p((function r(){return M(r,(function(r){switch(r.j){case 1:if(!t.a){r.A(2);break}return S(r,t.a.destroy(),2);case 2:if(!t.b){r.A(4);break}return S(r,t.b.destroy(),4);case 4:if(!t.c){r.A(6);break}return S(r,t.c.destroy(),6);case 6:return t.f&&t.f.close(),S(r,function(){var t=new ge,r=e.indexedDB.deleteDatabase("shaka_offline_db");return r.onblocked=function(){},r.onsuccess=function(){t.resolve()},r.onerror=function(e){t.reject(new me(2,9,9001,r.error)),e.preventDefault()},t}(),8);case 8:return t.f=null,t.a=null,t.b=null,t.c=null,S(r,t.init(),0)}}))}))},$a("idb",(function(){return e.indexedDB?new ts:null})),rs.prototype.wa=function(){return this.g},rs.prototype.ba=function(){return this.f},rs.prototype.key=function(){return this.c},rs.prototype.toString=function(){return this.b},(n=ls.prototype).configure=function(){},n.start=function(e){var t=this;return p((function r(){var n,i,o,a,s;return M(r,(function(r){switch(r.j){case 1:return n=ns(e),t.a=n,null==n||"manifest"!=n.a?r.return(Promise.reject(new me(2,1,9004,n))):(i=new Ya,x(r,2),S(r,i.init(),4));case 4:return S(r,za(i,n.wa(),n.ba()),5);case 5:return S(r,r.o.getManifests([n.key()]),6);case 6:return o=r.o,a=o[0],s=new is(n.wa(),n.ba()),r.return(function(e,t){var r=new yi(null,0);r.xa(t.duration);var n=t.periods.map((function(t){return os(e,t,r)})),i=t.drmInfo?[t.drmInfo]:[];return t.drmInfo&&n.forEach((function(e){e.variants.forEach((function(e){e.drmInfos=i}))})),{presentationTimeline:r,minBufferTime:2,offlineSessionIds:t.sessionIds,periods:n}}(s,a));case 2:return j(r),S(r,i.destroy(),7);case 7:L(r,0)}}))}))},n.stop=function(){return Promise.resolve()},n.update=function(){},n.onExpirationUpdated=function(e,t){var r=this;return p((function n(){var i,o,a,s,l,u,c;return M(n,(function(n){switch(n.j){case 1:return i=r.a,o=new Ya,k(n,2,3),S(n,o.init(),5);case 5:return S(n,za(o,i.wa(),i.ba()),6);case 6:return S(n,(a=n.o).getManifests([i.key()]),7);case 7:if(s=n.o,l=s[0],u=l.sessionIds.includes(e),c=null==l.expiration||l.expiration>t,!u||!c){n.A(3);break}return S(n,a.updateManifestExpiration(i.key(),t),3);case 3:return j(n),S(n,o.destroy(),10);case 10:L(n,0);break;case 2:R(n),n.A(3)}}))}))},gi.Cb("application/x-offline-manifest",ls),G("shaka.offline.OfflineScheme",us),us.h=function(e){return _e(e={uri:e,ld:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}})},us.i=function(e,t){var r=new Ya;return _e(void 0).U((function(){return r.init()})).U((function(){return za(r,t.wa(),t.ba())})).U((function(e){return e.getSegments([t.key()])})).U((function(e){return{uri:t,ld:t,data:e[0].data,headers:{}}})).finally((function(){return r.destroy()}))},De("offline",us),fs.prototype.destroy=function(){var e=this;return p((function t(){return M(t,(function(t){switch(t.j){case 1:return e.l=!1,e.b&&e.b.abort(),ps(e),S(t,e.m,2);case 2:e.a&&e.a.va.Ya();for(var r=f(e.f),n=r.next();!n.done;n=r.next())n.value.va.Ya();e.a=null,e.f=[],e.g=null,w(t)}}))}))},G("shaka.text.SimpleTextDisplayer",ms),ms.prototype.remove=function(e,t){return!!this.a&&(ys(this.a,(function(r){return r.startTimee})),!0)},ms.prototype.remove=ms.prototype.remove,ms.prototype.append=function(e){for(var t=gs,r=[],n=0;n=e.a.duration-1;break;case ml:e:if(e.a.ended||Ar(e.D))t=!0;else{if(e.b.presentationTimeline.V()){var r=e.b.presentationTimeline.pb();if(Ft(e.a.buffered)>=r){t=!0;break e}}t=!1}break;default:t=!1}var n=Bt(e.a.buffered,e.a.currentTime),i=t,o=(r=e.B).b.get(r.a);t=r.a,n=i||n>=o?xo:ko,r.a=n,t!=n&&Gs(e)}function Ds(e){if(e.s){var t=xe(e.c.manifest);e.a&&"AUDIO"===e.a.nodeName&&(t.disableVideo=!0),e.s.configure(t)}if(e.h&&e.h.configure(e.c.drm),e.f){e.f.configure(e.c.streaming);try{e.b.periods.forEach(e.Nc.bind(e))}catch(t){e.Ma(t)}var r=ia(e.f),n=oa(e.f);t=ll(e),r=Nr.Qd(r,n,t.variants),e.l&&r&&r.allowedByApplication&&r.allowedByKeySystem?Hs(e,t.variants):Ys(e,t)}if(e.D&&(t=e.c.textDisplayFactory,e.Fc!=t)){r=new t;var i=(n=e.D).g;n.g=r,i&&(r.setTextVisibility(i.isTextVisible()),i.destroy()),n.a&&(n.a.c=r),e.Fc=t,e.f&&(r=(t=e.f).b.get("text"))&&ca(t,r.stream,!0,0,!0)}e.l&&(e.l.configure(e.c.abr),e.c.abr.enabled&&!e.kb?e.l.enable():e.l.disable(),Zs(e)),e.B&&(t=e.c.streaming.rebufferingGoal,e.b&&(t=Math.max(t,e.b.minBufferTime)),wo(e.B,t,Math.min(.5,t/2)))}function Ms(e,t,r,n){go(e.$,t).variant=r,(e=e.u.c).c!=r&&(e.c=r,e.a.push({timestamp:Date.now()/1e3,id:r.id,type:"variant",fromAdaptation:n,bandwidth:r.bandwidth}))}function Ns(e,t,r,n){mo(e.$,t,r),(e=e.u.c).b!=r&&(e.b=r,e.a.push({timestamp:Date.now()/1e3,id:r.id,type:"text",fromAdaptation:n,bandwidth:null}))}function Fs(e){var t=As();return t.streaming.failureCallback=function(t){e.V()&&[1001,1002,1003].includes(t.code)&&(t.severity=1,e.sd())},t.textDisplayFactory=function(){return new ms(e.a)},t}function Us(e,t){var r=e.f?ia(e.f):null,n=e.f?oa(e.f):null;if(t.forEach(Nr.filterNewPeriod.bind(null,e.h,r,n)),0==(r=function(e,t){var r=0;return e.forEach((function(e){r+=t(e)?1:0})),r}(t,(function(e){return e.variants.some(Nr.rb)}))))throw new me(2,4,4032);if(rr&&(r+=Math.pow(2,32)),r=r.toString(16)),new me(2,3,3016,t,r,e.a.error.message)}function tl(e,t){if(e.f){var r=ll(e),n=!1,i=Object.keys(t),o=1==i.length&&"00"==i[0];i.length&&e.b.periods.forEach((function(e){e.variants.forEach((function(e){Nr.nf(e).forEach((function(r){var i=e.allowedByKeySystem;r.keyId&&(r=t[o?"00":r.keyId],e.allowedByKeySystem=!!r&&!js.includes(r)),i!=e.allowedByKeySystem&&(n=!0)}))}))})),i=ia(e.f);var a=oa(e.f);(i=Nr.Qd(i,a,r.variants))&&!i.allowedByKeySystem&&zs(e,r),n&&(Ws(e),Hs(e,r.variants))}}function rl(e,t,r){e.s&&e.s.onExpirationUpdated&&e.s.onExpirationUpdated(t,r),e.dispatchEvent(new Se("expirationupdated"))}function nl(e,t){var r=e.h?We(e.h.W):{},n=Object.keys(r);n=n.length&&"00"==n[0];for(var i=!1,o=!1,a=[],s=[],l=f(t),u=l.next();!u.done;u=l.next()){var c=[];(u=u.value).audio&&c.push(u.audio),u.video&&c.push(u.video);for(var d=(c=f(c)).next();!d.done;d=c.next())if((d=d.value).keyId){var h=r[n?"00":d.keyId];h?js.includes(h)&&(s.includes(h)||s.push(h)):a.includes(d.keyId)||a.push(d.keyId)}u.allowedByApplication?u.allowedByKeySystem&&(i=!0):o=!0}if(!i)throw new me(2,4,4012,{hasAppRestrictions:o,missingKeys:a,restrictedKeyStatuses:s})}function il(e,t){p((function r(){return M(r,(function(r){switch(r.j){case 1:return S(r,Promise.resolve(),2);case 2:e.i!=hl&&e.dispatchEvent(t),w(r)}}))}))}function ol(e){for(var t=new Set,r=(e=f(e)).next();!r.done;r=e.next())(r=r.value).language?t.add(Pr(r.language)):t.add("und");return t}function al(e){for(var t=new Map,r=(e=f(e)).next();!r.done;r=e.next()){var n=r.value;r="und";var i=[];for(n.language&&(r=Pr(n.language)),(i="variant"==n.type?n.audioRoles:n.roles)&&i.length||(i=[""]),t.has(r)||t.set(r,new Set),i=(n=f(i)).next();!i.done;i=n.next())i=i.value,t.get(r).add(i)}var o=[];return t.forEach((function(e,t){for(var r=f(e),n=r.next();!n.done;n=r.next())o.push({language:t,role:n.value})})),o}function sl(e){return null==(e=ll(e))?[]:e.variants.filter((function(e){return Nr.rb(e)}))}function ll(e){for(var t=e.m.h(),r=null,n=(e=f(e.b.periods)).next();!n.done;n=e.next())(n=n.value).startTime<=t&&(r=n);return r}function ul(e){var t=ll(e);return go(e.$,t).variant}function cl(){return new me(2,7,7e3)}function dl(e,t,r,n,i,o){return n==e&&i.v==o.v&&i.uri==o.uri&&i.mimeType==o.mimeType&&i.Aa==o.Aa?t:r}function fl(e){return new Promise((function(t,r){e.Ya=function(){return r(cl())},e.pc=function(){return t()},e.onError=function(e){return r(e)},e.rc=function(){return r(cl())}}))}Cs.registerSupportPlugin=function(e,t){Ls[e]=t},Cs.isBrowserSupported=function(){if(!(e.Promise&&e.Uint8Array&&Array.prototype.forEach))return!1;var t=tt();return!(t&&12>t||!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration))&&(!!Ze()||Qe("application/x-mpegurl"))},Cs.probeSupport=function(){return Ct().then((function(e){for(var t=gi.Sf(),r={},n=f('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",")),i=n.next();!i.done;i=n.next()){r[i=i.value]=Ze()?!!pr(i)||MediaSource.isTypeSupported(i)||$t(i):Qe(i);var o=i.split(";")[0];r[o]=r[o]||r[i]}for(var a in e={manifest:t,media:r,drm:e},Ls)e[a]=Ls[a]();return e}))},Cs.prototype.Hb=function(e,t){if(t=void 0===t||t,this.i==hl)return Promise.reject(cl());var r={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null};r.v=e,Ze()||(t=!1);var n=t?this.hb:this.O,i=hs(this.lb,(function(){return{node:n,payload:r,Va:!1}}));return i.wb=function(){},fl(i)},Cs.prototype.attach=Cs.prototype.Hb,Cs.prototype.detach=function(){var e=this;if(this.i==hl)return Promise.reject(cl());var t=hs(this.lb,(function(){return{node:e.F,payload:{Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},Va:!1}}));return t.wb=function(){},fl(t)},Cs.prototype.detach=Cs.prototype.detach,Cs.prototype.Cd=function(e){var t=this;if(e=void 0===e||e,this.i==hl)return Promise.reject(cl());Ze()||(e=!1);var r={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},n=hs(this.lb,(function(n){var i=n.v&&e?t.hb:n.v?t.O:t.F;return r.v=n.v,{node:i,payload:r,Va:!1}}));return n.wb=function(){},fl(n)},Cs.prototype.unload=Cs.prototype.Cd,Cs.prototype.load=function(e,t,r){if(this.i==hl)return Promise.reject(cl());this.dispatchEvent(new Se("loading"));var n={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null};n.uri=e,n.zd=Date.now()/1e3,r&&"string"!=typeof r&&(Kr("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),n.Aa=function(){return new r}),r&&"string"==typeof r&&(n.mimeType=r),void 0!==t&&(n.startTime=t);var i=function(e,t){if(t.Aa)return!1;if(!Ze())return!0;var r=t.mimeType,n=t.uri||"";return r||(r={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[gi.getExtension(n)]),!!r&&""!=(t.v||nt()).canPlayType(r)&&(!gi.isSupported(n,r)||et()&&e.c.streaming.useNativeHlsOnSafari)}(this,n)?this.jb:this.S,o=hs(this.lb,(function(e){return null==e.v?null:(n.v=e.v,{node:i,payload:n,Va:!0})}));return o.wb=function(){},new Promise((function(e,t){o.rc=function(){return t(new me(2,7,7002))},o.pc=function(){return e()},o.Ya=function(){return t(cl())},o.onError=function(e){return t(e)}}))},Cs.prototype.load=Cs.prototype.load,Cs.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=bs(e,t));var r=Es(this.c,e,Fs(this));return Ds(this),r},Cs.prototype.configure=Cs.prototype.configure,Cs.prototype.getConfiguration=function(){var e=Fs(this);return Es(e,this.c,Fs(this)),e},Cs.prototype.getConfiguration=Cs.prototype.getConfiguration,Cs.prototype.$f=function(){for(var e in this.c)delete this.c[e];Es(this.c,Fs(this),Fs(this)),Ds(this)},Cs.prototype.resetConfiguration=Cs.prototype.$f,Cs.prototype.We=function(){return this.i},Cs.prototype.getLoadMode=Cs.prototype.We,Cs.prototype.af=function(){return this.a},Cs.prototype.getMediaElement=Cs.prototype.af,Cs.prototype.Mb=function(){return this.K},Cs.prototype.getNetworkingEngine=Cs.prototype.Mb,Cs.prototype.hc=function(){return this.Fb},Cs.prototype.getAssetUri=Cs.prototype.hc,Cs.prototype.Ze=function(){return Kr("getManifestUri",'Please use "getAssetUri" instead.'),this.hc()},Cs.prototype.getManifestUri=Cs.prototype.Ze,Cs.prototype.V=function(){return this.b?this.b.presentationTimeline.V():!(!this.a||!this.a.src)&&1/0==this.a.duration},Cs.prototype.isLive=Cs.prototype.V,Cs.prototype.Xa=function(){return!!this.b&&this.b.presentationTimeline.Xa()},Cs.prototype.isInProgress=Cs.prototype.Xa,Cs.prototype.uf=function(){if(this.b){if(!this.b.periods.length)return!1;var e=this.b.periods[0].variants;return!!e.length&&!e[0].video}return!(!this.a||!this.a.src)&&(this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight)},Cs.prototype.isAudioOnly=Cs.prototype.uf,Cs.prototype.bg=function(){if(this.b){var e=this.b.presentationTimeline;return{start:e.ob(),end:e.Ca()}}return this.a&&this.a.src&&(e=this.a.seekable).length?{start:e.start(0),end:e.end(e.length-1)}:{start:0,end:0}},Cs.prototype.seekRange=Cs.prototype.bg,Cs.prototype.keySystem=function(){return _t(this.drmInfo())},Cs.prototype.keySystem=Cs.prototype.keySystem,Cs.prototype.drmInfo=function(){return this.h?this.h.a:null},Cs.prototype.drmInfo=Cs.prototype.drmInfo,Cs.prototype.Lb=function(){return this.h?this.h.Lb():1/0},Cs.prototype.getExpiration=Cs.prototype.Lb,Cs.prototype.Xc=function(){return!!this.B&&this.B.a==ko},Cs.prototype.isBuffering=Cs.prototype.Xc,Cs.prototype.ef=function(){if(this.W){var e=this.W;e=e.f?0:e.c}else e=0;return e},Cs.prototype.getPlaybackRate=Cs.prototype.ef,Cs.prototype.ug=function(e){0==e?q("A trick play rate of 0 is unsupported!"):(this.a.paused&&this.a.play(),this.W.set(e),this.i==ml&&la(this.f,1=a.b.periods.length?a.b.presentationTimeline.Y():a.b.periods[d].startTime,1/0==(h=f-l.startTime))throw new me(1,4,4033);return p=new Zn(1,0,h,(function(){return[e]}),0,null),m={id:a.Xd++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return 1},getSegmentReference:function(e){return 1==e?p:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:n,codecs:i||"",kind:r,encrypted:!1,keyId:null,language:t,label:o||null,type:u.ra,primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},a.ac.add(m),l.textStreams.push(m),S(s,sa(a.f,m),2);case 2:return(g=aa(a.f,"text"))&&mo(a.$,l,g),a.ac.delete(m),Ys(a,l),Ws(a),s.return(Nr.xc(m))}}))}))},Cs.prototype.addTextTrack=Cs.prototype.addTextTrack,Cs.prototype.vd=function(e,t){this.bc.width=e,this.bc.height=t},Cs.prototype.setMaxHardwareResolution=Cs.prototype.vd,Cs.prototype.sd=function(){if(this.i==ml){var e=this.f;if(e.f)e=!1;else if(e.m)e=!1;else{for(var t=f(e.b.values()),r=t.next();!r.done;r=t.next())(r=r.value).Pb&&(r.Pb=!1,ka(e,r,.1));e=!0}}else e=!1;return e},Cs.prototype.retryStreaming=Cs.prototype.sd,Cs.prototype.Xe=function(){return this.b},Cs.prototype.getManifest=Cs.prototype.Xe,Cs.prototype.Ye=function(){return this.s?this.s.constructor:null},Cs.prototype.getManifestParserFactory=Cs.prototype.Ye,(n=Cs.prototype).Nc=function(e){var t=this.f?ia(this.f):null,r=this.f?oa(this.f):null;if(Nr.filterNewPeriod(this.h,t,r,e),!(t=e.variants).some(Nr.rb))throw new me(2,4,4011);if(nl(this,e.variants),Nr.Gd(t,this.c.restrictions,this.bc)&&this.f&&ll(this)==e&&Ws(this),e=this.h?this.h.a:null)for(r=(t=f(t)).next();!r.done;r=t.next())for(var n=(r=f(r.value.drmInfos)).next();!n.done;n=r.next())if((n=n.value).keySystem==e.keySystem)for(var i=(n=f(n.initData||[])).next();!i.done;i=n.next())i=i.value,bt(this.h,i.initDataType,i.initData)},n.zf=function(e){try{this.kb=!0,this.l.disable(),Zs(this);var t=Hs(this,e.variants),r=Nr.Jb(e.textStreams,this.na,this.fb)[0]||null;this.pa&&(e.variants.includes(this.pa)&&(t=this.pa),this.pa=null),this.oa&&(e.textStreams.includes(this.oa)&&(r=this.oa),this.oa=null),t&&Ms(this,e,t,!0),r&&Ns(this,e,r,!0);var n=this.f,i=n.b.get("video");if(i)var o=n.c.periods[i.ia];else{var a=n.b.get("audio");o=a?n.c.periods[a.ia]:null}var s=t?t.audio:null;if(!o&&r){var l;if(l=s){e=r;var u=Pr(this.c.preferredTextLanguage),c=Pr(s.language),d=Pr(e.language);l=Lr(d,u)&&!Lr(c,d)}l&&(this.gb=!0),this.gb&&this.D.g.setTextVisibility(!0),Js(this)}return this.c.streaming.alwaysStreamText||this.mc()?{variant:t,text:r}:{variant:t,text:null}}catch(e){return this.Ma(e),{variant:null,text:null}}},n.Fe=function(){this.kb=!1,this.c.abr.enabled&&(this.l.enable(),Zs(this)),this.pa&&(ua(this.f,this.pa,this.Ud,this.Rd),qs(this),this.pa=null),this.oa&&(ca(this.f,this.oa,!0,0,!1),Xs(this),this.oa=null)},n.Ef=function(){this.s&&this.s.update&&this.s.update()},n.Jf=function(){this.m&&this.m.s()},n.Ma=function(e){if(this.i!=hl){var t=new Se("error",{detail:e});this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)}};var hl=0,pl=1,ml=2,gl=3;function yl(e,t){var r=os(new is(e.wa(),e.ba()),t.periods[0],new yi(null,0)),n=t.appMetadata||{};return r=vl(r),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:r,appMetadata:n}}function vl(e){for(var t=[],r=Nr.df(e.variants),n=(r=f(r)).next();!n.done;n=r.next())t.push(Nr.Ed(n.value));for(r=(e=f(e.textStreams)).next();!r.done;r=e.next())t.push(Nr.xc(r.value));return t}function bl(){this.a={}}function _l(e,t){var r=t.audio,n=t.video;if(r&&!n&&(e.a[r.id]=r.bandwidth||t.bandwidth),!r&&n&&(e.a[n.id]=n.bandwidth||t.bandwidth),r&&n){var i=r.bandwidth||393216,o=n.bandwidth||t.bandwidth-i;0>=o&&(o=t.bandwidth),e.a[r.id]=i,e.a[n.id]=o}}function Al(e,t){var r=e.a[t];return null==r&&(r=0),r}function El(e){this.a=!1,this.b=new ge,this.c=e}function Tl(e){var t=new wl;e.periods.forEach((function(e,r){var n=xl(e.variants);if(0==r)for(var i=(n=f(n.a)).next();!i.done;i=n.next())t.add(i.value);else!function(e,t){e.a=e.a.filter((function(e){return kl(t,e)}))}(t,n)}));for(var r=(e=f(e.periods)).next();!r.done;r=e.next())(r=r.value).variants=r.variants.filter((function(e){return kl(t,new Sl(e))}))}function Sl(e){var t=e.audio;e=e.video,this.b=t?t.mimeType:null,this.a=t?t.codecs.split(".")[0]:null,this.f=e?e.mimeType:null,this.c=e?e.codecs.split(".")[0]:null}function wl(){this.a=[]}function kl(e,t){return e.a.some((function(e){return t.b==e.b&&t.a==e.a&&t.f==e.f&&t.c==e.c}))}function xl(e){for(var t=new wl,r=(e=f(e)).next();!r.done;r=e.next())t.add(new Sl(r.value));return t}function Cl(e){var t=this;if(e&&e.constructor!=Cs)throw new me(2,9,9008);this.b=this.a=null,e?(this.a=e.c,this.b=e.Mb()):(this.a=As(),this.b=new Pe),this.f=!1,this.c=[],this.g=[];var r=!e;this.h=new El((function(){return p((function e(){var n;return M(e,(function(e){switch(e.j){case 1:return n=function(){},S(e,Promise.all(t.g.map((function(e){return e.then(n,n)}))),2);case 2:if(!r){e.A(3);break}return S(e,t.b.destroy(),3);case 3:t.a=null,t.b=null,w(e)}}))}))}))}function Rl(){if(Ze())e:{for(var e=f(Wa.values()),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function jl(e,t){for(var r=[],n=f(e.periods),i=n.next();!i.done;i=n.next())for(var o=(i=f(i.value.streams)).next();!o.done;o=i.next())o=o.value,t&&"video"==o.contentType?r.push({contentType:qe(o.mimeType,o.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=o.contentType||r.push({contentType:qe(o.mimeType,o.codecs),robustness:e.drmInfo.audioRobustness});return r}function Ll(e,t,r){return p((function n(){return M(n,(function(n){switch(n.j){case 1:return S(n,function(e,t,r,n){return p((function i(){var o,a,s;return M(i,(function(i){switch(i.j){case 1:return n.drmInfo?(o=function(e){var t=Array.from(e.a.keys());if(!t.length)throw new me(2,9,9e3,"No supported storage mechanisms found");return e.a.get(t[0]).getEmeSessionCell()}(r),a=n.sessionIds.map((function(e){return{sessionId:e,keySystem:n.drmInfo.keySystem,licenseUri:n.drmInfo.licenseServerUri,serverCertificate:n.drmInfo.serverCertificate,audioCapabilities:jl(n,!1),videoCapabilities:jl(n,!0)}})),S(i,cs(t,e,a),2)):i.return();case 2:return s=i.o,S(i,o.remove(s),3);case 3:return S(i,o.add(a.filter((function(e){return-1==s.indexOf(e.sessionId)}))),0)}}))}))}(e.b,e.a.drm,r,t),0)}}))}))}function Il(e,t,r,n){function i(){s+=1,e.a.offline.progressCallback(l,s/a)}var o=function(e){var t=[];return e.periods.forEach((function(e){e.streams.forEach((function(e){null!=e.initSegmentKey&&t.push(e.initSegmentKey),e.segments.forEach((function(e){t.push(e.dataKey)}))}))})),t}(n),a=o.length+1,s=0,l=yl(r,n);return Promise.all([t.removeSegments(o,i),t.removeManifests([r.key()],i)])}function Pl(e,t,r,n,i,o){var a={id:o.id,originalId:o.originalId,primary:o.primary,presentationTimeOffset:o.presentationTimeOffset||0,contentType:o.type,mimeType:o.mimeType,codecs:o.codecs,frameRate:o.frameRate,pixelAspectRatio:o.pixelAspectRatio,kind:o.kind,language:o.language,label:o.label,width:o.width||null,height:o.height||null,initSegmentKey:null,encrypted:o.encrypted,keyId:o.keyId,segments:[],variantIds:[]};i=i.presentationTimeline.Ob();var s=o.id,l=o.initSegmentReference;return l&&(l=vi(l.c(),l.b,l.a,e.a.streaming.retryParameters),Oa(t,s,l,.5*Al(n,o.id),!0,(function(t){return p((function n(){var i;return M(n,(function(n){switch(n.j){case 1:return S(n,r.addSegments([{data:t}]),2);case 2:i=n.o,e.c.push(i[0]),a.initSegmentKey=i[0],w(n)}}))}))}))),function(e,t,r){for(var n=null==(t=e.findSegmentPosition(t))?null:e.getSegmentReference(t);n;)r(n),n=e.getSegmentReference(++t)}(o,i,(function(i){var l=vi(i.c(),i.b,i.a,e.a.streaming.retryParameters);Oa(t,s,l,function(e,t,r){return r=r.endTime-r.startTime,Al(e,t)*r}(n,o.id,i),!1,(function(t){return p((function n(){var o;return M(n,(function(n){switch(n.j){case 1:return S(n,r.addSegments([{data:t}]),2);case 2:o=n.o,e.c.push(o[0]),a.segments.push({startTime:i.startTime,endTime:i.endTime,dataKey:o[0]}),w(n)}}))}))}))})),a}function Ol(e){if(e.h.a)throw new me(2,9,7001)}function Dl(){if(!Rl())throw new me(2,9,9e3)}function Ml(e,t){return p((function r(){return M(r,(function(r){switch(r.j){case 1:return e.g.push(t),x(r,2),S(r,t,4);case 4:return r.return(r.o);case 2:j(r),Re(e.g,t),L(r,0)}}))}))}function Nl(e){e.variants.map((function(e){return e.video}));var t=new Set(e.variants.map((function(e){return e.audio})));e=e.textStreams;for(var r=f(t),n=r.next();!n.done;n=r.next())for(var i=(n=f(t)).next();!i.done;i=n.next());for(r=(t=f(e)).next();!r.done;r=t.next())for(n=(r=f(e)).next();!n.done;n=r.next());}Cs.LoadMode={DESTROYED:hl,NOT_LOADED:pl,MEDIA_SOURCE:ml,SRC_EQUALS:gl},El.prototype.destroy=function(){var e=this;return this.a?this.b:(this.a=!0,this.c().then((function(){e.b.resolve()}),(function(){e.b.resolve()})))},wl.prototype.add=function(e){kl(this,e)||this.a.push(e)},G("shaka.offline.Storage",Cl),Cl.support=Rl,Cl.prototype.destroy=function(){return this.h.destroy()},Cl.prototype.destroy=Cl.prototype.destroy,Cl.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=bs(e,t));var r=e,n=!1;return null!=r.trackSelectionCallback&&(n=!0,r.offline=r.offline||{},r.offline.trackSelectionCallback=r.trackSelectionCallback,delete r.trackSelectionCallback),null!=r.progressCallback&&(n=!0,r.offline=r.offline||{},r.offline.progressCallback=r.progressCallback,delete r.progressCallback),null!=r.usePersistentLicense&&(n=!0,r.offline=r.offline||{},r.offline.usePersistentLicense=r.usePersistentLicense,delete r.usePersistentLicense),n&&Kr("Storage.configure with OfflineConfig","Please configure storage with a player configuration."),Es(this.a,e)},Cl.prototype.configure=Cl.prototype.configure,Cl.prototype.getConfiguration=function(){var e=As();return Es(e,this.a,As()),e},Cl.prototype.getConfiguration=Cl.prototype.getConfiguration,Cl.prototype.Mb=function(){return this.b},Cl.prototype.getNetworkingEngine=Cl.prototype.Mb,Cl.prototype.store=function(e,t,r){var n=this;return Ml(this,function(e,t,r,n){return p((function i(){var o,a,s,l,u,c,d,h,m;return M(i,(function(i){switch(i.j){case 1:return Dl(),e.f?i.return(Promise.reject(new me(2,9,9006))):(e.f=!0,S(i,function(e,t,r){return p((function n(){var i,o,a,s,l,u;return M(n,(function(n){switch(n.j){case 1:return i=null,o=e.b,a={networkingEngine:o,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){i=e}},S(n,r(),2);case 2:return(s=n.o).configure(e.a.manifest),Ol(e),x(n,3),S(n,s.start(t,a),5);case 5:return l=n.o,Ol(e),u=function(e){for(var t=new Set,r=(e=f(e.periods)).next();!r.done;r=e.next()){for(var n=f((r=r.value).textStreams),i=n.next();!i.done;i=n.next())t.add(i.value);for(r=f(r.variants),n=r.next();!n.done;n=r.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video)}return t}(l),S(n,Promise.all(Ye(u,(function(e){return e.createSegmentIndex()}))),6);case 6:if(Ol(e),i)throw i;return n.return(l);case 3:return j(n),S(n,s.stop(),7);case 7:L(n,0)}}))}))}(e,t,n),2));case 2:if(o=i.o,Ol(e),o.presentationTimeline.V()||o.presentationTimeline.Xa())throw new me(2,9,9005,t);return a=null,s=new Ya,u=l=null,k(i,3,4),S(i,function(e,t,r){return p((function n(){var i,o,a;return M(n,(function(n){switch(n.j){case 1:return i=new pt({ub:e.b,onError:r,qc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),o=Do(t.periods),a=e.a,i.configure(a.drm),S(n,function(e,t,r){return e.s=[],e.D=r,gt(e,t)}(i,o,a.offline.usePersistentLicense),2);case 2:return S(n,yt(i),3);case 3:return S(n,vt(i),4);case 4:return n.return(i)}}))}))}(e,o,(function(e){u=u||e})),6);case 6:if(a=i.o,Ol(e),u)throw u;return S(i,function(e,t,r){return p((function n(){var i;return M(n,(function(n){switch(n.j){case 1:return i={width:1/0,height:1/0},function(e,t,r){for(var n=(e=f(e.periods)).next();!n.done;n=e.next())(n=n.value).variants=n.variants.filter((function(e){return Nr.bd(e,t,r)}))}(t,e.a.restrictions,i),function(e){for(var t=(e=f(e.periods)).next();!t.done;t=e.next())(t=t.value).variants=t.variants.filter((function(e){var t=!0;return e.audio&&(t=t&&br(e.audio)),e.video&&(t=t&&br(e.video)),t}))}(t),function(e,t){for(var r=f(e.periods),n=r.next();!n.done;n=r.next())(n=n.value).variants=n.variants.filter((function(e){return Rt(t,e)}))}(t,r),Tl(t),S(n,function(e,t){return p((function r(){var n,i,o,a;return M(r,(function(r){switch(r.j){case 1:n=null,i=f(e.periods),o=i.next();case 2:if(o.done){r.A(0);break}return a=o.value,n&&(a.variants=a.variants.filter((function(e){return kl(n,new Sl(e))}))),S(r,t(a),5);case 5:n=xl(a.variants),o=i.next(),r.A(2)}}))}))}(t,(function(t){return p((function r(){var n,i,o,a,s,l,u,c;return M(r,(function(r){switch(r.j){case 1:n=Nr,i=[];for(var d=f(t.variants),h=d.next();!h.done;h=d.next())o=h.value,i.push(n.Ed(o));for(h=(d=f(t.textStreams)).next();!h.done;h=d.next())a=h.value,i.push(n.xc(a));return S(r,e.a.offline.trackSelectionCallback(i),2);case 2:for(s=r.o,l=new Set,u=new Set,h=(d=f(s)).next();!h.done;h=d.next())"variant"==(c=h.value).type&&l.add(c.id),"text"==c.type&&u.add(c.id);t.variants=t.variants.filter((function(e){return l.has(e.id)})),t.textStreams=t.textStreams.filter((function(e){return u.has(e.id)})),w(r)}}))}))})),2);case 2:(function(e){if(0==e.periods.length)throw new me(2,4,4014);for(var t=(e=f(e.periods)).next();!t.done;t=e.next())Nl(t.value)})(t),w(n)}}))}))}(e,o,a),7);case 7:return S(i,s.init(),8);case 8:return Ol(e),S(i,function(e){var t=null;if(e.a.forEach((function(e,r){e.getCells().forEach((function(e,n){e.hasFixedKeySpace()||t||(t={path:{wa:r,ba:n},ba:e})}))})),t)return t;throw new me(2,9,9013,"Could not find a cell that supports add-operations")}(s),9);case 9:return l=i.o,Ol(e),S(i,function(e,t,r,n,i,o){return p((function a(){var s,l,u,c,d,h,m,g,y,v;return M(a,(function(a){switch(a.j){case 1:return s=function(e,t,r){var n=null==t.expiration?1/0:t.expiration;return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.Y(),size:0,expiration:n,tracks:t=vl(t.periods[0]),appMetadata:r}}(i,n,o),l=n.periods.some((function(e){return e.variants.some((function(e){return e.drmInfos&&e.drmInfos.length}))})),u=n.periods.some((function(e){return e.variants.some((function(e){return e.drmInfos.some((function(e){return e.initData&&e.initData.length}))}))})),d=null,(c=l&&!u)&&(h=r.a,d=Fl.get(h.keySystem)),m=new Pa(e.b,(function(t,r){s.size=r,e.a.offline.progressCallback(s,t)}),(function(t,n){c&&e.a.offline.usePersistentLicense&&d==n&&bt(r,"cenc",t)})),x(a,2),y=g=function(e,t,r,n,i,o,a){var s=new bl,l=i.periods.map((function(n){return function(e,t,r,n,i,o){for(var a=f(o.variants),s=a.next();!s.done;s=a.next())_l(n,s.value);for(a=f(o.textStreams),s=a.next();!s.done;s=a.next())n.a[s.value.id]=52;a=function(e){for(var t=new Set,r=f(e.textStreams),n=r.next();!n.done;n=r.next())t.add(n.value);for(e=f(e.variants),r=e.next();!r.done;r=e.next())(r=r.value).audio&&t.add(r.audio),r.video&&t.add(r.video);return t}(o);var l=new Map;for(a=f(a),s=a.next();!s.done;s=a.next()){s=s.value;var u=Pl(e,t,r,n,i,s);l.set(s.id,u)}return o.variants.forEach((function(e){e.audio&&l.get(e.audio.id).variantIds.push(e.id),e.video&&l.get(e.video.id).variantIds.push(e.id)})),{startTime:o.startTime,streams:Array.from(l.values())}}(e,t,r,s,i,n)})),u=n.a,c=e.a.offline.usePersistentLicense;return u&&c&&(u.initData=[]),{originalManifestUri:o,duration:i.presentationTimeline.Y(),size:0,expiration:n.Lb(),periods:l,sessionIds:c?Et(n):[],drmInfo:u,appMetadata:a}}(e,m,t,r,n,i,o),S(a,function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return S(t,Promise.all(e.b.values()),2);case 2:return t.return(e.a.a)}}))}))}(m),4);case 4:if(y.size=a.o,g.expiration=r.Lb(),v=Et(r),g.sessionIds=e.a.offline.usePersistentLicense?v:[],l&&e.a.offline.usePersistentLicense&&!v.length)throw new me(2,9,9007);return a.return(g);case 2:return j(a),S(a,m.destroy(),5);case 5:L(a,0)}}))}))}(e,l.ba,a,o,t,r),10);case 10:if(c=i.o,Ol(e),u)throw u;return S(i,l.ba.addManifests([c]),11);case 11:return d=i.o,Ol(e),h=new rs("manifest",l.path.wa,l.path.ba,d[0]),i.return(yl(h,c));case 4:return j(i),e.f=!1,e.c=[],S(i,s.destroy(),12);case 12:if(!a){i.A(13);break}return S(i,a.destroy(),13);case 13:L(i,0);break;case 3:if(m=R(i),!l){i.A(15);break}return S(i,l.ba.removeSegments(e.c,(function(){})),15);case 15:throw u||m}}))}))}(this,e,t||{},(function(){return p((function t(){var i,o;return M(t,(function(t){switch(t.j){case 1:return r&&"string"!=typeof r?(Kr("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),i=r,t.return(new i)):S(t,gi.create(e,n.b,n.a.manifest.retryParameters,r),2);case 2:return o=t.o,t.return(o)}}))}))})))},Cl.prototype.store=Cl.prototype.store,Cl.prototype.kf=function(){return this.f},Cl.prototype.getStoreInProgress=Cl.prototype.kf,Cl.prototype.remove=function(e){return Ml(this,function(e,t){return p((function r(){var n,i,o,a,s,l;return M(r,(function(r){switch(r.j){case 1:return Dl(),null==(n=ns(t))||"manifest"!=n.a?r.return(Promise.reject(new me(2,9,9004,t))):(i=n,o=new Ya,x(r,2),S(r,o.init(),4));case 4:return S(r,za(o,i.wa(),i.ba()),5);case 5:return S(r,(a=r.o).getManifests([i.key()]),6);case 6:return s=r.o,l=s[0],S(r,Promise.all([Ll(e,l,o),Il(e,a,i,l)]),2);case 2:return j(r),S(r,o.destroy(),8);case 8:L(r,0)}}))}))}(this,e))},Cl.prototype.remove=Cl.prototype.remove,Cl.prototype.Xf=function(){return Ml(this,function(e){return p((function t(){var r,n,i,o,a,s,l,u,c;return M(t,(function(t){switch(t.j){case 1:return Dl(),r=e.b,n=e.a.drm,i=new Ya,o=!1,x(t,2),S(t,i.init(),4);case 4:for(a=[],function(e,t){e.a.forEach((function(e){t(e.getEmeSessionCell())}))}(i,(function(e){return a.push(e)})),s=Promise.resolve(),l={},u=f(a),c=u.next();!c.done;l={wc:l.wc},c=u.next())l.wc=c.value,s=s.then(function(e){return function(){return p((function t(){var i,a;return M(t,(function(t){switch(t.j){case 1:return S(t,e.wc.getAll(),2);case 2:return i=t.o,S(t,cs(n,r,i),3);case 3:return a=t.o,S(t,e.wc.remove(a),4);case 4:a.length!=i.length&&(o=!0),w(t)}}))}))}}(l));return S(t,s,2);case 2:return j(t),S(t,i.destroy(),6);case 6:L(t,3);break;case 3:return t.return(!o)}}))}))}(this))},Cl.prototype.removeEmeSessions=Cl.prototype.Xf,Cl.prototype.list=function(){return Ml(this,p((function e(){var t,r,n;return M(e,(function(e){switch(e.j){case 1:return Dl(),t=[],r=new Ya,x(e,2),S(e,r.init(),4);case 4:return n=Promise.resolve(),function(e,t){e.a.forEach((function(e,r){e.getCells().forEach((function(e,n){t({wa:r,ba:n},e)}))}))}(r,(function(e,r){n=n.then((function(){return p((function n(){return M(n,(function(n){switch(n.j){case 1:return S(n,r.getAllManifests(),2);case 2:n.o.forEach((function(r,n){var i=yl(new rs("manifest",e.wa,e.ba,n),r);t.push(i)})),w(n)}}))}))}))})),S(e,n,2);case 2:return j(e),S(e,r.destroy(),6);case 6:L(e,3);break;case 3:return e.return(t)}}))})))},Cl.prototype.list=Cl.prototype.list,Cl.deleteAll=function(){return p((function e(){var t;return M(e,(function(e){switch(e.j){case 1:return t=new Ya,x(e,2),S(e,t.erase(),2);case 2:return j(e),S(e,t.destroy(),5);case 5:L(e,0)}}))}))};var Fl=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");Ls.offline=Rl,G("shaka.polyfill.installAll",(function(){for(var e=0;e=t.data.length)return e;e=[];for(var r={},n=(t=f(t.data)).next();!n.done;r={lc:r.lc},n=t.next())r.lc=n.value,e.some(function(e){return function(t){return ht.za(t,e.lc)}}(r))||e.push(r.lc);return ht.concat.apply(ht,e instanceof Array?e:function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(f(e)))}(e.initData),this.dispatchEvent(t)}}function lu(e,t){var r=e.keyStatuses;r.size=null==t?0:1,r.a=t,e.dispatchEvent(new Se("keystatuseschange"))}function uu(){this.size=0,this.a=void 0}function cu(){return Promise.reject(Error("The key system specified is not supported."))}function du(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function fu(){throw new TypeError("Illegal constructor.")}function hu(){throw new TypeError("Illegal constructor.")}G("shaka.polyfill.register",Gl),Gl((function(){Sc()}),-1),Gl((function(){if(e.Document){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,(t=Document.prototype).exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitExitFullscreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",Vl),document.addEventListener("webkitfullscreenerror",Vl),document.addEventListener("mozfullscreenchange",Vl),document.addEventListener("mozfullscreenerror",Vl),document.addEventListener("MSFullscreenChange",Vl),document.addEventListener("MSFullscreenError",Vl)}})),Gl((function(){var t=!1;if(rt("CrKey"))t=!0;else try{e.indexedDB&&(t=!1)}catch(e){t=!0}t&&delete e.indexedDB})),Gl((function(){rt("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Hl)})),Gl((function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})})),Gl((function(){})),Gl((function(){var t=tt();e.MediaSource&&(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType?function(){var e=MediaSource.isTypeSupported,t=/^dv(?:h[e1]|a[v1])\./;MediaSource.isTypeSupported=function(r){for(var n=r.split(/ *; */),i=n[0],o={},a=1;a=t?(Yl(),function(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,r){return e.call(this,t,r-.001)}}()):Yl()):rt("Tizen")&&function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"opus"!=Xe(t)[0]&&e(t)}}())})),$l.prototype.createMediaKeys=function(){var e=new ql(this.keySystem);return Promise.resolve(e)},$l.prototype.getConfiguration=function(){return this.a},ql.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Jl(this.b,e)},ql.prototype.setServerCertificate=function(e){return e&&new Uint8Array(e),Promise.resolve(!0)},V(Jl,ke),(n=Jl.prototype).generateRequest=function(e,t){this.a=new ge;try{this.b=this.g.createSession("video/mp4",new Uint8Array(t)),this.sessionId=this.b.sessionId||"",this.f.w(this.b,"webkitkeymessage",this.og.bind(this)),this.f.w(this.b,"webkitkeyadded",this.mg.bind(this)),this.f.w(this.b,"webkitkeyerror",this.ng.bind(this)),Ql(this,"status-pending")}catch(e){this.a.reject(e)}return this.a},n.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},n.update=function(e){this.c=new ge;try{this.b.update(new Uint8Array(e))}catch(e){this.c.reject(e)}return this.c},n.close=function(){try{this.b.close(),this.closed.resolve(),this.f.$a()}catch(e){this.closed.reject(e)}return this.closed},n.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},n.og=function(e){this.a&&(this.a.resolve(),this.a=null),this.dispatchEvent(new Se("message",{messageType:null==this.keyStatuses.a?"license-request":"license-renewal",message:e.message.buffer}))},n.mg=function(){this.c&&(Ql(this,"usable"),this.c.resolve(),this.c=null)},n.ng=function(){var e=Error("EME PatchedMediaKeysApple key error");if(e.errorCode=this.b.error,null!=this.a)this.a.reject(e),this.a=null;else if(null!=this.c)this.c.reject(e),this.c=null;else switch(this.b.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Ql(this,"output-not-allowed");break;default:Ql(this,"internal-error")}},(n=eu.prototype).forEach=function(e){this.a&&e(this.a,Ul)},n.get=function(e){if(this.has(e))return this.a},n.has=function(e){var t=Ul;return!(!this.a||!ht.za(new Uint8Array(e),new Uint8Array(t)))},n.entries=function(){},n.keys=function(){},n.values=function(){},Gl((function(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(Ul=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Wl,e.MediaKeys=ql,e.MediaKeySystemAccess=$l,navigator.requestMediaKeySystemAccess=zl)})),ru.prototype.createMediaKeys=function(){var e=new iu(this.keySystem);return Promise.resolve(e)},ru.prototype.getConfiguration=function(){return this.a},iu.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new au(this.a,e)},iu.prototype.setServerCertificate=function(){return Promise.resolve(!1)},V(au,ke),(n=au.prototype).generateRequest=function(e,t){this.a=new ge;try{this.c=this.g.createSession("video/mp4",new Uint8Array(t),null),this.f.w(this.c,"mskeymessage",this.If.bind(this)),this.f.w(this.c,"mskeyadded",this.Gf.bind(this)),this.f.w(this.c,"mskeyerror",this.Hf.bind(this)),lu(this,"status-pending")}catch(e){this.a.reject(e)}return this.a},n.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},n.update=function(e){this.b=new ge;try{this.c.update(new Uint8Array(e))}catch(e){this.b.reject(e)}return this.b},n.close=function(){try{this.c.close(),this.closed.resolve(),this.f.$a()}catch(e){this.closed.reject(e)}return this.closed},n.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},n.If=function(e){this.a&&(this.a.resolve(),this.a=null),this.dispatchEvent(new Se("message",{messageType:null==this.keyStatuses.a?"license-request":"license-renewal",message:e.message.buffer}))},n.Gf=function(){this.a?(lu(this,"usable"),this.a.resolve(),this.a=null):this.b&&(lu(this,"usable"),this.b.resolve(),this.b=null)},n.Hf=function(){var e=Error("EME PatchedMediaKeysMs key error");if(e.errorCode=this.c.error,null!=this.a)this.a.reject(e),this.a=null;else if(null!=this.b)this.b.reject(e),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:lu(this,"output-not-allowed");break;default:lu(this,"internal-error")}},(n=uu.prototype).forEach=function(e){this.a&&e(this.a,Bl)},n.get=function(e){if(this.has(e))return this.a},n.has=function(e){var t=Bl;return!(!this.a||!ht.za(new Uint8Array(e),new Uint8Array(t)))},n.entries=function(){},n.keys=function(){},n.values=function(){},Gl((function(){!e.HTMLVideoElement||!e.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(Bl=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=nu,e.MediaKeys=iu,e.MediaKeySystemAccess=ru,navigator.requestMediaKeySystemAccess=tu)})),fu.prototype.createSession=function(){},fu.prototype.setServerCertificate=function(){},hu.prototype.getConfiguration=function(){},hu.prototype.createMediaKeys=function(){},Gl((function(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=cu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=du,e.MediaKeys=fu,e.MediaKeySystemAccess=hu)}),-10);var pu,mu="";function gu(e){return mu?mu+e.charAt(0).toUpperCase()+e.slice(1):e}function yu(e,t){try{var r=new bu(e,t);return Promise.resolve(r)}catch(e){return Promise.reject(e)}}function vu(e){var t=this.mediaKeys;return t&&t!=e&&Au(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&Au(e,this),Promise.resolve()}function bu(e,t){this.a=this.keySystem=e;var r=!1;"org.w3.clearkey"==e&&(this.a="webkit-org.w3.clearkey",r=!1);var n=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video");for(var o=0;o tag.");var a=Bn.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","frameRate"),s=Bn.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","subFrameRate"),l=Bn.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier"),u=Bn.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","tickRate");if(o=i.getAttribute("xml:space")||"default",r=i.getAttribute("tts:extent"),"default"!=o&&"preserve"!=o)throw new me(2,2,2005,"Invalid xml:space value: "+o);o="default"==o,a=new ic(a,s,l,u),s=qu(i.getElementsByTagName("metadata")[0]),l=qu(i.getElementsByTagName("styling")[0]),u=qu(i.getElementsByTagName("layout")[0]);for(var c=[],d=0;dr.length)return i;var o=e;for(e=null;o&&!(e=o.getAttribute(t))&&(o=o.parentNode)instanceof Element;);if(t=e)for(e=(t=f(t=t.split(" "))).next();!e.done;e=t.next()){e=e.value;for(var a=(o=f(r)).next();!a.done;a=o.next())if(n+(a=a.value).getAttribute("xml:id")==e){i.push(a);break}}return i}function rc(e,t){var r=null;if(Ku.test(e)){r=Ku.exec(e);var n=Number(r[1]),i=Number(r[2]),o=Number(r[3]),a=Number(r[4]);r=(o+=(a+=(Number(r[5])||0)/t.b)/t.frameRate)+60*i+3600*n}else Gu.test(e)?r=nc(Gu,e):Vu.test(e)?r=nc(Vu,e):Hu.test(e)?(r=Hu.exec(e),r=Number(r[1])/t.frameRate):Yu.test(e)?(r=Yu.exec(e),r=Number(r[1])/t.a):zu.test(e)&&(r=nc(zu,e));return r}function nc(e,t){var r=e.exec(t);return null==r||""==r[0]?null:(Number(r[4])||0)/1e3+(Number(r[3])||0)+60*(Number(r[2])||0)+3600*(Number(r[1])||0)}function ic(e,t,r,n){this.frameRate=Number(e)||30,this.b=Number(t)||1,this.a=Number(n),0==this.a&&(this.a=e?this.frameRate*this.b:1),r&&(e=/^(\d+) (\d+)$/g.exec(r))&&(this.frameRate*=Number(e[1])/Number(e[2]))}function oc(){this.a=new Du}function ac(){}function sc(e,t,r){var n;(n=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=n[1],e.textAlign="middle"==t?Jt:Zt[t.toUpperCase()]):(n=/^vertical:(lr|rl)$/.exec(t))?e.writingMode="lr"==n[1]?"vertical-lr":"vertical-rl":(n=/^size:([\d.]+)%$/.exec(t))?e.size=Number(n[1]):(n=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(t))?(e.position=Number(n[1]),n[2]&&(t=n[2],e.positionAlign="line-left"==t||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center")):(n=/^region:(.*)$/.exec(t))?(t=function(e,t){var r=e.filter((function(e){return e.id==t}));return r.length?r[0]:null}(r,n[1]))&&(e.region=t):(r=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(r[1]),r[2]&&(e.lineAlign=or[r[2].toUpperCase()])):(r=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=nr,e.line=Number(r[1]),r[2]&&(e.lineAlign=or[r[2].toUpperCase()]))}function lc(e){if(null==(e=Mi(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g)))return null;var t=Number(e[2]),r=Number(e[3]);return 59i&&(i=Math.max(i+n,0));i=i}})),h("Array.prototype.find",(function(e){return e||function(e,t){return U(this,e,t).ve}}));var B="function"==typeof Object.assign?Object.assign:function(e,t){for(var r=1;rthis.a?e:Math.min(z(this.b),z(this.c))},e.console&&e.console.log.bind&&(q=console.warn.bind(console),$=console.error.bind(console));var J=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function Z(e){var t;e instanceof Z?(Q(this,e.ta),this.bb=e.bb,this.sa=e.sa,ee(this,e.Ab),this.ja=e.ja,te(this,e.a.clone()),this.Sa=e.Sa):e&&(t=String(e).match(J))?(Q(this,t[1]||"",!0),this.bb=re(t[2]||""),this.sa=re(t[3]||"",!0),ee(this,t[4]),this.ja=re(t[5]||"",!0),te(this,t[6]||"",!0),this.Sa=re(t[7]||"")):this.a=new ce(null)}function Q(e,t,r){e.ta=r?re(t,!0):t,e.ta&&(e.ta=e.ta.replace(/:$/,""))}function ee(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.Ab=t}else e.Ab=null}function te(e,t,r){t instanceof ce?e.a=t:(r||(t=ne(t,le)),e.a=new ce(t))}function re(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function ne(e,t,r){return"string"==typeof e?(e=encodeURI(e).replace(t,ie),r&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function ie(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(n=Z.prototype).ta="",n.bb="",n.sa="",n.Ab=null,n.ja="",n.Sa="",n.toString=function(){var e=[],t=this.ta;if(t&&e.push(ne(t,oe,!0),":"),t=this.sa){e.push("//");var r=this.bb;r&&e.push(ne(r,oe,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Ab)&&e.push(":",String(t))}return(t=this.ja)&&(this.sa&&"/"!=t.charAt(0)&&e.push("/"),e.push(ne(t,"/"==t.charAt(0)?se:ae,!0))),(t=this.a.toString())&&e.push("?",t),(t=this.Sa)&&e.push("#",ne(t,ue)),e.join("")},n.resolve=function(e){var t=this.clone();"data"===t.ta&&(t=new Z);var r=!!e.ta;r?Q(t,e.ta):r=!!e.bb,r?t.bb=e.bb:r=!!e.sa,r?t.sa=e.sa:r=null!=e.Ab;var n=e.ja;if(r)ee(t,e.Ab);else if(r=!!e.ja){if("/"!=n.charAt(0))if(this.sa&&!this.ja)n="/"+n;else{var i=t.ja.lastIndexOf("/");-1!=i&&(n=t.ja.substr(0,i+1)+n)}if(".."==n||"."==n)n="";else if(-1!=n.indexOf("./")||-1!=n.indexOf("/.")){i=0==n.lastIndexOf("/",0),n=n.split("/");for(var o=[],a=0;a=e.i){if(!e.c)return t.return(Promise.reject());e.a=1,e.b=e.f}return r=e.a,e.a++,0==r?t.return():(n=e.b*(1+(2*Math.random()-1)*e.h),S(t,new Promise((function(e){new fe(e).R(n/1e3)})),2));case 2:e.b*=e.g,w(t)}}))}))}function me(e,t,r,n){for(var i=[],o=3;o=n.priority)&&(Oe[e]={priority:r,Rf:t})}function Me(e,t){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null}}function Ne(){this.a=0}function Ue(e,t,r){ye.call(this,e,t),this.b=r}function Fe(){}function Be(){this.a=new we}function Ke(e,t,r,n){this.target=e,this.type=t,this.listener=r,this.a=function(e,t){if(null==t)return!1;if("boolean"==typeof t)return t;var r=new Set(["passive","capture"]);return Object.keys(t).filter((function(e){return!r.has(e)})),function(e){var t=Ge;if(null==t){t=!1;try{var r={},n={get:function(){return t=!0,!1}};Object.defineProperty(r,"passive",n),Object.defineProperty(r,"capture",n),n=function(){},e.addEventListener("test",n,r),e.removeEventListener("test",n,r)}catch(e){t=!1}Ge=t}return t||!1}(e)?t:t.capture||!1}(e,n),this.target.addEventListener(t,r,this.a)}Ie.registerScheme=De,Ie.unregisterScheme=function(e){delete Oe[e]},Ie.prototype.Tf=function(e){this.a.add(e)},Ie.prototype.registerRequestFilter=Ie.prototype.Tf,Ie.prototype.vg=function(e){this.a.delete(e)},Ie.prototype.unregisterRequestFilter=Ie.prototype.vg,Ie.prototype.Ie=function(){this.a.clear()},Ie.prototype.clearAllRequestFilters=Ie.prototype.Ie,Ie.prototype.Uf=function(e){this.b.add(e)},Ie.prototype.registerResponseFilter=Ie.prototype.Uf,Ie.prototype.wg=function(e){this.b.delete(e)},Ie.prototype.unregisterResponseFilter=Ie.prototype.wg,Ie.prototype.Je=function(){this.b.clear()},Ie.prototype.clearAllResponseFilters=Ie.prototype.Je,Ie.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0}},Ie.makeRequest=Me,Ie.prototype.destroy=function(){return this.f=!0,this.a.clear(),this.b.clear(),this.g.destroy()},Ie.prototype.destroy=Ie.prototype.destroy,Ie.prototype.request=function(e,t){var r=this,n=new Ne;if(this.f){var i=Promise.reject(new me(2,7,7001));return i.catch((function(){})),new Ue(i,(function(){return Promise.resolve()}),n)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?xe(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},t.uris=xe(t.uris);var o=(i=function(e,t,r){for(var n=_e(void 0),i={},o=(e=f(e.a)).next();!o.done;i={qd:i.qd},o=e.next())i.qd=o.value,n=n.U(function(e){return function(){return e.qd(t,r)}}(i));return n.U(void 0,(function(e){if(e&&7001==e.code)throw e;throw new me(2,1,1006,e)}))}(this,e,t)).U((function(){return function e(t,r,n,i,o,a,s){var l=new Z(n.uris[o]),u=l.ta,c=!1;u||(u=(u=location.protocol).slice(0,-1),Q(l,u),n.uris[o]=l.toString()),u=u.toLowerCase();var d,f=(u=Oe[u])?u.Rf:null;return f?Ae(pe(i)).U((function(){return t.f?be():(d=Date.now(),f(n.uris[o],n,r,(function(e,n,i){t.c&&1==r&&(t.c(e,n),c=!0,s.a=i)})))})).U((function(e){return null==e.timeMs&&(e.timeMs=Date.now()-d),{response:e,qf:c}}),(function(l){if(l&&7001==l.code)throw l;if(t.f)return be();if(l&&1==l.severity)return t.dispatchEvent(new Se("retry",{error:l instanceof me?l:null})),o=(o+1)%n.uris.length,e(t,r,n,i,o,l,s);throw l||a})):ve(new me(2,1,1e3,l))}(r,e,t,new he(t.retryParameters,!1),0,null,n)})),a=o.U((function(t){return function(e,t,r){for(var n=_e(void 0),i=(e=f(e.b)).next();!i.done;i=e.next())n=n.U(i.value.bind(null,t,r.response));return n.U((function(){return r}),(function(e){if(e&&7001==e.code)throw e;var t=2;throw e instanceof me&&(t=e.severity),new me(t,1,1007,e)}))}(r,e,t)})),s=Date.now(),l=0;i.promise.then((function(){l=Date.now()-s}),(function(){}));var u=0;return o.promise.then((function(){u=Date.now()}),(function(){})),i=new Ue((i=a.U((function(t){var n=Date.now()-u,i=t.response;return i.timeMs+=l,i.timeMs+=n,t.qf||!r.c||i.fromCache||1!=e||r.c(i.timeMs,i.data.byteLength),i}),(function(e){throw e&&(e.severity=2),e}))).promise,i.Zd,n),Pe(this.g,i),i},Ie.prototype.request=Ie.prototype.request,Ie.NumBytesRemainingClass=Ne,_(Ue,ye),Ie.PendingRequest=Ue,Ue.all=Ee,Ue.notAbortable=Ae,Ue.completed=_e,Ue.aborted=be,Ue.failed=ve,G("shaka.util.IReleasable",Fe),Fe.prototype.release=function(){},G("shaka.util.EventManager",Be),Be.prototype.release=function(){this.$a(),this.a=null},Be.prototype.release=Be.prototype.release,Be.prototype.w=function(e,t,r,n){this.a&&(e=new Ke(e,t,r,n),this.a.push(t,e))},Be.prototype.listen=Be.prototype.w,Be.prototype.da=function(e,t,r,n){var i=this;this.w(e,t,(function n(o){i.ea(e,t,n),r(o)}),n)},Be.prototype.listenOnce=Be.prototype.da,Be.prototype.ea=function(e,t,r){if(this.a)for(var n=this.a.get(t)||[],i=(n=f(n)).next();!i.done;i=n.next())(i=i.value).target!=e||r!=i.listener&&r||(i.ea(),this.a.remove(t,i))},Be.prototype.unlisten=Be.prototype.ea,Be.prototype.$a=function(){if(this.a){for(var e=this.a.getAll(),t=(e=f(e)).next();!t.done;t=e.next())t.value.ea();this.a.a={}}},Be.prototype.removeAll=Be.prototype.$a,Ke.prototype.ea=function(){this.target.removeEventListener(this.type,this.listener,this.a),this.listener=this.target=null,this.a=!1},Ke.prototype.unlisten=Ke.prototype.ea;var Ge=void 0;function Ve(e){if(e=new Uint8Array(e),new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");return new Z(e=st(e.subarray(4),!0)).sa}function He(e,t,r){function n(e){new DataView(o.buffer).setUint32(a,e.byteLength,!0),a+=4,i(e)}function i(e){o.set(e,a),a+=e.byteLength}if(!r||!r.byteLength)throw new me(2,6,6015);t="string"==typeof t?new Uint8Array(ct(t,!0)):new Uint8Array(t);var o=new Uint8Array(8+e.byteLength+t.byteLength+r.byteLength),a=0;return i(new Uint8Array(e)),n(t),n(new Uint8Array(r)),o}function Ye(e,t){for(var r=[],n=f(e),i=n.next();!i.done;i=n.next())r.push(t(i.value));return r}function ze(e,t){for(var r=f(e),n=r.next();!n.done;n=r.next())if(!t(n.value))return!1;return!0}function We(e){var t=new Map;return Object.keys(e).forEach((function(r){t.set(r,e[r])})),t}function $e(e){var t={};return e.forEach((function(e,r){t[r]=e})),t}function qe(e,t){var r=e;return t&&(r+='; codecs="'+t+'"'),r}function Xe(e){var t=(e=e.split("."))[0];return e.pop(),[t,e.join(".")]}G("shaka.util.FairPlayUtils.defaultGetContentId",Ve),G("shaka.util.FairPlayUtils.initDataTransform",He);var Je=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Ze(){return!(!e.MediaSource||!MediaSource.isTypeSupported)}function Qe(e){return""!=nt().canPlayType(e)}function et(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!rt("Tizen")}function tt(){if(!et())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function rt(e){return(navigator.userAgent||"").includes(e)}function nt(){return ot||(it||(it=new fe((function(){ot=null}))),(ot=document.querySelector("video")||document.querySelector("audio"))||(ot=document.createElement("video")),it.R(1),ot)}var it=null,ot=null;function at(e){if(!e)return"";239==(e=new Uint8Array(e))[0]&&187==e[1]&&191==e[2]&&(e=e.subarray(3)),e=dt(e),e=escape(e);try{return decodeURIComponent(e)}catch(e){throw new me(2,2,2004)}}function st(e,t,r){if(!e)return"";if(!r&&0!=e.byteLength%2)throw new me(2,2,2004);if(e instanceof ArrayBuffer)var n=e;else(r=new Uint8Array(e.byteLength)).set(new Uint8Array(e)),n=r.buffer;e=Math.floor(e.byteLength/2),r=new Uint16Array(e),n=new DataView(n);for(var i=0;i=e[t]}.bind(null,t);if(0==t[0]&&0==t[2])return st(e,!1);if(0==t[1]&&0==t[3])return st(e,!0);if(r(0)&&r(1)&&r(2)&&r(3))return at(e);throw new me(2,2,2003)}function ut(e){e=encodeURIComponent(e),e=unescape(e);for(var t=new Uint8Array(e.length),r=0;rr&&(r+=Math.pow(2,32)),r="0x"+r.toString(16)}e.g(new me(2,6,6006,t.message,t,r))}}))}function kt(e,t){if(_t(t).startsWith("com.apple.fps")){var r=t.serverCertificate;e=He(e,Ve(e),r)}return e}function xt(e,t){var r=t.target,n=e.b.get(r),i=e.a.licenseServerUri,o=e.f.advanced[e.a.keySystem];"individualization-request"==t.messageType&&o&&o.individualizationServer&&(i=o.individualizationServer),(i=Me([i],e.f.retryParameters)).body=t.message,i.method="POST",i.licenseRequestType=t.messageType,i.sessionId=r.sessionId,"com.microsoft.playready"!=e.a.keySystem&&"com.chromecast.playready"!=e.a.keySystem||function(e){var t=st(e.body,!0,!0);if(t.includes("PlayReadyKeyMessage")){for(var r=(t=(new DOMParser).parseFromString(t,"application/xml")).getElementsByTagName("HttpHeader"),n=0;n"===(t=t.trim()).substr(0,5)&&""===t.substr(-6)&&(t=t.slice(5,-6));try{t=JSON.parse(t).ckc}catch(e){}e.data=ht.Ba(t).buffer}(e),this.K+=(Date.now()-a)/1e3,r.update(e.data).then(function(){var e=this;this.B.onEvent(new Se("drmsessionupdate")),n&&(n.ya&&n.ya.resolve(),new fe((function(){n.loaded=!0,Pt(e)&&e.m.resolve()})).R(Ot))}.bind(this)))}.bind(e),function(e){this.c||(e=new me(2,6,6007,e),this.g(e),n&&n.ya&&n.ya.reject(e))}.bind(e)).catch(function(e){this.c||(e=new me(2,6,6008,e.message),this.g(e),n&&n.ya&&n.ya.reject(e))}.bind(e))}function Ct(){var e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],t=[{videoCapabilities:e,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:e}],r=new Map;return e="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").map((function(e){return function(e){return p((function n(){var i,o,a;return M(n,(function(n){switch(n.j){case 1:return k(n,2),S(n,navigator.requestMediaKeySystemAccess(e,t),4);case 4:return i=n.o,a=!!(o=i.getConfiguration().sessionTypes)&&o.includes("persistent-license"),rt("Tizen 3")&&(a=!1),r.set(e,{persistentState:a}),S(n,i.createMediaKeys(),5);case 5:C(n,0);break;case 2:R(n),r.set(e,null),w(n)}}))}))}(e)})),Promise.all(e).then((function(){return $e(r)}))}function Rt(e,t){var r=t.audio,n=t.video;if(r&&r.encrypted&&!At(e,qe(r.mimeType,r.codecs))||n&&n.encrypted&&!At(e,qe(n.mimeType,n.codecs)))return!1;var i=_t(e.a);return 0==t.drmInfos.length||t.drmInfos.some((function(e){return e.keySystem==i}))}function Lt(e,t){if(!e.length)return t;if(!t.length)return e;for(var r=[],n=0;nn||r&&1e3>n)&&t&&!t.ya&&(this.b.delete(e),e.close().catch((function(){}))),Pt(this)&&(this.m.resolve(),this.O.R(Dt))};var Ot=5,Dt=.5;function Mt(){this.a=new muxjs.mp4.CaptionParser,this.g=[],this.f={}}function Nt(){}function Ut(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function Ft(e,t,r){return r=void 0===r?0:r,!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t+r>=e.start(0)}function Bt(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;for(var r=0,n=e.length-1;0<=n&&e.end(n)>t;--n)r+=e.end(n)-Math.max(e.start(n),t);return r}function Kt(e){if(!e)return[];for(var t=[],r=0;r>4).toString(16),i+=(15&a).toString(16),r=r.replace(n[0],i)}return r}function qt(e,t,r){this.startTime=e,this.direction=tr,this.endTime=t,this.payload=r,this.region=new ur,this.position=null,this.positionAlign=Xt,this.size=100,this.textAlign=Jt,this.writingMode=rr,this.lineInterpretation=nr,this.line=null,this.lineHeight="",this.lineAlign=ir,this.displayAlign=Qt,this.fontSize=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=ar,this.fontStyle=sr,this.fontFamily="",this.textDecoration=[],this.wrapLine=!0,this.id="",this.nestedCues=[],this.spacer=!1}zt.prototype.destroy=function(){return this.a.dispose(),this.a=null,Promise.resolve()},zt.prototype.i=function(e){this.c=e.captions;var t=new Uint8Array(e.data.byteLength+e.initSegment.byteLength);t.set(e.initSegment,0),t.set(e.data,e.initSegment.byteLength),this.g.push(t)},zt.prototype.h=function(){var e={data:ht.concat.apply(null,this.g),captions:this.c};this.b.resolve(e),this.f=!1},G("shaka.text.Cue",qt);var Xt="auto";qt.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Xt};var Jt="center",Zt={LEFT:"left",RIGHT:"right",CENTER:Jt,START:"start",END:"end"};qt.textAlign=Zt;var Qt="after",er={BEFORE:"before",CENTER:"center",AFTER:Qt};qt.displayAlign=er;var tr="ltr";qt.direction={HORIZONTAL_LEFT_TO_RIGHT:tr,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var rr="horizontal-tb";qt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:rr,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var nr=0;qt.lineInterpretation={LINE_NUMBER:nr,PERCENTAGE:1};var ir="start",or={CENTER:"center",START:ir,END:"end"};qt.lineAlign=or;var ar=400;qt.fontWeight={NORMAL:ar,BOLD:700};var sr="normal",lr={NORMAL:sr,ITALIC:"italic",OBLIQUE:"oblique"};function ur(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=cr,this.scroll=dr}qt.fontStyle=lr,qt.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},G("shaka.text.CueRegion",ur);var cr=1;ur.units={PX:0,PERCENTAGE:cr,LINES:2};var dr="";function fr(e){this.g=null,this.c=e,this.f=this.m=0,this.h=1/0,this.b=this.a=null,this.l="",this.i=new Map}ur.scrollMode={NONE:dr,UP:"up"};var hr={};function pr(t){return!!(hr[t]||e.muxjs&&"application/cea-608"==t)}function mr(e,t){"application/cea-608"!=t&&(e.g=new hr[t])}function gr(e,t,r,n,i){for(var o=r+" "+n,a=new Map,s=(t=f(t)).next();!s.done;s=t.next()){var l=s.value;s=l.stream,a.has(s)||a.set(s,new Map),a.get(s).has(o)||a.get(s).set(o,[]),l.startTime+=i,l.endTime+=i,l.startTime>=e.f&&l.startTime=this.b||(e<=this.a&&t>=this.b?this.a=this.b=null:e<=this.a&&tthis.a&&t>=this.b&&(this.b=e))}.bind(this))};var vr=e.URL.createObjectURL;function br(e){var t=qe(e.mimeType,e.codecs),r=function(e){var t=[e.mimeType];return Je.forEach((function(r,n){var i=e[n];i&&t.push(r+'="'+i+'"')})),t.join(";")}(e);return pr(t)||MediaSource.isTypeSupported(r)||Wt(t,e.type)}function _r(e,t){e.a||(e.a=new fr(e.g)),mr(e.a,t)}function Ar(e){return!e.h||"ended"==e.h.readyState}function Er(e,t){if("text"==t)var r=e.a.a;else r=!(r=Sr(e,t))||1==r.length&&1e-6>r.end(0)-r.start(0)?null:1==r.length&&0>r.start(0)?0:r.length?r.start(0):null;return r}function Tr(e,t){return"text"==t?e.a.b:Ut(Sr(e,t))}function Sr(e,t){try{return e.b[t].buffered}catch(e){return null}}function wr(t,r,n,i,o,a){return"text"==r?function(e,t,r,n){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==r||null==n)this.g.parseInit(new Uint8Array(t));else{var e={periodStart:this.m,segmentStart:r,segmentEnd:n};e=this.g.parseMedia(new Uint8Array(t),e).filter(function(e){return e.startTime>=this.f&&e.startTimet&&(t+=.001),this.b[e].timestampOffset=t,this.xb(e)},n.hg=function(e,t,r){this.b[e].appendWindowStart=0,this.b[e].appendWindowEnd=r,this.b[e].appendWindowStart=t,this.xb(e)},n.lg=function(e){this.c[e][0].p.reject(new me(2,3,3014,this.f.error?this.f.error.code:0))},n.xb=function(e){var t=this.c[e][0];t&&(t.p.resolve(),Lr(this,e))};var Mr=new Map([["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"]]),Nr={bd:function(e,t,r){function n(e,t,r){return e>=t&&e<=r}var i=e.video;return!(i&&i.width&&i.height&&(!n(i.width,t.minWidth,Math.min(t.maxWidth,r.width))||!n(i.height,t.minHeight,Math.min(t.maxHeight,r.height))||!n(i.width*i.height,t.minPixels,t.maxPixels))||e&&e.frameRate&&!n(e.frameRate,t.minFrameRate,t.maxFrameRate)||!n(e.bandwidth,t.minBandwidth,t.maxBandwidth))},Gd:function(e,t,r){var n=!1;return e.forEach((function(e){var i=e.allowedByApplication;e.allowedByApplication=Nr.bd(e,t,r),i!=e.allowedByApplication&&(n=!0)})),n},filterNewPeriod:function(e,t,r,n){n.variants=n.variants.filter((function(n){if(e&&e.S&&!Rt(e,n))return!1;var i=n.audio;return n=n.video,!(i&&!br(i)||n&&!br(n)||i&&t&&!Nr.Hd(i,t)||n&&r&&!Nr.Hd(n,r))})),n.textStreams=n.textStreams.filter((function(e){return pr(qe(e.mimeType,e.codecs))}))},Hd:function(e,t){return e.mimeType==t.mimeType&&e.codecs.split(".")[0]==t.codecs.split(".")[0]},Ed:function(e){var t=e.audio,r=e.video,n=t?t.codecs:null,i=r?r.codecs:null,o=[];i&&o.push(i),n&&o.push(n);var a=[];r&&a.push(r.mimeType),t&&a.push(t.mimeType),a=a[0]||null;var s=[];t&&s.push(t.kind),r&&s.push(r.kind),s=s[0]||null;var l=new Set;return t&&t.roles.forEach((function(e){return l.add(e)})),r&&r.roles.forEach((function(e){return l.add(e)})),e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:s,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:a,codecs:o.join(", "),audioCodec:n,videoCodec:i,primary:e.primary,roles:Array.from(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null},r&&(e.videoId=r.id,e.originalVideoId=r.originalId,e.width=r.width||null,e.height=r.height||null,e.frameRate=r.frameRate||null,e.pixelAspectRatio=r.pixelAspectRatio||null,e.videoBandwidth=r.bandwidth||null),t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.label=t.label,e.audioRoles=t.roles),e},xc:function(e){return{id:e.id,active:!1,type:"text",bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:e.mimeType,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId}},Wc:function(e){return e.__shaka_id||(e.__shaka_id=Nr.yf++),e.__shaka_id},yf:0,sf:function(e){var t=Nr.Sd(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="application/cea-608"),t},rf:function(e){var t=Nr.Sd(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,"main"==e.kind?(t.primary=!0,t.roles=["main"],t.audioRoles=["main"]):t.audioRoles=[],t},Sd:function(e){return{id:Nr.Wc(e),active:!1,type:"",bandwidth:0,language:Ir(e.language),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}},rb:function(e){return e.allowedByApplication&&e.allowedByKeySystem},df:function(e){return e.filter((function(e){return Nr.rb(e)}))},Nd:function(e,t){for(var r=e.filter((function(e){return e.audio&&e.audio.channelsCount})),n=new Map,i=(r=f(r)).next();!i.done;i=r.next()){var o=(i=i.value).audio.channelsCount;n.has(o)||n.set(o,[]),n.get(o).push(i)}return 0==(r=Array.from(n.keys())).length?e:(i=r.filter((function(e){return e<=t}))).length?n.get(Math.max.apply(null,i)):n.get(Math.min.apply(null,r))},Jb:function(e,t,r){var n=e,i=e.filter((function(e){return e.primary}));i.length&&(n=i);var o=n.length?n[0].language:"";if(n=n.filter((function(e){return e.language==o})),t){var a=Dr(Ir(t),e.map((function(e){return e.language})));a&&(n=e.filter((function(e){return Ir(e.language)==a})))}if(r){if((e=Nr.Md(n,r)).length)return e}else if((e=n.filter((function(e){return 0==e.roles.length}))).length)return e;return(e=n.map((function(e){return e.roles})).reduce(Gt.Gc,[])).length?Nr.Md(n,e[0]):n},Md:function(e,t){return e.filter((function(e){return e.roles.includes(t)}))},Qd:function(e,t,r){for(var n=0;n=i.bandwidth/this.a.bandwidthDowngradeTarget&&t<=o&&(r=i)}return this.g=Date.now(),r},Ur.prototype.chooseVariant=Ur.prototype.chooseVariant,Ur.prototype.enable=function(){this.f=!0},Ur.prototype.enable=Ur.prototype.enable,Ur.prototype.disable=function(){this.f=!1},Ur.prototype.disable=Ur.prototype.disable,Ur.prototype.segmentDownloaded=function(e,t){var r=this.b;if(!(16e3>t)){var n=8e3*t/e,i=e/1e3;r.a+=t,Y(r.b,i,n),Y(r.c,i,n)}if(null!=this.g&&this.f)e:{if(this.i){if(Date.now()-this.g<1e3*this.a.switchInterval)break e}else{if(!(128e3<=this.b.a))break e;this.i=!0}r=this.chooseVariant(),this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate),this.h(r)}},Ur.prototype.segmentDownloaded=Ur.prototype.segmentDownloaded,Ur.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)},Ur.prototype.getBandwidthEstimate=Ur.prototype.getBandwidthEstimate,Ur.prototype.setVariants=function(e){this.c=e},Ur.prototype.setVariants=Ur.prototype.setVariants,Ur.prototype.configure=function(e){this.a=e},Ur.prototype.configure=Ur.prototype.configure,Br.prototype.toString=function(){return"v"+this.a+"."+this.b};var Hr=null,Yr="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),zr="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Wr=["loop","playbackRate"],$r=["pause","play"],qr="abrstatuschanged adaptation buffering drmsessionupdate emsg error expirationupdated largegap loading manifestparsed onstatechange onstateidle streaming textchanged texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged".split(" "),Xr={getAssetUri:2,getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},Jr={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Zr=[["getConfiguration","configure"]],Qr=[["isTextTrackVisible","setTextTrackVisibility"]],en="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),tn=["attach","detach","load","unload"];function rn(e){return JSON.stringify(e,(function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof Se){var r,n={};for(r in t){var i=t[r];i&&"object"==typeof i?"detail"==r&&(n[r]=i):r in Event||(n[r]=i)}return n}if(t instanceof TimeRanges)for(n={__type__:"TimeRanges",length:t.length,start:[],end:[]},r=0;rt?"-Infinity":"Infinity":t;return n}}))}function nn(e){return JSON.parse(e,(function(e,t){return"NaN"==t?NaN:"-Infinity"==t?-1/0:"Infinity"==t?1/0:t&&"object"==typeof t&&"TimeRanges"==t.__type__?function(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}(t):t&&"object"==typeof t&&"Uint8Array"==t.__type__?new Uint8Array(t.entries):t}))}function on(e,t,r,n,i,o){this.O=e,this.f=new fe(t),this.S=r,this.l=!1,this.F=n,this.K=i,this.B=o,this.b=this.h=!1,this.D="",this.i=null,this.m=this.ce.bind(this),this.s=this.Ff.bind(this),this.a={video:{},player:{}},this.u=0,this.c={},this.g=null,pn.add(this)}var an=!1,sn=null;function ln(e){for(var t=f(pn),r=t.next();!r.done;r=t.next())un(r.value,e)}function un(e,t){var r=e.B();e.g=new ge,e.l=!0,e.kd(r,t)}function cn(e){for(var t=f(pn),r=t.next();!r.done;r=t.next())r=r.value,an="available"==e,r.f.yc()}function dn(e){var t=sn;t.removeUpdateListener(e.m),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.s)}function fn(e){for(var t in e.c){var r=e.c[t];delete e.c[t],r.reject(new me(1,7,7e3))}}function hn(e){e=rn(e),sn.sendMessage("urn:x-cast:com.google.shaka.v2",e,(function(){}),X)}(n=on.prototype).destroy=function(){return pn.delete(this),fn(this),sn&&dn(this),this.f&&(this.f.stop(),this.f=null),this.K=this.F=null,this.b=this.h=!1,this.s=this.m=this.g=this.c=this.a=this.i=null,Promise.resolve()},n.ga=function(){return this.b},n.nd=function(){return this.D},n.init=function(){if(e.chrome&&chrome.cast&&chrome.cast.isAvailable&&this.O.length){this.h=!0,this.f.yc();var t=new chrome.cast.SessionRequest(this.O);t=new chrome.cast.ApiConfig(t,ln.bind(this),cn.bind(this),"origin_scoped"),chrome.cast.initialize(t,(function(){}),(function(){})),an&&this.f.R(.02),(t=sn)&&t.status!=chrome.cast.SessionStatus.STOPPED?un(this,t):sn=null}},n.ud=function(e){this.i=e,this.b&&hn({type:"appData",appData:this.i})},n.cast=function(e){return this.h?an?this.b?Promise.reject(new me(1,8,8002)):(this.g=new ge,chrome.cast.requestSession(this.kd.bind(this,e),this.be.bind(this)),this.g):Promise.reject(new me(1,8,8001)):Promise.reject(new me(1,8,8e3))},n.Kb=function(){this.b&&(fn(this),sn&&(dn(this),sn.stop((function(){}),(function(){})),sn=null))},n.get=function(e,t){if("video"==e){if($r.includes(t))return this.le.bind(this,e,t)}else if("player"==e){if(Jr[t]&&!this.get("player","isLive")())return function(){};if(en.includes(t))return this.le.bind(this,e,t);if(tn.includes(t))return this.Wf.bind(this,e,t);if(Xr[t])return this.ie.bind(this,e,t)}return this.ie(e,t)},n.set=function(e,t,r){this.a[e][t]=r,hn({type:"set",targetName:e,property:t,value:r})},n.kd=function(e,t){sn=t,t.addUpdateListener(this.m),t.addMessageListener("urn:x-cast:com.google.shaka.v2",this.s),this.ce(),hn({type:"init",initState:e,appData:this.i}),this.g.resolve()},n.be=function(e){var t=8003;switch(e.code){case"cancel":t=8004;break;case"timeout":t=8005;break;case"receiver_unavailable":t=8006}this.g.reject(new me(2,8,t,e))},n.ie=function(e,t){return this.a[e][t]},n.le=function(e,t,r){for(var n=[],i=2;i>24&255,e>>16&255,e>>8&255,255&e)}function Fn(e){var t=this;this.a=[],this.b=[],this.data=[],(new In).H("moov",On).fa("pssh",(function(e){if(!(1this.J.byteLength&&Pn();var t=new Uint8Array(this.J.buffer,this.J.byteOffset+this.a,e);return this.a+=e,t},Ln.prototype.readBytes=Ln.prototype.Za,Ln.prototype.M=function(e){this.a+e>this.J.byteLength&&Pn(),this.a+=e},Ln.prototype.skip=Ln.prototype.M,Ln.prototype.me=function(e){this.ae||e>this.J.byteLength)&&Pn(),this.a=e},Ln.prototype.seek=Ln.prototype.seek,Ln.prototype.md=function(){for(var e=this.a;this.ua()&&0!=this.J.getUint8(this.a);)this.a+=1;return e=new Uint8Array(this.J.buffer,this.J.byteOffset+e,this.a-e),this.a+=1,at(e)},Ln.prototype.readTerminatedString=Ln.prototype.md,G("shaka.util.Mp4Parser",In),In.prototype.H=function(e,t){var r=Nn(e);return this.c[r]=0,this.b[r]=t,this},In.prototype.box=In.prototype.H,In.prototype.fa=function(e,t){var r=Nn(e);return this.c[r]=1,this.b[r]=t,this},In.prototype.fullBox=In.prototype.fa,In.prototype.stop=function(){this.a=!0},In.prototype.stop=In.prototype.stop,In.prototype.parse=function(e,t){var r=new Uint8Array(e);for(r=new Ln(new DataView(r.buffer,r.byteOffset,r.byteLength),0),this.a=!1;r.ua()&&!this.a;)this.sc(0,r,t)},In.prototype.parse=In.prototype.parse,In.prototype.sc=function(e,t,r){var n=t.ca(),i=t.G(),o=t.G();switch(i){case 0:i=t.J.byteLength-n;break;case 1:i=t.Bb()}var a=this.b[o];if(a){var s=null,l=null;1==this.c[o]&&(s=(l=t.G())>>>24,l&=16777215),o=n+i,r&&o>t.J.byteLength&&(o=t.J.byteLength),o-=t.ca(),t=0 LA_URL"))?e.textContent:""}(e):""):""}));function Yn(e){var t=e.getAttribute("schemeIdUri"),r=Bn.getAttributeNS(e,"urn:mpeg:cenc:2013","default_KID"),n=Bn.Od(e,"urn:mpeg:cenc:2013","pssh").map(Bn.ic);if(!t)return null;if(t=t.toLowerCase(),r&&(r=r.replace(/-/g,"").toLowerCase()).includes(" "))throw new me(2,4,4009);var i=[];try{i=n.map((function(e){return{initDataType:"cenc",initData:ht.Ba(e),keyId:null}}))}catch(e){throw new me(2,4,4007)}return{node:e,ne:t,keyId:r,init:0(f=f||0))if(d+1=f)break;f=Math.ceil((f-h)/p)-1}else{if(1/0==l)break;if(h/i>=l)break;f=Math.ceil((l*i-h)/p)-1}0>>31;u&=2147483647;var d=n.reader.G();if(n.reader.M(4),1==c)throw new me(2,3,3006);i.push(new Zn(i.length,a/o-t,(a+d)/o-t,(function(){return r}),e,e+u-1)),a+=d,e+=u}return n.parser.stop(),i}(t,n,r,e)}));if(e&&o.parse(e),i)return i;throw new me(2,3,3004)}function ei(e){this.a=e}function ti(e,t){for(;e.a.length&&e.a[e.a.length-1].startTime>=t;)e.a.pop();for(;e.a.length&&0>=e.a[0].endTime;)e.a.shift();if(0!=e.a.length){var r=e.a[e.a.length-1];e.a[e.a.length-1]=new Zn(r.position,r.startTime,t,r.c,r.b,r.a)}}function ri(e){this.b=e,this.a=new Ln(e,0),Vn||(Vn=[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])])}function ni(e){var t=ii(e);if(7=t&&!(r&1<<8-t);t++);if(8e||r&&e>=r?null:Math.floor(e/n)},getSegmentReference:function(e){var t=e*n,c=t+n;return r&&(c=Math.min(c,r)),0>c||r&&t>=r?null:new Zn(e,t,c,(function(){var r=zn(a,l,e+i,s,t*o);return Vt(u,[r])}),0,null)}}}(e,o)):(a=t=null,e.ka.id&&e.C.id&&(t=r[a=e.ka.id+","+e.C.id]),s=function(e,t){for(var r=[],n=0;n=r.startTime&&e(e-=this.a[0].position)||e>=this.a.length?null:this.a[e]},ei.prototype.get=ei.prototype.get,ei.prototype.offset=function(e){for(var t=0;to.startTime?0==r&&t.push(o):(.1e)return void this.a.splice(0,t);this.a=[]},ei.prototype.evict=ei.prototype.Lc,ri.prototype.ua=function(){return this.a.ua()},si.prototype.parse=function(e,t,r,n){var i;if(440786851!=ni(t=new ri(new DataView(t))).id)throw new me(2,3,3008);var o=ni(t);if(408125543!=o.id)throw new me(2,3,3009);for(t=o.a.byteOffset,o=new ri(o.a),i=null;o.ua();){var a=ni(o);if(357149030==a.id){i=a;break}}if(!i)throw new me(2,3,3010);for(o=new ri(i.a),i=1e6,a=null;o.ua();){var s=ni(o);if(2807729==s.id)i=ai(s);else if(17545==s.id)if(4==(a=s).a.byteLength)a=a.a.getFloat32(0);else{if(8!=a.a.byteLength)throw new me(2,3,3003);a=a.a.getFloat64(0)}}if(null==a)throw new me(2,3,3011);if(i=a*(o=i/1e9),475249515!=(e=ni(new ri(new DataView(e)))).id)throw new me(2,3,3007);return function(e,t,r,n,i,o){function a(){return i}var s=[];e=new ri(e.a);for(var l=null,u=null;e.ua();){var c=ni(e);if(187==c.id){var d=li(c);d&&(c=r*d.yg,d=t+d.Vf,null!=l&&s.push(new Zn(s.length,l-o,c-o,a,u,d-1)),l=c,u=d)}}return null!=l&&s.push(new Zn(s.length,l-o,n-o,a,u,null)),s}(e,t,o,i,r,n)};var gi={zb:{},Sb:{},pd:function(e,t){gi.Sb[e]=t}};function yi(e,t,r){this.f=e,this.vc=t,this.h=this.g=1/0,this.a=1,this.b=this.c=null,this.l=0,this.m=!0,this.i=0,this.s=void 0===r||r}function vi(e,t,r,n){return e=Me(e,n),0==t&&null==r||(e.headers.Range=r?"bytes="+t+"-"+r:"bytes="+t+"-"),e}function bi(){var e=this;this.b=this.a=null,this.f=[],this.c=null,this.l=[],this.h=1,this.m={},this.s=0,this.u=new H(5),this.i=new fe((function(){!function(e){p((function t(){var r,n;return M(t,(function(t){switch(t.j){case 1:return r=0,k(t,2),S(t,_i(e),4);case 4:r=t.o,C(t,3);break;case 2:n=R(t),e.b&&(n.severity=1,e.b.onError(n));case 3:if(!e.b)return t.return();Si(e,r),w(t)}}))}))}(e)})),this.g=new je}function _i(e){var t=Date.now(),r=e.b.networkingEngine.request(0,Me(e.f,e.a.retryParameters));return Pe(e.g,r),r.promise.then((function(t){if(e.b)return t.uri&&!e.f.includes(t.uri)&&e.f.unshift(t.uri),function(e,t,r){if(!(t=Bn.ge(t,"MPD")))throw new me(2,4,4001,r);return t=Xn(t,e.a.retryParameters,e.a.dash.xlinkFailGracefully,r,e.b.networkingEngine),Pe(e.g,t),t.promise.then((function(t){return function(e,t,r){return p((function n(){var i,o,a,s,l,u,c,d,f,h,p,m,g,y,v,b,_,A,E,T,k,x,C,R;return M(n,(function(n){switch(n.j){case 1:s=Gt,u=[r],0<(c=(l=Bn).P(t,"Location").map(l.ic).filter(s.Ia)).length&&(d=Vt(u,c),u=e.f=d),f=l.P(t,"BaseURL").map(l.ic),h=Vt(u,f),p=e.a.dash.ignoreMinBufferTime,m=0,p||(m=l.I(t,"minBufferTime",l.Ea)),e.s=l.I(t,"minimumUpdatePeriod",l.Ea,-1),g=l.I(t,"availabilityStartTime",l.Of),y=l.I(t,"timeShiftBufferDepth",l.Ea),v=l.I(t,"maxSegmentDuration",l.Ea),b=t.getAttribute("type")||"static",_=e.a.dash.ignoreSuggestedPresentationDelay,A=null,_||(A=l.I(t,"suggestedPresentationDelay",l.Ea)),e.c?E=e.c.presentationTimeline:(T=Math.max(e.a.dash.defaultPresentationDelay,1.5*m),E=new yi(g,null!=A?A:T,e.a.dash.autoCorrectDrift));for(var L={mb:"static"!=b,presentationTimeline:E,ka:null,T:null,aa:null,C:null,bandwidth:0,Vd:!1},j=h,P=Bn.I(t,"mediaPresentationDuration",Bn.Ea),I=[],O=0,D=Bn.P(t,"Period"),M=0;Me.s||e.i.R(Math.max(3,e.s-t,z(e.u)))}function wi(e,t,r){t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,gd:null,audioSamplingRate:null},r=r||t.qa;var n=Bn.yb,i=Bn.Me,o=Bn.P(e,"BaseURL").map(Bn.ic),a=e.getAttribute("contentType")||t.contentType,s=e.getAttribute("mimeType")||t.mimeType,l=e.getAttribute("codecs")||t.codecs;i=Bn.I(e,"frameRate",i)||t.frameRate;for(var u=e.getAttribute("par")||t.pixelAspectRatio,c=Bn.P(e,"InbandEventStream"),d=t.emsgSchemeIdUris.slice(),h=(c=f(c)).next();!h.done;h=c.next())h=h.value.getAttribute("schemeIdUri"),d.includes(h)||d.push(h);return c=function(e){for(var t=0;t>=1;return e}}}return null}(c=Bn.P(e,"AudioChannelConfiguration"))||t.gd,h=Bn.I(e,"audioSamplingRate",n)||t.audioSamplingRate,a||(a=xi(s,l)),{qa:Vt(r,o),Ub:Bn.gc(e,"SegmentBase")||t.Ub,La:Bn.gc(e,"SegmentList")||t.La,Wb:Bn.gc(e,"SegmentTemplate")||t.Wb,width:Bn.I(e,"width",n)||t.width,height:Bn.I(e,"height",n)||t.height,contentType:a,mimeType:s,codecs:l,frameRate:i,pixelAspectRatio:u,emsgSchemeIdUris:d,id:e.getAttribute("id"),gd:c,audioSamplingRate:h}}function ki(e,t,r,n){return(t=Me(t=Vt(t,[r]),e.a.retryParameters)).method=n,t=e.b.networkingEngine.request(4,t),Pe(e.g,t),t.promise.then((function(e){if("HEAD"==n){if(!e.headers||!e.headers.date)return 0;e=e.headers.date}else e=at(e.data);return e=Date.parse(e),isNaN(e)?0:e-Date.now()}))}function xi(e,t){return pr(qe(e,t))?"text":e.split("/")[0]}function Ci(e,t,r,n){this.b=e,this.type=t,this.a=r,this.segments=n||null}function Ri(e,t,r,n){this.id=e,this.name=t,this.a=r,this.value=void 0===n?null:n}function Li(e,t){this.name=e,this.value=t}function ji(e,t,r){return(e=e.getAttribute(t))?e.value:r||null}function Pi(e,t){this.b=t,this.a=e}G("shaka.media.ManifestParser.registerParserByExtension",gi.pd),gi.Cb=function(e,t){gi.zb[e]=t},G("shaka.media.ManifestParser.registerParserByMime",gi.Cb),gi.Sf=function(){var e={};if(Ze()){for(var t in gi.zb)e[t]=!0;for(var r in gi.Sb)e[r]=!0}t={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var n=(r=f(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!n.done;n=r.next())e[n=n.value]=Ze()?!!gi.zb[n]:Qe(n);for(var i in t)e[i]=Ze()?!!gi.Sb[i]:Qe(t[i]);return e},gi.create=function(e,t,r,n){return p((function i(){var o,a;return M(i,(function(i){switch(i.j){case 1:return k(i,2),S(i,gi.Ue(e,t,r,n),4);case 4:return o=i.o,i.return(new o);case 2:throw(a=R(i)).severity=2,a}}))}))},gi.Ue=function(e,t,r,n){return p((function i(){var o,a,s,l,u;return M(i,(function(i){switch(i.j){case 1:if(o=gi,n&&(a=o.zb[n.toLowerCase()]))return i.return(a);if((s=o.getExtension(e))&&(l=o.Sb[s]))return i.return(l);if(n){i.A(2);break}return S(i,o.bf(e,t,r),3);case 3:if((n=i.o)&&(u=gi.zb[n]))return i.return(u);case 2:throw new me(2,4,4e3,e)}}))}))},gi.bf=function(e,t,r){return p((function n(){var i,o,a;return M(n,(function(n){switch(n.j){case 1:return(i=Me([e],r)).method="HEAD",S(n,t.request(0,i).promise,2);case 2:return o=n.o,a=o.headers["content-type"],n.return(a?a.toLowerCase().split(";").shift():"")}}))}))},gi.getExtension=function(e){return 1==(e=new Z(e).ja.split("/").pop().split(".")).length?"":e.pop().toLowerCase()},gi.isSupported=function(e,t){return!!Ze()&&(t in gi.zb||gi.getExtension(e)in gi.Sb)},G("shaka.media.PresentationTimeline",yi),yi.prototype.Y=function(){return this.g},yi.prototype.getDuration=yi.prototype.Y,yi.prototype.$e=function(){return this.a},yi.prototype.getMaxSegmentDuration=yi.prototype.$e,yi.prototype.xa=function(e){this.g=e},yi.prototype.setDuration=yi.prototype.xa,yi.prototype.hf=function(){return this.f},yi.prototype.getPresentationStartTime=yi.prototype.hf,yi.prototype.pe=function(e){this.l=e},yi.prototype.setClockOffset=yi.prototype.pe,yi.prototype.Xb=function(e){this.m=e},yi.prototype.setStatic=yi.prototype.Xb,yi.prototype.xd=function(e){this.h=e},yi.prototype.setSegmentAvailabilityDuration=yi.prototype.xd,yi.prototype.ig=function(e){this.vc=e},yi.prototype.setDelay=yi.prototype.ig,yi.prototype.Se=function(){return this.vc},yi.prototype.getDelay=yi.prototype.Se,yi.prototype.vb=function(e,t){if(0!=e.length){var r=e[e.length-1].endTime+t;this.fd(e[0].startTime+t),this.a=e.reduce((function(e,t){return Math.max(e,t.endTime-t.startTime)}),this.a),this.b=Math.max(this.b,r),null!=this.f&&this.s&&(this.f=(Date.now()+this.l)/1e3-this.b-this.a)}},yi.prototype.notifySegments=yi.prototype.vb,yi.prototype.fd=function(e){this.c=null==this.c?e:Math.min(this.c,e)},yi.prototype.notifyMinSegmentStartTime=yi.prototype.fd,yi.prototype.ed=function(e){this.a=Math.max(this.a,e)},yi.prototype.notifyMaxSegmentDuration=yi.prototype.ed,yi.prototype.offset=function(e){null!=this.c&&(this.c+=e),null!=this.b&&(this.b+=e)},yi.prototype.offset=yi.prototype.offset,yi.prototype.V=function(){return 1/0==this.g&&!this.m},yi.prototype.isLive=yi.prototype.V,yi.prototype.Xa=function(){return 1/0!=this.g&&!this.m},yi.prototype.isInProgress=yi.prototype.Xa,yi.prototype.Ob=function(){if(1/0==this.h)return this.i;var e=this.pb()-this.h;return Math.max(this.i,e)},yi.prototype.getSegmentAvailabilityStart=yi.prototype.Ob,yi.prototype.qe=function(e){this.i=e},yi.prototype.setUserSeekStart=yi.prototype.qe,yi.prototype.pb=function(){return this.V()||this.Xa()?Math.min(Math.max(0,(Date.now()+this.l)/1e3-this.a-this.f),this.g):this.g},yi.prototype.getSegmentAvailabilityEnd=yi.prototype.pb,yi.prototype.Nb=function(e){var t=Math.max(this.c,this.i);if(1/0==this.h)return t;var r=this.pb()-this.h;return e=Math.min(r+e,this.Ca()),Math.max(t,e)},yi.prototype.getSafeSeekRangeStart=yi.prototype.Nb,yi.prototype.ob=function(){return this.Nb(0)},yi.prototype.getSeekRangeStart=yi.prototype.ob,yi.prototype.Ca=function(){var e=this.V()||this.Xa()?this.vc:0;return Math.max(0,this.pb()-e)},yi.prototype.getSeekRangeEnd=yi.prototype.Ca,yi.prototype.ue=function(){return!(null==this.f||null!=this.b&&this.s)},yi.prototype.usingPresentationStartTime=yi.prototype.ue,G("shaka.dash.DashParser",bi),(n=bi.prototype).configure=function(e){this.a=e},n.start=function(e,t){var r=this;return p((function n(){var i;return M(n,(function(n){switch(n.j){case 1:return r.f=[e],r.b=t,S(n,_i(r),2);case 2:if(i=n.o,r.b&&Si(r,i),!r.b)throw new me(2,7,7001);return n.return(r.c)}}))}))},n.stop=function(){return this.a=this.b=null,this.f=[],this.c=null,this.l=[],this.m={},null!=this.i&&(this.i.stop(),this.i=null),this.g.destroy()},n.update=function(){_i(this).catch(function(e){this.b&&this.b.onError(e)}.bind(this))},n.onExpirationUpdated=function(){},n.Nf=function(e,t){if(e.aa=wi(t,e.ka,null),"image"==e.aa.contentType)return null;var r=!1,n=Bn.P(t,"Role"),i=n.map((function(e){return e.getAttribute("value")})).filter(Gt.Ia),o=void 0,a="text"==e.aa.contentType;a&&(o="subtitle");for(var s=0;s>4)&&2!=o||n(),3==o&&(o=r.la(),r.M(o)),1==r.G()>>8)return r.M(3),0!=(i=r.la()>>6)&&1!=i||n(),0==r.la()&&n(),i=r.la(),o=r.Tb(),r=r.Tb(),(1073741824*((14&i)>>1)+((65534&o)<<14|(65534&r)>>1))/9e4;r.seek(i+188),71!=(o=r.la())&&(r.seek(i+192),o=r.la()),71!=o&&(r.seek(i+204),o=r.la()),71!=o&&n(),r.me(1)}}(t,p.uri,p.data));case 4:if("application/mp4"!=i&&!i.startsWith("text/")){a.A(6);break}return S(a,to(e,n),7);case 7:return m=a.o,a.return(function(e,t,r){return pr(e=qe(e,t))?(mr(t=new fr(null),e),t.kc(r)):0}(i,o,m.data));case 6:throw new me(2,4,4030,t)}}))}))}(e,t,d,c,i,o),2);case 2:f=a.o,u.split("/").pop();for(var v=0;vr.length||"data"!=r[0])throw new me(2,1,1004,t);if(2>(r=r.slice(1).join(":").split(",")).length)throw new me(2,1,1004,t);var n=r[0];r=e.decodeURIComponent(r.slice(1).join(","));var i=null;if(1<(n=n.split(";")).length&&(i=n[1]),"base64"==i)t=ht.Ba(r).buffer;else{if(i)throw new me(2,1,1005,t);t=ut(r)}return{data:t,contentType:n[0]}},De("data",Hi),G("shaka.hls.HlsParser",Yi),(n=Yi.prototype).configure=function(e){this.a=e},n.start=function(e,t){var r=this;return p((function n(){var i,o;return M(n,(function(n){switch(n.j){case 1:return r.f=t,S(n,uo(r,Me([e],r.a.retryParameters),0),2);case 2:return i=n.o,r.u=i.uri,S(n,function(e,t){return p((function r(){var n,i,o,a,s,l,u,c,d,h,m;return M(r,(function(r){switch(r.j){case 1:if(0!=(n=Fi(e.s,t,e.u)).type)throw new me(2,4,4022);return S(r,function(e,t){return p((function r(){var n,i,o,a,s,l,u,c,d,h,m,g;return M(r,(function(r){switch(r.j){case 1:return n=Ii,i=Gt,o=t.a,a=n.nb(t.a,"EXT-X-MEDIA"),s=a.filter(function(e){return"SUBTITLES"==no(e,"TYPE")}.bind(e)),l=s.map(function(e){var t=this;return p((function r(){var n;return M(r,(function(r){switch(r.j){case 1:return t.a.disableText?r.return(null):(k(r,2),S(r,function(e,t){return p((function r(){var n;return M(r,(function(r){switch(r.j){case 1:return no(t,"TYPE"),S(r,qi(e,t,[]),2);case 2:return n=r.o,r.return(n.stream)}}))}))}(t,e),4));case 4:return r.return(r.o);case 2:if(n=R(r),t.a.hls.ignoreTextStreamFailures)return r.return(null);throw n}}))}))}.bind(e)),u=a.filter((function(e){return"CLOSED-CAPTIONS"==no(e,"TYPE")})),function(e,t){for(var r=f(t),n=r.next();!n.done;n=r.next()){no(n=n.value,"TYPE");var i=ji(n,"LANGUAGE")||"und";i=Ir(i);var o=no(n,"GROUP-ID");n=no(n,"INSTREAM-ID"),e.l.get(o)||e.l.set(o,new Map),e.l.get(o).set(n,i)}}(e,u),S(r,Promise.all(l),2);case 2:return c=r.o,d=n.nb(o,"EXT-X-STREAM-INF"),h=d.map(function(e){return function(e,t,r){return p((function n(){var i,o,a,s,l,u,c,d,h,m,g,y,v,b,_,A,E,T,w,k,x,C,R,L,j,P,I;return M(n,(function(n){switch(n.j){case 1:return i=Yt,o=Ii,a=ji(t,"CODECS","avc1.42E01E,mp4a.40.2"),s=function(e){for(var t=new Set,r=[],n=(e=f(e)).next();!n.done;n=e.next()){var i=Xe(n=n.value)[0];t.has(i)||(r.push(n),t.add(i))}return r}(a.split(/\s*,\s*/)),l=t.getAttribute("RESOLUTION"),c=u=null,d=ji(t,"FRAME-RATE"),h=Number(no(t,"BANDWIDTH")),l&&(m=l.value.split("x"),u=m[0],c=m[1]),g=(g=(g=o.nb(r.a,"EXT-X-MEDIA")).filter((function(e){return"CLOSED-CAPTIONS"!=no(e,"TYPE")}))).filter((function(e){var t=ji(e,"URI")||"";return"SUBTITLES"==(ji(e,"TYPE")||"")||""!=t})),y=ji(t,"AUDIO"),v=ji(t,"VIDEO"),y?g=o.Pc(g,"AUDIO",y):v&&(g=o.Pc(g,"VIDEO",v)),(b=ro(i.ra,s))&&((_=ji(t,"SUBTITLES"))&&(A=o.Pc(g,"SUBTITLES",_)).length&&(E=e.D.get(A[0].id))&&(E.stream.codecs=b),Re(s,b)),T=g.map(function(e){return qi(this,e,s)}.bind(e)),w=[],k=[],S(n,Promise.all(T),2);case 2:if(C=(C=n.o).filter((function(e){return null!=e})),y?w=C:v&&(k=C),L=!1,w.length||k.length?w.length?(P=no(t,"URI"),I=w[0].Bc,P==I?(R=i.Eb,L=!0):R=i.Pa):R=i.Eb:1==s.length?(j=ro(i.Pa,s),R=l||d||j?i.Pa:i.Eb):(R=i.Pa,s=[s.join(",")]),L){n.A(3);break}return S(n,function(e,t,r,n){return p((function i(){var o,a,s,l,u;return M(i,(function(i){switch(i.j){case 1:return o=Yt,a=no(t,"URI"),e.b.has(a)?i.return(e.b.get(a)):(s=ji(t,"CLOSED-CAPTIONS"),l=null,n==o.Pa&&s&&"NONE"!=s&&(l=e.l.get(s)),S(i,Xi(e,a,r,n,"und",!1,null,null,l),2));case 2:return null==(u=i.o)?i.return(null):e.b.has(a)?i.return(e.b.get(a)):(e.b.set(a,u),i.return(u))}}))}))}(e,t,s,R),4);case 4:x=n.o;case 3:if(x)x.stream.type==i.Eb?w=[x]:k=[x];else if(null===x)return n.return([]);return k&&Wi(k),w&&Wi(w),n.return(function(e,t,r,n,i,o,a){r.forEach(function(e){(e=e.stream)&&(e.width=Number(i)||void 0,e.height=Number(o)||void 0,e.frameRate=Number(a)||void 0)}.bind(e));var s=!!e.a&&e.a.disableAudio;t.length&&!s||(t=[null]),s=!!e.a&&e.a.disableVideo,(!r.length||s)&&(r=[null]),s=[];for(var l=(t=f(t)).next();!l.done;l=t.next()){l=l.value;for(var u=f(r),c=u.next();!c.done;c=u.next()){var d=c.value;c=l?l.stream:null;var h=d?d.stream:null,p=l?l.drmInfos:null,m=d?d.drmInfos:null;d=(d?d.Bc:"")+" - "+(l?l.Bc:"");var g=void 0;if(c&&h){if(p.length&&m.length&&!(0(h=y.value).dd&&(h.stream.presentationTimeOffset=-d,h.Vb.offset(d))}else for(e.c.xa(s),e.c.offset(-o),y=(g=f(e.b.values())).next();!y.done;y=g.next())(m=y.value).stream.presentationTimeOffset=o,m.Vb.offset(-o),ti(m.Vb,s);e.m={presentationTimeline:e.c,periods:[i],offlineSessionIds:[],minBufferTime:0},w(r)}}))}))}(r,i.data),3);case 3:return 0<(o=r.O)&&r.h.R(o),n.return(r.m)}}))}))},n.stop=function(){this.h&&(this.h.stop(),this.h=null);var e=[];return this.i&&(e.push(this.i.destroy()),this.i=null),this.a=this.f=null,this.D.clear(),this.S.clear(),this.b.clear(),this.m=null,Promise.all(e)},n.update=function(){if(this.g!=ho.Qa){for(var e=[],t=f(this.b.values()),r=t.next();!r.done;r=t.next())e.push(zi(this,r.value));return Promise.all(e)}},n.onExpirationUpdated=function(){};var oo={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},ao=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],so={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};function lo(e,t){e.g=t,e.c&&e.c.Xb(e.g==ho.Qa),e.g!=ho.Qa||e.h.stop()}function uo(e,t,r){if(!e.i)throw new me(2,7,7001);return t=e.f.networkingEngine.request(r,t),Pe(e.i,t),t.promise}var co={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=no(e,"METHOD");return Kr("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227"),["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].includes(t)?(t=no(e,"URI"),t=Hi.parse(t),t=Ht("com.widevine.alpha",[{initDataType:"cenc",initData:t=new Uint8Array(t.data)}]),(e=ji(e,"KEYID"))&&(t.keyIds=[e.substr(2).toLowerCase()]),t):null}},fo="VOD",ho={Qa:fo,xe:"EVENT",Fd:"LIVE"};function po(){this.a=new Map}function mo(e,t,r){go(e,t).text=r}function go(e,t){return e.a.has(t)||e.a.set(t,new yo),e.a.get(t)}function yo(){this.text=this.variant=null}function vo(e,t){this.a=e,this.b=new Set([e]);for(var r=f(t=t||[]),n=r.next();!n.done;n=r.next())this.add(n.value)}function bo(e,t){var r;if(!(r=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(r=e.audio&&t.audio)){r=e.audio;var n=t.audio;r=!(r.channelsCount==n.channelsCount&&_o(r,n)&&Ao(r.roles,n.roles))}return!r&&(r=e.video&&t.video)&&(r=!(_o(r=e.video,n=t.video)&&Ao(r.roles,n.roles))),!r}function _o(e,t){if(e.mimeType!=t.mimeType)return!1;var r=e.codecs.split(",").map((function(e){return Xe(e)[0]})),n=t.codecs.split(",").map((function(e){return Xe(e)[0]}));if(r.length!=n.length)return!1;r.sort(),n.sort();for(var i=0;ii-.5)){t=!0;break e}}t=!1}return t}function jo(e,t,r,n,i){var o=this;this.a=e,this.u=t,this.s=r,this.l=i,this.f=new Be,this.i=!1,this.m=e.readyState,this.c=!1,this.b=n,this.h=!1,this.f.w(e,"waiting",(function(){return Po(o)})),this.g=new fe((function(){Po(o)})).Na(.25)}function Po(e){if(0!=e.a.readyState){if(e.a.seeking){if(!e.i)return}else e.i=!1;if(!e.a.paused){e.a.readyState!=e.m&&(e.c=!1,e.m=e.a.readyState);var t=e.s.smallGapLimit,r=e.a.currentTime,n=e.a.buffered;e:{if(n&&n.length&&!(1==n.length&&1e-6>n.end(0)-n.start(0)))for(var i=rt("Edge/")||rt("Trident/")||rt("Tizen")||rt("CrKey")?.5:.1,o=0;or&&(0==o||n.end(o-1)-r<=i)){i=o;break e}i=null}if(null==i)e.b&&(r=Lo(n=(e=e.b).g),i=n.a.currentTime,o=Date.now()/1e3,e.a==i&&e.h==r||(e.f=o,e.a=i,e.h=r,e.b=!1),(i=o-e.f)>=e.i&&r&&!e.b&&(e.c(e.a,i),e.b=!0,e.a=n.a.currentTime));else if(0!=i||e.h){o=n.start(i);var a=e.u.Ca();if(!(o>=a)){t=(a=o-r)<=t;var s=!1;.001>a||(t||e.c||(e.c=!0,(r=new Se("largegap",{currentTime:r,gapSize:a})).cancelable=!0,e.l(r),e.s.jumpLargeGaps&&!r.defaultPrevented&&(s=!0)),!t&&!s)||(0!=i&&n.end(i-1),e.a.currentTime=o)}}}}}function Io(e){var t=this;this.c=e,this.a=new Set,this.b=new fe((function(){Oo(t,!1)})).Na(.25)}function Oo(e,t){for(var r=f(e.a),n=r.next();!n.done;n=r.next())n.value.g(e.c.currentTime,t)}function Do(e){for(var t=[],r=(e=f(e)).next();!r.done;r=e.next())for(var n=(r=f(r.value.variants)).next();!n.done;n=r.next())t.push(n.value);return t}function Mo(e,t){for(var r=null,n=f(e),i=n.next();!i.done;i=n.next())t>=(i=i.value).startTime&&(r=i);return r}function No(e){this.c=e,this.a=null,this.b=function(){}}function Uo(e){var t=this;this.a=e,this.f=!1,this.c=this.a.jc(),this.b=new fe((function(){t.a.Yd(.25*t.c)}))}function Fo(e){e.b.stop();var t=e.f?0:e.c;if(0<=t)try{return void(e.a.jc()!=t&&e.a.wd(t))}catch(e){}e.b.Na(.25),0!=e.a.jc()&&e.a.wd(0)}function Bo(e,t,r){this.a=e,this.f=t,this.g=r,this.h=!1,this.b=new Be,this.c=new Yo(e),0Math.abs(e.a.currentTime-t)?Ho(e):(e.b.da(e.a,"seeking",(function(){Ho(e)})),zo(e.c,0==e.a.currentTime?t:e.a.currentTime))}function Ho(e){e.h=!0,e.b.w(e.a,"seeking",(function(){return e.f()}))}function Yo(e){var t=this;this.b=e,this.h=10,this.g=this.f=this.c=0,this.a=new fe((function(){0>=t.c||t.b.currentTime!=t.f?t.a.stop():(t.b.currentTime=t.g,t.c--)}))}function zo(e,t){e.f=e.b.currentTime,e.g=t,e.c=e.h,e.b.currentTime=t,e.a.Na(.1)}function Wo(e){function t(){null==r.c?r.f=!0:(r.b.da(r.a,"seeking",(function(){r.f=!0})),r.a.currentTime=Math.max(0,r.a.currentTime+r.c))}var r=this;this.a=e,this.f=!1,this.c=null,this.b=new Be,0==this.a.readyState?this.b.da(this.a,"loadeddata",t):t()}function $o(e,t,r,n,i,o){var a=this;this.b=e,this.a=t.presentationTimeline,this.B=t.minBufferTime||0,this.g=r,this.u=i,this.l=null,this.f=new jo(e,t.presentationTimeline,r,function(e,t){if(!t.stallEnabled)return null;var r=t.stallSkip,n=new Co(new Ro(e),t.stallThreshold);return function(e,t){e.c=t}(n,(function(){e.currentTime+=r})),n}(e,r),o),this.c=new Bo(e,(function(){var e=a.f;e.i=!0,e.h=!1,e.c=!1;var t=Ko(a.c);return e=Xo(a,t),.001e.a.Y()?e.a.ob():e.a.Ca():0>t&&(t=e.a.Ca()+t),qo(e,Jo(e,t))}(this,n)),this.i=new fe((function(){if(0!=a.b.readyState&&!a.b.paused){var e=a.b.currentTime,t=a.a.ob(),r=a.a.Ca();3>r-t&&(t=r-3),e=r?r-e.g.durationBackoff:t}function Xo(e,t){var r=Ft.bind(null,e.b.buffered),n=Math.max(e.B,e.g.rebufferingGoal),i=e.g.safeSeekOffset,o=e.a.ob(),a=e.a.Ca(),s=e.a.Y();3>a-o&&(o=a-3);var l=e.a.Nb(n),u=e.a.Nb(i);return n=e.a.Nb(n+i),t>=s?qo(e,t):t>a?a:t=l||r(t)?t:n}function Jo(e,t){var r=e.a.ob();return t(r=e.a.Ca())?r:t}function Zo(){this.b=function(){},this.a=new Set}function Qo(e){var t=this;this.h=e,this.f=new Map,this.a=function(){},this.b=function(){},this.c=function(){},this.i=[{eb:null,cb:ta,Wa:function(e,r){return t.a(e,r)}},{eb:ea,cb:ta,Wa:function(e,r){return t.a(e,r)}},{eb:ra,cb:ta,Wa:function(e,r){return t.a(e,r)}},{eb:ta,cb:ea,Wa:function(e,r){return t.b(e,r)}},{eb:ta,cb:ra,Wa:function(e,r){return t.b(e,r)}},{eb:ea,cb:ra,Wa:function(e,r){return t.c(e,r)}},{eb:ra,cb:ea,Wa:function(e,r){return t.c(e,r)}}]}Co.prototype.release=function(){this.g=null,this.c=function(){}},jo.prototype.release=function(){this.f&&(this.f.release(),this.f=null),null!=this.g&&(this.g.stop(),this.g=null),this.b&&(this.b.release(),this.b=null),this.a=this.u=this.l=null},jo.prototype.jd=function(){this.h=!0,Po(this)},Io.prototype.release=function(){this.b.stop();for(var e=f(this.a),t=e.next();!t.done;t=e.next())t.value.release();this.a.clear()},No.prototype.release=function(){this.a=this.c=null,this.b=function(){}},No.prototype.g=function(e){var t=this.a,r=this.c.periods;t!=(e=Mo(r,e)||r[0])&&this.b(e),this.a=e},Uo.prototype.release=function(){this.b&&(this.b.stop(),this.b=null),this.a=null},Uo.prototype.set=function(e){this.c=e,Fo(this)},Bo.prototype.release=function(){this.b&&(this.b.release(),this.b=null),null!=this.c&&(this.c.release(),this.c=null),this.f=function(){},this.a=null},Yo.prototype.release=function(){this.a&&(this.a.stop(),this.a=null),this.b=null},Wo.prototype.release=function(){this.b&&(this.b.release(),this.b=null),this.a=null},Wo.prototype.m=function(e){this.c=this.f?this.c:e},Wo.prototype.h=function(){return(this.f?this.a.currentTime:this.c)||0},Wo.prototype.s=function(){},$o.prototype.release=function(){this.c&&(this.c.release(),this.c=null),this.f&&(this.f.release(),this.f=null),this.i&&(this.i.stop(),this.i=null),this.b=this.c=this.a=this.g=null,this.u=function(){}},$o.prototype.m=function(e){var t=this.c;0n.endTime?ra:ta;this.f.set(n,o);for(var a=f(this.i),s=a.next();!s.done;s=a.next())(s=s.value).eb==i&&s.cb==o&&s.Wa(n,t)}};var ea=1,ta=2,ra=3;function na(e,t){this.a=t,this.c=e,this.g=null,this.l=1,this.u=Promise.resolve(),this.h=[],this.i=new Map,this.b=new Map,this.s=!1,this.F=null,this.D=this.f=this.m=!1,this.B=0}function ia(e){return aa(e,"audio")}function oa(e){return aa(e,"video")}function aa(e,t){var r=e.b.get(t);return r?r.Ka||r.stream:null}function sa(e,t){return p((function r(){var n,i,o,a,s,l,u,c,d;return M(r,(function(r){switch(r.j){case 1:return n=Yt,S(r,xr(e.a.L,n.ra),2);case 2:return e.B++,e.D=!1,i=e.B,o=e.a.L,a=new Map,s=new Set,a.set(n.ra,t),s.add(t),S(r,o.init(a,!1),3);case 3:return e.f?r.return():S(r,ma(e,s),4);case 4:if(e.f)return r.return();l=e.a.L.g.isTextVisible()||e.g.alwaysStreamText,e.B!=i||e.b.has(n.ra)||e.D||!l||(u=e.a.Ua(),c=Ea(e,u),d=ha(t,c,0),e.b.set(n.ra,d),ka(e,d,0)),w(r)}}))}))}function la(e,t){var r=e.b.get("video");if(r){var n=r.stream;if(n)if(t){var i=n.trickModeVideo;i&&!r.Ka&&(ca(e,i,!1,0,!1),r.Ka=n)}else(n=r.Ka)&&(r.Ka=null,ca(e,n,!0,0,!1))}}function ua(e,t,r,n){var i=!1;if(t.video){var o=ca(e,t.video,r,n,!1);i=i||o}return t.audio&&(e=ca(e,t.audio,r,n,!1),i=i||e),i}function ca(e,t,r,n,i){var o=e.b.get(t.type);if(!o&&"text"==t.type&&e.g.ignoreTextStreamFailures)return sa(e,t),!0;if(!o)return!1;var a=Ta(e,t),s=Array.from(e.b.values()).every((function(e){return e.ia==o.ia}));return r&&a!=o.ia&&s?(e.b.forEach((function(t){da(e,t)})),!0):(o.Ka&&(t.trickModeVideo?(o.Ka=t,t=t.trickModeVideo):o.Ka=null),!(!(s=e.h[a])||!s.Db||!(s=e.i.get(t.id))||!s.Db||o.stream==t&&!i||("text"==t.type&&_r(e.a.L,qe(t.mimeType,t.codecs)),o.stream=t,o.nc=!0,function(e,t,r){if(!t.Rb)return!1;var n=e.a.Ua(),i=Tr(e.a.L,t.type),o=va(e,t,n,i,r);return r=o&&o.a?o.a-o.b:null,o&&!r&&(r=(o.endTime-o.kc())*t.stream.bandwidth/8),!isNaN(r)&&((o=t.stream.initSegmentReference)&&(r+=(o.a?o.a-o.b:null)||0),o=e.a.getBandwidthEstimate(),8*r/or)}(e,o,a)&&o.Rb.abort(),r&&(o.Ra?o.Cc=!0:o.Ja?(o.Oa=!0,o.dc=n,o.Cc=!0):(xa(o),wa(e,o,!0,n).catch((function(t){e.a&&e.a.onError(t)})))),0)))}function da(e,t){t.Ra||t.Oa||(t.Ja?(t.Oa=!0,t.dc=0):null==Er(e.a.L,t.type)?null==t.Ga&&ka(e,t,0):(xa(t),wa(e,t,!1,0).catch((function(t){e.a&&e.a.onError(t)}))))}function fa(e,t,r,n,i){return p((function o(){var a,s,l,u,c,d,f;return M(o,(function(o){switch(o.j){case 1:return a=e.a.Ua(),s=Ea(e,a),l=Yt,u=new Map,c=new Set,t&&(u.set(l.Eb,t),c.add(t)),r&&(u.set(l.Pa,r),c.add(r)),n&&(u.set(l.ra,n),c.add(n)),d=e.a.L,f=e.g.forceTransmuxTS,S(o,d.init(u,f),2);case 2:return e.f?o.return():(function(e){var t=e.c.presentationTimeline.Y();1/0>t?e.a.L.xa(t):e.a.L.xa(Math.pow(2,32))}(e),S(o,ma(e,c),3));case 3:if(e.f)return o.return();u.forEach((function(t,r){if(!e.b.has(r)){var n=ha(t,s,i);e.b.set(r,n),ka(e,n,0)}})),w(o)}}))}))}function ha(e,t,r){return{stream:e,type:e.type,sb:null,Da:null,Ka:null,nc:!0,ia:t,endOfStream:!1,Ja:!1,Ga:null,Oa:!1,dc:0,Cc:!1,Ra:!1,od:!1,Pb:!1,rd:r||0,Rb:null}}function pa(e,t){var r=e.h[t];if(r)return r.promise;r={promise:new ge,Db:!1},e.h[t]=r;for(var n=new Set,i=f(e.c.periods[t].variants),o=i.next();!o.done;o=i.next())(o=o.value).video&&n.add(o.video),o.video&&o.video.trickModeVideo&&n.add(o.video.trickModeVideo),o.audio&&n.add(o.audio);for(o=(i=f(e.c.periods[t].textStreams)).next();!o.done;o=i.next())n.add(o.value);return e.u=e.u.then(function(){if(!this.f)return ma(this,n)}.bind(e)).then(function(){this.f||(this.h[t].promise.resolve(),this.h[t].Db=!0)}.bind(e)).catch(function(e){this.f||(this.h[t].promise.catch((function(){})),this.h[t].promise.reject(),delete this.h[t],this.a.onError(e))}.bind(e)),r.promise}function ma(e,t){return p((function r(){var n,i,o,a,s,l,u;return M(r,(function(r){switch(r.j){case 1:n=[];for(var c=f(t),d=c.next();!d.done;d=c.next())i=d.value,(o=e.i.get(i.id))?n.push(o.promise):(e.i.set(i.id,{promise:new ge,Db:!1}),n.push(i.createSegmentIndex()));return k(r,2),S(r,Promise.all(n),4);case 4:if(e.f)return r.return();C(r,3);break;case 2:if(a=R(r),e.f)return r.return();for(d=(r=f(t)).next();!d.done;d=r.next())s=d.value,e.i.get(s.id).promise.catch((function(){})),e.i.get(s.id).promise.reject(),e.i.delete(s.id);throw a;case 3:for(d=(c=f(t)).next();!d.done;d=c.next())l=d.value,(u=e.i.get(l.id)).Db||(u.promise.resolve(),u.Db=!0);w(r)}}))}))}function ga(e,t){if(!e.f&&!t.Ja&&null!=t.Ga&&!t.Ra)if(t.Ga=null,t.Oa)wa(e,t,t.Cc,t.dc);else{try{var r=function(e,t){if(_a(t))return kr(e.a.L,t.stream.originalId||""),null;var r=e.a.Ua(),n=ya(e,t,r),i=Ta(e,t.stream),o=Ea(e,n),a=function(e,t,r){return"text"==t?null==(e=e.a).b||e.b=e.c.presentationTimeline.Y())return t.endOfStream=!0,"video"==t.type&&(n=e.b.get("text"))&&"application/cea-608"==n.stream.mimeType&&(n.endOfStream=!0),null;if(t.endOfStream=!1,t.ia=o,o!=i)return null;if(a>=s)return.5;if(o=Tr(e.a.L,t.type),!(o=va(e,t,r,o,i)))return 1;var l=1/0;return Array.from(e.b.values()).forEach((function(t){_a(t)||(t=ya(e,t,r),l=Math.min(l,t))})),n>=l+e.c.presentationTimeline.a?1:(t.rd=0,function(e,t,r,n,i){var o=e.c.periods[n],a=t.stream,s=e.c.presentationTimeline.Y(),l=e.c.periods[n+1];n=function(e,t,r,n,i){return t.nc?(r=function(e,t,r,n,i){return"text"==t?(e.a.m=r,(e=e.a).f=n,e.h=i,Promise.resolve()):Promise.all([Cr(e,t,e.Be.bind(e,t)),Cr(e,t,e.kg.bind(e,t,r)),Cr(e,t,e.hg.bind(e,t,n,i))])}(e.a.L,t.type,e.c.periods[r].startTime-t.stream.presentationTimeOffset,n,i),t.stream.initSegmentReference?(e=Sa(e,t,t.stream.initSegmentReference).then(function(e){if(!this.f)return wr(this.a.L,t.type,e,null,null,t.stream.closedCaptions&&0=(r=r-i-n)?Promise.resolve():e.a.L.remove(t.type,i,i+r).then(function(){}.bind(e))}(e,t,r).then(function(){if(!this.f)return wr(this.a.L,t.type,a,o.startTime+n.startTime,o.endTime+n.startTime,s)}.bind(e)).then(function(){if(!this.f)return t.sb=i,t.Da=o,Promise.resolve()}.bind(e))}(this,t,r,o,a,i,e[1])}.bind(e)).then(function(){this.f||this.m||(t.Ja=!1,t.od=!1,t.Oa||this.a.jd(),ka(this,t,0),function(e,t){if(!e.s){var r=Array.from(e.b.values());if(1==r.length&&"text"==r[0].type||(e.s=r.every((function(e){return"text"==e.type||!e.Oa&&!e.Ra&&e.Da}))),e.s){for(r=Ta(e,t),e.h[r]||pa(e,r).then(function(){this.f||this.a.$d()}.bind(e)).catch(Gt.oc),r=0;rn?null:t):null}function _a(e){return e&&"text"==e.type&&"application/cea-608"==e.stream.mimeType}function Aa(e){return!e.Ja&&null==e.Ga&&!e.Oa&&!e.Ra}function Ea(e,t){var r=Mo(e.c.periods,t+1/15);return r?e.c.periods.indexOf(r):0}function Ta(e,t){for(var r=e.c.periods,n=0;n=r&&202!=r)return{uri:i||n,ld:n,data:t,headers:e,fromCache:!!e["x-shaka-from-cache"]};i=null;try{i=lt(t)}catch(e){}throw new me(401==r||403==r?2:1,1,1001,n,r,i,e,o)}function La(e,t,r,n){var i=new La.b;We(t.headers).forEach((function(e,t){i.append(t,e)}));var o=new La.a,a={Id:!1,te:!1};if(e=new ye(e=La.l(e,r,{body:t.body||void 0,headers:i,method:t.method,signal:o.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},a,n),(function(){return a.Id=!0,o.abort(),Promise.resolve()})),t=t.retryParameters.timeout){var s=new fe((function(){a.te=!0,o.abort()}));s.R(t/1e3),e.finally((function(){s.stop()}))}return e}function ja(e,t,r,n){var i=new ja.f,o=Date.now(),a=0;return new ye(new Promise((function(s,l){for(var u in i.open(t.method,e,!0),i.responseType="arraybuffer",i.timeout=t.retryParameters.timeout,i.withCredentials=t.allowCrossSiteCredentials,i.onabort=function(){l(new me(1,1,7001,e,r))},i.onload=function(t){for(var n=(t=t.target).getAllResponseHeaders().trim().split("\r\n"),i={},o=(n=f(n)).next();!o.done;o=n.next())i[(o=o.value.split(": "))[0].toLowerCase()]=o.slice(1).join(": ");try{var a=Ra(i,t.response,t.status,e,t.responseURL,r);s(a)}catch(e){l(e)}},i.onerror=function(t){l(new me(1,1,1002,e,t,r))},i.ontimeout=function(){l(new me(1,1,1003,e,r))},i.onprogress=function(e){var t=Date.now();(100=e.endTime)return null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,t.positionAlign=e.positionAlign,t.size=e.size;try{t.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),"vertical-lr"==e.writingMode?t.vertical="lr":"vertical-rl"==e.writingMode&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}function ys(e,t){var r=e.mode;e.mode="showing"==r?"showing":"hidden";for(var n=e.cues,i=n.length-1;0<=i;i--){var o=n[i];o&&t(o)&&e.removeCue(o)}e.mode=r}function vs(e,t,r,n,i){var o,a=i in n,s=!0;for(o in t){var l=i+"."+o,u=a?n[i]:r[o];a||o in r?void 0===t[o]?void 0===u||a?delete e[o]:e[o]=xe(u):u.constructor==Object&&t[o]&&t[o].constructor==Object?(e[o]||(e[o]=xe(u)),l=vs(e[o],t[o],u,n,l),s=s&&l):typeof t[o]!=typeof u||null==t[o]||"function"!=typeof t[o]&&t[o].constructor!=u.constructor?($("Invalid config, wrong type for "+l),s=!1):("function"==typeof r[o]&&r[o].length!=t[o].length&&q("Unexpected number of arguments for "+l),e[o]=t[o]):($("Invalid config, unrecognized key "+l),s=!1)}return s}function bs(e,t){for(var r={},n=r,i=0,o=0;!(0>(i=e.indexOf(".",i)));)0!=i&&"\\"==e[i-1]||(n[o=e.substring(o,i).replace(/\\\./g,".")]={},n=n[o],o=i+1),i+=1;return n[e.substring(o).replace(/\\\./g,".")]=t,r}function _s(){}function As(){var e=5e5,t=1/0;navigator.connection&&(e=1e6*navigator.connection.downlink,navigator.connection.saveData&&(t=360));var r={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:kt,fairPlayTransform:!0},n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,dash:{customScheme:function(e){if(e)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1},hls:{ignoreTextStreamFailures:!1}},i={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},failureCallback:function(e){return[e]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0};rt("Web0S")&&(i.stallEnabled=!1);var o={trackSelectionCallback:function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return t.return(e)}}))}))},progressCallback:function(e,t){return[e,t]},usePersistentLicense:!0},a={drm:r,manifest:n,streaming:i,offline:o,abrFactory:Ur,abr:{enabled:!0,defaultBandwidthEstimate:e,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:t,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null}};return o.trackSelectionCallback=function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return t.return(function(e,t){var r=e.filter((function(e){return"variant"==e.type})),n=[],i=Dr(t,r.map((function(e){return e.language})));i&&(n=r.filter((function(e){return Ir(e.language)==i}))),0==n.length&&(n=r.filter((function(e){return e.primary}))),0==n.length&&(r.map((function(e){return e.language})),n=r);var o=n.filter((function(e){return e.height&&480>=e.height}));if(o.length&&(o.sort((function(e,t){return t.height-e.height})),n=o.filter((function(e){return e.height==o[0].height}))),r=[],n.length){var a=Math.floor(n.length/2);n.sort((function(e,t){return e.bandwidth-t.bandwidth})),r.push(n[a])}for(n=f(e),a=n.next();!a.done;a=n.next())"text"==(a=a.value).type&&r.push(a);return r}(e,a.preferredAudioLanguage))}}))}))},a}function Es(e,t,r){var n={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return vs(e,t,r||As(),n,"")}function Ts(){this.a=null,this.b=[]}function Ss(e,t){if(null==e.a)e.a={timestamp:Date.now()/1e3,state:t,duration:0};else{var r=Date.now()/1e3;e.a.duration=r-e.a.timestamp,e.a.state!=t&&(e.b.push(e.a),e.a={timestamp:r,state:t,duration:0})}}function ws(e,t){var r=0;e.a&&e.a.state==t&&(r+=e.a.duration);for(var n=f(e.b),i=n.next();!i.done;i=n.next())r+=(i=i.value).state==t?i.duration:0;return r}function ks(){this.b=this.c=null,this.a=[]}function xs(){this.f=this.s=this.h=this.b=this.i=this.l=this.m=this.g=this.u=NaN,this.a=new Ts,this.c=new ks}function Cs(t,r){var n=this;ke.call(this),this.i=pl,this.a=null,this.gb=!1,this.g=new Be,this.Dc=this.l=this.Fb=this.b=this.s=this.f=this.Yb=this.B=this.Zb=this.W=this.ib=this.m=this.D=this.h=this.K=null,this.Xd=1e9,this.ac=new Set,this.kb=!0,this.pa=null,this.Ud=!1,this.Rd=0,this.oa=null,this.$=new po,this.c=Us(this),this.bc={width:1/0,height:1/0},this.u=null,this.Gb=new To(this.c.preferredAudioLanguage,this.c.preferredVariantRole,this.c.preferredAudioChannelCount),this.na=this.c.preferredTextLanguage,this.fb=this.c.preferredTextRole,r&&r(this),this.K=function(e){return new Ie((function(t,r){e.l&&e.l.segmentDownloaded(t,r)}))}(this),this.g.w(e,"online",(function(){n.sd()})),this.F={name:"detach"},this.O={name:"attach"},this.Ha={name:"unload"},this.Mc={name:"manifest-parser"},this.Kc={name:"manifest"},this.hb={name:"media-source"},this.Ec={name:"drm-engine"},this.S={name:"load"},this.Rc={name:"src-equals-drm-engine"},this.jb={name:"src-equals"};var i=new Map;i.set(this.O,(function(e,t){return Ae(function(e,t,r){return null==t.v&&(t.v=r.v,e.g.w(t.v,"error",(function(){var t=el(e);t&&e.Ma(t)}))),e.a=t.v,Promise.resolve()}(n,e,t))})),i.set(this.F,(function(e){return e.v&&(n.g.ea(e.v,"error"),e.v=null),n.a=null,Ae(e=Promise.resolve())})),i.set(this.Ha,(function(e){return Ae(Ps(n,e))})),i.set(this.hb,(function(t){return Ae(t=function(t,r){return p((function n(){var i,o,a,s;return M(n,(function(n){switch(n.j){case 1:return i=e.muxjs?new Mt:new Nt,o=t.c.textDisplayFactory,a=new o,t.Fc=o,S(n,(s=new yr(r.v,i,a)).s,2);case 2:t.D=s,w(n)}}))}))}(n,t))})),i.set(this.Mc,(function(e,t){return Ae(function(e,t,r){return p((function n(){var i,o,a,s;return M(n,(function(n){switch(n.j){case 1:if(t.Aa=r.Aa,t.mimeType=r.mimeType,t.uri=r.uri,i=t.uri,o=e.K,e.Fb=i,t.Aa){e.s=t.Aa(),n.A(2);break}return a=e,S(n,gi.create(i,o,e.c.manifest.retryParameters,t.mimeType),3);case 3:a.s=n.o;case 2:s=xe(e.c.manifest),r.v&&"AUDIO"===r.v.nodeName&&(s.disableVideo=!0),e.s.configure(s),w(n)}}))}))}(n,e,t))})),i.set(this.Kc,(function(e){return function(e,t){var r=t.uri,n=e.K;e.Yb=new Zo,function(e,t){e.b=t}(e.Yb,(function(t){Qs(e,"timelineregionadded",t)}));var i={networkingEngine:n,filterNewPeriod:function(t){return e.Nc(t)},filterAllPeriods:function(t){return Fs(e,t)},onTimelineRegionAdded:function(t){var r=e.Yb;e:{for(var n=f(r.a),i=n.next();!i.done;i=n.next())if((i=i.value).schemeIdUri==t.schemeIdUri&&i.id==t.id&&i.startTime==t.startTime&&i.endTime==t.endTime){n=i;break e}n=null}null==n&&(r.a.add(t),r.b(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return e.Ma(t)}};return new ye(Promise.resolve().then((function(){return p((function t(){var n;return M(t,(function(t){switch(t.j){case 1:return n=e,S(t,e.s.start(r,i),2);case 2:if(n.b=t.o,e.dispatchEvent(new Se("manifestparsed")),0==e.b.periods.length)throw new me(2,4,4014);!function(e){function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}e.some((function(e){return e.variants.some(t)}))&&e.forEach((function(e){e.variants=e.variants.filter(t)}))}(e.b.periods),w(t)}}))}))})),(function(){return e.s.stop()}))}(n,e)})),i.set(this.Ec,(function(){return Ae(function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return e.h=new pt({ub:e.K,onError:function(t){e.Ma(t)},qc:function(t){tl(e,t)},onExpirationUpdated:function(t,r){rl(e,t,r)},onEvent:function(t){e.dispatchEvent(t)}}),e.h.configure(e.c.drm),S(t,mt(e.h,Do(e.b.periods),e.b.offlineSessionIds),2);case 2:Fs(e,e.b.periods),w(t)}}))}))}(n))})),i.set(this.S,(function(e,t){return Ae(function(e,t,r){return p((function n(){var i,o,a,s,l,u,c,d,h;return M(n,(function(n){switch(n.j){case 1:return t.startTime=r.startTime,i=t.v,o=t.uri,e.Fb=o,e.u=new xs,a=function(){return Vs(e)},s=function(){var t=e.a.playbackRate;0!=t&&e.W.set(t)},e.g.w(i,"playing",a),e.g.w(i,"pause",a),e.g.w(i,"ended",a),e.g.w(i,"ratechange",s),l=e.c.abrFactory,e.l&&e.Dc==l||(e.Dc=l,e.l=new l,e.l.configure(e.c.abr)),function(e,t){for(var r=0;r=t.a&&r=HTMLMediaElement.HAVE_CURRENT_DATA?o.resolve():e.a.error?o.reject(el(e)):(e.g.da(e.a,"loadeddata",(function(){o.resolve()})),e.g.da(e.a,"error",(function(){o.reject(el(e))}))),new ye(o,(function(){return o.reject(new me(2,7,7001)),Promise.resolve()}))}(n,e,t)})),this.lb=new fs(this.F,{cf:function(e,t,r,i){var o=null;return e==n.F&&(o=r==n.F?n.F:n.O),e==n.O&&(o=r==n.F||t.v!=i.v?n.F:r==n.O?n.O:r==n.hb||r==n.S?n.hb:r==n.jb?n.Rc:null),e==n.hb&&(o=r==n.S&&t.v==i.v?n.Mc:n.Ha),e==n.Mc&&(o=dl(n.S,n.Kc,n.Ha,r,t,i)),e==n.Kc&&(o=dl(n.S,n.Ec,n.Ha,r,t,i)),e==n.Ec&&(o=dl(n.S,n.S,n.Ha,r,t,i)),e==n.Rc&&(o=r==n.jb&&t.v==i.v?n.jb:n.Ha),e!=n.S&&e!=n.jb||(o=n.Ha),e==n.Ha&&(o=i.v&&t.v==i.v?n.O:n.F),o},Le:function(e,t,r){return n.dispatchEvent(new Se("onstatechange",{state:e.name})),i.get(e)(t,r)},handleError:function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return S(t,Ps(n,e),2);case 2:return t.return(e.v?n.O:n.F)}}))}))},Bf:function(e){n.dispatchEvent(new Se("onstateidle",{state:e.name}))}}),t&&this.Hb(t,!0)}_(qa,Ba),qa.prototype.updateManifestExpiration=function(e,t){var r=Ua(this.b,this.a),n=r.store(),i=new ge;return n.get(e).onsuccess=function(r){(r=r.target.result)?(r.expiration=t,n.put(r),i.resolve()):i.reject(new me(2,9,9012,"Could not find values for "+e))},r.promise().then((function(){return i}))},qa.prototype.ec=function(e){return{originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,periods:e.periods.map(Xa),sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata}},qa.prototype.Jd=function(e){return{data:e.data}},_(es,Ba),es.prototype.hasFixedKeySpace=function(){return this.f},es.prototype.addSegments=function(e){return this.f?Ka(this.c):this.add(this.c,e)},es.prototype.addManifests=function(e){return this.f?Ka(this.a):this.add(this.a,e)},es.prototype.ec=function(e){return null==e.expiration&&(e.expiration=1/0),e},(n=ts.prototype).init=function(){var t=this,r=new ge,n=e.indexedDB.open("shaka_offline_db",4);return n.onsuccess=function(e){e=e.target.result,t.f=e;var n=e.objectStoreNames;n=n.contains("manifest")&&n.contains("segment")?new qa(e,"segment","manifest"):null,t.a=n,n=(n=e.objectStoreNames).contains("manifest-v2")&&n.contains("segment-v2")?new es(e,"segment-v2","manifest-v2",!0):null,t.b=n,n=(n=e.objectStoreNames).contains("manifest-v3")&&n.contains("segment-v3")?new es(e,"segment-v3","manifest-v3",!1):null,t.c=n,e=e.objectStoreNames.contains("session-ids")?new Ha(e):null,t.g=e,r.resolve()},n.onupgradeneeded=function(e){e=e.target.result;for(var t=f(["segment-v3","manifest-v3","session-ids"]),r=t.next();!r.done;r=t.next())r=r.value,e.objectStoreNames.contains(r)||e.createObjectStore(r,{autoIncrement:!0})},n.onerror=function(e){r.reject(new me(2,9,9001,n.error)),e.preventDefault()},r},n.destroy=function(){var e=this;return p((function t(){return M(t,(function(t){switch(t.j){case 1:if(!e.a){t.A(2);break}return S(t,e.a.destroy(),2);case 2:if(!e.b){t.A(4);break}return S(t,e.b.destroy(),4);case 4:if(!e.c){t.A(6);break}return S(t,e.c.destroy(),6);case 6:if(!e.g){t.A(8);break}return S(t,e.g.destroy(),8);case 8:e.f&&e.f.close(),w(t)}}))}))},n.getCells=function(){var e=new Map;return this.a&&e.set("v1",this.a),this.b&&e.set("v2",this.b),this.c&&e.set("v3",this.c),e},n.getEmeSessionCell=function(){return this.g},n.erase=function(){var t=this;return p((function r(){return M(r,(function(r){switch(r.j){case 1:if(!t.a){r.A(2);break}return S(r,t.a.destroy(),2);case 2:if(!t.b){r.A(4);break}return S(r,t.b.destroy(),4);case 4:if(!t.c){r.A(6);break}return S(r,t.c.destroy(),6);case 6:return t.f&&t.f.close(),S(r,function(){var t=new ge,r=e.indexedDB.deleteDatabase("shaka_offline_db");return r.onblocked=function(){},r.onsuccess=function(){t.resolve()},r.onerror=function(e){t.reject(new me(2,9,9001,r.error)),e.preventDefault()},t}(),8);case 8:return t.f=null,t.a=null,t.b=null,t.c=null,S(r,t.init(),0)}}))}))},Wa("idb",(function(){return e.indexedDB?new ts:null})),rs.prototype.wa=function(){return this.g},rs.prototype.ba=function(){return this.f},rs.prototype.key=function(){return this.c},rs.prototype.toString=function(){return this.b},(n=ls.prototype).configure=function(){},n.start=function(e){var t=this;return p((function r(){var n,i,o,a,s;return M(r,(function(r){switch(r.j){case 1:return n=ns(e),t.a=n,null==n||"manifest"!=n.a?r.return(Promise.reject(new me(2,1,9004,n))):(i=new Ya,x(r,2),S(r,i.init(),4));case 4:return S(r,za(i,n.wa(),n.ba()),5);case 5:return S(r,r.o.getManifests([n.key()]),6);case 6:return o=r.o,a=o[0],s=new is(n.wa(),n.ba()),r.return(function(e,t){var r=new yi(null,0);r.xa(t.duration);var n=t.periods.map((function(t){return os(e,t,r)})),i=t.drmInfo?[t.drmInfo]:[];return t.drmInfo&&n.forEach((function(e){e.variants.forEach((function(e){e.drmInfos=i}))})),{presentationTimeline:r,minBufferTime:2,offlineSessionIds:t.sessionIds,periods:n}}(s,a));case 2:return L(r),S(r,i.destroy(),7);case 7:j(r,0)}}))}))},n.stop=function(){return Promise.resolve()},n.update=function(){},n.onExpirationUpdated=function(e,t){var r=this;return p((function n(){var i,o,a,s,l,u,c;return M(n,(function(n){switch(n.j){case 1:return i=r.a,o=new Ya,k(n,2,3),S(n,o.init(),5);case 5:return S(n,za(o,i.wa(),i.ba()),6);case 6:return S(n,(a=n.o).getManifests([i.key()]),7);case 7:if(s=n.o,l=s[0],u=l.sessionIds.includes(e),c=null==l.expiration||l.expiration>t,!u||!c){n.A(3);break}return S(n,a.updateManifestExpiration(i.key(),t),3);case 3:return L(n),S(n,o.destroy(),10);case 10:j(n,0);break;case 2:R(n),n.A(3)}}))}))},gi.Cb("application/x-offline-manifest",ls),G("shaka.offline.OfflineScheme",us),us.h=function(e){return _e(e={uri:e,ld:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}})},us.i=function(e,t){var r=new Ya;return _e(void 0).U((function(){return r.init()})).U((function(){return za(r,t.wa(),t.ba())})).U((function(e){return e.getSegments([t.key()])})).U((function(e){return{uri:t,ld:t,data:e[0].data,headers:{}}})).finally((function(){return r.destroy()}))},De("offline",us),fs.prototype.destroy=function(){var e=this;return p((function t(){return M(t,(function(t){switch(t.j){case 1:return e.l=!1,e.b&&e.b.abort(),ps(e),S(t,e.m,2);case 2:e.a&&e.a.va.Ya();for(var r=f(e.f),n=r.next();!n.done;n=r.next())n.value.va.Ya();e.a=null,e.f=[],e.g=null,w(t)}}))}))},G("shaka.text.SimpleTextDisplayer",ms),ms.prototype.remove=function(e,t){return!!this.a&&(ys(this.a,(function(r){return r.startTimee})),!0)},ms.prototype.remove=ms.prototype.remove,ms.prototype.append=function(e){for(var t=gs,r=[],n=0;n=e.a.duration-1;break;case ml:e:if(e.a.ended||Ar(e.D))t=!0;else{if(e.b.presentationTimeline.V()){var r=e.b.presentationTimeline.pb();if(Ut(e.a.buffered)>=r){t=!0;break e}}t=!1}break;default:t=!1}var n=Bt(e.a.buffered,e.a.currentTime),i=t,o=(r=e.B).b.get(r.a);t=r.a,n=i||n>=o?xo:ko,r.a=n,t!=n&&Gs(e)}function Ds(e){if(e.s){var t=xe(e.c.manifest);e.a&&"AUDIO"===e.a.nodeName&&(t.disableVideo=!0),e.s.configure(t)}if(e.h&&e.h.configure(e.c.drm),e.f){e.f.configure(e.c.streaming);try{e.b.periods.forEach(e.Nc.bind(e))}catch(t){e.Ma(t)}var r=ia(e.f),n=oa(e.f);t=ll(e),r=Nr.Qd(r,n,t.variants),e.l&&r&&r.allowedByApplication&&r.allowedByKeySystem?Hs(e,t.variants):Ys(e,t)}if(e.D&&(t=e.c.textDisplayFactory,e.Fc!=t)){r=new t;var i=(n=e.D).g;n.g=r,i&&(r.setTextVisibility(i.isTextVisible()),i.destroy()),n.a&&(n.a.c=r),e.Fc=t,e.f&&(r=(t=e.f).b.get("text"))&&ca(t,r.stream,!0,0,!0)}e.l&&(e.l.configure(e.c.abr),e.c.abr.enabled&&!e.kb?e.l.enable():e.l.disable(),Zs(e)),e.B&&(t=e.c.streaming.rebufferingGoal,e.b&&(t=Math.max(t,e.b.minBufferTime)),wo(e.B,t,Math.min(.5,t/2)))}function Ms(e,t,r,n){go(e.$,t).variant=r,(e=e.u.c).c!=r&&(e.c=r,e.a.push({timestamp:Date.now()/1e3,id:r.id,type:"variant",fromAdaptation:n,bandwidth:r.bandwidth}))}function Ns(e,t,r,n){mo(e.$,t,r),(e=e.u.c).b!=r&&(e.b=r,e.a.push({timestamp:Date.now()/1e3,id:r.id,type:"text",fromAdaptation:n,bandwidth:null}))}function Us(e){var t=As();return t.streaming.failureCallback=function(t){e.V()&&[1001,1002,1003].includes(t.code)&&(t.severity=1,e.sd())},t.textDisplayFactory=function(){return new ms(e.a)},t}function Fs(e,t){var r=e.f?ia(e.f):null,n=e.f?oa(e.f):null;if(t.forEach(Nr.filterNewPeriod.bind(null,e.h,r,n)),0==(r=function(e,t){var r=0;return e.forEach((function(e){r+=t(e)?1:0})),r}(t,(function(e){return e.variants.some(Nr.rb)}))))throw new me(2,4,4032);if(rr&&(r+=Math.pow(2,32)),r=r.toString(16)),new me(2,3,3016,t,r,e.a.error.message)}function tl(e,t){if(e.f){var r=ll(e),n=!1,i=Object.keys(t),o=1==i.length&&"00"==i[0];i.length&&e.b.periods.forEach((function(e){e.variants.forEach((function(e){Nr.nf(e).forEach((function(r){var i=e.allowedByKeySystem;r.keyId&&(r=t[o?"00":r.keyId],e.allowedByKeySystem=!!r&&!Ls.includes(r)),i!=e.allowedByKeySystem&&(n=!0)}))}))})),i=ia(e.f);var a=oa(e.f);(i=Nr.Qd(i,a,r.variants))&&!i.allowedByKeySystem&&zs(e,r),n&&($s(e),Hs(e,r.variants))}}function rl(e,t,r){e.s&&e.s.onExpirationUpdated&&e.s.onExpirationUpdated(t,r),e.dispatchEvent(new Se("expirationupdated"))}function nl(e,t){var r=e.h?$e(e.h.W):{},n=Object.keys(r);n=n.length&&"00"==n[0];for(var i=!1,o=!1,a=[],s=[],l=f(t),u=l.next();!u.done;u=l.next()){var c=[];(u=u.value).audio&&c.push(u.audio),u.video&&c.push(u.video);for(var d=(c=f(c)).next();!d.done;d=c.next())if((d=d.value).keyId){var h=r[n?"00":d.keyId];h?Ls.includes(h)&&(s.includes(h)||s.push(h)):a.includes(d.keyId)||a.push(d.keyId)}u.allowedByApplication?u.allowedByKeySystem&&(i=!0):o=!0}if(!i)throw new me(2,4,4012,{hasAppRestrictions:o,missingKeys:a,restrictedKeyStatuses:s})}function il(e,t){p((function r(){return M(r,(function(r){switch(r.j){case 1:return S(r,Promise.resolve(),2);case 2:e.i!=hl&&e.dispatchEvent(t),w(r)}}))}))}function ol(e){for(var t=new Set,r=(e=f(e)).next();!r.done;r=e.next())(r=r.value).language?t.add(Ir(r.language)):t.add("und");return t}function al(e){for(var t=new Map,r=(e=f(e)).next();!r.done;r=e.next()){var n=r.value;r="und";var i=[];for(n.language&&(r=Ir(n.language)),(i="variant"==n.type?n.audioRoles:n.roles)&&i.length||(i=[""]),t.has(r)||t.set(r,new Set),i=(n=f(i)).next();!i.done;i=n.next())i=i.value,t.get(r).add(i)}var o=[];return t.forEach((function(e,t){for(var r=f(e),n=r.next();!n.done;n=r.next())o.push({language:t,role:n.value})})),o}function sl(e){return null==(e=ll(e))?[]:e.variants.filter((function(e){return Nr.rb(e)}))}function ll(e){for(var t=e.m.h(),r=null,n=(e=f(e.b.periods)).next();!n.done;n=e.next())(n=n.value).startTime<=t&&(r=n);return r}function ul(e){var t=ll(e);return go(e.$,t).variant}function cl(){return new me(2,7,7e3)}function dl(e,t,r,n,i,o){return n==e&&i.v==o.v&&i.uri==o.uri&&i.mimeType==o.mimeType&&i.Aa==o.Aa?t:r}function fl(e){return new Promise((function(t,r){e.Ya=function(){return r(cl())},e.pc=function(){return t()},e.onError=function(e){return r(e)},e.rc=function(){return r(cl())}}))}Cs.registerSupportPlugin=function(e,t){js[e]=t},Cs.isBrowserSupported=function(){if(!(e.Promise&&e.Uint8Array&&Array.prototype.forEach))return!1;var t=tt();return!(t&&12>t||!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration))&&(!!Ze()||Qe("application/x-mpegurl"))},Cs.probeSupport=function(){return Ct().then((function(e){for(var t=gi.Sf(),r={},n=f('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",")),i=n.next();!i.done;i=n.next()){r[i=i.value]=Ze()?!!pr(i)||MediaSource.isTypeSupported(i)||Wt(i):Qe(i);var o=i.split(";")[0];r[o]=r[o]||r[i]}for(var a in e={manifest:t,media:r,drm:e},js)e[a]=js[a]();return e}))},Cs.prototype.Hb=function(e,t){if(t=void 0===t||t,this.i==hl)return Promise.reject(cl());var r={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null};r.v=e,Ze()||(t=!1);var n=t?this.hb:this.O,i=hs(this.lb,(function(){return{node:n,payload:r,Va:!1}}));return i.wb=function(){},fl(i)},Cs.prototype.attach=Cs.prototype.Hb,Cs.prototype.detach=function(){var e=this;if(this.i==hl)return Promise.reject(cl());var t=hs(this.lb,(function(){return{node:e.F,payload:{Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},Va:!1}}));return t.wb=function(){},fl(t)},Cs.prototype.detach=Cs.prototype.detach,Cs.prototype.Cd=function(e){var t=this;if(e=void 0===e||e,this.i==hl)return Promise.reject(cl());Ze()||(e=!1);var r={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},n=hs(this.lb,(function(n){var i=n.v&&e?t.hb:n.v?t.O:t.F;return r.v=n.v,{node:i,payload:r,Va:!1}}));return n.wb=function(){},fl(n)},Cs.prototype.unload=Cs.prototype.Cd,Cs.prototype.load=function(e,t,r){if(this.i==hl)return Promise.reject(cl());this.dispatchEvent(new Se("loading"));var n={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null};n.uri=e,n.zd=Date.now()/1e3,r&&"string"!=typeof r&&(Kr("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),n.Aa=function(){return new r}),r&&"string"==typeof r&&(n.mimeType=r),void 0!==t&&(n.startTime=t);var i=function(e,t){if(t.Aa)return!1;if(!Ze())return!0;var r=t.mimeType,n=t.uri||"";return r||(r={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[gi.getExtension(n)]),!!r&&""!=(t.v||nt()).canPlayType(r)&&(!gi.isSupported(n,r)||et()&&e.c.streaming.useNativeHlsOnSafari)}(this,n)?this.jb:this.S,o=hs(this.lb,(function(e){return null==e.v?null:(n.v=e.v,{node:i,payload:n,Va:!0})}));return o.wb=function(){},new Promise((function(e,t){o.rc=function(){return t(new me(2,7,7002))},o.pc=function(){return e()},o.Ya=function(){return t(cl())},o.onError=function(e){return t(e)}}))},Cs.prototype.load=Cs.prototype.load,Cs.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=bs(e,t));var r=Es(this.c,e,Us(this));return Ds(this),r},Cs.prototype.configure=Cs.prototype.configure,Cs.prototype.getConfiguration=function(){var e=Us(this);return Es(e,this.c,Us(this)),e},Cs.prototype.getConfiguration=Cs.prototype.getConfiguration,Cs.prototype.$f=function(){for(var e in this.c)delete this.c[e];Es(this.c,Us(this),Us(this)),Ds(this)},Cs.prototype.resetConfiguration=Cs.prototype.$f,Cs.prototype.We=function(){return this.i},Cs.prototype.getLoadMode=Cs.prototype.We,Cs.prototype.af=function(){return this.a},Cs.prototype.getMediaElement=Cs.prototype.af,Cs.prototype.Mb=function(){return this.K},Cs.prototype.getNetworkingEngine=Cs.prototype.Mb,Cs.prototype.hc=function(){return this.Fb},Cs.prototype.getAssetUri=Cs.prototype.hc,Cs.prototype.Ze=function(){return Kr("getManifestUri",'Please use "getAssetUri" instead.'),this.hc()},Cs.prototype.getManifestUri=Cs.prototype.Ze,Cs.prototype.V=function(){return this.b?this.b.presentationTimeline.V():!(!this.a||!this.a.src)&&1/0==this.a.duration},Cs.prototype.isLive=Cs.prototype.V,Cs.prototype.Xa=function(){return!!this.b&&this.b.presentationTimeline.Xa()},Cs.prototype.isInProgress=Cs.prototype.Xa,Cs.prototype.uf=function(){if(this.b){if(!this.b.periods.length)return!1;var e=this.b.periods[0].variants;return!!e.length&&!e[0].video}return!(!this.a||!this.a.src)&&(this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight)},Cs.prototype.isAudioOnly=Cs.prototype.uf,Cs.prototype.bg=function(){if(this.b){var e=this.b.presentationTimeline;return{start:e.ob(),end:e.Ca()}}return this.a&&this.a.src&&(e=this.a.seekable).length?{start:e.start(0),end:e.end(e.length-1)}:{start:0,end:0}},Cs.prototype.seekRange=Cs.prototype.bg,Cs.prototype.keySystem=function(){return _t(this.drmInfo())},Cs.prototype.keySystem=Cs.prototype.keySystem,Cs.prototype.drmInfo=function(){return this.h?this.h.a:null},Cs.prototype.drmInfo=Cs.prototype.drmInfo,Cs.prototype.Lb=function(){return this.h?this.h.Lb():1/0},Cs.prototype.getExpiration=Cs.prototype.Lb,Cs.prototype.Xc=function(){return!!this.B&&this.B.a==ko},Cs.prototype.isBuffering=Cs.prototype.Xc,Cs.prototype.ef=function(){if(this.W){var e=this.W;e=e.f?0:e.c}else e=0;return e},Cs.prototype.getPlaybackRate=Cs.prototype.ef,Cs.prototype.ug=function(e){0==e?q("A trick play rate of 0 is unsupported!"):(this.a.paused&&this.a.play(),this.W.set(e),this.i==ml&&la(this.f,1=a.b.periods.length?a.b.presentationTimeline.Y():a.b.periods[d].startTime,1/0==(h=f-l.startTime))throw new me(1,4,4033);return p=new Zn(1,0,h,(function(){return[e]}),0,null),m={id:a.Xd++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return 1},getSegmentReference:function(e){return 1==e?p:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:n,codecs:i||"",kind:r,encrypted:!1,keyId:null,language:t,label:o||null,type:u.ra,primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},a.ac.add(m),l.textStreams.push(m),S(s,sa(a.f,m),2);case 2:return(g=aa(a.f,"text"))&&mo(a.$,l,g),a.ac.delete(m),Ys(a,l),$s(a),s.return(Nr.xc(m))}}))}))},Cs.prototype.addTextTrack=Cs.prototype.addTextTrack,Cs.prototype.vd=function(e,t){this.bc.width=e,this.bc.height=t},Cs.prototype.setMaxHardwareResolution=Cs.prototype.vd,Cs.prototype.sd=function(){if(this.i==ml){var e=this.f;if(e.f)e=!1;else if(e.m)e=!1;else{for(var t=f(e.b.values()),r=t.next();!r.done;r=t.next())(r=r.value).Pb&&(r.Pb=!1,ka(e,r,.1));e=!0}}else e=!1;return e},Cs.prototype.retryStreaming=Cs.prototype.sd,Cs.prototype.Xe=function(){return this.b},Cs.prototype.getManifest=Cs.prototype.Xe,Cs.prototype.Ye=function(){return this.s?this.s.constructor:null},Cs.prototype.getManifestParserFactory=Cs.prototype.Ye,(n=Cs.prototype).Nc=function(e){var t=this.f?ia(this.f):null,r=this.f?oa(this.f):null;if(Nr.filterNewPeriod(this.h,t,r,e),!(t=e.variants).some(Nr.rb))throw new me(2,4,4011);if(nl(this,e.variants),Nr.Gd(t,this.c.restrictions,this.bc)&&this.f&&ll(this)==e&&$s(this),e=this.h?this.h.a:null)for(r=(t=f(t)).next();!r.done;r=t.next())for(var n=(r=f(r.value.drmInfos)).next();!n.done;n=r.next())if((n=n.value).keySystem==e.keySystem)for(var i=(n=f(n.initData||[])).next();!i.done;i=n.next())i=i.value,bt(this.h,i.initDataType,i.initData)},n.zf=function(e){try{this.kb=!0,this.l.disable(),Zs(this);var t=Hs(this,e.variants),r=Nr.Jb(e.textStreams,this.na,this.fb)[0]||null;this.pa&&(e.variants.includes(this.pa)&&(t=this.pa),this.pa=null),this.oa&&(e.textStreams.includes(this.oa)&&(r=this.oa),this.oa=null),t&&Ms(this,e,t,!0),r&&Ns(this,e,r,!0);var n=this.f,i=n.b.get("video");if(i)var o=n.c.periods[i.ia];else{var a=n.b.get("audio");o=a?n.c.periods[a.ia]:null}var s=t?t.audio:null;if(!o&&r){var l;if(l=s){e=r;var u=Ir(this.c.preferredTextLanguage),c=Ir(s.language),d=Ir(e.language);l=jr(d,u)&&!jr(c,d)}l&&(this.gb=!0),this.gb&&this.D.g.setTextVisibility(!0),Js(this)}return this.c.streaming.alwaysStreamText||this.mc()?{variant:t,text:r}:{variant:t,text:null}}catch(e){return this.Ma(e),{variant:null,text:null}}},n.Fe=function(){this.kb=!1,this.c.abr.enabled&&(this.l.enable(),Zs(this)),this.pa&&(ua(this.f,this.pa,this.Ud,this.Rd),qs(this),this.pa=null),this.oa&&(ca(this.f,this.oa,!0,0,!1),Xs(this),this.oa=null)},n.Ef=function(){this.s&&this.s.update&&this.s.update()},n.Jf=function(){this.m&&this.m.s()},n.Ma=function(e){if(this.i!=hl){var t=new Se("error",{detail:e});this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)}};var hl=0,pl=1,ml=2,gl=3;function yl(e,t){var r=os(new is(e.wa(),e.ba()),t.periods[0],new yi(null,0)),n=t.appMetadata||{};return r=vl(r),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:r,appMetadata:n}}function vl(e){for(var t=[],r=Nr.df(e.variants),n=(r=f(r)).next();!n.done;n=r.next())t.push(Nr.Ed(n.value));for(r=(e=f(e.textStreams)).next();!r.done;r=e.next())t.push(Nr.xc(r.value));return t}function bl(){this.a={}}function _l(e,t){var r=t.audio,n=t.video;if(r&&!n&&(e.a[r.id]=r.bandwidth||t.bandwidth),!r&&n&&(e.a[n.id]=n.bandwidth||t.bandwidth),r&&n){var i=r.bandwidth||393216,o=n.bandwidth||t.bandwidth-i;0>=o&&(o=t.bandwidth),e.a[r.id]=i,e.a[n.id]=o}}function Al(e,t){var r=e.a[t];return null==r&&(r=0),r}function El(e){this.a=!1,this.b=new ge,this.c=e}function Tl(e){var t=new wl;e.periods.forEach((function(e,r){var n=xl(e.variants);if(0==r)for(var i=(n=f(n.a)).next();!i.done;i=n.next())t.add(i.value);else!function(e,t){e.a=e.a.filter((function(e){return kl(t,e)}))}(t,n)}));for(var r=(e=f(e.periods)).next();!r.done;r=e.next())(r=r.value).variants=r.variants.filter((function(e){return kl(t,new Sl(e))}))}function Sl(e){var t=e.audio;e=e.video,this.b=t?t.mimeType:null,this.a=t?t.codecs.split(".")[0]:null,this.f=e?e.mimeType:null,this.c=e?e.codecs.split(".")[0]:null}function wl(){this.a=[]}function kl(e,t){return e.a.some((function(e){return t.b==e.b&&t.a==e.a&&t.f==e.f&&t.c==e.c}))}function xl(e){for(var t=new wl,r=(e=f(e)).next();!r.done;r=e.next())t.add(new Sl(r.value));return t}function Cl(e){var t=this;if(e&&e.constructor!=Cs)throw new me(2,9,9008);this.b=this.a=null,e?(this.a=e.c,this.b=e.Mb()):(this.a=As(),this.b=new Ie),this.f=!1,this.c=[],this.g=[];var r=!e;this.h=new El((function(){return p((function e(){var n;return M(e,(function(e){switch(e.j){case 1:return n=function(){},S(e,Promise.all(t.g.map((function(e){return e.then(n,n)}))),2);case 2:if(!r){e.A(3);break}return S(e,t.b.destroy(),3);case 3:t.a=null,t.b=null,w(e)}}))}))}))}function Rl(){if(Ze())e:{for(var e=f($a.values()),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function Ll(e,t){for(var r=[],n=f(e.periods),i=n.next();!i.done;i=n.next())for(var o=(i=f(i.value.streams)).next();!o.done;o=i.next())o=o.value,t&&"video"==o.contentType?r.push({contentType:qe(o.mimeType,o.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=o.contentType||r.push({contentType:qe(o.mimeType,o.codecs),robustness:e.drmInfo.audioRobustness});return r}function jl(e,t,r){return p((function n(){return M(n,(function(n){switch(n.j){case 1:return S(n,function(e,t,r,n){return p((function i(){var o,a,s;return M(i,(function(i){switch(i.j){case 1:return n.drmInfo?(o=function(e){var t=Array.from(e.a.keys());if(!t.length)throw new me(2,9,9e3,"No supported storage mechanisms found");return e.a.get(t[0]).getEmeSessionCell()}(r),a=n.sessionIds.map((function(e){return{sessionId:e,keySystem:n.drmInfo.keySystem,licenseUri:n.drmInfo.licenseServerUri,serverCertificate:n.drmInfo.serverCertificate,audioCapabilities:Ll(n,!1),videoCapabilities:Ll(n,!0)}})),S(i,cs(t,e,a),2)):i.return();case 2:return s=i.o,S(i,o.remove(s),3);case 3:return S(i,o.add(a.filter((function(e){return-1==s.indexOf(e.sessionId)}))),0)}}))}))}(e.b,e.a.drm,r,t),0)}}))}))}function Pl(e,t,r,n){function i(){s+=1,e.a.offline.progressCallback(l,s/a)}var o=function(e){var t=[];return e.periods.forEach((function(e){e.streams.forEach((function(e){null!=e.initSegmentKey&&t.push(e.initSegmentKey),e.segments.forEach((function(e){t.push(e.dataKey)}))}))})),t}(n),a=o.length+1,s=0,l=yl(r,n);return Promise.all([t.removeSegments(o,i),t.removeManifests([r.key()],i)])}function Il(e,t,r,n,i,o){var a={id:o.id,originalId:o.originalId,primary:o.primary,presentationTimeOffset:o.presentationTimeOffset||0,contentType:o.type,mimeType:o.mimeType,codecs:o.codecs,frameRate:o.frameRate,pixelAspectRatio:o.pixelAspectRatio,kind:o.kind,language:o.language,label:o.label,width:o.width||null,height:o.height||null,initSegmentKey:null,encrypted:o.encrypted,keyId:o.keyId,segments:[],variantIds:[]};i=i.presentationTimeline.Ob();var s=o.id,l=o.initSegmentReference;return l&&(l=vi(l.c(),l.b,l.a,e.a.streaming.retryParameters),Oa(t,s,l,.5*Al(n,o.id),!0,(function(t){return p((function n(){var i;return M(n,(function(n){switch(n.j){case 1:return S(n,r.addSegments([{data:t}]),2);case 2:i=n.o,e.c.push(i[0]),a.initSegmentKey=i[0],w(n)}}))}))}))),function(e,t,r){for(var n=null==(t=e.findSegmentPosition(t))?null:e.getSegmentReference(t);n;)r(n),n=e.getSegmentReference(++t)}(o,i,(function(i){var l=vi(i.c(),i.b,i.a,e.a.streaming.retryParameters);Oa(t,s,l,function(e,t,r){return r=r.endTime-r.startTime,Al(e,t)*r}(n,o.id,i),!1,(function(t){return p((function n(){var o;return M(n,(function(n){switch(n.j){case 1:return S(n,r.addSegments([{data:t}]),2);case 2:o=n.o,e.c.push(o[0]),a.segments.push({startTime:i.startTime,endTime:i.endTime,dataKey:o[0]}),w(n)}}))}))}))})),a}function Ol(e){if(e.h.a)throw new me(2,9,7001)}function Dl(){if(!Rl())throw new me(2,9,9e3)}function Ml(e,t){return p((function r(){return M(r,(function(r){switch(r.j){case 1:return e.g.push(t),x(r,2),S(r,t,4);case 4:return r.return(r.o);case 2:L(r),Re(e.g,t),j(r,0)}}))}))}function Nl(e){e.variants.map((function(e){return e.video}));var t=new Set(e.variants.map((function(e){return e.audio})));e=e.textStreams;for(var r=f(t),n=r.next();!n.done;n=r.next())for(var i=(n=f(t)).next();!i.done;i=n.next());for(r=(t=f(e)).next();!r.done;r=t.next())for(n=(r=f(e)).next();!n.done;n=r.next());}Cs.LoadMode={DESTROYED:hl,NOT_LOADED:pl,MEDIA_SOURCE:ml,SRC_EQUALS:gl},El.prototype.destroy=function(){var e=this;return this.a?this.b:(this.a=!0,this.c().then((function(){e.b.resolve()}),(function(){e.b.resolve()})))},wl.prototype.add=function(e){kl(this,e)||this.a.push(e)},G("shaka.offline.Storage",Cl),Cl.support=Rl,Cl.prototype.destroy=function(){return this.h.destroy()},Cl.prototype.destroy=Cl.prototype.destroy,Cl.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=bs(e,t));var r=e,n=!1;return null!=r.trackSelectionCallback&&(n=!0,r.offline=r.offline||{},r.offline.trackSelectionCallback=r.trackSelectionCallback,delete r.trackSelectionCallback),null!=r.progressCallback&&(n=!0,r.offline=r.offline||{},r.offline.progressCallback=r.progressCallback,delete r.progressCallback),null!=r.usePersistentLicense&&(n=!0,r.offline=r.offline||{},r.offline.usePersistentLicense=r.usePersistentLicense,delete r.usePersistentLicense),n&&Kr("Storage.configure with OfflineConfig","Please configure storage with a player configuration."),Es(this.a,e)},Cl.prototype.configure=Cl.prototype.configure,Cl.prototype.getConfiguration=function(){var e=As();return Es(e,this.a,As()),e},Cl.prototype.getConfiguration=Cl.prototype.getConfiguration,Cl.prototype.Mb=function(){return this.b},Cl.prototype.getNetworkingEngine=Cl.prototype.Mb,Cl.prototype.store=function(e,t,r){var n=this;return Ml(this,function(e,t,r,n){return p((function i(){var o,a,s,l,u,c,d,h,m;return M(i,(function(i){switch(i.j){case 1:return Dl(),e.f?i.return(Promise.reject(new me(2,9,9006))):(e.f=!0,S(i,function(e,t,r){return p((function n(){var i,o,a,s,l,u;return M(n,(function(n){switch(n.j){case 1:return i=null,o=e.b,a={networkingEngine:o,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){i=e}},S(n,r(),2);case 2:return(s=n.o).configure(e.a.manifest),Ol(e),x(n,3),S(n,s.start(t,a),5);case 5:return l=n.o,Ol(e),u=function(e){for(var t=new Set,r=(e=f(e.periods)).next();!r.done;r=e.next()){for(var n=f((r=r.value).textStreams),i=n.next();!i.done;i=n.next())t.add(i.value);for(r=f(r.variants),n=r.next();!n.done;n=r.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video)}return t}(l),S(n,Promise.all(Ye(u,(function(e){return e.createSegmentIndex()}))),6);case 6:if(Ol(e),i)throw i;return n.return(l);case 3:return L(n),S(n,s.stop(),7);case 7:j(n,0)}}))}))}(e,t,n),2));case 2:if(o=i.o,Ol(e),o.presentationTimeline.V()||o.presentationTimeline.Xa())throw new me(2,9,9005,t);return a=null,s=new Ya,u=l=null,k(i,3,4),S(i,function(e,t,r){return p((function n(){var i,o,a;return M(n,(function(n){switch(n.j){case 1:return i=new pt({ub:e.b,onError:r,qc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),o=Do(t.periods),a=e.a,i.configure(a.drm),S(n,function(e,t,r){return e.s=[],e.D=r,gt(e,t)}(i,o,a.offline.usePersistentLicense),2);case 2:return S(n,yt(i),3);case 3:return S(n,vt(i),4);case 4:return n.return(i)}}))}))}(e,o,(function(e){u=u||e})),6);case 6:if(a=i.o,Ol(e),u)throw u;return S(i,function(e,t,r){return p((function n(){var i;return M(n,(function(n){switch(n.j){case 1:return i={width:1/0,height:1/0},function(e,t,r){for(var n=(e=f(e.periods)).next();!n.done;n=e.next())(n=n.value).variants=n.variants.filter((function(e){return Nr.bd(e,t,r)}))}(t,e.a.restrictions,i),function(e){for(var t=(e=f(e.periods)).next();!t.done;t=e.next())(t=t.value).variants=t.variants.filter((function(e){var t=!0;return e.audio&&(t=t&&br(e.audio)),e.video&&(t=t&&br(e.video)),t}))}(t),function(e,t){for(var r=f(e.periods),n=r.next();!n.done;n=r.next())(n=n.value).variants=n.variants.filter((function(e){return Rt(t,e)}))}(t,r),Tl(t),S(n,function(e,t){return p((function r(){var n,i,o,a;return M(r,(function(r){switch(r.j){case 1:n=null,i=f(e.periods),o=i.next();case 2:if(o.done){r.A(0);break}return a=o.value,n&&(a.variants=a.variants.filter((function(e){return kl(n,new Sl(e))}))),S(r,t(a),5);case 5:n=xl(a.variants),o=i.next(),r.A(2)}}))}))}(t,(function(t){return p((function r(){var n,i,o,a,s,l,u,c;return M(r,(function(r){switch(r.j){case 1:n=Nr,i=[];for(var d=f(t.variants),h=d.next();!h.done;h=d.next())o=h.value,i.push(n.Ed(o));for(h=(d=f(t.textStreams)).next();!h.done;h=d.next())a=h.value,i.push(n.xc(a));return S(r,e.a.offline.trackSelectionCallback(i),2);case 2:for(s=r.o,l=new Set,u=new Set,h=(d=f(s)).next();!h.done;h=d.next())"variant"==(c=h.value).type&&l.add(c.id),"text"==c.type&&u.add(c.id);t.variants=t.variants.filter((function(e){return l.has(e.id)})),t.textStreams=t.textStreams.filter((function(e){return u.has(e.id)})),w(r)}}))}))})),2);case 2:(function(e){if(0==e.periods.length)throw new me(2,4,4014);for(var t=(e=f(e.periods)).next();!t.done;t=e.next())Nl(t.value)})(t),w(n)}}))}))}(e,o,a),7);case 7:return S(i,s.init(),8);case 8:return Ol(e),S(i,function(e){var t=null;if(e.a.forEach((function(e,r){e.getCells().forEach((function(e,n){e.hasFixedKeySpace()||t||(t={path:{wa:r,ba:n},ba:e})}))})),t)return t;throw new me(2,9,9013,"Could not find a cell that supports add-operations")}(s),9);case 9:return l=i.o,Ol(e),S(i,function(e,t,r,n,i,o){return p((function a(){var s,l,u,c,d,h,m,g,y,v;return M(a,(function(a){switch(a.j){case 1:return s=function(e,t,r){var n=null==t.expiration?1/0:t.expiration;return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.Y(),size:0,expiration:n,tracks:t=vl(t.periods[0]),appMetadata:r}}(i,n,o),l=n.periods.some((function(e){return e.variants.some((function(e){return e.drmInfos&&e.drmInfos.length}))})),u=n.periods.some((function(e){return e.variants.some((function(e){return e.drmInfos.some((function(e){return e.initData&&e.initData.length}))}))})),d=null,(c=l&&!u)&&(h=r.a,d=Ul.get(h.keySystem)),m=new Ia(e.b,(function(t,r){s.size=r,e.a.offline.progressCallback(s,t)}),(function(t,n){c&&e.a.offline.usePersistentLicense&&d==n&&bt(r,"cenc",t)})),x(a,2),y=g=function(e,t,r,n,i,o,a){var s=new bl,l=i.periods.map((function(n){return function(e,t,r,n,i,o){for(var a=f(o.variants),s=a.next();!s.done;s=a.next())_l(n,s.value);for(a=f(o.textStreams),s=a.next();!s.done;s=a.next())n.a[s.value.id]=52;a=function(e){for(var t=new Set,r=f(e.textStreams),n=r.next();!n.done;n=r.next())t.add(n.value);for(e=f(e.variants),r=e.next();!r.done;r=e.next())(r=r.value).audio&&t.add(r.audio),r.video&&t.add(r.video);return t}(o);var l=new Map;for(a=f(a),s=a.next();!s.done;s=a.next()){s=s.value;var u=Il(e,t,r,n,i,s);l.set(s.id,u)}return o.variants.forEach((function(e){e.audio&&l.get(e.audio.id).variantIds.push(e.id),e.video&&l.get(e.video.id).variantIds.push(e.id)})),{startTime:o.startTime,streams:Array.from(l.values())}}(e,t,r,s,i,n)})),u=n.a,c=e.a.offline.usePersistentLicense;return u&&c&&(u.initData=[]),{originalManifestUri:o,duration:i.presentationTimeline.Y(),size:0,expiration:n.Lb(),periods:l,sessionIds:c?Et(n):[],drmInfo:u,appMetadata:a}}(e,m,t,r,n,i,o),S(a,function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return S(t,Promise.all(e.b.values()),2);case 2:return t.return(e.a.a)}}))}))}(m),4);case 4:if(y.size=a.o,g.expiration=r.Lb(),v=Et(r),g.sessionIds=e.a.offline.usePersistentLicense?v:[],l&&e.a.offline.usePersistentLicense&&!v.length)throw new me(2,9,9007);return a.return(g);case 2:return L(a),S(a,m.destroy(),5);case 5:j(a,0)}}))}))}(e,l.ba,a,o,t,r),10);case 10:if(c=i.o,Ol(e),u)throw u;return S(i,l.ba.addManifests([c]),11);case 11:return d=i.o,Ol(e),h=new rs("manifest",l.path.wa,l.path.ba,d[0]),i.return(yl(h,c));case 4:return L(i),e.f=!1,e.c=[],S(i,s.destroy(),12);case 12:if(!a){i.A(13);break}return S(i,a.destroy(),13);case 13:j(i,0);break;case 3:if(m=R(i),!l){i.A(15);break}return S(i,l.ba.removeSegments(e.c,(function(){})),15);case 15:throw u||m}}))}))}(this,e,t||{},(function(){return p((function t(){var i,o;return M(t,(function(t){switch(t.j){case 1:return r&&"string"!=typeof r?(Kr("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),i=r,t.return(new i)):S(t,gi.create(e,n.b,n.a.manifest.retryParameters,r),2);case 2:return o=t.o,t.return(o)}}))}))})))},Cl.prototype.store=Cl.prototype.store,Cl.prototype.kf=function(){return this.f},Cl.prototype.getStoreInProgress=Cl.prototype.kf,Cl.prototype.remove=function(e){return Ml(this,function(e,t){return p((function r(){var n,i,o,a,s,l;return M(r,(function(r){switch(r.j){case 1:return Dl(),null==(n=ns(t))||"manifest"!=n.a?r.return(Promise.reject(new me(2,9,9004,t))):(i=n,o=new Ya,x(r,2),S(r,o.init(),4));case 4:return S(r,za(o,i.wa(),i.ba()),5);case 5:return S(r,(a=r.o).getManifests([i.key()]),6);case 6:return s=r.o,l=s[0],S(r,Promise.all([jl(e,l,o),Pl(e,a,i,l)]),2);case 2:return L(r),S(r,o.destroy(),8);case 8:j(r,0)}}))}))}(this,e))},Cl.prototype.remove=Cl.prototype.remove,Cl.prototype.Xf=function(){return Ml(this,function(e){return p((function t(){var r,n,i,o,a,s,l,u,c;return M(t,(function(t){switch(t.j){case 1:return Dl(),r=e.b,n=e.a.drm,i=new Ya,o=!1,x(t,2),S(t,i.init(),4);case 4:for(a=[],function(e,t){e.a.forEach((function(e){t(e.getEmeSessionCell())}))}(i,(function(e){return a.push(e)})),s=Promise.resolve(),l={},u=f(a),c=u.next();!c.done;l={wc:l.wc},c=u.next())l.wc=c.value,s=s.then(function(e){return function(){return p((function t(){var i,a;return M(t,(function(t){switch(t.j){case 1:return S(t,e.wc.getAll(),2);case 2:return i=t.o,S(t,cs(n,r,i),3);case 3:return a=t.o,S(t,e.wc.remove(a),4);case 4:a.length!=i.length&&(o=!0),w(t)}}))}))}}(l));return S(t,s,2);case 2:return L(t),S(t,i.destroy(),6);case 6:j(t,3);break;case 3:return t.return(!o)}}))}))}(this))},Cl.prototype.removeEmeSessions=Cl.prototype.Xf,Cl.prototype.list=function(){return Ml(this,p((function e(){var t,r,n;return M(e,(function(e){switch(e.j){case 1:return Dl(),t=[],r=new Ya,x(e,2),S(e,r.init(),4);case 4:return n=Promise.resolve(),function(e,t){e.a.forEach((function(e,r){e.getCells().forEach((function(e,n){t({wa:r,ba:n},e)}))}))}(r,(function(e,r){n=n.then((function(){return p((function n(){return M(n,(function(n){switch(n.j){case 1:return S(n,r.getAllManifests(),2);case 2:n.o.forEach((function(r,n){var i=yl(new rs("manifest",e.wa,e.ba,n),r);t.push(i)})),w(n)}}))}))}))})),S(e,n,2);case 2:return L(e),S(e,r.destroy(),6);case 6:j(e,3);break;case 3:return e.return(t)}}))})))},Cl.prototype.list=Cl.prototype.list,Cl.deleteAll=function(){return p((function e(){var t;return M(e,(function(e){switch(e.j){case 1:return t=new Ya,x(e,2),S(e,t.erase(),2);case 2:return L(e),S(e,t.destroy(),5);case 5:j(e,0)}}))}))};var Ul=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");js.offline=Rl,G("shaka.polyfill.installAll",(function(){for(var e=0;e=t.data.length)return e;e=[];for(var r={},n=(t=f(t.data)).next();!n.done;r={lc:r.lc},n=t.next())r.lc=n.value,e.some(function(e){return function(t){return ht.za(t,e.lc)}}(r))||e.push(r.lc);return ht.concat.apply(ht,e instanceof Array?e:function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(f(e)))}(e.initData),this.dispatchEvent(t)}}function lu(e,t){var r=e.keyStatuses;r.size=null==t?0:1,r.a=t,e.dispatchEvent(new Se("keystatuseschange"))}function uu(){this.size=0,this.a=void 0}function cu(){return Promise.reject(Error("The key system specified is not supported."))}function du(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function fu(){throw new TypeError("Illegal constructor.")}function hu(){throw new TypeError("Illegal constructor.")}G("shaka.polyfill.register",Gl),Gl((function(){Sc()}),-1),Gl((function(){if(e.Document){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,(t=Document.prototype).exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitExitFullscreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",Vl),document.addEventListener("webkitfullscreenerror",Vl),document.addEventListener("mozfullscreenchange",Vl),document.addEventListener("mozfullscreenerror",Vl),document.addEventListener("MSFullscreenChange",Vl),document.addEventListener("MSFullscreenError",Vl)}})),Gl((function(){var t=!1;if(rt("CrKey"))t=!0;else try{e.indexedDB&&(t=!1)}catch(e){t=!0}t&&delete e.indexedDB})),Gl((function(){rt("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Hl)})),Gl((function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})})),Gl((function(){})),Gl((function(){var t=tt();e.MediaSource&&(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType?function(){var e=MediaSource.isTypeSupported,t=/^dv(?:h[e1]|a[v1])\./;MediaSource.isTypeSupported=function(r){for(var n=r.split(/ *; */),i=n[0],o={},a=1;a=t?(Yl(),function(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,r){return e.call(this,t,r-.001)}}()):Yl()):rt("Tizen")&&function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"opus"!=Xe(t)[0]&&e(t)}}())})),Wl.prototype.createMediaKeys=function(){var e=new ql(this.keySystem);return Promise.resolve(e)},Wl.prototype.getConfiguration=function(){return this.a},ql.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Jl(this.b,e)},ql.prototype.setServerCertificate=function(e){return e&&new Uint8Array(e),Promise.resolve(!0)},V(Jl,ke),(n=Jl.prototype).generateRequest=function(e,t){this.a=new ge;try{this.b=this.g.createSession("video/mp4",new Uint8Array(t)),this.sessionId=this.b.sessionId||"",this.f.w(this.b,"webkitkeymessage",this.og.bind(this)),this.f.w(this.b,"webkitkeyadded",this.mg.bind(this)),this.f.w(this.b,"webkitkeyerror",this.ng.bind(this)),Ql(this,"status-pending")}catch(e){this.a.reject(e)}return this.a},n.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},n.update=function(e){this.c=new ge;try{this.b.update(new Uint8Array(e))}catch(e){this.c.reject(e)}return this.c},n.close=function(){try{this.b.close(),this.closed.resolve(),this.f.$a()}catch(e){this.closed.reject(e)}return this.closed},n.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},n.og=function(e){this.a&&(this.a.resolve(),this.a=null),this.dispatchEvent(new Se("message",{messageType:null==this.keyStatuses.a?"license-request":"license-renewal",message:e.message.buffer}))},n.mg=function(){this.c&&(Ql(this,"usable"),this.c.resolve(),this.c=null)},n.ng=function(){var e=Error("EME PatchedMediaKeysApple key error");if(e.errorCode=this.b.error,null!=this.a)this.a.reject(e),this.a=null;else if(null!=this.c)this.c.reject(e),this.c=null;else switch(this.b.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Ql(this,"output-not-allowed");break;default:Ql(this,"internal-error")}},(n=eu.prototype).forEach=function(e){this.a&&e(this.a,Fl)},n.get=function(e){if(this.has(e))return this.a},n.has=function(e){var t=Fl;return!(!this.a||!ht.za(new Uint8Array(e),new Uint8Array(t)))},n.entries=function(){},n.keys=function(){},n.values=function(){},Gl((function(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(Fl=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=$l,e.MediaKeys=ql,e.MediaKeySystemAccess=Wl,navigator.requestMediaKeySystemAccess=zl)})),ru.prototype.createMediaKeys=function(){var e=new iu(this.keySystem);return Promise.resolve(e)},ru.prototype.getConfiguration=function(){return this.a},iu.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new au(this.a,e)},iu.prototype.setServerCertificate=function(){return Promise.resolve(!1)},V(au,ke),(n=au.prototype).generateRequest=function(e,t){this.a=new ge;try{this.c=this.g.createSession("video/mp4",new Uint8Array(t),null),this.f.w(this.c,"mskeymessage",this.If.bind(this)),this.f.w(this.c,"mskeyadded",this.Gf.bind(this)),this.f.w(this.c,"mskeyerror",this.Hf.bind(this)),lu(this,"status-pending")}catch(e){this.a.reject(e)}return this.a},n.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},n.update=function(e){this.b=new ge;try{this.c.update(new Uint8Array(e))}catch(e){this.b.reject(e)}return this.b},n.close=function(){try{this.c.close(),this.closed.resolve(),this.f.$a()}catch(e){this.closed.reject(e)}return this.closed},n.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},n.If=function(e){this.a&&(this.a.resolve(),this.a=null),this.dispatchEvent(new Se("message",{messageType:null==this.keyStatuses.a?"license-request":"license-renewal",message:e.message.buffer}))},n.Gf=function(){this.a?(lu(this,"usable"),this.a.resolve(),this.a=null):this.b&&(lu(this,"usable"),this.b.resolve(),this.b=null)},n.Hf=function(){var e=Error("EME PatchedMediaKeysMs key error");if(e.errorCode=this.c.error,null!=this.a)this.a.reject(e),this.a=null;else if(null!=this.b)this.b.reject(e),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:lu(this,"output-not-allowed");break;default:lu(this,"internal-error")}},(n=uu.prototype).forEach=function(e){this.a&&e(this.a,Bl)},n.get=function(e){if(this.has(e))return this.a},n.has=function(e){var t=Bl;return!(!this.a||!ht.za(new Uint8Array(e),new Uint8Array(t)))},n.entries=function(){},n.keys=function(){},n.values=function(){},Gl((function(){!e.HTMLVideoElement||!e.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(Bl=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=nu,e.MediaKeys=iu,e.MediaKeySystemAccess=ru,navigator.requestMediaKeySystemAccess=tu)})),fu.prototype.createSession=function(){},fu.prototype.setServerCertificate=function(){},hu.prototype.getConfiguration=function(){},hu.prototype.createMediaKeys=function(){},Gl((function(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=cu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=du,e.MediaKeys=fu,e.MediaKeySystemAccess=hu)}),-10);var pu,mu="";function gu(e){return mu?mu+e.charAt(0).toUpperCase()+e.slice(1):e}function yu(e,t){try{var r=new bu(e,t);return Promise.resolve(r)}catch(e){return Promise.reject(e)}}function vu(e){var t=this.mediaKeys;return t&&t!=e&&Au(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&Au(e,this),Promise.resolve()}function bu(e,t){this.a=this.keySystem=e;var r=!1;"org.w3.clearkey"==e&&(this.a="webkit-org.w3.clearkey",r=!1);var n=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video");for(var o=0;o tag.");var a=Bn.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","frameRate"),s=Bn.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","subFrameRate"),l=Bn.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier"),u=Bn.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","tickRate");if(o=i.getAttribute("xml:space")||"default",r=i.getAttribute("tts:extent"),"default"!=o&&"preserve"!=o)throw new me(2,2,2005,"Invalid xml:space value: "+o);o="default"==o,a=new ic(a,s,l,u),s=qu(i.getElementsByTagName("metadata")[0]),l=qu(i.getElementsByTagName("styling")[0]),u=qu(i.getElementsByTagName("layout")[0]);for(var c=[],d=0;dr.length)return i;var o=e;for(e=null;o&&!(e=o.getAttribute(t))&&(o=o.parentNode)instanceof Element;);if(t=e)for(e=(t=f(t=t.split(" "))).next();!e.done;e=t.next()){e=e.value;for(var a=(o=f(r)).next();!a.done;a=o.next())if(n+(a=a.value).getAttribute("xml:id")==e){i.push(a);break}}return i}function rc(e,t){var r=null;if(Ku.test(e)){r=Ku.exec(e);var n=Number(r[1]),i=Number(r[2]),o=Number(r[3]),a=Number(r[4]);r=(o+=(a+=(Number(r[5])||0)/t.b)/t.frameRate)+60*i+3600*n}else Gu.test(e)?r=nc(Gu,e):Vu.test(e)?r=nc(Vu,e):Hu.test(e)?(r=Hu.exec(e),r=Number(r[1])/t.frameRate):Yu.test(e)?(r=Yu.exec(e),r=Number(r[1])/t.a):zu.test(e)&&(r=nc(zu,e));return r}function nc(e,t){var r=e.exec(t);return null==r||""==r[0]?null:(Number(r[4])||0)/1e3+(Number(r[3])||0)+60*(Number(r[2])||0)+3600*(Number(r[1])||0)}function ic(e,t,r,n){this.frameRate=Number(e)||30,this.b=Number(t)||1,this.a=Number(n),0==this.a&&(this.a=e?this.frameRate*this.b:1),r&&(e=/^(\d+) (\d+)$/g.exec(r))&&(this.frameRate*=Number(e[1])/Number(e[2]))}function oc(){this.a=new Du}function ac(){}function sc(e,t,r){var n;(n=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=n[1],e.textAlign="middle"==t?Jt:Zt[t.toUpperCase()]):(n=/^vertical:(lr|rl)$/.exec(t))?e.writingMode="lr"==n[1]?"vertical-lr":"vertical-rl":(n=/^size:([\d.]+)%$/.exec(t))?e.size=Number(n[1]):(n=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(t))?(e.position=Number(n[1]),n[2]&&(t=n[2],e.positionAlign="line-left"==t||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center")):(n=/^region:(.*)$/.exec(t))?(t=function(e,t){var r=e.filter((function(e){return e.id==t}));return r.length?r[0]:null}(r,n[1]))&&(e.region=t):(r=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(r[1]),r[2]&&(e.lineAlign=or[r[2].toUpperCase()])):(r=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=nr,e.line=Number(r[1]),r[2]&&(e.lineAlign=or[r[2].toUpperCase()]))}function lc(e){if(null==(e=Mi(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g)))return null;var t=Number(e[2]),r=Number(e[3]);return 59=this._minDvrSize&&"live"===this.getPlaybackType()}},{key:"_duration",get:function(){return this.shakaPlayerInstance?this.seekRange.end-this.seekRange.start:0}},{key:"_startTime",get:function(){return this.seekRange.start}},{key:"presentationTimeline",get:function(){return this.shakaPlayerInstance.getManifest().presentationTimeline}},{key:"bandwidthEstimate",get:function(){if(this.shakaPlayerInstance)return this.shakaPlayerInstance.getStats().estimatedBandwidth}}],[{key:"canPlay",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";l.default.polyfill.installAll();var r=l.default.Player.isBrowserSupported(),n=e.split("?")[0].match(/.*\.(.*)$/)||[];return r&&("mpd"===n[1]||t.indexOf("application/dash+xml")>-1)}},{key:"Events",get:function(){return{SHAKA_READY:"shaka:ready"}}}]),o(t,[{key:"getProgramDateTime",value:function(){return new Date(1e3*(this.presentationTimeline.getPresentationStartTime()+this.seekRange.start))}},{key:"_updateDvr",value:function(e){this.trigger(a.Events.PLAYBACK_DVR,e),this.trigger(a.Events.PLAYBACK_STATS_ADD,{dvr:e})}},{key:"seek",value:function(e){e<0&&(a.Log.warn("Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point."),e=this._duration),this.dvrEnabled&&this._updateDvr(e1&&void 0!==arguments[1]?arguments[1]:null;this._player.selectAudioLanguage(e,t)}},{key:"selectTrack",value:function(e){if("text"===e.type)this._player.selectTextTrack(e);else{if("variant"!==e.type)throw new Error("Unhandled track type:",e.type);this._player.selectVariantTrack(e),e.mimeType.startsWith("video/")&&this._onAdaptation()}}},{key:"_enableShakaTextTrack",value:function(e){this.el.textTracks&&(this._shakaTTVisible=e,Array.from(this.el.textTracks).filter((function(e){return"subtitles"===e.kind})).forEach((function(t){return t.mode=!0===e?"showing":"hidden"})))}},{key:"_checkForClosedCaptions",value:function(){if(!this._ccIsSetup){if(this.hasClosedCaptionsTracks){this.trigger(a.Events.PLAYBACK_SUBTITLE_AVAILABLE);var e=this.closedCaptionsTrackId;this.closedCaptionsTrackId=e}this._ccIsSetup=!0}}},{key:"destroy",value:function(){var e=this;this._stopTimeUpdateTimer(),clearInterval(this.sendStatsId),this._player?this._player.destroy().then((function(){return e._destroy()})).catch((function(){e._destroy(),a.Log.error("shaka could not be destroyed")})):this._destroy(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"_setup",value:function(){var e=this;this._isShakaReadyState=!1,this._ccIsSetup=!1,this._player=this._createPlayer(),this._options.shakaConfiguration&&this._player.configure(this._options.shakaConfiguration),this._options.shakaOnBeforeLoad&&this._options.shakaOnBeforeLoad(this._player),this._player.load(this._options.src).then((function(){return e._loaded()})).catch((function(t){return e._setupError(t)}))}},{key:"_createPlayer",value:function(){var e=new l.default.Player(this.el);return e.addEventListener("error",this._onError.bind(this)),e.addEventListener("adaptation",this._onAdaptation.bind(this)),e.addEventListener("buffering",this._onBuffering.bind(this)),e}},{key:"_onTimeUpdate",value:function(){if(this.shakaPlayerInstance){var e={current:this.getCurrentTime(),total:this.getDuration(),firstFragDateTime:this.getProgramDateTime()};this._lastTimeUpdate&&e.current===this._lastTimeUpdate.current&&e.total===this._lastTimeUpdate.total||(this._lastTimeUpdate=e,this.trigger(a.Events.PLAYBACK_TIMEUPDATE,e,this.name))}}},{key:"_onBuffering",value:function(e){if(!this._stopped){var t=e.buffering?a.Events.PLAYBACK_BUFFERING:a.Events.PLAYBACK_BUFFERFULL;this.trigger(t)}}},{key:"_loaded",value:function(){this._onShakaReady(),this._startToSendStats(),this._fillLevels(),this._checkForClosedCaptions()}},{key:"_fillLevels",value:function(){0===this._levels.length&&(this._levels=this.videoTracks.slice(0).reverse(),this.trigger(a.Events.PLAYBACK_LEVELS_AVAILABLE,this.levels))}},{key:"_startToSendStats",value:function(){var e=this,t=this._options.shakaSendStatsInterval||3e4;this.sendStatsId=setInterval((function(){return e._sendStats()}),t)}},{key:"_sendStats",value:function(){this.trigger(a.Events.PLAYBACK_STATS_ADD,this._player.getStats())}},{key:"_setupError",value:function(e){this._onError(e)}},{key:"_onError",value:function(e){var r=this,n={shakaError:e,videoError:this.el.error},o=n.shakaError.detail||n.shakaError,s=o.category,u=o.code,c=o.severity;if(n.videoError||!u&&!s)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_onError",this).call(this);var d={code:s+"_"+u,description:"Category: "+s+", code: "+u+", severity: "+c,level:c===l.default.util.Error.Severity.CRITICAL?a.PlayerError.Levels.FATAL:a.PlayerError.Levels.WARN,raw:e},f=this.createError(d);a.Log.error("Shaka error event:",f),this.trigger(a.Events.PLAYBACK_ERROR,f),e.detail&&2==e.detail.severity&&1002==e.detail.code&&(console.log("retrying"),this.stop(),setTimeout((function(){return r.play()}),1e3))}},{key:"_onAdaptation",value:function(){var e=this.videoTracks.filter((function(e){return!0===e.active}))[0];this._fillLevels(),this._sendStats(),this._pendingAdaptationEvent&&(this.trigger(a.Events.PLAYBACK_LEVEL_SWITCH_END),this._pendingAdaptationEvent=!1),a.Log.debug("an adaptation has happened:",e),this.highDefinition=e.height>=720,this.trigger(a.Events.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(a.Events.PLAYBACK_BITRATE,{bandwidth:e.bandwidth,width:e.width,height:e.height,language:e.language,level:e.id,bitrate:e.videoBandwidth})}},{key:"_updateSettings",value:function(){"vod"===this.getPlaybackType()?this.settings.left=["playpause","position","duration"]:this.dvrEnabled?this.settings.left=["playpause"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(a.Events.PLAYBACK_SETTINGSUPDATE)}},{key:"_destroy",value:function(){this._isShakaReadyState=!1,a.Log.debug("shaka was destroyed")}},{key:"isReady",get:function(){return this._isShakaReadyState}},{key:"textTracks",get:function(){return this.isReady&&this._player.getTextTracks()}},{key:"audioLanguages",get:function(){return this.isReady&&this._player.getAudioLanguages()}},{key:"audioTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter((function(e){return e.mimeType.startsWith("audio/")}))}},{key:"videoTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter((function(e){return e.mimeType.startsWith("video/")}))}},{key:"closedCaptionsTracks",get:function(){var e=0;return(this.textTracks||[]).filter((function(e){return"subtitle"===e.kind})).map((function(t){return{id:e++,name:t.label||t.language,track:t}}))}},{key:"closedCaptionsTrackId",get:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"closedCaptionsTrackId",this)},set:function(e){if(this._player){var t=this.closedCaptionsTracks,r=void 0;if(-1!==e){if(!(r=t.find((function(t){return t.id===e}))))return void a.Log.warn('Track id "'+e+'" not found');if(this._shakaTTVisible&&!0===r.track.active)return void a.Log.info('Track id "'+e+'" already showing')}r?(this._player.selectTextTrack(r.track),this._player.setTextTrackVisibility(!0),this._enableShakaTextTrack(!0)):(this._player.setTextTrackVisibility(!1),this._enableShakaTextTrack(!1)),this._ccTrackId=e,this.trigger(a.Events.PLAYBACK_SUBTITLE_CHANGED,{id:e})}}}]),t}(a.HTML5Video);t.default=d,e.exports=t.default},clappr: +/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0},o=function(){function e(e,t){for(var r=0;r=this._minDvrSize&&"live"===this.getPlaybackType()}},{key:"_duration",get:function(){return this.shakaPlayerInstance?this.seekRange.end-this.seekRange.start:0}},{key:"_startTime",get:function(){return this.seekRange.start}},{key:"presentationTimeline",get:function(){var e=this.shakaPlayerInstance.getManifest();return e?e.presentationTimeline:null}},{key:"bandwidthEstimate",get:function(){if(this.shakaPlayerInstance)return this.shakaPlayerInstance.getStats().estimatedBandwidth}}],[{key:"canPlay",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";l.default.polyfill.installAll();var r=l.default.Player.isBrowserSupported(),n=e.split("?")[0].match(/.*\.(.*)$/)||[];return r&&("mpd"===n[1]||t.indexOf("application/dash+xml")>-1)}},{key:"Events",get:function(){return{SHAKA_READY:"shaka:ready"}}}]),o(t,[{key:"getProgramDateTime",value:function(){var e=this.presentationTimeline;return e?new Date(1e3*(e.getPresentationStartTime()+this.seekRange.start)):null}},{key:"_updateDvr",value:function(e){this.trigger(a.Events.PLAYBACK_DVR,e),this.trigger(a.Events.PLAYBACK_STATS_ADD,{dvr:e})}},{key:"seek",value:function(e){e<0&&(a.Log.warn("Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point."),e=this._duration),this.dvrEnabled&&this._updateDvr(e1&&void 0!==arguments[1]?arguments[1]:null;this._player.selectAudioLanguage(e,t)}},{key:"selectTrack",value:function(e){if("text"===e.type)this._player.selectTextTrack(e);else{if("variant"!==e.type)throw new Error("Unhandled track type:",e.type);this._player.selectVariantTrack(e),e.mimeType.startsWith("video/")&&this._onAdaptation()}}},{key:"_enableShakaTextTrack",value:function(e){this.el.textTracks&&(this._shakaTTVisible=e,Array.from(this.el.textTracks).filter((function(e){return"subtitles"===e.kind})).forEach((function(t){return t.mode=!0===e?"showing":"hidden"})))}},{key:"_checkForClosedCaptions",value:function(){if(!this._ccIsSetup){if(this.hasClosedCaptionsTracks){this.trigger(a.Events.PLAYBACK_SUBTITLE_AVAILABLE);var e=this.closedCaptionsTrackId;this.closedCaptionsTrackId=e}this._ccIsSetup=!0}}},{key:"destroy",value:function(){var e=this;this._stopTimeUpdateTimer(),clearInterval(this.sendStatsId),this._player?this._player.destroy().then((function(){return e._destroy()})).catch((function(){e._destroy(),a.Log.error("shaka could not be destroyed")})):this._destroy(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"_setup",value:function(){var e=this;this._isShakaReadyState=!1,this._ccIsSetup=!1,this._player=this._createPlayer(),this._options.shakaConfiguration&&this._player.configure(this._options.shakaConfiguration),this._options.shakaOnBeforeLoad&&this._options.shakaOnBeforeLoad(this._player),this._player.load(this._options.src).then((function(){return e._loaded()})).catch((function(t){return e._setupError(t)}))}},{key:"_createPlayer",value:function(){var e=new l.default.Player(this.el);return e.addEventListener("error",this._onError.bind(this)),e.addEventListener("adaptation",this._onAdaptation.bind(this)),e.addEventListener("buffering",this._onBuffering.bind(this)),e}},{key:"_onTimeUpdate",value:function(){if(this.shakaPlayerInstance){var e=this.getProgramDateTime();if(e){var t={current:this.getCurrentTime(),total:this.getDuration(),firstFragDateTime:e};this._lastTimeUpdate&&t.current===this._lastTimeUpdate.current&&t.total===this._lastTimeUpdate.total||(this._lastTimeUpdate=t,this.trigger(a.Events.PLAYBACK_TIMEUPDATE,t,this.name))}}}},{key:"_onBuffering",value:function(e){if(!this._stopped){var t=e.buffering?a.Events.PLAYBACK_BUFFERING:a.Events.PLAYBACK_BUFFERFULL;this.trigger(t)}}},{key:"_loaded",value:function(){this._onShakaReady(),this._startToSendStats(),this._fillLevels(),this._checkForClosedCaptions()}},{key:"_fillLevels",value:function(){0===this._levels.length&&(this._levels=this.videoTracks.slice(0).reverse(),this.trigger(a.Events.PLAYBACK_LEVELS_AVAILABLE,this.levels))}},{key:"_startToSendStats",value:function(){var e=this,t=this._options.shakaSendStatsInterval||3e4;this.sendStatsId=setInterval((function(){return e._sendStats()}),t)}},{key:"_sendStats",value:function(){this.trigger(a.Events.PLAYBACK_STATS_ADD,this._player.getStats())}},{key:"_setupError",value:function(e){this._onError(e)}},{key:"_onError",value:function(e){var r={shakaError:e,videoError:this.el.error},n=r.shakaError.detail||r.shakaError,o=n.category,s=n.code,u=n.severity;if(r.videoError||!s&&!o)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_onError",this).call(this);var c={code:o+"_"+s,description:"Category: "+o+", code: "+s+", severity: "+u,level:u===l.default.util.Error.Severity.CRITICAL?a.PlayerError.Levels.FATAL:a.PlayerError.Levels.WARN,raw:e},d=this.createError(c);a.Log.error("Shaka error event:",d),this.trigger(a.Events.PLAYBACK_ERROR,d)}},{key:"_onAdaptation",value:function(){var e=this.videoTracks.filter((function(e){return!0===e.active}))[0];this._fillLevels(),this._sendStats(),this._pendingAdaptationEvent&&(this.trigger(a.Events.PLAYBACK_LEVEL_SWITCH_END),this._pendingAdaptationEvent=!1),a.Log.debug("an adaptation has happened:",e),this.highDefinition=e.height>=720,this.trigger(a.Events.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(a.Events.PLAYBACK_BITRATE,{bandwidth:e.bandwidth,width:e.width,height:e.height,language:e.language,level:e.id,bitrate:e.videoBandwidth})}},{key:"_updateSettings",value:function(){"vod"===this.getPlaybackType()?this.settings.left=["playpause","position","duration"]:this.dvrEnabled?this.settings.left=["playpause"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(a.Events.PLAYBACK_SETTINGSUPDATE)}},{key:"_destroy",value:function(){this._isShakaReadyState=!1,a.Log.debug("shaka was destroyed")}},{key:"isReady",get:function(){return this._isShakaReadyState}},{key:"textTracks",get:function(){return this.isReady&&this._player.getTextTracks()}},{key:"audioLanguages",get:function(){return this.isReady&&this._player.getAudioLanguages()}},{key:"audioTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter((function(e){return e.mimeType.startsWith("audio/")}))}},{key:"videoTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter((function(e){return e.mimeType.startsWith("video/")}))}},{key:"closedCaptionsTracks",get:function(){var e=0;return(this.textTracks||[]).filter((function(e){return"subtitle"===e.kind})).map((function(t){return{id:e++,name:t.label||t.language,track:t}}))}},{key:"closedCaptionsTrackId",get:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"closedCaptionsTrackId",this)},set:function(e){if(this._player){var t=this.closedCaptionsTracks,r=void 0;if(-1!==e){if(!(r=t.find((function(t){return t.id===e}))))return void a.Log.warn('Track id "'+e+'" not found');if(this._shakaTTVisible&&!0===r.track.active)return void a.Log.info('Track id "'+e+'" already showing')}r?(this._player.selectTextTrack(r.track),this._player.setTextTrackVisibility(!0),this._enableShakaTextTrack(!0)):(this._player.setTextTrackVisibility(!1),this._enableShakaTextTrack(!1)),this._ccTrackId=e,this.trigger(a.Events.PLAYBACK_SUBTITLE_CHANGED,{id:e})}}}]),t}(a.HTML5Video);t.default=d,e.exports=t.default},clappr: /*!******************************************************************************************!*\ !*** external {"amd":"clappr","commonjs":"clappr","commonjs2":"clappr","root":"Clappr"} ***! \******************************************************************************************/ -/*! no static exports found */function(t,r){t.exports=e}})},e.exports=n(r(0))},function(e,t,r){var n;"undefined"!=typeof self&&self,n=function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="<%=baseUrl%>/",r(r.s=40)}([function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t){var r=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=r)},function(e,t,r){var n=r(10),i=r(29),o=r(15),a=Object.defineProperty;t.f=r(3)?Object.defineProperty:function(e,t,r){if(n(e),t=o(t,!0),n(r),i)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){e.exports=!r(11)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){var n=r(2),i=r(12);e.exports=r(3)?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,r){var n=r(56),i=r(17);e.exports=function(e){return n(i(e))}},function(e,t,r){var n=r(22)("wks"),i=r(14),o=r(0).Symbol,a="function"==typeof o;(e.exports=function(e){return n[e]||(n[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=n},function(e,t,r){var n=r(0),i=r(1),o=r(28),a=r(5),s=r(4),l=function(e,t,r){var u,c,d,f=e&l.F,h=e&l.G,p=e&l.S,m=e&l.P,g=e&l.B,y=e&l.W,v=h?i:i[t]||(i[t]={}),b=v.prototype,_=h?n:p?n[t]:(n[t]||{}).prototype;for(u in h&&(r=t),r)(c=!f&&_&&void 0!==_[u])&&s(v,u)||(d=c?_[u]:r[u],v[u]=h&&"function"!=typeof _[u]?r[u]:g&&c?o(d,n):y&&_[u]==d?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):m&&"function"==typeof d?o(Function.call,d):d,m&&((v.virtual||(v.virtual={}))[u]=d,e&l.R&&b&&!b[u]&&a(b,u,d)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,r){var n=r(6);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports=!0},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t,r){var n=r(6);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports={}},function(e,t,r){var n=r(10),i=r(55),o=r(23),a=r(21)("IE_PROTO"),s=function(){},l=function(){var e,t=r(30)("iframe"),n=o.length;for(t.style.display="none",r(60).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("