diff options
author | Anton Schubert | 2020-04-13 19:31:07 +0200 |
---|---|---|
committer | Anton Schubert | 2020-04-13 19:31:07 +0200 |
commit | 24f02757c9966ddc05871e6bd49226b752f183e4 (patch) | |
tree | a5a4ea8347ae506f5a66481efcb7c8c0b96c9f82 /assets/js/player.js | |
parent | 5fed49b39d7f3a8e7f32690f4d5ba28ba5c93ecc (diff) |
use voc-player for relive, update clappr plugins, remove old assets, clean up dash/relive player embeds
Diffstat (limited to 'assets/js/player.js')
-rw-r--r-- | assets/js/player.js | 1451 |
1 files changed, 0 insertions, 1451 deletions
diff --git a/assets/js/player.js b/assets/js/player.js deleted file mode 100644 index 394d302..0000000 --- a/assets/js/player.js +++ /dev/null @@ -1,1451 +0,0 @@ -!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": -/*!**********************************************************!*\ - !*** ./node_modules/babel-runtime/core-js/array/from.js ***! - \**********************************************************/ -/*! no static exports found */function(e,t,r){e.exports={default:r(/*! core-js/library/fn/array/from */"./node_modules/core-js/library/fn/array/from.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/get-iterator.js": -/*!************************************************************!*\ - !*** ./node_modules/babel-runtime/core-js/get-iterator.js ***! - \************************************************************/ -/*! no static exports found */function(e,t,r){e.exports={default:r(/*! core-js/library/fn/get-iterator */"./node_modules/core-js/library/fn/get-iterator.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/json/stringify.js": -/*!**************************************************************!*\ - !*** ./node_modules/babel-runtime/core-js/json/stringify.js ***! - \**************************************************************/ -/*! no static exports found */function(e,t,r){e.exports={default:r(/*! core-js/library/fn/json/stringify */"./node_modules/core-js/library/fn/json/stringify.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/object/assign.js": -/*!*************************************************************!*\ - !*** ./node_modules/babel-runtime/core-js/object/assign.js ***! - \*************************************************************/ -/*! no static exports found */function(e,t,r){e.exports={default:r(/*! core-js/library/fn/object/assign */"./node_modules/core-js/library/fn/object/assign.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/object/create.js": -/*!*************************************************************!*\ - !*** ./node_modules/babel-runtime/core-js/object/create.js ***! - \*************************************************************/ -/*! no static exports found */function(e,t,r){e.exports={default:r(/*! core-js/library/fn/object/create */"./node_modules/core-js/library/fn/object/create.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/object/define-property.js": -/*!**********************************************************************!*\ - !*** ./node_modules/babel-runtime/core-js/object/define-property.js ***! - \**********************************************************************/ -/*! no static exports found */function(e,t,r){e.exports={default:r(/*! core-js/library/fn/object/define-property */"./node_modules/core-js/library/fn/object/define-property.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js ***! - \**********************************************************************************/ -/*! no static exports found */function(e,t,r){e.exports={default:r(/*! core-js/library/fn/object/get-own-property-descriptor */"./node_modules/core-js/library/fn/object/get-own-property-descriptor.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/object/keys.js": -/*!***********************************************************!*\ - !*** ./node_modules/babel-runtime/core-js/object/keys.js ***! - \***********************************************************/ -/*! no static exports found */function(e,t,r){e.exports={default:r(/*! core-js/library/fn/object/keys */"./node_modules/core-js/library/fn/object/keys.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/object/set-prototype-of.js": -/*!***********************************************************************!*\ - !*** ./node_modules/babel-runtime/core-js/object/set-prototype-of.js ***! - \***********************************************************************/ -/*! no static exports found */function(e,t,r){e.exports={default:r(/*! core-js/library/fn/object/set-prototype-of */"./node_modules/core-js/library/fn/object/set-prototype-of.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/symbol.js": -/*!******************************************************!*\ - !*** ./node_modules/babel-runtime/core-js/symbol.js ***! - \******************************************************/ -/*! no static exports found */function(e,t,r){e.exports={default:r(/*! core-js/library/fn/symbol */"./node_modules/core-js/library/fn/symbol/index.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/symbol/iterator.js": -/*!***************************************************************!*\ - !*** ./node_modules/babel-runtime/core-js/symbol/iterator.js ***! - \***************************************************************/ -/*! no static exports found */function(e,t,r){e.exports={default:r(/*! core-js/library/fn/symbol/iterator */"./node_modules/core-js/library/fn/symbol/iterator.js"),__esModule:!0}},"./node_modules/babel-runtime/helpers/classCallCheck.js": -/*!**************************************************************!*\ - !*** ./node_modules/babel-runtime/helpers/classCallCheck.js ***! - \**************************************************************/ -/*! no static exports found */function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},"./node_modules/babel-runtime/helpers/createClass.js": -/*!***********************************************************!*\ - !*** ./node_modules/babel-runtime/helpers/createClass.js ***! - \***********************************************************/ -/*! no static exports found */function(e,t,r){"use strict";t.__esModule=!0;var n,i=r(/*! ../core-js/object/define-property */"./node_modules/babel-runtime/core-js/object/define-property.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,o.default)(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()},"./node_modules/babel-runtime/helpers/extends.js": -/*!*******************************************************!*\ - !*** ./node_modules/babel-runtime/helpers/extends.js ***! - \*******************************************************/ -/*! no static exports found */function(e,t,r){"use strict";t.__esModule=!0;var n,i=r(/*! ../core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}},"./node_modules/babel-runtime/helpers/inherits.js": -/*!********************************************************!*\ - !*** ./node_modules/babel-runtime/helpers/inherits.js ***! - \********************************************************/ -/*! no static exports found */function(e,t,r){"use strict";t.__esModule=!0;var n=a(r(/*! ../core-js/object/set-prototype-of */"./node_modules/babel-runtime/core-js/object/set-prototype-of.js")),i=a(r(/*! ../core-js/object/create */"./node_modules/babel-runtime/core-js/object/create.js")),o=a(r(/*! ../helpers/typeof */"./node_modules/babel-runtime/helpers/typeof.js"));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,o.default)(t)));e.prototype=(0,i.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(n.default?(0,n.default)(e,t):e.__proto__=t)}},"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js": -/*!*************************************************************************!*\ - !*** ./node_modules/babel-runtime/helpers/possibleConstructorReturn.js ***! - \*************************************************************************/ -/*! no static exports found */function(e,t,r){"use strict";t.__esModule=!0;var n,i=r(/*! ../helpers/typeof */"./node_modules/babel-runtime/helpers/typeof.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,o.default)(t))&&"function"!=typeof t?e:t}},"./node_modules/babel-runtime/helpers/toConsumableArray.js": -/*!*****************************************************************!*\ - !*** ./node_modules/babel-runtime/helpers/toConsumableArray.js ***! - \*****************************************************************/ -/*! no static exports found */function(e,t,r){"use strict";t.__esModule=!0;var n,i=r(/*! ../core-js/array/from */"./node_modules/babel-runtime/core-js/array/from.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return(0,o.default)(e)}},"./node_modules/babel-runtime/helpers/typeof.js": -/*!******************************************************!*\ - !*** ./node_modules/babel-runtime/helpers/typeof.js ***! - \******************************************************/ -/*! no static exports found */function(e,t,r){"use strict";t.__esModule=!0;var n=a(r(/*! ../core-js/symbol/iterator */"./node_modules/babel-runtime/core-js/symbol/iterator.js")),i=a(r(/*! ../core-js/symbol */"./node_modules/babel-runtime/core-js/symbol.js")),o="function"==typeof i.default&&"symbol"==typeof n.default?function(e){return typeof e}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};function a(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof i.default&&"symbol"===o(n.default)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":o(e)}},"./node_modules/clappr-zepto/zepto.js": -/*!********************************************!*\ - !*** ./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 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<n;r++)this[r]=e[r];this.length=n,this.selector=t||""}function G(t,r,n){for(e in r)n&&(D(r[e])||R(r[e]))?(D(r[e])&&!D(t[e])&&(t[e]={}),R(r[e])&&!R(t[e])&&(t[e]=[]),G(t[e],r[e],n)):void 0!==r[e]&&(t[e]=r[e])}function V(e,r){return null==r?t(e):t(e).filter(r)}function H(e,t,r,n){return L(t)?t.call(e,r,n):t}function Y(e,t,r){null==r?e.removeAttribute(t):e.setAttribute(t,r)}function z(e,t){var r=e.className||"",n=r&&void 0!==r.baseVal;if(void 0===t)return n?r.baseVal:r;n?r.baseVal=t:e.className=t}function W(e){try{return e?"true"==e||"false"!=e&&("null"==e?null:+e+""==e?+e:/^[\[\{]/.test(e)?t.parseJSON(e):e):e}catch(t){return e}}function $(e,t){t(e);for(var r=0,n=e.childNodes.length;r<n;r++)$(e.childNodes[r],t)}return k.matches=function(e,t){if(!t||!e||1!==e.nodeType)return!1;var r=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.matchesSelector;if(r)return r.call(e,t);var n,i=e.parentNode,o=!i;return o&&(i=x).appendChild(e),n=~k.qsa(i,t).indexOf(e),o&&x.removeChild(e),n},n=function(e){return e.replace(/-+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))},i=function(e){return s.call(e,(function(t,r){return e.indexOf(t)==r}))},k.fragment=function(e,r,n){var i,o,a;return p.test(e)&&(i=t(u.createElement(RegExp.$1))),i||(e.replace&&(e=e.replace(m,"<$1></$2>")),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;i<e.length;i++)null!=(n=r(e[i],i))&&s.push(n);else for(o in e)null!=(n=r(e[o],o))&&s.push(n);return(a=s).length>0?t.fn.concat.apply([],a):a},t.each=function(e,t){var r,n;if(M(e)){for(r=0;r<e.length;r++)if(!1===t.call(e[r],r,e[r]))return e}else for(n in e)if(!1===t.call(e[n],n,e[n]))return e;return e},t.grep=function(e,t){return s.call(e,t)},window.JSON&&(t.parseJSON=JSON.parse),t.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),(function(e,t){S["[object "+t+"]"]=t.toLowerCase()})),t.fn={constructor:k.Z,length:0,forEach:o.forEach,reduce:o.reduce,push:o.push,sort:o.sort,splice:o.splice,indexOf:o.indexOf,concat:function(){var e,t,r=[];for(e=0;e<arguments.length;e++)t=arguments[e],r[e]=k.isZ(t)?t.toArray():t;return a.apply(k.isZ(this)?this.toArray():this,r)},map:function(e){return t(t.map(this,(function(t,r){return e.call(t,r,t)})))},slice:function(){return t(l.apply(this,arguments))},ready:function(e){return E.test(u.readyState)&&u.body?e(t):u.addEventListener("DOMContentLoaded",(function(){e(t)}),!1),this},get:function(e){return void 0===e?l.call(this):this[e>=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?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"==j(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?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&&$(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\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/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("<div>").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<a;++s)if(!1===l[s].apply(r[0],r[1])&&e.stopOnFalse){t=!1;break}i=!1,l&&(u?u.length&&c(u.shift()):t?l.length=0:d.disable())},d={add:function(){if(l){var n=l.length,s=function(t){r.each(t,(function(t,r){"function"==typeof r?e.unique&&d.has(r)||l.push(r):r&&r.length&&"string"!=typeof r&&s(r)}))};s(arguments),i?a=l.length:t&&(o=n,c(t))}return this},remove:function(){return l&&r.each(arguments,(function(e,t){for(var n;(n=r.inArray(t,l,n))>-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<l;++u)s[u]&&e.isFunction(s[u].promise)?s[u].promise().done(f(u,a,s)).fail(d.reject).progress(f(u,o,i)):--c;return c||d.resolveWith(a,s),d.promise()},e.Deferred=r}(n),function(e){var t=1,r=Array.prototype.slice,n=e.isFunction,i=function(e){return"string"==typeof e},o={},a={},s="onfocusin"in window,l={focus:"focusin",blur:"focusout"},u={mouseenter:"mouseover",mouseleave:"mouseout"};function c(e){return e._zid||(e._zid=t++)}function d(e,t,r,n){if((t=f(t)).ns)var i=(a=t.ns,new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)"));var a;return(o[c(e)]||[]).filter((function(e){return e&&(!t.e||e.e==t.e)&&(!t.ns||i.test(e.ns))&&(!r||c(e.fn)===c(r))&&(!n||e.sel==n)}))}function f(e){var t=(""+e).split(".");return{e:t[0],ns:t.slice(1).sort().join(" ")}}function h(e,t){return e.del&&!s&&e.e in l||!!t}function p(e){return u[e]||s&&l[e]||e}function m(t,r,n,i,a,s,l){var d=c(t),m=o[d]||(o[d]=[]);r.split(/\s/).forEach((function(r){if("ready"==r)return e(document).ready(n);var o=f(r);o.fn=n,o.sel=a,o.e in u&&(n=function(t){var r=t.relatedTarget;if(!r||r!==this&&!e.contains(this,r))return o.fn.apply(this,arguments)}),o.del=s;var c=s||n;o.proxy=function(e){if(!(e=A(e)).isImmediatePropagationStopped()){e.data=i;var r=c.apply(t,null==e._args?[e]:[e].concat(e._args));return!1===r&&(e.preventDefault(),e.stopPropagation()),r}},o.i=m.length,m.push(o),"addEventListener"in t&&t.addEventListener(p(o.e),o.proxy,h(o,l))}))}function g(e,t,r,n,i){var a=c(e);(t||"").split(/\s/).forEach((function(t){d(e,t,r,n).forEach((function(t){delete o[a][t.i],"removeEventListener"in e&&e.removeEventListener(p(t.e),t.proxy,h(t,i))}))}))}a.click=a.mousedown=a.mouseup=a.mousemove="MouseEvents",e.event={add:m,remove:g},e.proxy=function(t,o){var a=2 in arguments&&r.call(arguments,2);if(n(t)){var s=function(){return t.apply(o,a?a.concat(r.call(arguments)):arguments)};return s._zid=c(t),s}if(i(o))return a?(a.unshift(t[o],t),e.proxy.apply(null,a)):e.proxy(t[o],t);throw new TypeError("expected function")},e.fn.bind=function(e,t,r){return this.on(e,t,r)},e.fn.unbind=function(e,t){return this.off(e,t)},e.fn.one=function(e,t,r,n){return this.on(e,t,r,n,1)};var y=function(){return!0},v=function(){return!1},b=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,_={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function A(t,r){return!r&&t.isDefaultPrevented||(r||(r=t),e.each(_,(function(e,n){var i=r[e];t[e]=function(){return this[n]=y,i&&i.apply(r,arguments)},t[n]=v})),t.timeStamp||(t.timeStamp=Date.now()),(void 0!==r.defaultPrevented?r.defaultPrevented:"returnValue"in r?!1===r.returnValue:r.getPreventDefault&&r.getPreventDefault())&&(t.isDefaultPrevented=y)),t}function E(e){var t,r={originalEvent:e};for(t in e)b.test(t)||void 0===e[t]||(r[t]=e[t]);return A(r,e)}e.fn.delegate=function(e,t,r){return this.on(t,e,r)},e.fn.undelegate=function(e,t,r){return this.off(t,e,r)},e.fn.live=function(t,r){return e(document.body).delegate(this.selector,t,r),this},e.fn.die=function(t,r){return e(document.body).undelegate(this.selector,t,r),this},e.fn.on=function(t,o,a,s,l){var u,c,d=this;return t&&!i(t)?(e.each(t,(function(e,t){d.on(e,o,a,t,l)})),d):(i(o)||n(s)||!1===s||(s=a,a=o,o=void 0),void 0!==s&&!1!==a||(s=a,a=void 0),!1===s&&(s=v),d.each((function(n,i){l&&(u=function(e){return g(i,e.type,s),s.apply(this,arguments)}),o&&(c=function(t){var n,a=e(t.target).closest(o,i).get(0);if(a&&a!==i)return n=e.extend(E(t),{currentTarget:a,liveFired:i}),(u||s).apply(a,[n].concat(r.call(arguments,1)))}),m(i,t,s,a,o,c||u)})))},e.fn.off=function(t,r,o){var a=this;return t&&!i(t)?(e.each(t,(function(e,t){a.off(e,r,t)})),a):(i(r)||n(o)||!1===o||(o=r,r=void 0),!1===o&&(o=v),a.each((function(){g(this,t,o,r)})))},e.fn.trigger=function(t,r){return(t=i(t)||e.isPlainObject(t)?e.Event(t):A(t))._args=r,this.each((function(){t.type in l&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,r)}))},e.fn.triggerHandler=function(t,r){var n,o;return this.each((function(a,s){(n=E(i(t)?e.Event(t):t))._args=r,n.target=s,e.each(d(s,t.type||t),(function(e,t){if(o=t.proxy(n),n.isImmediatePropagationStopped())return!1}))})),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}})),e.Event=function(e,t){i(e)||(e=(t=e).type);var r=document.createEvent(a[e]||"Events"),n=!0;if(t)for(var o in t)"bubbles"==o?n=!!t[o]:r[o]=t[o];return r.initEvent(e,n,!0),A(r)}}(n),function(){try{getComputedStyle(void 0)}catch(t){var e=getComputedStyle;window.getComputedStyle=function(t,r){try{return e(t,r)}catch(e){return null}}}}(),function(e){var t=e.zepto,r=t.qsa,n=t.matches;function i(t){return!(!(t=e(t)).width()&&!t.height())&&"none"!==t.css("display")}var o=e.expr[":"]={visible:function(){if(i(this))return this},hidden:function(){if(!i(this))return this},selected:function(){if(this.selected)return this},checked:function(){if(this.checked)return this},parent:function(){return this.parentNode},first:function(e){if(0===e)return this},last:function(e,t){if(e===t.length-1)return this},eq:function(e,t,r){if(e===r)return this},contains:function(t,r,n){if(e(this).text().indexOf(n)>-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 ***! - \*******************************************************/ -/*! no static exports found */function(e,t,r){r(/*! ../../modules/es6.string.iterator */"./node_modules/core-js/library/modules/es6.string.iterator.js"),r(/*! ../../modules/es6.array.from */"./node_modules/core-js/library/modules/es6.array.from.js"),e.exports=r(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Array.from},"./node_modules/core-js/library/fn/get-iterator.js": -/*!*********************************************************!*\ - !*** ./node_modules/core-js/library/fn/get-iterator.js ***! - \*********************************************************/ -/*! no static exports found */function(e,t,r){r(/*! ../modules/web.dom.iterable */"./node_modules/core-js/library/modules/web.dom.iterable.js"),r(/*! ../modules/es6.string.iterator */"./node_modules/core-js/library/modules/es6.string.iterator.js"),e.exports=r(/*! ../modules/core.get-iterator */"./node_modules/core-js/library/modules/core.get-iterator.js")},"./node_modules/core-js/library/fn/json/stringify.js": -/*!***********************************************************!*\ - !*** ./node_modules/core-js/library/fn/json/stringify.js ***! - \***********************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js"),i=n.JSON||(n.JSON={stringify:JSON.stringify});e.exports=function(e){return i.stringify.apply(i,arguments)}},"./node_modules/core-js/library/fn/object/assign.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/library/fn/object/assign.js ***! - \**********************************************************/ -/*! no static exports found */function(e,t,r){r(/*! ../../modules/es6.object.assign */"./node_modules/core-js/library/modules/es6.object.assign.js"),e.exports=r(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Object.assign},"./node_modules/core-js/library/fn/object/create.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/library/fn/object/create.js ***! - \**********************************************************/ -/*! no static exports found */function(e,t,r){r(/*! ../../modules/es6.object.create */"./node_modules/core-js/library/modules/es6.object.create.js");var n=r(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Object;e.exports=function(e,t){return n.create(e,t)}},"./node_modules/core-js/library/fn/object/define-property.js": -/*!*******************************************************************!*\ - !*** ./node_modules/core-js/library/fn/object/define-property.js ***! - \*******************************************************************/ -/*! no static exports found */function(e,t,r){r(/*! ../../modules/es6.object.define-property */"./node_modules/core-js/library/modules/es6.object.define-property.js");var n=r(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Object;e.exports=function(e,t,r){return n.defineProperty(e,t,r)}},"./node_modules/core-js/library/fn/object/get-own-property-descriptor.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/core-js/library/fn/object/get-own-property-descriptor.js ***! - \*******************************************************************************/ -/*! no static exports found */function(e,t,r){r(/*! ../../modules/es6.object.get-own-property-descriptor */"./node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js");var n=r(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Object;e.exports=function(e,t){return n.getOwnPropertyDescriptor(e,t)}},"./node_modules/core-js/library/fn/object/keys.js": -/*!********************************************************!*\ - !*** ./node_modules/core-js/library/fn/object/keys.js ***! - \********************************************************/ -/*! no static exports found */function(e,t,r){r(/*! ../../modules/es6.object.keys */"./node_modules/core-js/library/modules/es6.object.keys.js"),e.exports=r(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Object.keys},"./node_modules/core-js/library/fn/object/set-prototype-of.js": -/*!********************************************************************!*\ - !*** ./node_modules/core-js/library/fn/object/set-prototype-of.js ***! - \********************************************************************/ -/*! no static exports found */function(e,t,r){r(/*! ../../modules/es6.object.set-prototype-of */"./node_modules/core-js/library/modules/es6.object.set-prototype-of.js"),e.exports=r(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Object.setPrototypeOf},"./node_modules/core-js/library/fn/symbol/index.js": -/*!*********************************************************!*\ - !*** ./node_modules/core-js/library/fn/symbol/index.js ***! - \*********************************************************/ -/*! no static exports found */function(e,t,r){r(/*! ../../modules/es6.symbol */"./node_modules/core-js/library/modules/es6.symbol.js"),r(/*! ../../modules/es6.object.to-string */"./node_modules/core-js/library/modules/es6.object.to-string.js"),r(/*! ../../modules/es7.symbol.async-iterator */"./node_modules/core-js/library/modules/es7.symbol.async-iterator.js"),r(/*! ../../modules/es7.symbol.observable */"./node_modules/core-js/library/modules/es7.symbol.observable.js"),e.exports=r(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Symbol},"./node_modules/core-js/library/fn/symbol/iterator.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/fn/symbol/iterator.js ***! - \************************************************************/ -/*! no static exports found */function(e,t,r){r(/*! ../../modules/es6.string.iterator */"./node_modules/core-js/library/modules/es6.string.iterator.js"),r(/*! ../../modules/web.dom.iterable */"./node_modules/core-js/library/modules/web.dom.iterable.js"),e.exports=r(/*! ../../modules/_wks-ext */"./node_modules/core-js/library/modules/_wks-ext.js").f("iterator")},"./node_modules/core-js/library/modules/_a-function.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_a-function.js ***! - \*************************************************************/ -/*! no static exports found */function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},"./node_modules/core-js/library/modules/_add-to-unscopables.js": -/*!*********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_add-to-unscopables.js ***! - \*********************************************************************/ -/*! no static exports found */function(e,t){e.exports=function(){}},"./node_modules/core-js/library/modules/_an-object.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_an-object.js ***! - \************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js");e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},"./node_modules/core-js/library/modules/_array-includes.js": -/*!*****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_array-includes.js ***! - \*****************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),i=r(/*! ./_to-length */"./node_modules/core-js/library/modules/_to-length.js"),o=r(/*! ./_to-index */"./node_modules/core-js/library/modules/_to-index.js");e.exports=function(e){return function(t,r,a){var s,l=n(t),u=i(l.length),c=o(a,u);if(e&&r!=r){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===r)return e||c||0;return!e&&-1}}},"./node_modules/core-js/library/modules/_classof.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_classof.js ***! - \**********************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_cof */"./node_modules/core-js/library/modules/_cof.js"),i=r(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("toStringTag"),o="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,r,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:o?n(t):"Object"==(a=n(t))&&"function"==typeof t.callee?"Arguments":a}},"./node_modules/core-js/library/modules/_cof.js": -/*!******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_cof.js ***! - \******************************************************/ -/*! no static exports found */function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},"./node_modules/core-js/library/modules/_core.js": -/*!*******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_core.js ***! - \*******************************************************/ -/*! no static exports found */function(e,t){var r=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},"./node_modules/core-js/library/modules/_create-property.js": -/*!******************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_create-property.js ***! - \******************************************************************/ -/*! no static exports found */function(e,t,r){"use strict";var n=r(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js"),i=r(/*! ./_property-desc */"./node_modules/core-js/library/modules/_property-desc.js");e.exports=function(e,t,r){t in e?n.f(e,t,i(0,r)):e[t]=r}},"./node_modules/core-js/library/modules/_ctx.js": -/*!******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_ctx.js ***! - \******************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_a-function */"./node_modules/core-js/library/modules/_a-function.js");e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},"./node_modules/core-js/library/modules/_defined.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_defined.js ***! - \**********************************************************/ -/*! no static exports found */function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},"./node_modules/core-js/library/modules/_descriptors.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_descriptors.js ***! - \**************************************************************/ -/*! no static exports found */function(e,t,r){e.exports=!r(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},"./node_modules/core-js/library/modules/_dom-create.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_dom-create.js ***! - \*************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js"),i=r(/*! ./_global */"./node_modules/core-js/library/modules/_global.js").document,o=n(i)&&n(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},"./node_modules/core-js/library/modules/_enum-bug-keys.js": -/*!****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_enum-bug-keys.js ***! - \****************************************************************/ -/*! no static exports found */function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"./node_modules/core-js/library/modules/_enum-keys.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_enum-keys.js ***! - \************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js"),i=r(/*! ./_object-gops */"./node_modules/core-js/library/modules/_object-gops.js"),o=r(/*! ./_object-pie */"./node_modules/core-js/library/modules/_object-pie.js");e.exports=function(e){var t=n(e),r=i.f;if(r)for(var a,s=r(e),l=o.f,u=0;s.length>u;)l.call(e,a=s[u++])&&t.push(a);return t}},"./node_modules/core-js/library/modules/_export.js": -/*!*********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_export.js ***! - \*********************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),i=r(/*! ./_core */"./node_modules/core-js/library/modules/_core.js"),o=r(/*! ./_ctx */"./node_modules/core-js/library/modules/_ctx.js"),a=r(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js"),s=function(e,t,r){var l,u,c,d=e&s.F,f=e&s.G,h=e&s.S,p=e&s.P,m=e&s.B,g=e&s.W,y=f?i:i[t]||(i[t]={}),v=y.prototype,b=f?n:h?n[t]:(n[t]||{}).prototype;for(l in f&&(r=t),r)(u=!d&&b&&void 0!==b[l])&&l in y||(c=u?b[l]:r[l],y[l]=f&&"function"!=typeof b[l]?r[l]:m&&u?o(c,n):g&&b[l]==c?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}(c):p&&"function"==typeof c?o(Function.call,c):c,p&&((y.virtual||(y.virtual={}))[l]=c,e&s.R&&v&&!v[l]&&a(v,l,c)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},"./node_modules/core-js/library/modules/_fails.js": -/*!********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_fails.js ***! - \********************************************************/ -/*! no static exports found */function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"./node_modules/core-js/library/modules/_global.js": -/*!*********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_global.js ***! - \*********************************************************/ -/*! no static exports found */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)},"./node_modules/core-js/library/modules/_has.js": -/*!******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_has.js ***! - \******************************************************/ -/*! no static exports found */function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},"./node_modules/core-js/library/modules/_hide.js": -/*!*******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_hide.js ***! - \*******************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js"),i=r(/*! ./_property-desc */"./node_modules/core-js/library/modules/_property-desc.js");e.exports=r(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js")?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},"./node_modules/core-js/library/modules/_html.js": -/*!*******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_html.js ***! - \*******************************************************/ -/*! no static exports found */function(e,t,r){e.exports=r(/*! ./_global */"./node_modules/core-js/library/modules/_global.js").document&&document.documentElement},"./node_modules/core-js/library/modules/_ie8-dom-define.js": -/*!*****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_ie8-dom-define.js ***! - \*****************************************************************/ -/*! no static exports found */function(e,t,r){e.exports=!r(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js")&&!r(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js")((function(){return 7!=Object.defineProperty(r(/*! ./_dom-create */"./node_modules/core-js/library/modules/_dom-create.js")("div"),"a",{get:function(){return 7}}).a}))},"./node_modules/core-js/library/modules/_iobject.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_iobject.js ***! - \**********************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_cof */"./node_modules/core-js/library/modules/_cof.js");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},"./node_modules/core-js/library/modules/_is-array-iter.js": -/*!****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_is-array-iter.js ***! - \****************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js"),i=r(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||o[i]===e)}},"./node_modules/core-js/library/modules/_is-array.js": -/*!***********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_is-array.js ***! - \***********************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_cof */"./node_modules/core-js/library/modules/_cof.js");e.exports=Array.isArray||function(e){return"Array"==n(e)}},"./node_modules/core-js/library/modules/_is-object.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_is-object.js ***! - \************************************************************/ -/*! no static exports found */function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},"./node_modules/core-js/library/modules/_iter-call.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_iter-call.js ***! - \************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js");e.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var o=e.return;throw void 0!==o&&n(o.call(e)),t}}},"./node_modules/core-js/library/modules/_iter-create.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_iter-create.js ***! - \**************************************************************/ -/*! no static exports found */function(e,t,r){"use strict";var n=r(/*! ./_object-create */"./node_modules/core-js/library/modules/_object-create.js"),i=r(/*! ./_property-desc */"./node_modules/core-js/library/modules/_property-desc.js"),o=r(/*! ./_set-to-string-tag */"./node_modules/core-js/library/modules/_set-to-string-tag.js"),a={};r(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js")(a,r(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),(function(){return this})),e.exports=function(e,t,r){e.prototype=n(a,{next:i(1,r)}),o(e,t+" Iterator")}},"./node_modules/core-js/library/modules/_iter-define.js": -/*!**************************************************************!*\ - !*** ./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": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_iter-detect.js ***! - \**************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),i=!1;try{var o=[7][n]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var o=[7],a=o[n]();a.next=function(){return{done:r=!0}},o[n]=function(){return a},e(o)}catch(e){}return r}},"./node_modules/core-js/library/modules/_iter-step.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_iter-step.js ***! - \************************************************************/ -/*! no static exports found */function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},"./node_modules/core-js/library/modules/_iterators.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_iterators.js ***! - \************************************************************/ -/*! no static exports found */function(e,t){e.exports={}},"./node_modules/core-js/library/modules/_keyof.js": -/*!********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_keyof.js ***! - \********************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js"),i=r(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js");e.exports=function(e,t){for(var r,o=i(e),a=n(o),s=a.length,l=0;s>l;)if(o[r=a[l++]]===t)return r}},"./node_modules/core-js/library/modules/_library.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_library.js ***! - \**********************************************************/ -/*! no static exports found */function(e,t){e.exports=!0},"./node_modules/core-js/library/modules/_meta.js": -/*!*******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_meta.js ***! - \*******************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_uid */"./node_modules/core-js/library/modules/_uid.js")("meta"),i=r(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js"),o=r(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),a=r(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js").f,s=0,l=Object.isExtensible||function(){return!0},u=!r(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js")((function(){return l(Object.preventExtensions({}))})),c=function(e){a(e,n,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:n,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,n)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[n].i},getWeak:function(e,t){if(!o(e,n)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[n].w},onFreeze:function(e){return u&&d.NEED&&l(e)&&!o(e,n)&&c(e),e}}},"./node_modules/core-js/library/modules/_object-assign.js": -/*!****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-assign.js ***! - \****************************************************************/ -/*! no static exports found */function(e,t,r){"use strict";var n=r(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js"),i=r(/*! ./_object-gops */"./node_modules/core-js/library/modules/_object-gops.js"),o=r(/*! ./_object-pie */"./node_modules/core-js/library/modules/_object-pie.js"),a=r(/*! ./_to-object */"./node_modules/core-js/library/modules/_to-object.js"),s=r(/*! ./_iobject */"./node_modules/core-js/library/modules/_iobject.js"),l=Object.assign;e.exports=!l||r(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js")((function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=l({},e)[r]||Object.keys(l({},t)).join("")!=n}))?function(e,t){for(var r=a(e),l=arguments.length,u=1,c=i.f,d=o.f;l>u;)for(var f,h=s(arguments[u++]),p=c?n(h).concat(c(h)):n(h),m=p.length,g=0;m>g;)d.call(h,f=p[g++])&&(r[f]=h[f]);return r}:l},"./node_modules/core-js/library/modules/_object-create.js": -/*!****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-create.js ***! - \****************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),i=r(/*! ./_object-dps */"./node_modules/core-js/library/modules/_object-dps.js"),o=r(/*! ./_enum-bug-keys */"./node_modules/core-js/library/modules/_enum-bug-keys.js"),a=r(/*! ./_shared-key */"./node_modules/core-js/library/modules/_shared-key.js")("IE_PROTO"),s=function(){},l=function(){var e,t=r(/*! ./_dom-create */"./node_modules/core-js/library/modules/_dom-create.js")("iframe"),n=o.length;for(t.style.display="none",r(/*! ./_html */"./node_modules/core-js/library/modules/_html.js").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;n--;)delete l.prototype[o[n]];return l()};e.exports=Object.create||function(e,t){var r;return null!==e?(s.prototype=n(e),r=new s,s.prototype=null,r[a]=e):r=l(),void 0===t?r:i(r,t)}},"./node_modules/core-js/library/modules/_object-dp.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-dp.js ***! - \************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),i=r(/*! ./_ie8-dom-define */"./node_modules/core-js/library/modules/_ie8-dom-define.js"),o=r(/*! ./_to-primitive */"./node_modules/core-js/library/modules/_to-primitive.js"),a=Object.defineProperty;t.f=r(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js")?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}},"./node_modules/core-js/library/modules/_object-dps.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-dps.js ***! - \*************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js"),i=r(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),o=r(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js");e.exports=r(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js")?Object.defineProperties:function(e,t){i(e);for(var r,a=o(t),s=a.length,l=0;s>l;)n.f(e,r=a[l++],t[r]);return e}},"./node_modules/core-js/library/modules/_object-gopd.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-gopd.js ***! - \**************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_object-pie */"./node_modules/core-js/library/modules/_object-pie.js"),i=r(/*! ./_property-desc */"./node_modules/core-js/library/modules/_property-desc.js"),o=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"),s=r(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),l=r(/*! ./_ie8-dom-define */"./node_modules/core-js/library/modules/_ie8-dom-define.js"),u=Object.getOwnPropertyDescriptor;t.f=r(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js")?u:function(e,t){if(e=o(e),t=a(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return i(!n.f.call(e,t),e[t])}},"./node_modules/core-js/library/modules/_object-gopn-ext.js": -/*!******************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-gopn-ext.js ***! - \******************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),i=r(/*! ./_object-gopn */"./node_modules/core-js/library/modules/_object-gopn.js").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(n(e))}},"./node_modules/core-js/library/modules/_object-gopn.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-gopn.js ***! - \**************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_object-keys-internal */"./node_modules/core-js/library/modules/_object-keys-internal.js"),i=r(/*! ./_enum-bug-keys */"./node_modules/core-js/library/modules/_enum-bug-keys.js").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},"./node_modules/core-js/library/modules/_object-gops.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-gops.js ***! - \**************************************************************/ -/*! no static exports found */function(e,t){t.f=Object.getOwnPropertySymbols},"./node_modules/core-js/library/modules/_object-gpo.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-gpo.js ***! - \*************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),i=r(/*! ./_to-object */"./node_modules/core-js/library/modules/_to-object.js"),o=r(/*! ./_shared-key */"./node_modules/core-js/library/modules/_shared-key.js")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),n(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},"./node_modules/core-js/library/modules/_object-keys-internal.js": -/*!***********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-keys-internal.js ***! - \***********************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),i=r(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),o=r(/*! ./_array-includes */"./node_modules/core-js/library/modules/_array-includes.js")(!1),a=r(/*! ./_shared-key */"./node_modules/core-js/library/modules/_shared-key.js")("IE_PROTO");e.exports=function(e,t){var r,s=i(e),l=0,u=[];for(r in s)r!=a&&n(s,r)&&u.push(r);for(;t.length>l;)n(s,r=t[l++])&&(~o(u,r)||u.push(r));return u}},"./node_modules/core-js/library/modules/_object-keys.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-keys.js ***! - \**************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_object-keys-internal */"./node_modules/core-js/library/modules/_object-keys-internal.js"),i=r(/*! ./_enum-bug-keys */"./node_modules/core-js/library/modules/_enum-bug-keys.js");e.exports=Object.keys||function(e){return n(e,i)}},"./node_modules/core-js/library/modules/_object-pie.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-pie.js ***! - \*************************************************************/ -/*! no static exports found */function(e,t){t.f={}.propertyIsEnumerable},"./node_modules/core-js/library/modules/_object-sap.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-sap.js ***! - \*************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),i=r(/*! ./_core */"./node_modules/core-js/library/modules/_core.js"),o=r(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js");e.exports=function(e,t){var r=(i.Object||{})[e]||Object[e],a={};a[e]=t(r),n(n.S+n.F*o((function(){r(1)})),"Object",a)}},"./node_modules/core-js/library/modules/_property-desc.js": -/*!****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_property-desc.js ***! - \****************************************************************/ -/*! no static exports found */function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"./node_modules/core-js/library/modules/_redefine.js": -/*!***********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_redefine.js ***! - \***********************************************************/ -/*! no static exports found */function(e,t,r){e.exports=r(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js")},"./node_modules/core-js/library/modules/_set-proto.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_set-proto.js ***! - \************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js"),i=r(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),o=function(e,t){if(i(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=r(/*! ./_ctx */"./node_modules/core-js/library/modules/_ctx.js")(Function.call,r(/*! ./_object-gopd */"./node_modules/core-js/library/modules/_object-gopd.js").f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,r){return o(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:o}},"./node_modules/core-js/library/modules/_set-to-string-tag.js": -/*!********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_set-to-string-tag.js ***! - \********************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js").f,i=r(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),o=r(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},"./node_modules/core-js/library/modules/_shared-key.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_shared-key.js ***! - \*************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_shared */"./node_modules/core-js/library/modules/_shared.js")("keys"),i=r(/*! ./_uid */"./node_modules/core-js/library/modules/_uid.js");e.exports=function(e){return n[e]||(n[e]=i(e))}},"./node_modules/core-js/library/modules/_shared.js": -/*!*********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_shared.js ***! - \*********************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),i=n["__core-js_shared__"]||(n["__core-js_shared__"]={});e.exports=function(e){return i[e]||(i[e]={})}},"./node_modules/core-js/library/modules/_string-at.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_string-at.js ***! - \************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_to-integer */"./node_modules/core-js/library/modules/_to-integer.js"),i=r(/*! ./_defined */"./node_modules/core-js/library/modules/_defined.js");e.exports=function(e){return function(t,r){var o,a,s=String(i(t)),l=n(r),u=s.length;return l<0||l>=u?e?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):o:e?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}}},"./node_modules/core-js/library/modules/_to-index.js": -/*!***********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_to-index.js ***! - \***********************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_to-integer */"./node_modules/core-js/library/modules/_to-integer.js"),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=n(e))<0?i(e+t,0):o(e,t)}},"./node_modules/core-js/library/modules/_to-integer.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_to-integer.js ***! - \*************************************************************/ -/*! no static exports found */function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},"./node_modules/core-js/library/modules/_to-iobject.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_to-iobject.js ***! - \*************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_iobject */"./node_modules/core-js/library/modules/_iobject.js"),i=r(/*! ./_defined */"./node_modules/core-js/library/modules/_defined.js");e.exports=function(e){return n(i(e))}},"./node_modules/core-js/library/modules/_to-length.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_to-length.js ***! - \************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_to-integer */"./node_modules/core-js/library/modules/_to-integer.js"),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},"./node_modules/core-js/library/modules/_to-object.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_to-object.js ***! - \************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_defined */"./node_modules/core-js/library/modules/_defined.js");e.exports=function(e){return Object(n(e))}},"./node_modules/core-js/library/modules/_to-primitive.js": -/*!***************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_to-primitive.js ***! - \***************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js");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")}},"./node_modules/core-js/library/modules/_uid.js": -/*!******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_uid.js ***! - \******************************************************/ -/*! no static exports found */function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},"./node_modules/core-js/library/modules/_wks-define.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_wks-define.js ***! - \*************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),i=r(/*! ./_core */"./node_modules/core-js/library/modules/_core.js"),o=r(/*! ./_library */"./node_modules/core-js/library/modules/_library.js"),a=r(/*! ./_wks-ext */"./node_modules/core-js/library/modules/_wks-ext.js"),s=r(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js").f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},"./node_modules/core-js/library/modules/_wks-ext.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_wks-ext.js ***! - \**********************************************************/ -/*! no static exports found */function(e,t,r){t.f=r(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")},"./node_modules/core-js/library/modules/_wks.js": -/*!******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_wks.js ***! - \******************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_shared */"./node_modules/core-js/library/modules/_shared.js")("wks"),i=r(/*! ./_uid */"./node_modules/core-js/library/modules/_uid.js"),o=r(/*! ./_global */"./node_modules/core-js/library/modules/_global.js").Symbol,a="function"==typeof o;(e.exports=function(e){return n[e]||(n[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=n},"./node_modules/core-js/library/modules/core.get-iterator-method.js": -/*!**************************************************************************!*\ - !*** ./node_modules/core-js/library/modules/core.get-iterator-method.js ***! - \**************************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_classof */"./node_modules/core-js/library/modules/_classof.js"),i=r(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),o=r(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js");e.exports=r(/*! ./_core */"./node_modules/core-js/library/modules/_core.js").getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[n(e)]}},"./node_modules/core-js/library/modules/core.get-iterator.js": -/*!*******************************************************************!*\ - !*** ./node_modules/core-js/library/modules/core.get-iterator.js ***! - \*******************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),i=r(/*! ./core.get-iterator-method */"./node_modules/core-js/library/modules/core.get-iterator-method.js");e.exports=r(/*! ./_core */"./node_modules/core-js/library/modules/_core.js").getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},"./node_modules/core-js/library/modules/es6.array.from.js": -/*!****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.array.from.js ***! - \****************************************************************/ -/*! no static exports found */function(e,t,r){"use strict";var n=r(/*! ./_ctx */"./node_modules/core-js/library/modules/_ctx.js"),i=r(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),o=r(/*! ./_to-object */"./node_modules/core-js/library/modules/_to-object.js"),a=r(/*! ./_iter-call */"./node_modules/core-js/library/modules/_iter-call.js"),s=r(/*! ./_is-array-iter */"./node_modules/core-js/library/modules/_is-array-iter.js"),l=r(/*! ./_to-length */"./node_modules/core-js/library/modules/_to-length.js"),u=r(/*! ./_create-property */"./node_modules/core-js/library/modules/_create-property.js"),c=r(/*! ./core.get-iterator-method */"./node_modules/core-js/library/modules/core.get-iterator-method.js");i(i.S+i.F*!r(/*! ./_iter-detect */"./node_modules/core-js/library/modules/_iter-detect.js")((function(e){Array.from(e)})),"Array",{from:function(e){var t,r,i,d,f=o(e),h="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,y=0,v=c(f);if(g&&(m=n(m,p>2?arguments[2]:void 0,2)),null==v||h==Array&&s(v))for(r=new h(t=l(f.length));t>y;y++)u(r,y,g?m(f[y],y):f[y]);else for(d=v.call(f),r=new h;!(i=d.next()).done;y++)u(r,y,g?a(d,m,[i.value,y],!0):i.value);return r.length=y,r}})},"./node_modules/core-js/library/modules/es6.array.iterator.js": -/*!********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.array.iterator.js ***! - \********************************************************************/ -/*! no static exports found */function(e,t,r){"use strict";var n=r(/*! ./_add-to-unscopables */"./node_modules/core-js/library/modules/_add-to-unscopables.js"),i=r(/*! ./_iter-step */"./node_modules/core-js/library/modules/_iter-step.js"),o=r(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js"),a=r(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js");e.exports=r(/*! ./_iter-define */"./node_modules/core-js/library/modules/_iter-define.js")(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])}),"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},"./node_modules/core-js/library/modules/es6.object.assign.js": -/*!*******************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.object.assign.js ***! - \*******************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_export */"./node_modules/core-js/library/modules/_export.js");n(n.S+n.F,"Object",{assign:r(/*! ./_object-assign */"./node_modules/core-js/library/modules/_object-assign.js")})},"./node_modules/core-js/library/modules/es6.object.create.js": -/*!*******************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.object.create.js ***! - \*******************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_export */"./node_modules/core-js/library/modules/_export.js");n(n.S,"Object",{create:r(/*! ./_object-create */"./node_modules/core-js/library/modules/_object-create.js")})},"./node_modules/core-js/library/modules/es6.object.define-property.js": -/*!****************************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.object.define-property.js ***! - \****************************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_export */"./node_modules/core-js/library/modules/_export.js");n(n.S+n.F*!r(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js"),"Object",{defineProperty:r(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js").f})},"./node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js ***! - \****************************************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),i=r(/*! ./_object-gopd */"./node_modules/core-js/library/modules/_object-gopd.js").f;r(/*! ./_object-sap */"./node_modules/core-js/library/modules/_object-sap.js")("getOwnPropertyDescriptor",(function(){return function(e,t){return i(n(e),t)}}))},"./node_modules/core-js/library/modules/es6.object.keys.js": -/*!*****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.object.keys.js ***! - \*****************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_to-object */"./node_modules/core-js/library/modules/_to-object.js"),i=r(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js");r(/*! ./_object-sap */"./node_modules/core-js/library/modules/_object-sap.js")("keys",(function(){return function(e){return i(n(e))}}))},"./node_modules/core-js/library/modules/es6.object.set-prototype-of.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.object.set-prototype-of.js ***! - \*****************************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ./_export */"./node_modules/core-js/library/modules/_export.js");n(n.S,"Object",{setPrototypeOf:r(/*! ./_set-proto */"./node_modules/core-js/library/modules/_set-proto.js").set})},"./node_modules/core-js/library/modules/es6.object.to-string.js": -/*!**********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.object.to-string.js ***! - \**********************************************************************/ -/*! no static exports found */function(e,t){},"./node_modules/core-js/library/modules/es6.string.iterator.js": -/*!*********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.string.iterator.js ***! - \*********************************************************************/ -/*! no static exports found */function(e,t,r){"use strict";var n=r(/*! ./_string-at */"./node_modules/core-js/library/modules/_string-at.js")(!0);r(/*! ./_iter-define */"./node_modules/core-js/library/modules/_iter-define.js")(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})}))},"./node_modules/core-js/library/modules/es6.symbol.js": -/*!************************************************************!*\ - !*** ./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"),U=c("symbols"),F=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=U[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},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=j(_(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=j(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((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(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: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):$(T(e),t)},defineProperty:W,defineProperties:$,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": -/*!***************************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es7.symbol.async-iterator.js ***! - \***************************************************************************/ -/*! no static exports found */function(e,t,r){r(/*! ./_wks-define */"./node_modules/core-js/library/modules/_wks-define.js")("asyncIterator")},"./node_modules/core-js/library/modules/es7.symbol.observable.js": -/*!***********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es7.symbol.observable.js ***! - \***********************************************************************/ -/*! no static exports found */function(e,t,r){r(/*! ./_wks-define */"./node_modules/core-js/library/modules/_wks-define.js")("observable")},"./node_modules/core-js/library/modules/web.dom.iterable.js": -/*!******************************************************************!*\ - !*** ./node_modules/core-js/library/modules/web.dom.iterable.js ***! - \******************************************************************/ -/*! no static exports found */function(e,t,r){r(/*! ./es6.array.iterator */"./node_modules/core-js/library/modules/es6.array.iterator.js");for(var n=r(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),i=r(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js"),o=r(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js"),a=r(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],l=0;l<5;l++){var u=s[l],c=n[u],d=c&&c.prototype;d&&!d[a]&&i(d,a,u),o[u]=o.Array}},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/components/container/public/style.scss": -/*!***************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/components/container/public/style.scss ***! - \***************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */function(e,t,r){(e.exports=r(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".container[data-container] {\n position: absolute;\n background-color: black;\n height: 100%;\n width: 100%;\n max-width: 100%; }\n .container[data-container] .chromeless {\n cursor: default; }\n\n[data-player]:not(.nocursor) .container[data-container]:not(.chromeless).pointer-enabled {\n cursor: pointer; }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/components/core/public/style.scss": -/*!**********************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/components/core/public/style.scss ***! - \**********************************************************************************************************************************************************************************************************************/ -/*! no static exports found */function(e,t,r){(e.exports=r(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,'[data-player] {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n user-select: none;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n position: relative;\n margin: 0;\n padding: 0;\n border: 0;\n font-style: normal;\n font-weight: normal;\n text-align: center;\n overflow: hidden;\n font-size: 100%;\n font-family: "Roboto", "Open Sans", Arial, sans-serif;\n text-shadow: 0 0 0;\n box-sizing: border-box; }\n [data-player] div, [data-player] span, [data-player] applet, [data-player] object, [data-player] iframe,\n [data-player] h1, [data-player] h2, [data-player] h3, [data-player] h4, [data-player] h5, [data-player] h6, [data-player] p, [data-player] blockquote, [data-player] pre,\n [data-player] a, [data-player] abbr, [data-player] acronym, [data-player] address, [data-player] big, [data-player] cite, [data-player] code,\n [data-player] del, [data-player] dfn, [data-player] em, [data-player] img, [data-player] ins, [data-player] kbd, [data-player] q, [data-player] s, [data-player] samp,\n [data-player] small, [data-player] strike, [data-player] strong, [data-player] sub, [data-player] sup, [data-player] tt, [data-player] var,\n [data-player] b, [data-player] u, [data-player] i, [data-player] center,\n [data-player] dl, [data-player] dt, [data-player] dd, [data-player] ol, [data-player] ul, [data-player] li,\n [data-player] fieldset, [data-player] form, [data-player] label, [data-player] legend,\n [data-player] table, [data-player] caption, [data-player] tbody, [data-player] tfoot, [data-player] thead, [data-player] tr, [data-player] th, [data-player] td,\n [data-player] article, [data-player] aside, [data-player] canvas, [data-player] details, [data-player] embed,\n [data-player] figure, [data-player] figcaption, [data-player] footer, [data-player] header, [data-player] hgroup,\n [data-player] menu, [data-player] nav, [data-player] output, [data-player] ruby, [data-player] section, [data-player] summary,\n [data-player] time, [data-player] mark, [data-player] audio, [data-player] video {\n margin: 0;\n padding: 0;\n border: 0;\n font: inherit;\n font-size: 100%;\n vertical-align: baseline; }\n [data-player] table {\n border-collapse: collapse;\n border-spacing: 0; }\n [data-player] caption, [data-player] th, [data-player] td {\n text-align: left;\n font-weight: normal;\n vertical-align: middle; }\n [data-player] q, [data-player] blockquote {\n quotes: none; }\n [data-player] q:before, [data-player] q:after, [data-player] blockquote:before, [data-player] blockquote:after {\n content: "";\n content: none; }\n [data-player] a img {\n border: none; }\n [data-player]:focus {\n outline: 0; }\n [data-player] * {\n max-width: none;\n box-sizing: inherit;\n float: none; }\n [data-player] div {\n display: block; }\n [data-player].fullscreen {\n width: 100% !important;\n height: 100% !important;\n top: 0;\n left: 0; }\n [data-player].nocursor {\n cursor: none; }\n\n.clappr-style {\n display: none !important; }\n',""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/base_flash_playback/public/flash.scss": -/*!************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/base_flash_playback/public/flash.scss ***! - \************************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */function(e,t,r){(e.exports=r(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".clappr-flash-playback[data-flash-playback] {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n pointer-events: none; }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/html5_video/public/style.scss": -/*!****************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/html5_video/public/style.scss ***! - \****************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */function(e,t,r){(e.exports=r(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,"[data-html5-video] {\n position: absolute;\n height: 100%;\n width: 100%;\n display: block; }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/html_img/public/style.scss": -/*!*************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/html_img/public/style.scss ***! - \*************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */function(e,t,r){(e.exports=r(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,"[data-html-img] {\n max-width: 100%;\n max-height: 100%; }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/no_op/public/style.scss": -/*!**********************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/no_op/public/style.scss ***! - \**********************************************************************************************************************************************************************************************************************/ -/*! no static exports found */function(e,t,r){(e.exports=r(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,"[data-no-op] {\n position: absolute;\n height: 100%;\n width: 100%;\n text-align: center; }\n\n[data-no-op] p[data-no-op-msg] {\n position: absolute;\n text-align: center;\n font-size: 25px;\n left: 0;\n right: 0;\n color: white;\n padding: 10px;\n /* center vertically */\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n max-height: 100%;\n overflow: auto; }\n\n[data-no-op] canvas[data-no-op-canvas] {\n background-color: #777;\n height: 100%;\n width: 100%; }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/closed_captions/public/closed_captions.scss": -/*!****************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/closed_captions/public/closed_captions.scss ***! - \****************************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */function(e,t,r){(e.exports=r(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".cc-controls[data-cc-controls] {\n float: right;\n position: relative;\n display: none; }\n .cc-controls[data-cc-controls].available {\n display: block; }\n .cc-controls[data-cc-controls] .cc-button {\n padding: 6px !important; }\n .cc-controls[data-cc-controls] .cc-button.enabled {\n display: block;\n opacity: 1.0; }\n .cc-controls[data-cc-controls] .cc-button.enabled:hover {\n opacity: 1.0;\n text-shadow: none; }\n .cc-controls[data-cc-controls] > ul {\n list-style-type: none;\n position: absolute;\n bottom: 25px;\n border: 1px solid black;\n display: none;\n background-color: #e6e6e6; }\n .cc-controls[data-cc-controls] li {\n font-size: 10px; }\n .cc-controls[data-cc-controls] li[data-title] {\n background-color: #c3c2c2;\n padding: 5px; }\n .cc-controls[data-cc-controls] li a {\n color: #444;\n padding: 2px 10px;\n display: block;\n text-decoration: none; }\n .cc-controls[data-cc-controls] li a:hover {\n background-color: #555;\n color: white; }\n .cc-controls[data-cc-controls] li a:hover a {\n color: white;\n text-decoration: none; }\n .cc-controls[data-cc-controls] li.current a {\n color: #f00; }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/dvr_controls/public/dvr_controls.scss": -/*!**********************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/dvr_controls/public/dvr_controls.scss ***! - \**********************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */function(e,t,r){(e.exports=r(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,'.dvr-controls[data-dvr-controls] {\n display: inline-block;\n float: left;\n color: #fff;\n line-height: 32px;\n font-size: 10px;\n font-weight: bold;\n margin-left: 6px; }\n .dvr-controls[data-dvr-controls] .live-info {\n cursor: default;\n font-family: "Roboto", "Open Sans", Arial, sans-serif;\n text-transform: uppercase; }\n .dvr-controls[data-dvr-controls] .live-info:before {\n content: "";\n display: inline-block;\n position: relative;\n width: 7px;\n height: 7px;\n border-radius: 3.5px;\n margin-right: 3.5px;\n background-color: #ff0101; }\n .dvr-controls[data-dvr-controls] .live-info.disabled {\n opacity: 0.3; }\n .dvr-controls[data-dvr-controls] .live-info.disabled:before {\n background-color: #fff; }\n .dvr-controls[data-dvr-controls] .live-button {\n cursor: pointer;\n outline: none;\n display: none;\n border: 0;\n color: #fff;\n background-color: transparent;\n height: 32px;\n padding: 0;\n opacity: 0.7;\n font-family: "Roboto", "Open Sans", Arial, sans-serif;\n text-transform: uppercase;\n transition: all 0.1s ease; }\n .dvr-controls[data-dvr-controls] .live-button:before {\n content: "";\n display: inline-block;\n position: relative;\n width: 7px;\n height: 7px;\n border-radius: 3.5px;\n margin-right: 3.5px;\n background-color: #fff; }\n .dvr-controls[data-dvr-controls] .live-button:hover {\n opacity: 1;\n text-shadow: rgba(255, 255, 255, 0.75) 0 0 5px; }\n\n.dvr .dvr-controls[data-dvr-controls] .live-info {\n display: none; }\n\n.dvr .dvr-controls[data-dvr-controls] .live-button {\n display: block; }\n\n.dvr.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n background-color: #005aff; }\n\n.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n background-color: #ff0101; }\n',""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/error_screen/public/error_screen.scss": -/*!**********************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/error_screen/public/error_screen.scss ***! - \**********************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */function(e,t,r){(e.exports=r(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,"div.player-error-screen {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: #CCCACA;\n position: absolute;\n top: 0;\n height: 100%;\n width: 100%;\n background-color: rgba(0, 0, 0, 0.7);\n z-index: 2000;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center; }\n div.player-error-screen__content[data-error-screen] {\n font-size: 14px;\n color: #CCCACA;\n margin-top: 45px; }\n div.player-error-screen__title[data-error-screen] {\n font-weight: bold;\n line-height: 30px;\n font-size: 18px; }\n div.player-error-screen__message[data-error-screen] {\n width: 90%;\n margin: 0 auto; }\n div.player-error-screen__code[data-error-screen] {\n font-size: 13px;\n margin-top: 15px; }\n div.player-error-screen__reload {\n cursor: pointer;\n width: 30px;\n margin: 15px auto 0; }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/media_control/public/media-control.scss": -/*!************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/media_control/public/media-control.scss ***! - \************************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ../../../../node_modules/css-loader/lib/url/escape.js */"./node_modules/css-loader/lib/url/escape.js");(e.exports=r(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".media-control-notransition {\n transition: none !important; }\n\n.media-control[data-media-control] {\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 9999;\n pointer-events: none; }\n .media-control[data-media-control].dragging {\n pointer-events: auto;\n cursor: -webkit-grabbing !important;\n cursor: grabbing !important;\n cursor: url("+n(r(/*! ./closed-hand.cur */"./src/plugins/media_control/public/closed-hand.cur"))+"), move; }\n .media-control[data-media-control].dragging * {\n cursor: -webkit-grabbing !important;\n cursor: grabbing !important;\n cursor: url("+n(r(/*! ./closed-hand.cur */"./src/plugins/media_control/public/closed-hand.cur"))+'), move; }\n .media-control[data-media-control] .media-control-background[data-background] {\n position: absolute;\n height: 40%;\n width: 100%;\n bottom: 0;\n background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));\n transition: opacity 0.6s ease-out; }\n .media-control[data-media-control] .media-control-icon {\n line-height: 0;\n letter-spacing: 0;\n speak: none;\n color: #fff;\n opacity: 0.5;\n vertical-align: middle;\n text-align: left;\n transition: all 0.1s ease; }\n .media-control[data-media-control] .media-control-icon:hover {\n color: white;\n opacity: 0.75;\n text-shadow: rgba(255, 255, 255, 0.8) 0 0 5px; }\n .media-control[data-media-control].media-control-hide .media-control-background[data-background] {\n opacity: 0; }\n .media-control[data-media-control].media-control-hide .media-control-layer[data-controls] {\n bottom: -50px; }\n .media-control[data-media-control].media-control-hide .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] {\n opacity: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] {\n position: absolute;\n bottom: 7px;\n width: 100%;\n height: 32px;\n font-size: 0;\n vertical-align: middle;\n pointer-events: auto;\n transition: bottom 0.4s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-left-panel[data-media-control] {\n position: absolute;\n top: 0;\n left: 4px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-center-panel[data-media-control] {\n height: 100%;\n text-align: center;\n line-height: 32px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-right-panel[data-media-control] {\n position: absolute;\n top: 0;\n right: 4px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button {\n background-color: transparent;\n border: 0;\n margin: 0 6px;\n padding: 0;\n cursor: pointer;\n display: inline-block;\n width: 32px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg {\n width: 100%;\n height: 22px; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg path {\n fill: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button:focus {\n outline: none; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-play] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-pause] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-stop] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-fullscreen] {\n float: right;\n background-color: transparent;\n border: 0;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator] {\n background-color: transparent;\n border: 0;\n cursor: default;\n display: none;\n float: right;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled {\n display: block;\n opacity: 1.0; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled:hover {\n opacity: 1.0;\n text-shadow: none; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playpause] {\n float: left; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playstop] {\n float: left; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position], .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration] {\n display: inline-block;\n font-size: 10px;\n color: white;\n cursor: default;\n line-height: 32px;\n position: relative; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position] {\n margin: 0 6px 0 7px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration] {\n color: rgba(255, 255, 255, 0.5);\n margin-right: 6px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]:before {\n content: "|";\n margin-right: 7px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] {\n position: absolute;\n top: -20px;\n left: 0;\n display: inline-block;\n vertical-align: middle;\n width: 100%;\n height: 25px;\n cursor: pointer; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] {\n width: 100%;\n height: 1px;\n position: relative;\n top: 12px;\n background-color: #666666; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-1[data-seekbar] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #c2c2c2;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #005aff;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 0;\n position: absolute;\n top: -3px;\n width: 5px;\n height: 7px;\n background-color: rgba(255, 255, 255, 0.5);\n transition: opacity 0.1s ease; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]:hover .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 1; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled {\n cursor: default; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled:hover .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] {\n position: absolute;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n top: 2px;\n left: 0;\n width: 20px;\n height: 20px;\n opacity: 1;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] .bar-scrubber-icon[data-seekbar] {\n position: absolute;\n left: 6px;\n top: 6px;\n width: 8px;\n height: 8px;\n border-radius: 10px;\n box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);\n background-color: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] {\n float: right;\n display: inline-block;\n height: 32px;\n cursor: pointer;\n margin: 0 6px;\n box-sizing: border-box; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] {\n float: left;\n bottom: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] {\n background-color: transparent;\n border: 0;\n box-sizing: content-box;\n width: 32px;\n height: 32px;\n opacity: 0.5; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]:hover {\n opacity: 0.75; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg {\n height: 24px;\n position: relative;\n top: 3px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg path {\n fill: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume].muted svg {\n margin-left: 2px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] {\n float: left;\n position: relative;\n overflow: hidden;\n top: 6px;\n width: 42px;\n height: 18px;\n padding: 3px 0;\n transition: width .2s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] {\n height: 1px;\n position: relative;\n top: 7px;\n margin: 0 3px;\n background-color: #666666; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-1[data-volume] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #c2c2c2;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-2[data-volume] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #005aff;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-hover[data-volume] {\n opacity: 0;\n position: absolute;\n top: -3px;\n width: 5px;\n height: 7px;\n background-color: rgba(255, 255, 255, 0.5);\n transition: opacity 0.1s ease; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] {\n position: absolute;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n top: 0px;\n left: 0;\n width: 20px;\n height: 20px;\n opacity: 1;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] .bar-scrubber-icon[data-volume] {\n position: absolute;\n left: 6px;\n top: 6px;\n width: 8px;\n height: 8px;\n border-radius: 10px;\n box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);\n background-color: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume] {\n float: left;\n width: 4px;\n padding-left: 2px;\n height: 12px;\n opacity: 0.5;\n box-shadow: inset 2px 0 0 white;\n transition: -webkit-transform .2s ease-out;\n transition: transform .2s ease-out;\n transition: transform .2s ease-out, -webkit-transform .2s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume].fill {\n box-shadow: inset 2px 0 0 #fff;\n opacity: 1; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:nth-of-type(1) {\n padding-left: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:hover {\n -webkit-transform: scaleY(1.5);\n transform: scaleY(1.5); }\n .media-control[data-media-control].w320 .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume].volume-bar-hide {\n width: 0;\n height: 12px;\n top: 9px;\n padding: 0; }\n',""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/poster/public/poster.scss": -/*!**********************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/poster/public/poster.scss ***! - \**********************************************************************************************************************************************************************************************************************/ -/*! no static exports found */function(e,t,r){(e.exports=r(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".player-poster[data-poster] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n position: absolute;\n height: 100%;\n width: 100%;\n z-index: 998;\n top: 0;\n left: 0;\n background-color: #000;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: 50% 50%; }\n .player-poster[data-poster].clickable {\n cursor: pointer; }\n .player-poster[data-poster]:hover .play-wrapper[data-poster] {\n opacity: 1; }\n .player-poster[data-poster] .play-wrapper[data-poster] {\n width: 100%;\n height: 25%;\n margin: 0 auto;\n opacity: 0.75;\n transition: opacity 0.1s ease; }\n .player-poster[data-poster] .play-wrapper[data-poster] svg {\n height: 100%; }\n .player-poster[data-poster] .play-wrapper[data-poster] svg path {\n fill: #fff; }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/seek_time/public/seek_time.scss": -/*!****************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/seek_time/public/seek_time.scss ***! - \****************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */function(e,t,r){(e.exports=r(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,'.seek-time[data-seek-time] {\n position: absolute;\n white-space: nowrap;\n height: 20px;\n line-height: 20px;\n font-size: 0;\n left: -100%;\n bottom: 55px;\n background-color: rgba(2, 2, 2, 0.5);\n z-index: 9999;\n transition: opacity 0.1s ease; }\n .seek-time[data-seek-time].hidden[data-seek-time] {\n opacity: 0; }\n .seek-time[data-seek-time] [data-seek-time] {\n display: inline-block;\n color: white;\n font-size: 10px;\n padding-left: 7px;\n padding-right: 7px;\n vertical-align: top; }\n .seek-time[data-seek-time] [data-duration] {\n display: inline-block;\n color: rgba(255, 255, 255, 0.5);\n font-size: 10px;\n padding-right: 7px;\n vertical-align: top; }\n .seek-time[data-seek-time] [data-duration]:before {\n content: "|";\n margin-right: 7px; }\n',""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/spinner_three_bounce/public/spinner.scss": -/*!*************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/spinner_three_bounce/public/spinner.scss ***! - \*************************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */function(e,t,r){(e.exports=r(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".spinner-three-bounce[data-spinner] {\n position: absolute;\n margin: 0 auto;\n width: 70px;\n text-align: center;\n z-index: 999;\n left: 0;\n right: 0;\n margin-left: auto;\n margin-right: auto;\n /* center vertically */\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%); }\n .spinner-three-bounce[data-spinner] > div {\n width: 18px;\n height: 18px;\n background-color: #FFFFFF;\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: bouncedelay 1.4s infinite ease-in-out;\n animation: bouncedelay 1.4s infinite ease-in-out;\n /* Prevent first frame from flickering when animation starts */\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both; }\n .spinner-three-bounce[data-spinner] [data-bounce1] {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s; }\n .spinner-three-bounce[data-spinner] [data-bounce2] {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s; }\n\n@-webkit-keyframes bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0); }\n 40% {\n -webkit-transform: scale(1);\n transform: scale(1); } }\n\n@keyframes bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0); }\n 40% {\n -webkit-transform: scale(1);\n transform: scale(1); } }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/watermark/public/watermark.scss": -/*!****************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/watermark/public/watermark.scss ***! - \****************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */function(e,t,r){(e.exports=r(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".clappr-watermark[data-watermark] {\n position: absolute;\n min-width: 70px;\n max-width: 200px;\n width: 12%;\n text-align: center;\n z-index: 10; }\n\n.clappr-watermark[data-watermark] a {\n outline: none;\n cursor: pointer; }\n\n.clappr-watermark[data-watermark] img {\n max-width: 100%; }\n\n.clappr-watermark[data-watermark-bottom-left] {\n bottom: 10px;\n left: 10px; }\n\n.clappr-watermark[data-watermark-bottom-right] {\n bottom: 10px;\n right: 42px; }\n\n.clappr-watermark[data-watermark-top-left] {\n top: 10px;\n left: 10px; }\n\n.clappr-watermark[data-watermark-top-right] {\n top: 10px;\n right: 37px; }\n",""])},"./node_modules/css-loader/lib/css-base.js": -/*!*************************************************!*\ - !*** ./node_modules/css-loader/lib/css-base.js ***! - \*************************************************/ -/*! no static exports found */function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r,n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var o=(r=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),a=i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}));return[n].concat(a).concat([o]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r})).join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(n[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&n[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),t.push(a))}},t}},"./node_modules/css-loader/lib/url/escape.js": -/*!***************************************************!*\ - !*** ./node_modules/css-loader/lib/url/escape.js ***! - \***************************************************/ -/*! no static exports found */function(e,t){e.exports=function(e){return"string"!=typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)?'"'+e.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':e)}},"./node_modules/hls.js/dist/hls.js": -/*!*****************************************!*\ - !*** ./node_modules/hls.js/dist/hls.js ***! - \*****************************************/ -/*! no static exports found */function(e,t,r){var n;"undefined"!=typeof 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/hls.js")}({"./node_modules/eventemitter3/index.js": -/*!*********************************************!*\ - !*** ./node_modules/eventemitter3/index.js ***! - \*********************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,i="~";function o(){}function a(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function s(e,t,r,n,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new a(r,n||e,o),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new o:delete e._events[t]}function u(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),u.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)n.call(e,t)&&r.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},u.prototype.listeners=function(e){var t=i?i+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,a=new Array(o);n<o;n++)a[n]=r[n].fn;return a},u.prototype.listenerCount=function(e){var t=i?i+e:e,r=this._events[t];return r?r.fn?1:r.length:0},u.prototype.emit=function(e,t,r,n,o,a){var s=i?i+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,n),!0;case 5:return c.fn.call(c.context,t,r,n,o),!0;case 6:return c.fn.call(c.context,t,r,n,o,a),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var f,h=c.length;for(u=0;u<h;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,n);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];c[u].fn.apply(c[u].context,l)}}return!0},u.prototype.on=function(e,t,r){return s(this,e,t,r,!1)},u.prototype.once=function(e,t,r){return s(this,e,t,r,!0)},u.prototype.removeListener=function(e,t,r,n){var o=i?i+e:e;if(!this._events[o])return this;if(!t)return l(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||n&&!a.once||r&&a.context!==r||l(this,o);else{for(var s=0,u=[],c=a.length;s<c;s++)(a[s].fn!==t||n&&!a[s].once||r&&a[s].context!==r)&&u.push(a[s]);u.length?this._events[o]=1===u.length?u[0]:u:l(this,o)}return this},u.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&l(this,t)):(this._events=new o,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=i,u.EventEmitter=u,e.exports=u},"./node_modules/node-libs-browser/node_modules/events/events.js": -/*!**********************************************************************!*\ - !*** ./node_modules/node-libs-browser/node_modules/events/events.js ***! - \**********************************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,a,s,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(o(r=this._events[e]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(i(r))for(s=Array.prototype.slice.call(arguments,1),a=(u=r.slice()).length,l=0;l<a;l++)u[l].apply(this,s);return!0},r.prototype.addListener=function(e,t){var a;if(!n(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned&&(a=o(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&a>0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!n(t))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(e,i),r||(r=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},r.prototype.removeListener=function(e,t){var r,o,a,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(r=this._events[e]).length,o=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(s=a;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){o=s;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},"./node_modules/url-toolkit/src/url-toolkit.js": -/*!*****************************************************!*\ - !*** ./node_modules/url-toolkit/src/url-toolkit.js ***! - \*****************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){var n,i,o,a,s;n=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,i=/^([^\/?#]*)(.*)$/,o=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,s={buildAbsoluteURL:function(e,t,r){if(r=r||{},e=e.trim(),!(t=t.trim())){if(!r.alwaysNormalize)return e;var n=s.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");return n.path=s.normalizePath(n.path),s.buildURLFromParts(n)}var o=s.parseURL(t);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return r.alwaysNormalize?(o.path=s.normalizePath(o.path),s.buildURLFromParts(o)):t;var a=s.parseURL(e);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var l=i.exec(a.path);a.netLoc=l[1],a.path=l[2]}a.netLoc&&!a.path&&(a.path="/");var u={scheme:a.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(u.netLoc=a.netLoc,"/"!==o.path[0]))if(o.path){var c=a.path,d=c.substring(0,c.lastIndexOf("/")+1)+o.path;u.path=s.normalizePath(d)}else u.path=a.path,o.params||(u.params=a.params,o.query||(u.query=a.query));return null===u.path&&(u.path=r.alwaysNormalize?s.normalizePath(o.path):o.path),s.buildURLFromParts(u)},parseURL:function(e){var t=n.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(o,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},"./node_modules/webworkify-webpack/index.js": -/*!**************************************************!*\ - !*** ./node_modules/webworkify-webpack/index.js ***! - \**************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){function n(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}r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},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.oe=function(e){throw console.error(e),e};var n=r(r.s=ENTRY_MODULE);return n.default||n}function i(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function o(e,t,n){var o={};o[n]=[];var a=t.toString(),s=a.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return o;for(var l,u=s[1],c=new RegExp("(\\\\n|\\W)"+i(u)+"\\((/\\*.*?\\*/)?s?.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");l=c.exec(a);)"dll-reference"!==l[3]&&o[n].push(l[3]);for(c=new RegExp("\\("+i(u)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\((/\\*.*?\\*/)?s?.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");l=c.exec(a);)e[l[2]]||(o[n].push(l[1]),e[l[2]]=r(l[1]).m),o[l[2]]=o[l[2]]||[],o[l[2]].push(l[4]);for(var d,f=Object.keys(o),h=0;h<f.length;h++)for(var p=0;p<o[f[h]].length;p++)d=o[f[h]][p],isNaN(1*d)||(o[f[h]][p]=1*o[f[h]][p]);return o}function a(e){return Object.keys(e).reduce((function(t,r){return t||e[r].length>0}),!1)}e.exports=function(e,t){t=t||{};var i={main:r.m},s=t.all?{main:Object.keys(i.main)}:function(e,t){for(var r={main:[t]},n={main:[]},i={main:{}};a(r);)for(var s=Object.keys(r),l=0;l<s.length;l++){var u=s[l],c=r[u].pop();if(i[u]=i[u]||{},!i[u][c]&&e[u][c]){i[u][c]=!0,n[u]=n[u]||[],n[u].push(c);for(var d=o(e,e[u][c],u),f=Object.keys(d),h=0;h<f.length;h++)r[f[h]]=r[f[h]]||[],r[f[h]]=r[f[h]].concat(d[f[h]])}}return n}(i,e),l="";Object.keys(s).filter((function(e){return"main"!==e})).forEach((function(e){for(var t=0;s[e][t];)t++;s[e].push(t),i[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",l=l+"var "+e+" = ("+n.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+s[e].map((function(t){return JSON.stringify(t)+": "+i[e][t].toString()})).join(",")+"});\n"})),l=l+"new (("+n.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+s.main.map((function(e){return JSON.stringify(e)+": "+i.main[e].toString()})).join(",")+"}))(self);";var u=new window.Blob([l],{type:"text/javascript"});if(t.bare)return u;var c=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(u),d=new window.Worker(c);return d.objectURL=c,d}},"./src/config.js": -/*!***********************!*\ - !*** ./src/config.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(/*! ./controller/abr-controller */"./src/controller/abr-controller.js"),i=r(/*! ./controller/buffer-controller */"./src/controller/buffer-controller.js"),o=r(/*! ./controller/cap-level-controller */"./src/controller/cap-level-controller.js"),a=r(/*! ./controller/fps-controller */"./src/controller/fps-controller.js"),s=r(/*! ./utils/xhr-loader */"./src/utils/xhr-loader.js"),l=r(/*! ./controller/audio-track-controller */"./src/controller/audio-track-controller.js"),u=r(/*! ./controller/audio-stream-controller */"./src/controller/audio-stream-controller.js"),c=r(/*! ./utils/cues */"./src/utils/cues.js"),d=r(/*! ./controller/timeline-controller */"./src/controller/timeline-controller.js"),f=r(/*! ./controller/subtitle-track-controller */"./src/controller/subtitle-track-controller.js"),h=r(/*! ./controller/subtitle-stream-controller */"./src/controller/subtitle-stream-controller.js"),p=r(/*! ./controller/eme-controller */"./src/controller/eme-controller.js"),m=r(/*! ./utils/mediakeys-helper */"./src/utils/mediakeys-helper.js");t.hlsDefaultConfig={autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,liveDurationInfinity:!1,liveBackBufferLength:1/0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:s.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,abrController:n.default,bufferController:i.default,capLevelController:o.default,fpsController:a.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,requestMediaKeySystemAccessFunc:m.requestMediaKeySystemAccess},t.hlsDefaultConfig.subtitleStreamController=h.SubtitleStreamController,t.hlsDefaultConfig.subtitleTrackController=f.default,t.hlsDefaultConfig.timelineController=d.default,t.hlsDefaultConfig.cueHandler=c,t.hlsDefaultConfig.enableCEA708Captions=!0,t.hlsDefaultConfig.enableWebVTT=!0,t.hlsDefaultConfig.captionsTextTrack1Label="English",t.hlsDefaultConfig.captionsTextTrack1LanguageCode="en",t.hlsDefaultConfig.captionsTextTrack2Label="Spanish",t.hlsDefaultConfig.captionsTextTrack2LanguageCode="es",t.hlsDefaultConfig.audioStreamController=u.default,t.hlsDefaultConfig.audioTrackController=l.default,t.hlsDefaultConfig.emeController=p.default},"./src/controller/abr-controller.js": -/*!******************************************!*\ - !*** ./src/controller/abr-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(/*! ../events */"./src/events.js"),a=r(/*! ../event-handler */"./src/event-handler.js"),s=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.js"),l=r(/*! ../errors */"./src/errors.js"),u=r(/*! ../utils/logger */"./src/utils/logger.js"),c=r(/*! ../utils/ewma-bandwidth-estimator */"./src/utils/ewma-bandwidth-estimator.js"),d=window.performance,f=function(t){function r(e){var r=t.call(this,e,o.default.FRAG_LOADING,o.default.FRAG_LOADED,o.default.FRAG_BUFFERED,o.default.ERROR)||this;return r.lastLoadedFragLevel=0,r._nextAutoLevel=-1,r.hls=e,r.timer=null,r._bwEstimator=null,r.onCheck=r._abandonRulesCheck.bind(r),r}return i(r,t),r.prototype.destroy=function(){this.clearTimer(),a.default.prototype.destroy.call(this)},r.prototype.onFragLoading=function(e){var t=e.frag;if("main"===t.type&&(this.timer||(this.fragCurrent=t,this.timer=setInterval(this.onCheck,100)),!this._bwEstimator)){var r=this.hls,n=r.config,i=t.level,o=void 0,a=void 0;r.levels[i].details.live?(o=n.abrEwmaFastLive,a=n.abrEwmaSlowLive):(o=n.abrEwmaFastVoD,a=n.abrEwmaSlowVoD),this._bwEstimator=new c.default(r,a,o,n.abrEwmaDefaultEstimate)}},r.prototype._abandonRulesCheck=function(){var e=this.hls,t=e.media,r=this.fragCurrent;if(r){var n=r.loader,i=e.minAutoLevel;if(!n||n.stats&&n.stats.aborted)return u.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);var a=n.stats;if(t&&a&&(!t.paused&&0!==t.playbackRate||!t.readyState)&&r.autoLevel&&r.level){var l=d.now()-a.trequest,c=Math.abs(t.playbackRate);if(l>500*r.duration/c){var f=e.levels,h=Math.max(1,a.bw?a.bw/8:1e3*a.loaded/l),p=f[r.level],m=p.realBitrate?Math.max(p.realBitrate,p.bitrate):p.bitrate,g=a.total?a.total:Math.max(a.loaded,Math.round(r.duration*m/8)),y=t.currentTime,v=(g-a.loaded)/h,b=(s.BufferHelper.bufferInfo(t,y,e.config.maxBufferHole).end-y)/c;if(b<2*r.duration/c&&v>b){var _=void 0,A=void 0;for(A=r.level-1;A>i;A--){var E=f[A].realBitrate?Math.max(f[A].realBitrate,f[A].bitrate):f[A].bitrate;if((_=r.duration*E/(6.4*h))<b)break}_<v&&(u.logger.warn("loading too slow, abort fragment loading and switch to level "+A+":fragLoadedDelay["+A+"]<fragLoadedDelay["+(r.level-1)+"];bufferStarvationDelay:"+_.toFixed(1)+"<"+v.toFixed(1)+":"+b.toFixed(1)),e.nextLoadLevel=A,this._bwEstimator.sample(l,a.loaded),n.abort(),this.clearTimer(),e.trigger(o.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,stats:a}))}}}}},r.prototype.onFragLoaded=function(t){var r=t.frag;if("main"===r.type&&e.isFinite(r.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=r.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var n=this.hls.levels[r.level],i=(n.loaded?n.loaded.bytes:0)+t.stats.loaded,o=(n.loaded?n.loaded.duration:0)+t.frag.duration;n.loaded={bytes:i,duration:o},n.realBitrate=Math.round(8*i/o)}if(t.frag.bitrateTest){var a=t.stats;a.tparsed=a.tbuffered=a.tload,this.onFragBuffered(t)}}},r.prototype.onFragBuffered=function(t){var r=t.stats,n=t.frag;if(!0!==r.aborted&&"main"===n.type&&e.isFinite(n.sn)&&(!n.bitrateTest||r.tload===r.tbuffered)){var i=r.tparsed-r.trequest;u.logger.log("latency/loading/parsing/append/kbps:"+Math.round(r.tfirst-r.trequest)+"/"+Math.round(r.tload-r.tfirst)+"/"+Math.round(r.tparsed-r.tload)+"/"+Math.round(r.tbuffered-r.tparsed)+"/"+Math.round(8*r.loaded/(r.tbuffered-r.trequest))),this._bwEstimator.sample(i,r.loaded),r.bwEstimate=this._bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=i/1e3:this.bitrateTestDelay=0}},r.prototype.onError=function(e){switch(e.details){case l.ErrorDetails.FRAG_LOAD_ERROR:case l.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},r.prototype.clearTimer=function(){clearInterval(this.timer),this.timer=null},Object.defineProperty(r.prototype,"nextAutoLevel",{get:function(){var e=this._nextAutoLevel,t=this._bwEstimator;if(!(-1===e||t&&t.canEstimate()))return e;var r=this._nextABRAutoLevel;return-1!==e&&(r=Math.min(e,r)),r},set:function(e){this._nextAutoLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_nextABRAutoLevel",{get:function(){var e=this.hls,t=e.maxAutoLevel,r=e.levels,n=e.config,i=e.minAutoLevel,o=e.media,a=this.lastLoadedFragLevel,l=this.fragCurrent?this.fragCurrent.duration:0,c=o?o.currentTime:0,d=o&&0!==o.playbackRate?Math.abs(o.playbackRate):1,f=this._bwEstimator?this._bwEstimator.getEstimate():n.abrEwmaDefaultEstimate,h=(s.BufferHelper.bufferInfo(o,c,n.maxBufferHole).end-c)/d,p=this._findBestLevel(a,l,f,i,t,h,n.abrBandWidthFactor,n.abrBandWidthUpFactor,r);if(p>=0)return p;u.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var m=l?Math.min(l,n.maxStarvationDelay):n.maxStarvationDelay,g=n.abrBandWidthFactor,y=n.abrBandWidthUpFactor;if(0===h){var v=this.bitrateTestDelay;v&&(m=(l?Math.min(l,n.maxLoadingDelay):n.maxLoadingDelay)-v,u.logger.trace("bitrate test took "+Math.round(1e3*v)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*m)+" ms"),g=y=1)}return p=this._findBestLevel(a,l,f,i,t,h+m,g,y,r),Math.max(p,0)},enumerable:!0,configurable:!0}),r.prototype._findBestLevel=function(e,t,r,n,i,o,a,s,l){for(var c=i;c>=n;c--){var d=l[c];if(d){var f=d.details,h=f?f.totalduration/f.fragments.length:t,p=!!f&&f.live,m=void 0;m=c<=e?a*r:s*r;var g=l[c].realBitrate?Math.max(l[c].realBitrate,l[c].bitrate):l[c].bitrate,y=g*h/m;if(u.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+c+"/"+Math.round(m)+"/"+g+"/"+h+"/"+o+"/"+y),m>g&&(!y||p&&!this.bitrateTestDelay||y<o))return c}}return-1},r}(a.default);t.default=f}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/audio-stream-controller.js": -/*!***************************************************!*\ - !*** ./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((b<T||S)&&w<u.length){if(void 0===(n=u[w].details)){this.state=g.State.WAITING_TRACK;break}if(!S&&this._streamEnded(m,n))return this.hls.trigger(l.default.BUFFER_EOS,{type:"audio"}),void(this.state=g.State.ENDED);var k=n.fragments,x=k.length,C=k[0].start,R=k[x-1].start+k[x-1].duration,j=void 0;if(S)if(n.live&&!n.PTSKnown)f.logger.log("switching audiotrack, live stream, unknown PTS,load first fragment"),_=0;else if(_=t,n.PTSKnown&&t<C){if(!(m.end>C||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?(_>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.endSN?(j=k[j.sn+1-n.startSN],f.logger.log("SN just loaded, load next one: "+j.sn)):j=null))}j&&(j.encrypted?(f.logger.log("Loading key for "+j.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+w),this.state=g.State.KEY_LOADING,i.trigger(l.default.KEY_LOADING,{frag:j})):(f.logger.log("Loading "+j.sn+", cc: "+j.cc+" of ["+n.startSN+" ,"+n.endSN+"],track "+w+", currentTime:"+t+",bufferEnd:"+_.toFixed(3)),this.fragCurrent=j,(S||this.fragmentTracker.getState(j)===p.FragmentState.NOT_LOADED)&&(this.startFragRequested=!0,e.isFinite(j.sn)&&(this.nextLoadPosition=j.start+j.duration),i.trigger(l.default.FRAG_LOADING,{frag:j}),this.state=g.State.FRAG_LOADING)))}break;case g.State.WAITING_TRACK:(r=this.tracks[this.trackId])&&r.details&&(this.state=g.State.IDLE);break;case g.State.FRAG_LOADING_WAITING_RETRY:var M=y.now(),N=this.retryDate,U=(c=this.media)&&c.seeking;(!N||M>=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 ***! - \**************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";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(/*! ../events */"./src/events.js"),a=r(/*! ../task-loop */"./src/task-loop.js"),s=r(/*! ../utils/logger */"./src/utils/logger.js"),l=r(/*! ../errors */"./src/errors.js"),u=function(e){function t(t){var r=e.call(this,t,o.default.MANIFEST_LOADING,o.default.MANIFEST_PARSED,o.default.AUDIO_TRACK_LOADED,o.default.AUDIO_TRACK_SWITCHED,o.default.LEVEL_LOADED,o.default.ERROR)||this;return r._trackId=-1,r._selectDefaultTrack=!0,r.tracks=[],r.trackIdBlacklist=Object.create(null),r.audioGroupId=null,r}return i(t,e),t.prototype.onManifestLoading=function(){this.tracks=[],this._trackId=-1,this._selectDefaultTrack=!0},t.prototype.onManifestParsed=function(e){var t=this.tracks=e.audioTracks||[];this.hls.trigger(o.default.AUDIO_TRACKS_UPDATED,{audioTracks:t})},t.prototype.onAudioTrackLoaded=function(e){if(e.id>=this.tracks.length)s.logger.warn("Invalid audio track id:",e.id);else{if(s.logger.log("audioTrack "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.hasInterval()){var t=1e3*e.details.targetduration;this.setInterval(t)}!e.details.live&&this.hasInterval()&&this.clearInterval()}},t.prototype.onAudioTrackSwitched=function(e){var t=this.tracks[e.id].groupId;t&&this.audioGroupId!==t&&(this.audioGroupId=t)},t.prototype.onLevelLoaded=function(e){var t=this.hls.levels[e.level];if(t.audioGroupIds){var r=t.audioGroupIds[t.urlId];this.audioGroupId!==r&&(this.audioGroupId=r,this._selectInitialAudioTrack())}},t.prototype.onError=function(e){e.type===l.ErrorTypes.NETWORK_ERROR&&(e.fatal&&this.clearInterval(),e.details===l.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&(s.logger.warn("Network failure on audio-track id:",e.context.id),this._handleLoadError()))},Object.defineProperty(t.prototype,"audioTracks",{get:function(){return this.tracks},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"audioTrack",{get:function(){return this._trackId},set:function(e){this._setAudioTrack(e),this._selectDefaultTrack=!1},enumerable:!0,configurable:!0}),t.prototype._setAudioTrack=function(e){if(this._trackId===e&&this.tracks[this._trackId].details)s.logger.debug("Same id as current audio-track passed, and track details available -> no-op");else if(e<0||e>=this.tracks.length)s.logger.warn("Invalid id passed to audio-track controller");else{var t=this.tracks[e];s.logger.log("Now switching to audio-track index "+e),this.clearInterval(),this._trackId=e;var r=t.url,n=t.type,i=t.id;this.hls.trigger(o.default.AUDIO_TRACK_SWITCHING,{id:i,type:n,url:r}),this._loadTrackDetailsIfNeeded(t)}},t.prototype.doTick=function(){this._updateTrack(this._trackId)},t.prototype._selectInitialAudioTrack=function(){var e=this,t=this.tracks;if(t.length){var r=this.tracks[this._trackId],n=null;if(r&&(n=r.name),this._selectDefaultTrack){var i=t.filter((function(e){return e.default}));i.length?t=i:s.logger.warn("No default audio tracks defined")}var a=!1,u=function(){t.forEach((function(t){a||e.audioGroupId&&t.groupId!==e.audioGroupId||n&&n!==t.name||(e._setAudioTrack(t.id),a=!0)}))};u(),a||(n=null,u()),a||(s.logger.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(o.default.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},t.prototype._needsTrackLoading=function(e){var t=e.details,r=e.url;return!(t&&!t.live||!r)},t.prototype._loadTrackDetailsIfNeeded=function(e){if(this._needsTrackLoading(e)){var t=e.url,r=e.id;s.logger.log("loading audio-track playlist for id: "+r),this.hls.trigger(o.default.AUDIO_TRACK_LOADING,{url:t,id:r})}},t.prototype._updateTrack=function(e){if(!(e<0||e>=this.tracks.length)){this.clearInterval(),this._trackId=e,s.logger.log("trying to update audio-track "+e);var t=this.tracks[e];this._loadTrackDetailsIfNeeded(t)}},t.prototype._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var e=this._trackId,t=this.tracks[e],r=t.name,n=t.language,i=t.groupId;s.logger.warn("Loading failed on audio track id: "+e+", group-id: "+i+', name/language: "'+r+'" / "'+n+'"');for(var o=e,a=0;a<this.tracks.length;a++)if(!this.trackIdBlacklist[a]&&this.tracks[a].name===r){o=a;break}o!==e?(s.logger.log("Attempting audio-track fallback id:",o,"group-id:",this.tracks[o].groupId),this._setAudioTrack(o)):s.logger.warn('No fallback audio-track found for name/language: "'+r+'" / "'+n+'"')},t}(a.default);t.default=u},"./src/controller/base-stream-controller.js": -/*!**************************************************!*\ - !*** ./src/controller/base-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(/*! ../task-loop */"./src/task-loop.js"),a=r(/*! ./fragment-tracker */"./src/controller/fragment-tracker.js"),s=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.js"),l=r(/*! ../utils/logger */"./src/utils/logger.js");t.State={STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"};var u=function(r){function n(){return null!==r&&r.apply(this,arguments)||this}return i(n,r),n.prototype.doTick=function(){},n.prototype._streamEnded=function(e,t){var r=this.fragCurrent,n=this.fragmentTracker;if(!t.live&&r&&!r.backtracked&&r.sn===t.endSN&&!e.nextStart){var i=n.getState(r);return i===a.FragmentState.PARTIAL||i===a.FragmentState.OK}return!1},n.prototype.onMediaSeeking=function(){var r=this.config,n=this.media,i=this.mediaBuffer,o=this.state,a=n?n.currentTime:null,u=s.BufferHelper.bufferInfo(i||n,a,this.config.maxBufferHole);if(e.isFinite(a)&&l.logger.log("media seeking to "+a.toFixed(3)),o===t.State.FRAG_LOADING){var c=this.fragCurrent;if(0===u.len&&c){var d=r.maxFragLookUpTolerance,f=c.start-d,h=c.start+c.duration+d;a<f||a>h?(c.loader&&(l.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),c.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=t.State.IDLE):l.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else o===t.State.ENDED&&(0===u.len&&(this.fragPrevious=null,this.fragCurrent=null),this.state=t.State.IDLE);n&&(this.lastCurrentTime=a),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=a),this.tick()},n.prototype.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},n}(o.default);t.default=u}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/buffer-controller.js": -/*!*********************************************!*\ - !*** ./src/controller/buffer-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(/*! ../events */"./src/events.js"),a=r(/*! ../event-handler */"./src/event-handler.js"),s=r(/*! ../utils/logger */"./src/utils/logger.js"),l=r(/*! ../errors */"./src/errors.js"),u=r(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.js").getMediaSource(),c=function(t){function r(e){var r=t.call(this,e,o.default.MEDIA_ATTACHING,o.default.MEDIA_DETACHING,o.default.MANIFEST_PARSED,o.default.BUFFER_RESET,o.default.BUFFER_APPENDING,o.default.BUFFER_CODECS,o.default.BUFFER_EOS,o.default.BUFFER_FLUSHING,o.default.LEVEL_PTS_UPDATED,o.default.LEVEL_UPDATED)||this;return r._msDuration=null,r._levelDuration=null,r._levelTargetDuration=10,r._live=null,r._objectUrl=null,r.bufferCodecEventsExpected=0,r.onsbue=r.onSBUpdateEnd.bind(r),r.onsbe=r.onSBUpdateError.bind(r),r.pendingTracks={},r.tracks={},r}return i(r,t),r.prototype.destroy=function(){a.default.prototype.destroy.call(this)},r.prototype.onLevelPtsUpdated=function(e){var t=e.type,r=this.tracks.audio;if("audio"===t&&r&&"audio/mpeg"===r.container){var n=this.sourceBuffer.audio;if(Math.abs(n.timestampOffset-e.start)>.1){var i=n.updating;try{n.abort()}catch(e){s.logger.warn("can not abort audio buffer: "+e)}i?this.audioTimestampOffset=e.start:(s.logger.warn("change mpeg audio timestamp offset from "+n.timestampOffset+" to "+e.start),n.timestampOffset=e.start)}}},r.prototype.onManifestParsed=function(e){this.bufferCodecEventsExpected=e.altAudio?2:1,s.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},r.prototype.onMediaAttaching=function(e){var t=this.media=e.media;if(t){var r=this.mediaSource=new u;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),r.addEventListener("sourceopen",this.onmso),r.addEventListener("sourceended",this.onmse),r.addEventListener("sourceclose",this.onmsc),t.src=window.URL.createObjectURL(r),this._objectUrl=t.src}},r.prototype.onMediaDetaching=function(){s.logger.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(e){s.logger.warn("onMediaDetaching:"+e.message+" while calling endOfStream")}e.removeEventListener("sourceopen",this.onmso),e.removeEventListener("sourceended",this.onmse),e.removeEventListener("sourceclose",this.onmsc),this.media&&(window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):s.logger.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(o.default.MEDIA_DETACHED)},r.prototype.onMediaSourceOpen=function(){s.logger.log("media source opened"),this.hls.trigger(o.default.MEDIA_ATTACHED,{media:this.media});var e=this.mediaSource;e&&e.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()},r.prototype.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.pendingTracks,r=Object.keys(t).length;(r&&!e||2===r)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())},r.prototype.onMediaSourceClose=function(){s.logger.log("media source closed")},r.prototype.onMediaSourceEnded=function(){s.logger.log("media source ended")},r.prototype.onSBUpdateEnd=function(){if(this.audioTimestampOffset){var e=this.sourceBuffer.audio;s.logger.warn("change mpeg audio timestamp offset from "+e.timestampOffset+" to "+this.audioTimestampOffset),e.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1;var t=this.parent,r=this.segments.reduce((function(e,r){return r.parent===t?e+1:e}),0),n={},i=this.sourceBuffer;for(var a in i)n[a]=i[a].buffered;this.hls.trigger(o.default.BUFFER_APPENDED,{parent:t,pending:r,timeRanges:n}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration(),0===r&&this.flushLiveBackBuffer()},r.prototype.onSBUpdateError=function(e){s.logger.error("sourceBuffer error:",e),this.hls.trigger(o.default.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})},r.prototype.onBufferReset=function(){var e=this.sourceBuffer;for(var t in e){var r=e[t];try{this.mediaSource.removeSourceBuffer(r),r.removeEventListener("updateend",this.onsbue),r.removeEventListener("error",this.onsbe)}catch(e){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},r.prototype.onBufferCodecs=function(e){var t=this;if(!Object.keys(this.sourceBuffer).length){Object.keys(e).forEach((function(r){t.pendingTracks[r]=e[r]}));var r=this.mediaSource;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),r&&"open"===r.readyState&&this.checkPendingTracks()}},r.prototype.createSourceBuffers=function(e){var t=this.sourceBuffer,r=this.mediaSource;for(var n in e)if(!t[n]){var i=e[n],a=i.levelCodec||i.codec,u=i.container+";codecs="+a;s.logger.log("creating sourceBuffer("+u+")");try{var c=t[n]=r.addSourceBuffer(u);c.addEventListener("updateend",this.onsbue),c.addEventListener("error",this.onsbe),this.tracks[n]={codec:a,container:i.container},i.buffer=c}catch(e){s.logger.error("error while trying to add sourceBuffer:"+e.message),this.hls.trigger(o.default.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:e,mimeType:u})}}this.hls.trigger(o.default.BUFFER_CREATED,{tracks:e})},r.prototype.onBufferAppending=function(e){this._needsFlush||(this.segments?this.segments.push(e):this.segments=[e],this.doAppending())},r.prototype.onBufferAppendFail=function(e){s.logger.error("sourceBuffer error:",e.event),this.hls.trigger(o.default.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})},r.prototype.onBufferEos=function(e){var t=this.sourceBuffer,r=e.type;for(var n in t)r&&n!==r||t[n].ended||(t[n].ended=!0,s.logger.log(n+" sourceBuffer now EOS"));this.checkEos()},r.prototype.checkEos=function(){var e=this.sourceBuffer,t=this.mediaSource;if(t&&"open"===t.readyState){for(var r in e){var n=e[r];if(!n.ended)return;if(n.updating)return void(this._needsEos=!0)}s.logger.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{t.endOfStream()}catch(e){s.logger.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}else this._needsEos=!1},r.prototype.onBufferFlushing=function(e){this.flushRange.push({start:e.startOffset,end:e.endOffset,type:e.type}),this.flushBufferCounter=0,this.doFlush()},r.prototype.flushLiveBackBuffer=function(){if(this._live){var e=this.hls.config.liveBackBufferLength;if(isFinite(e)&&!(e<0))for(var t=this.media.currentTime,r=this.sourceBuffer,n=Object.keys(r),i=t-Math.max(e,this._levelTargetDuration),o=n.length-1;o>=0;o--){var a=n[o],s=r[a].buffered;s.length>0&&i>s.start(0)&&this.removeBufferRange(a,r[a],0,i)}}},r.prototype.onLevelUpdated=function(e){var t=e.details;t.fragments.length>0&&(this._levelDuration=t.totalduration+t.fragments[0].start,this._levelTargetDuration=t.averagetargetduration||t.targetduration||10,this._live=t.live,this.updateMediaElementDuration())},r.prototype.updateMediaElementDuration=function(){var t,r=this.hls.config;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var n in this.sourceBuffer)if(!0===this.sourceBuffer[n].updating)return;t=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===r.liveDurationInfinity?(s.logger.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>t||!e.isFinite(t))&&(s.logger.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},r.prototype.doFlush=function(){for(;this.flushRange.length;){var e=this.flushRange[0];if(!this.flushBuffer(e.start,e.end,e.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var t=0,r=this.sourceBuffer;try{for(var n in r)t+=r[n].buffered.length}catch(e){s.logger.error("error while accessing sourceBuffer.buffered")}this.appended=t,this.hls.trigger(o.default.BUFFER_FLUSHED)}},r.prototype.doAppending=function(){var e=this.hls,t=this.segments,r=this.sourceBuffer;if(Object.keys(r).length){if(this.media.error)return this.segments=[],void s.logger.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(t&&t.length){var n=t.shift();try{var i=r[n.type];i?i.updating?t.unshift(n):(i.ended=!1,this.parent=n.parent,i.appendBuffer(n.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(r){s.logger.error("error while trying to append buffer:"+r.message),t.unshift(n);var a={type:l.ErrorTypes.MEDIA_ERROR,parent:n.parent};22!==r.code?(this.appendError?this.appendError++:this.appendError=1,a.details=l.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>e.config.appendErrorMaxRetry?(s.logger.log("fail "+e.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],a.fatal=!0,e.trigger(o.default.ERROR,a)):(a.fatal=!1,e.trigger(o.default.ERROR,a))):(this.segments=[],a.details=l.ErrorDetails.BUFFER_FULL_ERROR,a.fatal=!1,e.trigger(o.default.ERROR,a))}}}},r.prototype.flushBuffer=function(e,t,r){var n,i=this.sourceBuffer;if(Object.keys(i).length){if(s.logger.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+e+"/"+t),this.flushBufferCounter<this.appended){for(var o in i)if(!r||o===r){if((n=i[o]).ended=!1,n.updating)return s.logger.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(o,n,e,t))return this.flushBufferCounter++,!1}}else s.logger.warn("abort flushing too many retries");s.logger.log("buffer flushed")}return!0},r.prototype.removeBufferRange=function(e,t,r,n){try{for(var i=0;i<t.buffered.length;i++){var o=t.buffered.start(i),a=t.buffered.end(i),l=Math.max(o,r),u=Math.min(a,n);if(Math.min(u,a)-l>.5)return s.logger.log("sb remove "+e+" ["+l+","+u+"], of ["+o+","+a+"], pos:"+this.media.currentTime),t.remove(l,u),!0}}catch(e){s.logger.warn("removeBufferRange failed",e)}return!1},r}(a.default);t.default=c}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/cap-level-controller.js": -/*!************************************************!*\ - !*** ./src/controller/cap-level-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(/*! ../events */"./src/events.js"),a=function(t){function r(r){var n=t.call(this,r,o.default.FPS_DROP_LEVEL_CAPPING,o.default.MEDIA_ATTACHING,o.default.MANIFEST_PARSED,o.default.BUFFER_CODECS,o.default.MEDIA_DETACHING)||this;return n.autoLevelCapping=e.POSITIVE_INFINITY,n.firstLevel=null,n.levels=[],n.media=null,n.restrictedLevels=[],n.timer=null,n}return i(r,t),r.prototype.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=null,this._stopCapping())},r.prototype.onFpsDropLevelCapping=function(e){r.isLevelAllowed(e.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(e.droppedLevel)},r.prototype.onMediaAttaching=function(e){this.media=e.media instanceof window.HTMLVideoElement?e.media:null},r.prototype.onManifestParsed=function(e){var t=this.hls;this.restrictedLevels=[],this.levels=e.levels,this.firstLevel=e.firstLevel,t.config.capLevelToPlayerSize&&e.video&&this._startCapping()},r.prototype.onBufferCodecs=function(e){this.hls.config.capLevelToPlayerSize&&e.video&&this._startCapping()},r.prototype.onLevelsUpdated=function(e){this.levels=e.levels},r.prototype.onMediaDetaching=function(){this._stopCapping()},r.prototype.detectPlayerSize=function(){if(this.media){var e=this.levels?this.levels.length:0;if(e){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e-1),t.autoLevelCapping>this.autoLevelCapping&&t.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},r.prototype.getMaxLevel=function(e){var t=this;if(!this.levels)return-1;var n=this.levels.filter((function(n,i){return r.isLevelAllowed(i,t.restrictedLevels)&&i<=e}));return r.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)},r.prototype._startCapping=function(){this.timer||(this.autoLevelCapping=e.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},r.prototype._stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=e.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},Object.defineProperty(r.prototype,"mediaWidth",{get:function(){var e,t=this.media;return t&&(e=t.width||t.clientWidth||t.offsetWidth,e*=r.contentScaleFactor),e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"mediaHeight",{get:function(){var e,t=this.media;return t&&(e=t.height||t.clientHeight||t.offsetHeight,e*=r.contentScaleFactor),e},enumerable:!0,configurable:!0}),Object.defineProperty(r,"contentScaleFactor",{get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){}return e},enumerable:!0,configurable:!0}),r.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},r.getMaxLevelByMediaSize=function(e,t,r){if(!e||e&&!e.length)return-1;for(var n,i,o=e.length-1,a=0;a<e.length;a+=1){var s=e[a];if((s.width>=t||s.height>=r)&&(n=s,!(i=e[a+1])||n.width!==i.width||n.height!==i.height)){o=a;break}}return o},r}(r(/*! ../event-handler */"./src/event-handler.js").default);t.default=a}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/eme-controller.js": -/*!******************************************!*\ - !*** ./src/controller/eme-controller.js ***! - \******************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";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(/*! ../event-handler */"./src/event-handler.js"),a=r(/*! ../events */"./src/events.js"),s=r(/*! ../errors */"./src/errors.js"),l=r(/*! ../utils/logger */"./src/utils/logger.js"),u=window.XMLHttpRequest,c="com.widevine.alpha",d="com.microsoft.playready",f=function(e){function t(t){var r=e.call(this,t,a.default.MEDIA_ATTACHED,a.default.MANIFEST_PARSED)||this;return r._widevineLicenseUrl=t.config.widevineLicenseUrl,r._licenseXhrSetup=t.config.licenseXhrSetup,r._emeEnabled=t.config.emeEnabled,r._requestMediaKeySystemAccess=t.config.requestMediaKeySystemAccessFunc,r._mediaKeysList=[],r._media=null,r._hasSetMediaKeys=!1,r._isMediaEncrypted=!1,r._requestLicenseFailureCount=0,r}return i(t,e),t.prototype.getLicenseServerUrl=function(e){var t;switch(e){case c:t=this._widevineLicenseUrl;break;default:t=null}return t||(l.logger.error('No license server URL configured for key-system "'+e+'"'),this.hls.trigger(a.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})),t},t.prototype._attemptKeySystemAccess=function(e,t,r){var n=this,i=function(e,t,r){switch(e){case c:return function(e,t,r){var n={videoCapabilities:[]};return t.forEach((function(e){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+e+'"'})})),[n]}(0,r);default:throw Error("Unknown key-system: "+e)}}(e,0,r);i?(l.logger.log("Requesting encrypted media key-system access"),this.requestMediaKeySystemAccess(e,i).then((function(t){n._onMediaKeySystemAccessObtained(e,t)})).catch((function(t){l.logger.error('Failed to obtain key-system "'+e+'" access:',t)}))):l.logger.warn("Can not create config for key-system (maybe because platform is not supported):",e)},Object.defineProperty(t.prototype,"requestMediaKeySystemAccess",{get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess},enumerable:!0,configurable:!0}),t.prototype._onMediaKeySystemAccessObtained=function(e,t){var r=this;l.logger.log('Access for key-system "'+e+'" obtained');var n={mediaKeys:null,mediaKeysSession:null,mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:e};this._mediaKeysList.push(n),t.createMediaKeys().then((function(t){n.mediaKeys=t,l.logger.log('Media-keys created for key-system "'+e+'"'),r._onMediaKeysCreated()})).catch((function(e){l.logger.error("Failed to create media-keys:",e)}))},t.prototype._onMediaKeysCreated=function(){var e=this;this._mediaKeysList.forEach((function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),e._onNewMediaKeySession(t.mediaKeysSession))}))},t.prototype._onNewMediaKeySession=function(e){var t=this;l.logger.log("New key-system session "+e.sessionId),e.addEventListener("message",(function(r){t._onKeySessionMessage(e,r.message)}),!1)},t.prototype._onKeySessionMessage=function(e,t){l.logger.log("Got EME message event, creating license request"),this._requestLicense(t,(function(t){l.logger.log("Received license data, updating key-session"),e.update(t)}))},t.prototype._onMediaEncrypted=function(e,t){l.logger.log('Media is encrypted using "'+e+'" init data type'),this._isMediaEncrypted=!0,this._mediaEncryptionInitDataType=e,this._mediaEncryptionInitData=t,this._attemptSetMediaKeys(),this._generateRequestWithPreferredKeySession()},t.prototype._attemptSetMediaKeys=function(){if(!this._hasSetMediaKeys){var e=this._mediaKeysList[0];if(!e||!e.mediaKeys)return l.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(a.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});l.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(e.mediaKeys),this._hasSetMediaKeys=!0}},t.prototype._generateRequestWithPreferredKeySession=function(){var e=this,t=this._mediaKeysList[0];if(!t)return l.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(a.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(t.mediaKeysSessionInitialized)l.logger.warn("Key-Session already initialized but requested again");else{var r=t.mediaKeysSession;r||(l.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(a.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0}));var n=this._mediaEncryptionInitDataType,i=this._mediaEncryptionInitData;l.logger.log('Generating key-session request for "'+n+'" init data type'),t.mediaKeysSessionInitialized=!0,r.generateRequest(n,i).then((function(){l.logger.debug("Key-session generation succeeded")})).catch((function(t){l.logger.error("Error generating key-session request:",t),e.hls.trigger(a.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})}))}},t.prototype._createLicenseXhr=function(e,t,r){var n=new u,i=this._licenseXhrSetup;try{if(i)try{i(n,e)}catch(t){n.open("POST",e,!0),i(n,e)}n.readyState||n.open("POST",e,!0)}catch(e){return l.logger.error("Error setting up key-system license XHR",e),void this.hls.trigger(a.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}return n.responseType="arraybuffer",n.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,n,e,t,r),n},t.prototype._onLicenseRequestReadyStageChange=function(e,t,r,n){switch(e.readyState){case 4:if(200===e.status)this._requestLicenseFailureCount=0,l.logger.log("License request succeeded"),n(e.response);else{if(l.logger.error("License Request XHR failed ("+t+"). Status: "+e.status+" ("+e.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount<=3){var i=3-this._requestLicenseFailureCount+1;return l.logger.warn("Retrying license request, "+i+" attempts left"),void this._requestLicense(r,n)}this.hls.trigger(a.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}}},t.prototype._generateLicenseRequestChallenge=function(e,t){var r;return e.mediaKeySystemDomain===d?l.logger.error("PlayReady is not supported (yet)"):e.mediaKeySystemDomain===c?r=t:l.logger.error("Unsupported key-system:",e.mediaKeySystemDomain),r},t.prototype._requestLicense=function(e,t){l.logger.log("Requesting content license for key-system");var r=this._mediaKeysList[0];if(!r)return l.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(a.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});var n=this.getLicenseServerUrl(r.mediaKeySystemDomain),i=this._createLicenseXhr(n,e,t);l.logger.log("Sending license request to URL: "+n),i.send(this._generateLicenseRequestChallenge(r,e))},t.prototype.onMediaAttached=function(e){var t=this;if(this._emeEnabled){var r=e.media;this._media=r,r.addEventListener("encrypted",(function(e){t._onMediaEncrypted(e.initDataType,e.initData)}))}},t.prototype.onManifestParsed=function(e){if(this._emeEnabled){var t=e.levels.map((function(e){return e.audioCodec})),r=e.levels.map((function(e){return e.videoCodec}));this._attemptKeySystemAccess(c,t,r)}},t}(o.default);t.default=f},"./src/controller/fps-controller.js": -/*!******************************************!*\ - !*** ./src/controller/fps-controller.js ***! - \******************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";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(/*! ../events */"./src/events.js"),a=r(/*! ../event-handler */"./src/event-handler.js"),s=r(/*! ../utils/logger */"./src/utils/logger.js"),l=window.performance,u=function(e){function t(t){return e.call(this,t,o.default.MEDIA_ATTACHING)||this}return i(t,e),t.prototype.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},t.prototype.onMediaAttaching=function(e){var t=this.hls.config;t.capLevelOnFPSDrop&&("function"==typeof(this.video=e.media instanceof window.HTMLVideoElement?e.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),t.fpsDroppedMonitoringPeriod))},t.prototype.checkFPS=function(e,t,r){var n=l.now();if(t){if(this.lastTime){var i=n-this.lastTime,a=r-this.lastDroppedFrames,u=t-this.lastDecodedFrames,c=1e3*a/i,d=this.hls;if(d.trigger(o.default.FPS_DROP,{currentDropped:a,currentDecoded:u,totalDroppedFrames:r}),c>0&&a>d.config.fpsDroppedMonitoringThreshold*u){var f=d.currentLevel;s.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+f),f>0&&(-1===d.autoLevelCapping||d.autoLevelCapping>=f)&&(f-=1,d.trigger(o.default.FPS_DROP_LEVEL_CAPPING,{level:f,droppedLevel:d.currentLevel}),d.autoLevelCapping=f,d.streamController.nextLevelSwitch())}}this.lastTime=n,this.lastDroppedFrames=r,this.lastDecodedFrames=t}},t.prototype.checkFPSInterval=function(){var e=this.video;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},t}(a.default);t.default=u},"./src/controller/fragment-finders.js": -/*!********************************************!*\ - !*** ./src/controller/fragment-finders.js ***! - \********************************************/ -/*! no static exports found */ -/*! 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(/*! ../utils/binary-search */"./src/utils/binary-search.js");function i(e,t,r){void 0===e&&(e=0),void 0===t&&(t=0);var n=Math.min(t,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-n<=e?1:r.start-n>e&&r.start?-1:0}function o(e,t,r){var n=1e3*Math.min(t,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.endProgramDateTime-n>e}t.findFragmentByPDT=function(t,r,n){if(!Array.isArray(t)||!t.length||!e.isFinite(r))return null;if(r<t[0].programDateTime)return null;if(r>=t[t.length-1].endProgramDateTime)return null;n=n||0;for(var i=0;i<t.length;++i){var a=t[i];if(o(r,n,a))return a}return null},t.findFragmentByPTS=function(e,t,r,o){void 0===r&&(r=0),void 0===o&&(o=0);var a=e?t[e.sn-t[0].sn+1]:null;return a&&!i(r,o,a)?a:n.default.search(t,i.bind(null,r,o))},t.fragmentWithinToleranceTest=i,t.pdtWithinToleranceTest=o}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/fragment-tracker.js": -/*!********************************************!*\ - !*** ./src/controller/fragment-tracker.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(/*! ../event-handler */"./src/event-handler.js"),a=r(/*! ../events */"./src/events.js");t.FragmentState={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};var s=function(r){function n(e){var t=r.call(this,e,a.default.BUFFER_APPENDED,a.default.FRAG_BUFFERED,a.default.FRAG_LOADED)||this;return t.bufferPadding=.2,t.fragments=Object.create(null),t.timeRanges=Object.create(null),t.config=e.config,t}return i(n,r),n.prototype.destroy=function(){this.fragments=null,this.timeRanges=null,this.config=null,o.default.prototype.destroy.call(this),r.prototype.destroy.call(this)},n.prototype.getBufferedFrag=function(e,t){var r=this.fragments,n=Object.keys(r).filter((function(n){var i=r[n];if(i.body.type!==t)return!1;if(!i.buffered)return!1;var o=i.body;return o.startPTS<=e&&e<=o.endPTS}));if(0===n.length)return null;var i=n.pop();return r[i].body},n.prototype.detectEvictedFragments=function(e,t){var r,n,i=this;Object.keys(this.fragments).forEach((function(o){var a=i.fragments[o];if(!0===a.buffered){var s=a.range[e];if(s){r=s.time;for(var l=0;l<r.length;l++)if(n=r[l],!1===i.isTimeBuffered(n.startPTS,n.endPTS,t)){i.removeFragment(a.body);break}}}}))},n.prototype.detectPartialFragments=function(e){var t=this,r=this.getFragmentKey(e),n=this.fragments[r];n&&(n.buffered=!0,Object.keys(this.timeRanges).forEach((function(r){if(e.hasElementaryStream(r)){var i=t.timeRanges[r];n.range[r]=t.getBufferedTimes(e.startPTS,e.endPTS,i)}})))},n.prototype.getBufferedTimes=function(e,t,r){for(var n,i,o=[],a=!1,s=0;s<r.length;s++){if(n=r.start(s)-this.bufferPadding,i=r.end(s)+this.bufferPadding,e>=n&&t<=i){o.push({startPTS:Math.max(e,r.start(s)),endPTS:Math.min(t,r.end(s))});break}if(e<i&&t>n)o.push({startPTS:Math.max(e,r.start(s)),endPTS:Math.min(t,r.end(s))}),a=!0;else if(t<=n)break}return{time:o,partial:a}},n.prototype.getFragmentKey=function(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn},n.prototype.getPartialFragment=function(e){var t,r,n,i=this,o=null,a=0;return Object.keys(this.fragments).forEach((function(s){var l=i.fragments[s];i.isPartial(l)&&(r=l.body.startPTS-i.bufferPadding,n=l.body.endPTS+i.bufferPadding,e>=r&&e<=n&&(t=Math.min(e-r,n-e),a<=t&&(o=l.body,a=t)))})),o},n.prototype.getState=function(e){var r=this.getFragmentKey(e),n=this.fragments[r],i=t.FragmentState.NOT_LOADED;return void 0!==n&&(i=n.buffered?!0===this.isPartial(n)?t.FragmentState.PARTIAL:t.FragmentState.OK:t.FragmentState.APPENDING),i},n.prototype.isPartial=function(e){return!0===e.buffered&&(void 0!==e.range.video&&!0===e.range.video.partial||void 0!==e.range.audio&&!0===e.range.audio.partial)},n.prototype.isTimeBuffered=function(e,t,r){for(var n,i,o=0;o<r.length;o++){if(n=r.start(o)-this.bufferPadding,i=r.end(o)+this.bufferPadding,e>=n&&t<=i)return!0;if(t<=n)return!1}return!1},n.prototype.onFragLoaded=function(t){var r=t.frag;e.isFinite(r.sn)&&!r.bitrateTest&&(this.fragments[this.getFragmentKey(r)]={body:r,range:Object.create(null),buffered:!1})},n.prototype.onBufferAppended=function(e){var t=this;this.timeRanges=e.timeRanges,Object.keys(this.timeRanges).forEach((function(e){var r=t.timeRanges[e];t.detectEvictedFragments(e,r)}))},n.prototype.onFragBuffered=function(e){this.detectPartialFragments(e.frag)},n.prototype.hasFragment=function(e){var t=this.getFragmentKey(e);return void 0!==this.fragments[t]},n.prototype.removeFragment=function(e){var t=this.getFragmentKey(e);delete this.fragments[t]},n.prototype.removeAllFragments=function(){this.fragments=Object.create(null)},n}(o.default);t.FragmentTracker=s}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/gap-controller.js": -/*!******************************************!*\ - !*** ./src/controller/gap-controller.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(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.js"),i=r(/*! ../errors */"./src/errors.js"),o=r(/*! ../events */"./src/events.js"),a=r(/*! ../utils/logger */"./src/utils/logger.js"),s=function(){function e(e,t,r,n){this.config=e,this.media=t,this.fragmentTracker=r,this.hls=n,this.stallReported=!1}return e.prototype.poll=function(e,t){var r=this.config,i=this.media,o=i.currentTime,s=window.performance.now();if(o!==e)return this.stallReported&&(a.logger.warn("playback not stuck anymore @"+o+", after "+Math.round(s-this.stalled)+"ms"),this.stallReported=!1),this.stalled=null,void(this.nudgeRetry=0);if(!(i.ended||!i.buffered.length||i.readyState>2||i.seeking&&n.BufferHelper.isBuffered(i,o))){var l=s-this.stalled,u=n.BufferHelper.bufferInfo(i,o,r.maxBufferHole);this.stalled?(l>=1e3&&this._reportStall(u.len),this._tryFixBufferStall(u,l)):this.stalled=s}},e.prototype._tryFixBufferStall=function(e,t){var r=this.config,n=this.fragmentTracker,i=this.media.currentTime,o=n.getPartialFragment(i);o&&this._trySkipBufferHole(o),e.len>.5&&t>1e3*r.highBufferWatchdogPeriod&&(this.stalled=null,this._tryNudgeBuffer())},e.prototype._reportStall=function(e){var t=this.hls,r=this.media;this.stallReported||(this.stallReported=!0,a.logger.warn("Playback stalling at @"+r.currentTime+" due to low buffer"),t.trigger(o.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},e.prototype._trySkipBufferHole=function(e){for(var t=this.hls,r=this.media,n=r.currentTime,s=0,l=0;l<r.buffered.length;l++){var u=r.buffered.start(l);if(n>=s&&n<u)return r.currentTime=Math.max(u,r.currentTime+.1),a.logger.warn("skipping hole, adjusting currentTime from "+n+" to "+r.currentTime),this.stalled=null,void t.trigger(o.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+n+" to "+r.currentTime,frag:e});s=r.buffered.end(l)}},e.prototype._tryNudgeBuffer=function(){var e=this.config,t=this.hls,r=this.media,n=r.currentTime,s=(this.nudgeRetry||0)+1;if(this.nudgeRetry=s,s<e.nudgeMaxRetry){var l=n+s*e.nudgeOffset;a.logger.log("adjust currentTime from "+n+" to "+l),r.currentTime=l,t.trigger(o.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else a.logger.error("still stuck in high buffer @"+n+" after "+e.nudgeMaxRetry+", raise fatal error"),t.trigger(o.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},e}();t.default=s},"./src/controller/id3-track-controller.js": -/*!************************************************!*\ - !*** ./src/controller/id3-track-controller.js ***! - \************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";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(/*! ../events */"./src/events.js"),a=r(/*! ../event-handler */"./src/event-handler.js"),s=r(/*! ../demux/id3 */"./src/demux/id3.js"),l=r(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.js"),u=function(e){function t(t){var r=e.call(this,t,o.default.MEDIA_ATTACHED,o.default.MEDIA_DETACHING,o.default.FRAG_PARSING_METADATA)||this;return r.id3Track=void 0,r.media=void 0,r}return i(t,e),t.prototype.destroy=function(){a.default.prototype.destroy.call(this)},t.prototype.onMediaAttached=function(e){this.media=e.media,this.media},t.prototype.onMediaDetaching=function(){l.clearCurrentCues(this.id3Track),this.id3Track=void 0,this.media=void 0},t.prototype.getID3Track=function(e){for(var t=0;t<e.length;t++){var r=e[t];if("metadata"===r.kind&&"id3"===r.label)return l.sendAddTrackEvent(r,this.media),r}return this.media.addTextTrack("metadata","id3")},t.prototype.onFragParsingMetadata=function(e){var t=e.frag,r=e.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var n=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,i=0;i<r.length;i++){var o=s.default.getID3Frames(r[i].data);if(o){var a=r[i].pts,l=i<r.length-1?r[i+1].pts:t.endPTS;a===l&&(l+=1e-4);for(var u=0;u<o.length;u++){var c=o[u];if(!s.default.isTimeStampFrame(c)){var d=new n(a,l,"");d.value=c,this.id3Track.addCue(d)}}}}},t}(a.default);t.default=u},"./src/controller/level-controller.js": -/*!********************************************!*\ - !*** ./src/controller/level-controller.js ***! - \********************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";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,a=r(/*! ../events */"./src/events.js"),s=r(/*! ../event-handler */"./src/event-handler.js"),l=r(/*! ../utils/logger */"./src/utils/logger.js"),u=r(/*! ../errors */"./src/errors.js"),c=r(/*! ../utils/codecs */"./src/utils/codecs.js"),d=r(/*! ./level-helper */"./src/controller/level-helper.js"),f=window.performance,h=function(e){function t(t){var r=e.call(this,t,a.default.MANIFEST_LOADED,a.default.LEVEL_LOADED,a.default.AUDIO_TRACK_SWITCHED,a.default.FRAG_LOADED,a.default.ERROR)||this;return r.canload=!1,r.currentLevelIndex=null,r.manualLevelIndex=-1,r.timer=null,o=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),r}return i(t,e),t.prototype.onHandlerDestroying=function(){this.clearTimer(),this.manualLevelIndex=-1},t.prototype.clearTimer=function(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)},t.prototype.startLoad=function(){var e=this._levels;this.canload=!0,this.levelRetryCount=0,e&&e.forEach((function(e){e.loadError=0;var t=e.details;t&&t.live&&(e.details=void 0)})),null!==this.timer&&this.loadLevel()},t.prototype.stopLoad=function(){this.canload=!1},t.prototype.onManifestLoaded=function(e){var t,r=[],n=[],i={},s=null,f=!1,h=!1;if(e.levels.forEach((function(e){var t=e.attrs;e.loadError=0,e.fragmentError=!1,f=f||!!e.videoCodec,h=h||!!e.audioCodec,o&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec=void 0),(s=i[e.bitrate])?s.url.push(e.url):(e.url=[e.url],e.urlId=0,i[e.bitrate]=e,r.push(e)),t&&(t.AUDIO&&(h=!0,d.addGroupId(s||e,"audio",t.AUDIO)),t.SUBTITLES&&d.addGroupId(s||e,"text",t.SUBTITLES))})),f&&h&&(r=r.filter((function(e){return!!e.videoCodec}))),r=r.filter((function(e){var t=e.audioCodec,r=e.videoCodec;return(!t||c.isCodecSupportedInMp4(t,"audio"))&&(!r||c.isCodecSupportedInMp4(r,"video"))})),e.audioTracks&&(n=e.audioTracks.filter((function(e){return!e.audioCodec||c.isCodecSupportedInMp4(e.audioCodec,"audio")}))).forEach((function(e,t){e.id=t})),r.length>0){t=r[0].bitrate,r.sort((function(e,t){return e.bitrate-t.bitrate})),this._levels=r;for(var p=0;p<r.length;p++)if(r[p].bitrate===t){this._firstLevel=p,l.logger.log("manifest loaded,"+r.length+" level(s) found, first bitrate:"+t);break}this.hls.trigger(a.default.MANIFEST_PARSED,{levels:r,audioTracks:n,firstLevel:this._firstLevel,stats:e.stats,audio:h,video:f,altAudio:n.some((function(e){return!!e.url}))})}else this.hls.trigger(a.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},Object.defineProperty(t.prototype,"levels",{get:function(){return this._levels},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"level",{get:function(){return this.currentLevelIndex},set:function(e){var t=this._levels;t&&(e=Math.min(e,t.length-1),this.currentLevelIndex===e&&t[e].details||this.setLevelInternal(e))},enumerable:!0,configurable:!0}),t.prototype.setLevelInternal=function(e){var t=this._levels,r=this.hls;if(e>=0&&e<t.length){if(this.clearTimer(),this.currentLevelIndex!==e){l.logger.log("switching to level "+e),this.currentLevelIndex=e;var n=t[e];n.level=e,r.trigger(a.default.LEVEL_SWITCHING,n)}var i=t[e],o=i.details;if(!o||o.live){var s=i.urlId;r.trigger(a.default.LEVEL_LOADING,{url:i.url[s],level:e,id:s})}}else r.trigger(a.default.ERROR,{type:u.ErrorTypes.OTHER_ERROR,details:u.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:!1,reason:"invalid level idx"})},Object.defineProperty(t.prototype,"manualLevel",{get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstLevel",{get:function(){return this._firstLevel},set:function(e){this._firstLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"startLevel",{get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e},enumerable:!0,configurable:!0}),t.prototype.onError=function(e){if(e.fatal)e.type===u.ErrorTypes.NETWORK_ERROR&&this.clearTimer();else{var t,r=!1,n=!1;switch(e.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:t=e.frag.level,n=!0;break;case u.ErrorDetails.LEVEL_LOAD_ERROR:case u.ErrorDetails.LEVEL_LOAD_TIMEOUT:t=e.context.level,r=!0;break;case u.ErrorDetails.REMUX_ALLOC_ERROR:t=e.level,r=!0}void 0!==t&&this.recoverLevel(e,t,r,n)}},t.prototype.recoverLevel=function(e,t,r,n){var i,o,a,s=this,u=this.hls.config,c=e.details,d=this._levels[t];if(d.loadError++,d.fragmentError=n,r){if(!(this.levelRetryCount+1<=u.levelLoadingMaxRetry))return l.logger.error("level controller, cannot recover from "+c+" error"),this.currentLevelIndex=null,this.clearTimer(),void(e.fatal=!0);o=Math.min(Math.pow(2,this.levelRetryCount)*u.levelLoadingRetryDelay,u.levelLoadingMaxRetryTimeout),this.timer=setTimeout((function(){return s.loadLevel()}),o),e.levelRetry=!0,this.levelRetryCount++,l.logger.warn("level controller, "+c+", retry in "+o+" ms, current retry count is "+this.levelRetryCount)}(r||n)&&((i=d.url.length)>1&&d.loadError<i?(d.urlId=(d.urlId+1)%i,d.details=void 0,l.logger.warn("level controller, "+c+" for level "+t+": switching to redundant URL-id "+d.urlId)):-1===this.manualLevelIndex?(a=0===t?this._levels.length-1:t-1,l.logger.warn("level controller, "+c+": switch to "+a),this.hls.nextAutoLevel=this.currentLevelIndex=a):n&&(l.logger.warn("level controller, "+c+": reload a fragment"),this.currentLevelIndex=null))},t.prototype.onFragLoaded=function(e){var t=e.frag;if(void 0!==t&&"main"===t.type){var r=this._levels[t.level];void 0!==r&&(r.fragmentError=!1,r.loadError=0,this.levelRetryCount=0)}},t.prototype.onLevelLoaded=function(e){var t=this,r=e.level;if(r===this.currentLevelIndex){var n=this._levels[r];n.fragmentError||(n.loadError=0,this.levelRetryCount=0);var i=e.details;if(i.live){var o=1e3*(i.averagetargetduration?i.averagetargetduration:i.targetduration),a=o,s=n.details;s&&i.endSN===s.endSN&&(a/=2,l.logger.log("same live playlist, reload twice faster")),a-=f.now()-e.stats.trequest,a=Math.max(o/2,Math.round(a)),l.logger.log("live playlist, reload in "+Math.round(a)+" ms"),this.timer=setTimeout((function(){return t.loadLevel()}),a)}else this.clearTimer()}},t.prototype.onAudioTrackSwitched=function(e){var t=this.hls.audioTracks[e.id].groupId,r=this.hls.levels[this.currentLevelIndex];if(r&&r.audioGroupIds){var n=r.audioGroupIds.findIndex((function(e){return e===t}));n!==r.urlId&&(r.urlId=n,this.startLoad())}},t.prototype.loadLevel=function(){if(l.logger.debug("call to loadLevel"),null!==this.currentLevelIndex&&this.canload){var e=this._levels[this.currentLevelIndex];if("object"==typeof e&&e.url.length>0){var t=this.currentLevelIndex,r=e.urlId,n=e.url[r];l.logger.log("Attempt loading level index "+t+" with URL-id "+r),this.hls.trigger(a.default.LEVEL_LOADING,{url:n,level:t,id:r})}}},Object.defineProperty(t.prototype,"nextLoadLevel",{get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)},enumerable:!0,configurable:!0}),t}(s.default);t.default=h},"./src/controller/level-helper.js": -/*!****************************************!*\ - !*** ./src/controller/level-helper.js ***! - \****************************************/ -/*! no static exports found */ -/*! 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(/*! ../utils/logger */"./src/utils/logger.js");function i(t,r,i){var o=t[r],a=t[i],s=a.startPTS;e.isFinite(s)?i>r?(o.duration=s-o.start,o.duration<0&&n.logger.warn("negative duration computed for frag "+o.sn+",level "+o.level+", there should be some duration drift between playlist and fragment!")):(a.duration=o.start-s,a.duration<0&&n.logger.warn("negative duration computed for frag "+a.sn+",level "+a.level+", there should be some duration drift between playlist and fragment!")):a.start=i>r?o.start+o.duration:Math.max(o.start-a.duration,0)}function o(t,r,n,o,a,s){var l=n;if(e.isFinite(r.startPTS)){var u=Math.abs(r.startPTS-n);e.isFinite(r.deltaPTS)?r.deltaPTS=Math.max(u,r.deltaPTS):r.deltaPTS=u,l=Math.max(n,r.startPTS),n=Math.min(n,r.startPTS),o=Math.max(o,r.endPTS),a=Math.min(a,r.startDTS),s=Math.max(s,r.endDTS)}var c=n-r.start;r.start=r.startPTS=n,r.maxStartPTS=l,r.endPTS=o,r.startDTS=a,r.endDTS=s,r.duration=o-n;var d,f,h,p=r.sn;if(!t||p<t.startSN||p>t.endSN)return 0;for(d=p-t.startSN,(f=t.fragments)[d]=r,h=d;h>0;h--)i(f,h,h-1);for(h=d;h<f.length-1;h++)i(f,h,h+1);return t.PTSKnown=!0,c}t.addGroupId=function(e,t,r){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(r);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(r)}},t.updatePTS=i,t.updateFragPTSDTS=o,t.mergeDetails=function(t,r){var i,a=Math.max(t.startSN,r.startSN)-r.startSN,s=Math.min(t.endSN,r.endSN)-r.startSN,l=r.startSN-t.startSN,u=t.fragments,c=r.fragments,d=0;if(r.initSegment&&t.initSegment&&(r.initSegment=t.initSegment),s<a)r.PTSKnown=!1;else{for(var f=a;f<=s;f++){var h=u[l+f],p=c[f];p&&h&&(d=h.cc-p.cc,e.isFinite(h.startPTS)&&(p.start=p.startPTS=h.startPTS,p.endPTS=h.endPTS,p.duration=h.duration,p.backtracked=h.backtracked,p.dropped=h.dropped,i=p))}if(d)for(n.logger.log("discontinuity sliding from playlist, take drift into account"),f=0;f<c.length;f++)c[f].cc+=d;if(i)o(r,i,i.startPTS,i.endPTS,i.startDTS,i.endDTS);else if(l>=0&&l<u.length){var m=u[l].start;for(f=0;f<c.length;f++)c[f].start+=m}r.PTSKnown=t.PTSKnown}}}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/stream-controller.js": -/*!*********************************************!*\ - !*** ./src/controller/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(/*! ./fragment-tracker */"./src/controller/fragment-tracker.js"),c=r(/*! ../loader/fragment */"./src/loader/fragment.js"),d=r(/*! ../loader/playlist-loader */"./src/loader/playlist-loader.js"),f=r(/*! ./level-helper */"./src/controller/level-helper.js"),h=r(/*! ../utils/time-ranges */"./src/utils/time-ranges.js"),p=r(/*! ../errors */"./src/errors.js"),m=r(/*! ../utils/logger */"./src/utils/logger.js"),g=r(/*! ../utils/discontinuities */"./src/utils/discontinuities.js"),y=r(/*! ./fragment-finders */"./src/controller/fragment-finders.js"),v=r(/*! ./gap-controller */"./src/controller/gap-controller.js"),b=r(/*! ./base-stream-controller */"./src/controller/base-stream-controller.js"),_=function(t){function r(e,r){var n=t.call(this,e,l.default.MEDIA_ATTACHED,l.default.MEDIA_DETACHING,l.default.MANIFEST_LOADING,l.default.MANIFEST_PARSED,l.default.LEVEL_LOADED,l.default.KEY_LOADED,l.default.FRAG_LOADED,l.default.FRAG_LOAD_EMERGENCY_ABORTED,l.default.FRAG_PARSING_INIT_SEGMENT,l.default.FRAG_PARSING_DATA,l.default.FRAG_PARSED,l.default.ERROR,l.default.AUDIO_TRACK_SWITCHING,l.default.AUDIO_TRACK_SWITCHED,l.default.BUFFER_CREATED,l.default.BUFFER_APPENDED,l.default.BUFFER_FLUSHED)||this;return n.fragmentTracker=r,n.config=e.config,n.audioCodecSwap=!1,n._state=b.State.STOPPED,n.stallReported=!1,n.gapController=null,n}return i(r,t),r.prototype.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},r.prototype.onHandlerDestroyed=function(){this.state=b.State.STOPPED,this.fragmentTracker=null,t.prototype.onHandlerDestroyed.call(this)},r.prototype.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,r=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var n=r.startLevel;-1===n&&(n=0,this.bitrateTest=!0),this.level=r.nextLoadLevel=n,this.loadedmetadata=!1}t>0&&-1===e&&(m.logger.log("override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=b.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this.forceStartLoad=!0,this.state=b.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.clearInterval(),this.state=b.State.STOPPED,this.forceStartLoad=!1},r.prototype.doTick=function(){switch(this.state){case b.State.BUFFER_FLUSHING:this.fragLoadError=0;break;case b.State.IDLE:this._doTickIdle();break;case b.State.WAITING_LEVEL:var e=this.levels[this.level];e&&e.details&&(this.state=b.State.IDLE);break;case b.State.FRAG_LOADING_WAITING_RETRY:var t=window.performance.now(),r=this.retryDate;(!r||t>=r||this.media&&this.media.seeking)&&(m.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=b.State.IDLE);break;case b.State.ERROR:case b.State.STOPPED:case b.State.FRAG_LOADING:case b.State.PARSING:case b.State.PARSED:case b.State.ENDED:}this._checkBuffer(),this._checkFragmentChanged()},r.prototype._doTickIdle=function(){var e=this.hls,t=e.config,r=this.media;if(void 0!==this.levelLastLoaded&&(r||!this.startFragRequested&&t.startFragPrefetch)){var n;n=this.loadedmetadata?r.currentTime:this.nextLoadPosition;var i=e.nextLoadLevel,o=this.levels[i];if(o){var s,u=o.bitrate;s=u?Math.max(8*t.maxBufferSize/u,t.maxBufferLength):t.maxBufferLength,s=Math.min(s,t.maxMaxBufferLength);var c=a.BufferHelper.bufferInfo(this.mediaBuffer?this.mediaBuffer:r,n,t.maxBufferHole),d=c.len;if(!(d>=s)){m.logger.trace("buffer length of "+d.toFixed(3)+" is below max of "+s.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=i;var f=o.details;if(!f||f.live&&this.levelLastLoaded!==i)this.state=b.State.WAITING_LEVEL;else{if(this._streamEnded(c,f)){var h={};return this.altAudio&&(h.type="video"),this.hls.trigger(l.default.BUFFER_EOS,h),void(this.state=b.State.ENDED)}this._fetchPayloadOrEos(n,c,f)}}}}},r.prototype._fetchPayloadOrEos=function(e,t,r){var n=this.fragPrevious,i=this.level,o=r.fragments,a=o.length;if(0!==a){var s,l=o[0].start,u=o[a-1].start+o[a-1].duration,c=t.end;if(r.initSegment&&!r.initSegment.data)s=r.initSegment;else if(r.live){var d=this.config.initialLiveManifestSize;if(a<d)return void m.logger.warn("Can not start playback of a level, reason: not enough fragments "+a+" < "+d);if(null===(s=this._ensureFragmentAtLivePoint(r,c,l,u,n,o,a)))return}else c<l&&(s=o[0]);s||(s=this._findFragment(l,n,a,o,c,u,r)),s&&(s.encrypted?(m.logger.log("Loading key for "+s.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+i),this._loadKey(s)):(m.logger.log("Loading "+s.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+i+", currentTime:"+e.toFixed(3)+",bufferEnd:"+c.toFixed(3)),this._loadFragment(s)))}},r.prototype._ensureFragmentAtLivePoint=function(e,t,r,n,i,a,s){var l,u=this.hls.config,c=this.media,d=void 0!==u.liveMaxLatencyDuration?u.liveMaxLatencyDuration:u.liveMaxLatencyDurationCount*e.targetduration;if(t<Math.max(r-u.maxFragLookUpTolerance,n-d)){var f=this.liveSyncPosition=this.computeLivePosition(r,e);m.logger.log("buffer end: "+t.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+f.toFixed(3)),t=f,c&&c.readyState&&c.duration>f&&(c.currentTime=f),this.nextLoadPosition=f}if(e.PTSKnown&&t>n&&c&&c.readyState)return null;if(this.startFragRequested&&!e.PTSKnown){if(i)if(e.hasProgramDateTime)m.logger.log("live playlist, switching playlist, load frag with same PDT: "+i.programDateTime),l=y.findFragmentByPDT(a,i.endProgramDateTime,u.maxFragLookUpTolerance);else{var h=i.sn+1;if(h>=e.startSN&&h<=e.endSN){var p=a[h-e.startSN];i.cc===p.cc&&(l=p,m.logger.log("live playlist, switching playlist, load frag with next SN: "+l.sn))}l||(l=o.default.search(a,(function(e){return i.cc-e.cc})))&&m.logger.log("live playlist, switching playlist, load frag with same CC: "+l.sn)}l||(l=a[Math.min(s-1,Math.round(s/2))],m.logger.log("live playlist, switching playlist, unknown, load middle frag : "+l.sn))}return l},r.prototype._findFragment=function(e,t,r,n,i,o,a){var s,l=this.hls.config;if(i<o){var u=i>o-l.maxFragLookUpTolerance?0:l.maxFragLookUpTolerance;s=y.findFragmentByPTS(t,n,i,u)}else s=n[r-1];if(s){var c=s.sn-a.startSN,d=t&&s.level===t.level,f=n[c-1],h=n[c+1];if(t&&s.sn===t.sn)if(d&&!s.backtracked)if(s.sn<a.endSN){var p=t.deltaPTS;p&&p>l.maxBufferHole&&t.dropped&&c?(s=f,m.logger.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this")):(s=h,m.logger.log("SN just loaded, load next one: "+s.sn,s))}else s=null;else s.backtracked&&(h&&h.backtracked?(m.logger.warn("Already backtracked from fragment "+h.sn+", will not backtrack to fragment "+s.sn+". Loading fragment "+h.sn),s=h):(m.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),s.dropped=0,f?(s=f).backtracked=!0:c&&(s=null)))}return s},r.prototype._loadKey=function(e){this.state=b.State.KEY_LOADING,this.hls.trigger(l.default.KEY_LOADING,{frag:e})},r.prototype._loadFragment=function(t){var r=this.fragmentTracker.getState(t);this.fragCurrent=t,this.startFragRequested=!0,e.isFinite(t.sn)&&!t.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),t.backtracked||r===u.FragmentState.NOT_LOADED||r===u.FragmentState.PARTIAL?(t.autoLevel=this.hls.autoLevelEnabled,t.bitrateTest=this.bitrateTest,this.hls.trigger(l.default.FRAG_LOADING,{frag:t}),this.demuxer||(this.demuxer=new s.default(this.hls,"main")),this.state=b.State.FRAG_LOADING):r===u.FragmentState.APPENDING&&this._reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t)},Object.defineProperty(r.prototype,"state",{get:function(){return this._state},set:function(e){if(this.state!==e){var t=this.state;this._state=e,m.logger.log("main stream:"+t+"->"+e),this.hls.trigger(l.default.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},enumerable:!0,configurable:!0}),r.prototype.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,d.default.LevelType.MAIN)},Object.defineProperty(r.prototype,"currentLevel",{get:function(){var e=this.media;if(e){var t=this.getBufferedFrag(e.currentTime);if(t)return t.level}return-1},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"nextBufferedFrag",{get:function(){var e=this.media;return e?this.followingBufferedFrag(this.getBufferedFrag(e.currentTime)):null},enumerable:!0,configurable:!0}),r.prototype.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.endPTS+.5):null},Object.defineProperty(r.prototype,"nextLevel",{get:function(){var e=this.nextBufferedFrag;return e?e.level:-1},enumerable:!0,configurable:!0}),r.prototype._checkFragmentChanged=function(){var e,t,r=this.media;if(r&&r.readyState&&!1===r.seeking&&((t=r.currentTime)>this.lastCurrentTime&&(this.lastCurrentTime=t),a.BufferHelper.isBuffered(r,t)?e=this.getBufferedFrag(t):a.BufferHelper.isBuffered(r,t+.1)&&(e=this.getBufferedFrag(t+.1)),e)){var n=e;if(n!==this.fragPlaying){this.hls.trigger(l.default.FRAG_CHANGED,{frag:n});var i=n.level;this.fragPlaying&&this.fragPlaying.level===i||this.hls.trigger(l.default.LEVEL_SWITCHED,{level:i}),this.fragPlaying=n}}},r.prototype.immediateLevelSwitch=function(){if(m.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t=this.media,r=void 0;t?(r=t.paused,t.pause()):r=!0,this.previouslyPaused=r}var n=this.fragCurrent;n&&n.loader&&n.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,e.POSITIVE_INFINITY)},r.prototype.immediateLevelSwitchEnd=function(){var e=this.media;e&&e.buffered.length&&(this.immediateSwitch=!1,a.BufferHelper.isBuffered(e,e.currentTime)&&(e.currentTime-=1e-4),this.previouslyPaused||e.play())},r.prototype.nextLevelSwitch=function(){var t=this.media;if(t&&t.readyState){var r,n=void 0,i=void 0;if((r=this.getBufferedFrag(t.currentTime))&&r.startPTS>1&&this.flushMainBuffer(0,r.startPTS-1),t.paused)n=0;else{var o=this.hls.nextLoadLevel,a=this.levels[o],s=this.fragLastKbps;n=s&&this.fragCurrent?this.fragCurrent.duration*a.bitrate/(1e3*s)+1:0}if((i=this.getBufferedFrag(t.currentTime+n))&&(i=this.followingBufferedFrag(i))){var l=this.fragCurrent;l&&l.loader&&l.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(i.maxStartPTS,e.POSITIVE_INFINITY)}}},r.prototype.flushMainBuffer=function(e,t){this.state=b.State.BUFFER_FLUSHING;var r={startOffset:e,endOffset:t};this.altAudio&&(r.type="video"),this.hls.trigger(l.default.BUFFER_FLUSHING,r)},r.prototype.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("seeked",this.onvseeked),t.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.hls.startLoad(r.startPosition),this.gapController=new v.default(r,t,this.fragmentTracker,this.hls)},r.prototype.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(m.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.levels;t&&t.forEach((function(e){e.details&&e.details.fragments.forEach((function(e){e.backtracked=void 0}))})),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("seeked",this.onvseeked),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},r.prototype.onMediaSeeked=function(){var t=this.media,r=t?t.currentTime:void 0;e.isFinite(r)&&m.logger.log("media seeked to "+r.toFixed(3)),this.tick()},r.prototype.onManifestLoading=function(){m.logger.log("trigger BUFFER_RESET"),this.hls.trigger(l.default.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},r.prototype.onManifestParsed=function(e){var t,r=!1,n=!1;e.levels.forEach((function(e){(t=e.audioCodec)&&(-1!==t.indexOf("mp4a.40.2")&&(r=!0),-1!==t.indexOf("mp4a.40.5")&&(n=!0))})),this.audioCodecSwitch=r&&n,this.audioCodecSwitch&&m.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1;var i=this.config;(i.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(i.startPosition)},r.prototype.onLevelLoaded=function(t){var r=t.details,n=t.level,i=this.levels[this.levelLastLoaded],o=this.levels[n],a=r.totalduration,s=0;if(m.logger.log("level "+n+" loaded ["+r.startSN+","+r.endSN+"],duration:"+a),r.live){var u=o.details;u&&r.fragments.length>0?(f.mergeDetails(u,r),s=r.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(s,u),r.PTSKnown&&e.isFinite(s)?m.logger.log("live playlist sliding:"+s.toFixed(3)):(m.logger.log("live playlist - outdated PTS, unknown sliding"),g.alignStream(this.fragPrevious,i,r))):(m.logger.log("live playlist - first load, unknown sliding"),r.PTSKnown=!1,g.alignStream(this.fragPrevious,i,r))}else r.PTSKnown=!1;if(o.details=r,this.levelLastLoaded=n,this.hls.trigger(l.default.LEVEL_UPDATED,{details:r,level:n}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var c=r.startTimeOffset;e.isFinite(c)?(c<0&&(m.logger.log("negative start time offset "+c+", count from end of last fragment"),c=s+a+c),m.logger.log("start time offset found in playlist, adjust startPosition to "+c),this.startPosition=c):r.live?(this.startPosition=this.computeLivePosition(s,r),m.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===b.State.WAITING_LEVEL&&(this.state=b.State.IDLE),this.tick()},r.prototype.onKeyLoaded=function(){this.state===b.State.KEY_LOADING&&(this.state=b.State.IDLE,this.tick())},r.prototype.onFragLoaded=function(e){var t=this.fragCurrent,r=this.hls,n=this.levels,i=this.media,o=e.frag;if(this.state===b.State.FRAG_LOADING&&t&&"main"===o.type&&o.level===t.level&&o.sn===t.sn){var a=e.stats,u=n[t.level],c=u.details;if(this.bitrateTest=!1,this.stats=a,m.logger.log("Loaded "+t.sn+" of ["+c.startSN+" ,"+c.endSN+"],level "+t.level),o.bitrateTest&&r.nextLoadLevel)this.state=b.State.IDLE,this.startFragRequested=!1,a.tparsed=a.tbuffered=window.performance.now(),r.trigger(l.default.FRAG_BUFFERED,{stats:a,frag:t,id:"main"}),this.tick();else if("initSegment"===o.sn)this.state=b.State.IDLE,a.tparsed=a.tbuffered=window.performance.now(),c.initSegment.data=e.payload,r.trigger(l.default.FRAG_BUFFERED,{stats:a,frag:t,id:"main"}),this.tick();else{m.logger.log("Parsing "+t.sn+" of ["+c.startSN+" ,"+c.endSN+"],level "+t.level+", cc "+t.cc),this.state=b.State.PARSING,this.pendingBuffering=!0,this.appended=!1,o.bitrateTest&&(o.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:o}));var d=!(i&&i.seeking)&&(c.PTSKnown||!c.live),f=c.initSegment?c.initSegment.data:[],h=this._getAudioCodec(u);(this.demuxer=this.demuxer||new s.default(this.hls,"main")).push(e.payload,f,h,u.videoCodec,t,c.totalduration,d)}}this.fragLoadError=0},r.prototype.onFragParsingInitSegment=function(e){var t=this.fragCurrent,r=e.frag;if(t&&"main"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===b.State.PARSING){var n=e.tracks,i=void 0,o=void 0;if(n.audio&&this.altAudio&&delete n.audio,o=n.audio){var a=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase();a&&this.audioCodecSwap&&(m.logger.log("swapping playlist audio codec"),a=-1!==a.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==o.metadata.channelCount&&-1===s.indexOf("firefox")&&(a="mp4a.40.5"),-1!==s.indexOf("android")&&"audio/mpeg"!==o.container&&(a="mp4a.40.2",m.logger.log("Android: force audio codec to "+a)),o.levelCodec=a,o.id=e.id}for(i in(o=n.video)&&(o.levelCodec=this.levels[this.level].videoCodec,o.id=e.id),this.hls.trigger(l.default.BUFFER_CODECS,n),n){o=n[i],m.logger.log("main track:"+i+",container:"+o.container+",codecs[level/parsed]=["+o.levelCodec+"/"+o.codec+"]");var u=o.initSegment;u&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,{type:i,data:u,parent:"main",content:"initSegment"}))}this.tick()}},r.prototype.onFragParsingData=function(t){var r=this,n=this.fragCurrent,i=t.frag;if(n&&"main"===t.id&&i.sn===n.sn&&i.level===n.level&&("audio"!==t.type||!this.altAudio)&&this.state===b.State.PARSING){var o=this.levels[this.level],a=n;if(e.isFinite(t.endPTS)||(t.endPTS=t.startPTS+n.duration,t.endDTS=t.startDTS+n.duration),!0===t.hasAudio&&a.addElementaryStream(c.default.ElementaryStreamTypes.AUDIO),!0===t.hasVideo&&a.addElementaryStream(c.default.ElementaryStreamTypes.VIDEO),m.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+",dropped:"+(t.dropped||0)),"video"===t.type)if(a.dropped=t.dropped,a.dropped)if(a.backtracked)m.logger.warn("Already backtracked on this fragment, appending with the gap",a.sn);else{var s=o.details;if(!s||a.sn!==s.startSN)return m.logger.warn("missing video frame(s), backtracking fragment",a.sn),this.fragmentTracker.removeFragment(a),a.backtracked=!0,this.nextLoadPosition=t.startPTS,this.state=b.State.IDLE,this.fragPrevious=a,void this.tick();m.logger.warn("missing video frame(s) on first frag, appending with gap",a.sn)}else a.backtracked=!1;var u=f.updateFragPTSDTS(o.details,a,t.startPTS,t.endPTS,t.startDTS,t.endDTS),d=this.hls;d.trigger(l.default.LEVEL_PTS_UPDATED,{details:o.details,level:this.level,drift:u,type:t.type,start:t.startPTS,end:t.endPTS}),[t.data1,t.data2].forEach((function(e){e&&e.length&&r.state===b.State.PARSING&&(r.appended=!0,r.pendingBuffering=!0,d.trigger(l.default.BUFFER_APPENDING,{type:t.type,data:e,parent:"main",content:"data"}))})),this.tick()}},r.prototype.onFragParsed=function(e){var t=this.fragCurrent,r=e.frag;t&&"main"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===b.State.PARSING&&(this.stats.tparsed=window.performance.now(),this.state=b.State.PARSED,this._checkAppendedParsed())},r.prototype.onAudioTrackSwitching=function(t){var r=!!t.url,n=t.id;if(!r){if(this.mediaBuffer!==this.media){m.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var i=this.fragCurrent;i.loader&&(m.logger.log("switching to main audio track, cancel main fragment load"),i.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=b.State.IDLE}var o=this.hls;o.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:e.POSITIVE_INFINITY,type:"audio"}),o.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:n}),this.altAudio=!1}},r.prototype.onAudioTrackSwitched=function(e){var t=e.id,r=!!this.hls.audioTracks[t].url;if(r){var n=this.videoBuffer;n&&this.mediaBuffer!==n&&(m.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=r,this.tick()},r.prototype.onBufferCreated=function(e){var t,r,n=e.tracks,i=!1;for(var o in n){var a=n[o];"main"===a.id?(r=o,t=a,"video"===o&&(this.videoBuffer=n[o].buffer)):i=!0}i&&t?(m.logger.log("alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=t.buffer):this.mediaBuffer=this.media},r.prototype.onBufferAppended=function(e){if("main"===e.parent){var t=this.state;t!==b.State.PARSING&&t!==b.State.PARSED||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},r.prototype._checkAppendedParsed=function(){if(!(this.state!==b.State.PARSED||this.appended&&this.pendingBuffering)){var e=this.fragCurrent;if(e){var t=this.mediaBuffer?this.mediaBuffer:this.media;m.logger.log("main buffered : "+h.default.toString(t.buffered)),this.fragPrevious=e;var r=this.stats;r.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*r.total/(r.tbuffered-r.tfirst)),this.hls.trigger(l.default.FRAG_BUFFERED,{stats:r,frag:e,id:"main"}),this.state=b.State.IDLE}this.tick()}},r.prototype.onError=function(t){var r=t.frag||this.fragCurrent;if(!r||"main"===r.type){var n=!!this.media&&a.BufferHelper.isBuffered(this.media,this.media.currentTime)&&a.BufferHelper.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:case p.ErrorDetails.KEY_LOAD_ERROR:case p.ErrorDetails.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var i=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);m.logger.warn("mediaController: frag loading failed, retry in "+i+" ms"),this.retryDate=window.performance.now()+i,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=b.State.FRAG_LOADING_WAITING_RETRY}else m.logger.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=b.State.ERROR;break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==b.State.ERROR&&(t.fatal?(this.state=b.State.ERROR,m.logger.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||this.state!==b.State.WAITING_LEVEL||(this.state=b.State.IDLE));break;case p.ErrorDetails.BUFFER_FULL_ERROR:"main"!==t.parent||this.state!==b.State.PARSING&&this.state!==b.State.PARSED||(n?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=b.State.IDLE):(m.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,e.POSITIVE_INFINITY)))}}},r.prototype._reduceMaxBufferLength=function(e){var t=this.config;return t.maxMaxBufferLength>=e&&(t.maxMaxBufferLength/=2,m.logger.warn("main:reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},r.prototype._checkBuffer=function(){var e=this.media;if(e&&0!==e.readyState){var t=(this.mediaBuffer?this.mediaBuffer:e).buffered;!this.loadedmetadata&&t.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,t)}},r.prototype.onFragLoadEmergencyAborted=function(){this.state=b.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},r.prototype.onBufferFlushed=function(){var e=this.mediaBuffer?this.mediaBuffer:this.media;e&&this.fragmentTracker.detectEvictedFragments(c.default.ElementaryStreamTypes.VIDEO,e.buffered),this.state=b.State.IDLE,this.fragPrevious=null},r.prototype.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},r.prototype.computeLivePosition=function(e,t){var r=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*t.targetduration;return e+Math.max(0,t.totalduration-r)},r.prototype._seekToStartPos=function(){var e=this.media,t=e.currentTime,r=e.seeking?t:this.startPosition;t!==r&&(m.logger.log("target start position not buffered, seek to buffered.start(0) "+r+" from current time "+t+" "),e.currentTime=r)},r.prototype._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&(m.logger.log("swapping playlist audio codec"),t&&(t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),t},Object.defineProperty(r.prototype,"liveSyncPosition",{get:function(){return this._liveSyncPosition},set:function(e){this._liveSyncPosition=e},enumerable:!0,configurable:!0}),r}(b.default);t.default=_}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/subtitle-stream-controller.js": -/*!******************************************************!*\ - !*** ./src/controller/subtitle-stream-controller.js ***! - \******************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";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(/*! ../events */"./src/events.js"),a=r(/*! ../utils/logger */"./src/utils/logger.js"),s=r(/*! ../crypt/decrypter */"./src/crypt/decrypter.js"),l=r(/*! ../task-loop */"./src/task-loop.js"),u=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.js"),c=r(/*! ./fragment-finders */"./src/controller/fragment-finders.js"),d=r(/*! ./fragment-tracker */"./src/controller/fragment-tracker.js"),f=window.performance;t.SubtitleStreamControllerState={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING"};var h=t.SubtitleStreamControllerState,p=function(e){function t(t,r){var n=e.call(this,t,o.default.MEDIA_ATTACHED,o.default.MEDIA_DETACHING,o.default.ERROR,o.default.KEY_LOADED,o.default.FRAG_LOADED,o.default.SUBTITLE_TRACKS_UPDATED,o.default.SUBTITLE_TRACK_SWITCH,o.default.SUBTITLE_TRACK_LOADED,o.default.SUBTITLE_FRAG_PROCESSED)||this;return n.fragmentTracker=r,n.config=t.config,n.state=h.STOPPED,n.tracks=[],n.tracksBuffered=[],n.currentTrackId=-1,n.decrypter=new s.default(t,t.config),n}return i(t,e),t.prototype.onHandlerDestroyed=function(){this.fragmentTracker=null,this.state=h.STOPPED,e.prototype.onHandlerDestroyed.call(this)},t.prototype.onSubtitleFragProcessed=function(e){if(this.state=h.IDLE,e.success){var t=this.tracksBuffered[this.currentTrackId],r=e.frag;if(this.fragPrevious=r,t){for(var n,i=0;i<t.length;i++)if(r.start>=t[i].start&&r.start<=t[i].end){n=t[i];break}n?n.end=r.start+r.duration:t.push({start:r.start,end:r.start+r.duration})}}},t.prototype.onMediaAttached=function(e){this.media=e.media,this.state=h.IDLE},t.prototype.onMediaDetaching=function(){this.media=null,this.state=h.STOPPED},t.prototype.onError=function(e){var t=e.frag;t&&"subtitle"===t.type&&(this.state=h.IDLE)},t.prototype.onSubtitleTracksUpdated=function(e){var t=this;a.logger.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=e.subtitleTracks,this.tracks.forEach((function(e){t.tracksBuffered[e.id]=[]}))},t.prototype.onSubtitleTrackSwitch=function(e){if(this.currentTrackId=e.id,this.tracks&&-1!==this.currentTrackId){var t=this.tracks[this.currentTrackId];t&&t.details&&this.setInterval(500)}else this.clearInterval()},t.prototype.onSubtitleTrackLoaded=function(e){var t=e.id,r=e.details;this.tracks?(this.tracks[t]&&(a.logger.log("Updating subtitle track details"),this.tracks[t].details=r),this.setInterval(500)):a.logger.warn("Can not update subtitle details, no tracks found")},t.prototype.onKeyLoaded=function(){this.state===h.KEY_LOADING&&(this.state=h.IDLE)},t.prototype.onFragLoaded=function(e){var t=this.fragCurrent,r=e.frag.decryptdata,n=e.frag,i=this.hls;if(this.state===h.FRAG_LOADING&&t&&"subtitle"===e.frag.type&&t.sn===e.frag.sn&&e.payload.byteLength>0&&r&&r.key&&"AES-128"===r.method){var a=f.now();this.decrypter.decrypt(e.payload,r.key.buffer,r.iv.buffer,(function(e){var t=f.now();i.trigger(o.default.FRAG_DECRYPTED,{frag:n,payload:e,stats:{tstart:a,tdecrypt:t}})}))}},t.prototype.doTick=function(){if(this.media)switch(this.state){case h.IDLE:var e=this.tracks,t=this.currentTrackId;if(!e||!e[t]||!e[t].details)break;var r=e[t].details,n=this.config,i=n.maxBufferHole,s=Math.min(n.maxBufferLength,n.maxMaxBufferLength),l=n.maxFragLookUpTolerance,f=u.BufferHelper.bufferedInfo(this._getBuffered(),this.media.currentTime,i),p=f.end,m=f.len,g=r.fragments,y=g.length,v=g[y-1].start+g[y-1].duration,b=void 0;m<s&&p<v?b=c.findFragmentByPTS(this.fragPrevious,g,p,l):r.hasProgramDateTime&&this.fragPrevious&&(b=c.findFragmentByPDT(g,this.fragPrevious.endProgramDateTime,l)),b&&b.encrypted?(a.logger.log("Loading key for "+b.sn),this.state=h.KEY_LOADING,this.hls.trigger(o.default.KEY_LOADING,{frag:b})):b&&this.fragmentTracker.getState(b)===d.FragmentState.NOT_LOADED&&(b.trackId=t,this.fragCurrent=b,this.state=h.FRAG_LOADING,this.hls.trigger(o.default.FRAG_LOADING,{frag:b}))}else this.state=h.IDLE},t.prototype._getBuffered=function(){return this.tracksBuffered[this.currentTrackId]||[]},t}(l.default);t.SubtitleStreamController=p},"./src/controller/subtitle-track-controller.js": -/*!*****************************************************!*\ - !*** ./src/controller/subtitle-track-controller.js ***! - \*****************************************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";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(/*! ../events */"./src/events.js"),a=r(/*! ../event-handler */"./src/event-handler.js"),s=r(/*! ../utils/logger */"./src/utils/logger.js");function l(e){for(var t=[],r=0;r<e.length;r++)"subtitles"===e[r].kind&&t.push(e[r]);return t}var u=function(e){function t(t){var r=e.call(this,t,o.default.MEDIA_ATTACHED,o.default.MEDIA_DETACHING,o.default.MANIFEST_LOADING,o.default.MANIFEST_LOADED,o.default.SUBTITLE_TRACK_LOADED)||this;return r.tracks=[],r.trackId=-1,r.media=null,r.subtitleDisplay=!0,r}return i(t,e),t.prototype._onTextTracksChanged=function(){if(this.media){for(var e=-1,t=l(this.media.textTracks),r=0;r<t.length;r++)if("hidden"===t[r].mode)e=r;else if("showing"===t[r].mode){e=r;break}this.subtitleTrack=e}},t.prototype.destroy=function(){a.default.prototype.destroy.call(this)},t.prototype.onMediaAttached=function(e){var t=this;this.media=e.media,this.media&&(this.queuedDefaultTrack&&(this.subtitleTrack=this.queuedDefaultTrack,delete this.queuedDefaultTrack),this.trackChangeListener=this._onTextTracksChanged.bind(this),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.subtitlePollingInterval=setInterval((function(){t.trackChangeListener()}),500):this.media.textTracks.addEventListener("change",this.trackChangeListener))},t.prototype.onMediaDetaching=function(){this.media&&(this.useTextTrackPolling?clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),this.media=null)},t.prototype.onManifestLoading=function(){this.tracks=[],this.trackId=-1},t.prototype.onManifestLoaded=function(e){var t=this,r=e.subtitles||[];this.tracks=r,this.trackId=-1,this.hls.trigger(o.default.SUBTITLE_TRACKS_UPDATED,{subtitleTracks:r}),r.forEach((function(e){e.default&&(t.media?t.subtitleTrack=e.id:t.queuedDefaultTrack=e.id)}))},t.prototype.onTick=function(){var e=this.trackId,t=this.tracks[e];if(t){var r=t.details;r&&!r.live||(s.logger.log("(re)loading playlist for subtitle track "+e),this.hls.trigger(o.default.SUBTITLE_TRACK_LOADING,{url:t.url,id:e}))}},t.prototype.onSubtitleTrackLoaded=function(e){var t=this;e.id<this.tracks.length&&(s.logger.log("subtitle track "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.timer&&(this.timer=setInterval((function(){t.onTick()}),1e3*e.details.targetduration,this)),!e.details.live&&this.timer&&this._stopTimer())},Object.defineProperty(t.prototype,"subtitleTracks",{get:function(){return this.tracks},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subtitleTrack",{get:function(){return this.trackId},set:function(e){this.trackId!==e&&(this._toggleTrackModes(e),this.setSubtitleTrackInternal(e))},enumerable:!0,configurable:!0}),t.prototype.setSubtitleTrackInternal=function(e){var t=this.hls,r=this.tracks;if(!("number"!=typeof e||e<-1||e>=r.length)&&(this._stopTimer(),this.trackId=e,s.logger.log("switching to subtitle track "+e),t.trigger(o.default.SUBTITLE_TRACK_SWITCH,{id:e}),-1!==e)){var n=r[e],i=n.details;i&&!i.live||(s.logger.log("(re)loading playlist for subtitle track "+e),t.trigger(o.default.SUBTITLE_TRACK_LOADING,{url:n.url,id:e}))}},t.prototype._stopTimer=function(){this.timer&&(clearInterval(this.timer),this.timer=null)},t.prototype._toggleTrackModes=function(e){var t=this.media,r=this.subtitleDisplay,n=this.trackId;if(t){var i=l(t.textTracks);if(-1===e)[].slice.call(i).forEach((function(e){e.mode="disabled"}));else{var o=i[n];o&&(o.mode="disabled")}var a=i[e];a&&(a.mode=r?"showing":"hidden")}},t}(a.default);t.default=u},"./src/controller/timeline-controller.js": -/*!***********************************************!*\ - !*** ./src/controller/timeline-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(/*! ../events */"./src/events.js"),a=r(/*! ../event-handler */"./src/event-handler.js"),s=r(/*! ../utils/cea-608-parser */"./src/utils/cea-608-parser.js"),l=r(/*! ../utils/output-filter */"./src/utils/output-filter.js"),u=r(/*! ../utils/webvtt-parser */"./src/utils/webvtt-parser.js"),c=r(/*! ../utils/logger */"./src/utils/logger.js"),d=r(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.js"),f=function(t){function r(e){var r=t.call(this,e,o.default.MEDIA_ATTACHING,o.default.MEDIA_DETACHING,o.default.FRAG_PARSING_USERDATA,o.default.FRAG_DECRYPTED,o.default.MANIFEST_LOADING,o.default.MANIFEST_LOADED,o.default.FRAG_LOADED,o.default.LEVEL_SWITCHING,o.default.INIT_PTS_FOUND)||this;if(r.hls=e,r.config=e.config,r.enabled=!0,r.Cues=e.config.cueHandler,r.textTracks=[],r.tracks=[],r.unparsedVttFrags=[],r.initPTS=[],r.cueRanges=[],r.captionsTracks={},r.captionsProperties={textTrack1:{label:r.config.captionsTextTrack1Label,languageCode:r.config.captionsTextTrack1LanguageCode},textTrack2:{label:r.config.captionsTextTrack2Label,languageCode:r.config.captionsTextTrack2LanguageCode}},r.config.enableCEA708Captions){var n=new l.default(r,"textTrack1"),i=new l.default(r,"textTrack2");r.cea608Parser=new s.default(0,n,i)}return r}return i(r,t),r.prototype.addCues=function(e,t,r,n){for(var i,o,a,s,l=this.cueRanges,u=!1,c=l.length;c--;){var d=l[c],f=(i=d[0],o=d[1],a=t,s=r,Math.min(o,s)-Math.max(i,a));if(f>=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],r),u=!0,f/(r-t)>.5))return}u||l.push([t,r]),this.Cues.newCue(this.captionsTracks[e],t,r,n)},r.prototype.onInitPtsFound=function(e){var t=this;if("main"===e.id&&(this.initPTS[e.frag.cc]=e.initPTS),this.unparsedVttFrags.length){var r=this.unparsedVttFrags;this.unparsedVttFrags=[],r.forEach((function(e){t.onFragLoaded(e)}))}},r.prototype.getExistingTrack=function(e){var t=this.media;if(t)for(var r=0;r<t.textTracks.length;r++){var n=t.textTracks[r];if(n[e])return n}return null},r.prototype.createCaptionsTrack=function(e){var t=this.captionsProperties[e],r=t.label,n=t.languageCode,i=this.captionsTracks;if(!i[e]){var o=this.getExistingTrack(e);if(o)i[e]=o,d.clearCurrentCues(i[e]),d.sendAddTrackEvent(i[e],this.media);else{var a=this.createTextTrack("captions",r,n);a&&(a[e]=!0,i[e]=a)}}},r.prototype.createTextTrack=function(e,t,r){var n=this.media;if(n)return n.addTextTrack(e,t,r)},r.prototype.destroy=function(){a.default.prototype.destroy.call(this)},r.prototype.onMediaAttaching=function(e){this.media=e.media,this._cleanTracks()},r.prototype.onMediaDetaching=function(){var e=this.captionsTracks;Object.keys(e).forEach((function(t){d.clearCurrentCues(e[t]),delete e[t]}))},r.prototype.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this._cleanTracks()},r.prototype._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var r=0;r<t.length;r++)d.clearCurrentCues(t[r])}},r.prototype.onManifestLoaded=function(e){var t=this;if(this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.cueRanges=[],this.config.enableWebVTT){this.tracks=e.subtitles||[];var r=this.media?this.media.textTracks:[];this.tracks.forEach((function(e,n){var i;if(n<r.length){var o=[].slice.call(r).find((function(t){return function(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}(t,e)}));o&&(i=o)}i||(i=t.createTextTrack("subtitles",e.name,e.lang)),e.default?i.mode=t.hls.subtitleDisplay?"showing":"hidden":i.mode="disabled",t.textTracks.push(i)}))}},r.prototype.onLevelSwitching=function(){this.enabled="NONE"!==this.hls.currentLevel.closedCaptions},r.prototype.onFragLoaded=function(t){var r=t.frag,n=t.payload;if("main"===r.type){var i=r.sn;if(i!==this.lastSn+1){var a=this.cea608Parser;a&&a.reset()}this.lastSn=i}else if("subtitle"===r.type)if(n.byteLength){if(!e.isFinite(this.initPTS[r.cc]))return this.unparsedVttFrags.push(t),void(this.initPTS.length&&this.hls.trigger(o.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r}));var s=r.decryptdata;null!=s&&null!=s.key&&"AES-128"===s.method||this._parseVTTs(r,n)}else this.hls.trigger(o.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r})},r.prototype._parseVTTs=function(e,t){var r=this.vttCCs;r[e.cc]||(r[e.cc]={start:e.start,prevCC:this.prevCC,new:!0},this.prevCC=e.cc);var n=this.textTracks,i=this.hls;u.default.parse(t,this.initPTS[e.cc],r,e.cc,(function(t){var r=n[e.trackId];"disabled"!==r.mode?(t.forEach((function(e){if(!r.cues.getCueById(e.id))try{r.addCue(e)}catch(n){var t=new window.TextTrackCue(e.startTime,e.endTime,e.text);t.id=e.id,r.addCue(t)}})),i.trigger(o.default.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})):i.trigger(o.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})}),(function(t){c.logger.log("Failed to parse VTT cue: "+t),i.trigger(o.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})}))},r.prototype.onFragDecrypted=function(t){var r=t.payload,n=t.frag;if("subtitle"===n.type){if(!e.isFinite(this.initPTS[n.cc]))return void this.unparsedVttFrags.push(t);this._parseVTTs(n,r)}},r.prototype.onFragParsingUserdata=function(e){if(this.enabled&&this.config.enableCEA708Captions)for(var t=0;t<e.samples.length;t++){var r=this.extractCea608Data(e.samples[t].bytes);this.cea608Parser.addData(e.samples[t].pts,r)}},r.prototype.extractCea608Data=function(e){for(var t,r,n,i=31&e[0],o=2,a=[],s=0;s<i;s++)t=e[o++],r=127&e[o++],n=127&e[o++],0===r&&0===n||0!=(4&t)&&0==(3&t)&&(a.push(r),a.push(n));return a},r}(a.default);t.default=f}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/crypt/aes-crypto.js": -/*!*********************************!*\ - !*** ./src/crypt/aes-crypto.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=function(){function e(e,t){this.subtle=e,this.aesIV=t}return e.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}();t.default=n},"./src/crypt/aes-decryptor.js": -/*!************************************!*\ - !*** ./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<t.length&&r;)r=t[n]===this.key[n],n++;if(!r){this.key=t;var i=this.keySize=t.length;if(4!==i&&6!==i&&8!==i)throw new Error("Invalid aes key size="+i);var o,a,s,l,u=this.ksRows=4*(i+6+1),c=this.keySchedule=new Uint32Array(u),d=this.invKeySchedule=new Uint32Array(u),f=this.sBox,h=this.rcon,p=this.invSubMix,m=p[0],g=p[1],y=p[2],v=p[3];for(o=0;o<u;o++)o<i?s=c[o]=t[o]:(l=s,o%i==0?(l=f[(l=l<<8|l>>>24)>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l],l^=h[o/i|0]<<24):i>6&&o%i==4&&(l=f[l>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l]),c[o]=s=(c[o-i]^l)>>>0);for(a=0;a<u;a++)o=u-a,l=3&a?c[o]:c[o-4],d[a]=a<4||o<=4?l:m[f[l>>>24]]^g[f[l>>>16&255]]^y[f[l>>>8&255]]^v[f[255&l]],d[a]=d[a]>>>0}},e.prototype.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},e.prototype.decrypt=function(e,t,r,i){for(var o,a,s,l,u,c,d,f,h,p,m,g,y,v,b=this.keySize+6,_=this.invKeySchedule,A=this.invSBox,E=this.invSubMix,T=E[0],S=E[1],w=E[2],k=E[3],x=this.uint8ArrayToUint32Array_(r),C=x[0],R=x[1],j=x[2],L=x[3],I=new Int32Array(e),P=new Int32Array(I.length),O=this.networkToHostOrderSwap;t<I.length;){for(h=O(I[t]),p=O(I[t+1]),m=O(I[t+2]),g=O(I[t+3]),u=h^_[0],c=g^_[1],d=m^_[2],f=p^_[3],y=4,v=1;v<b;v++)o=T[u>>>24]^S[c>>16&255]^w[d>>8&255]^k[255&f]^_[y],a=T[c>>>24]^S[d>>16&255]^w[f>>8&255]^k[255&u]^_[y+1],s=T[d>>>24]^S[f>>16&255]^w[u>>8&255]^k[255&c]^_[y+2],l=T[f>>>24]^S[u>>16&255]^w[c>>8&255]^k[255&d]^_[y+3],u=o,c=a,d=s,f=l,y+=4;o=A[u>>>24]<<24^A[c>>16&255]<<16^A[d>>8&255]<<8^A[255&f]^_[y],a=A[c>>>24]<<24^A[d>>16&255]<<16^A[f>>8&255]<<8^A[255&u]^_[y+1],s=A[d>>>24]<<24^A[f>>16&255]<<16^A[u>>8&255]<<8^A[255&c]^_[y+2],l=A[f>>>24]<<24^A[u>>16&255]<<16^A[c>>8&255]<<8^A[255&d]^_[y+3],y+=3,P[t]=O(o^C),P[t+1]=O(l^R),P[t+2]=O(s^j),P[t+3]=O(a^L),C=h,R=p,j=m,L=g,t+=4}return i?n(P.buffer):P.buffer},e.prototype.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},e}();t.default=i},"./src/crypt/decrypter.js": -/*!********************************!*\ - !*** ./src/crypt/decrypter.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(/*! ./aes-crypto */"./src/crypt/aes-crypto.js"),i=r(/*! ./fast-aes-key */"./src/crypt/fast-aes-key.js"),o=r(/*! ./aes-decryptor */"./src/crypt/aes-decryptor.js"),a=r(/*! ../errors */"./src/errors.js"),s=r(/*! ../utils/logger */"./src/utils/logger.js"),l=r(/*! ../events */"./src/events.js"),u=r(/*! ../utils/get-self-scope */"./src/utils/get-self-scope.js").getSelfScope(),c=function(){function e(e,t,r){var n=(void 0===r?{}:r).removePKCS7Padding,i=void 0===n||n;if(this.logEnabled=!0,this.observer=e,this.config=t,this.removePKCS7Padding=i,i)try{var o=u.crypto;o&&(this.subtle=o.subtle||o.webkitSubtle)}catch(e){}this.disableWebCrypto=!this.subtle}return e.prototype.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},e.prototype.decrypt=function(e,t,r,a){var l=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(s.logger.log("JS AES decrypt"),this.logEnabled=!1);var u=this.decryptor;u||(this.decryptor=u=new o.default),u.expandKey(t),a(u.decrypt(e,0,r,this.removePKCS7Padding))}else{this.logEnabled&&(s.logger.log("WebCrypto AES decrypt"),this.logEnabled=!1);var c=this.subtle;this.key!==t&&(this.key=t,this.fastAesKey=new i.default(c,t)),this.fastAesKey.expandKey().then((function(i){new n.default(c,r).decrypt(e,i).catch((function(n){l.onWebCryptoError(n,e,t,r,a)})).then((function(e){a(e)}))})).catch((function(n){l.onWebCryptoError(n,e,t,r,a)}))}},e.prototype.onWebCryptoError=function(e,t,r,n,i){this.config.enableSoftwareAES?(s.logger.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(t,r,n,i)):(s.logger.error("decrypting error : "+e.message),this.observer.trigger(l.default.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!0,reason:e.message}))},e.prototype.destroy=function(){var e=this.decryptor;e&&(e.destroy(),this.decryptor=void 0)},e}();t.default=c},"./src/crypt/fast-aes-key.js": -/*!***********************************!*\ - !*** ./src/crypt/fast-aes-key.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=function(){function e(e,t){this.subtle=e,this.key=t}return e.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}();t.default=n},"./src/demux/aacdemuxer.js": -/*!*********************************!*\ - !*** ./src/demux/aacdemuxer.js ***! - \*********************************/ -/*! no static exports found */ -/*! 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(/*! ./adts */"./src/demux/adts.js"),i=r(/*! ../utils/logger */"./src/utils/logger.js"),o=r(/*! ../demux/id3 */"./src/demux/id3.js"),a=function(){function t(e,t,r){this.observer=e,this.config=r,this.remuxer=t}return t.prototype.resetInitSegment=function(e,t,r,n){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:t,duration:n,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(e){if(!e)return!1;for(var t=(o.default.getID3Data(e,0)||[]).length,r=e.length;t<r;t++)if(n.probe(e,t))return i.logger.log("ADTS sync word found !"),!0;return!1},t.prototype.append=function(t,r,a,s){for(var l=this._audioTrack,u=o.default.getID3Data(t,0)||[],c=o.default.getTimeStamp(u),d=e.isFinite(c)?90*c:9e4*r,f=0,h=d,p=t.length,m=u.length,g=[{pts:h,dts:h,data:u}];m<p-1;)if(n.isHeader(t,m)&&m+5<p){n.initTrackConfig(l,this.observer,t,m,l.manifestCodec);var y=n.appendFrame(l,t,m,d,f);if(!y){i.logger.log("Unable to parse AAC frame");break}m+=y.length,h=y.sample.pts,f++}else o.default.isHeader(t,m)?(u=o.default.getID3Data(t,m),g.push({pts:h,dts:h,data:u}),m+=u.length):m++;this.remuxer.remux(l,{samples:[]},{samples:g,inputTimeScale:9e4},{samples:[]},r,a,s)},t.prototype.destroy=function(){},t}();t.default=a}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/demux/adts.js": -/*!***************************!*\ - !*** ./src/demux/adts.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(/*! ../utils/logger */"./src/utils/logger.js"),i=r(/*! ../errors */"./src/errors.js"),o=r(/*! ../events */"./src/events.js");function a(e,t,r,a){var s,l,u,c,d,f=navigator.userAgent.toLowerCase(),h=a,p=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];if(s=1+((192&t[r+2])>>>6),!((l=(60&t[r+2])>>>2)>p.length-1))return c=(1&t[r+2])<<2,c|=(192&t[r+3])>>>6,n.logger.log("manifest codec:"+a+",ADTS data:type:"+s+",sampleingIndex:"+l+"["+p[l]+"Hz],channelConfig:"+c),/firefox/i.test(f)?l>=6?(s=5,d=new Array(4),u=l-3):(s=2,d=new Array(2),u=l):-1!==f.indexOf("android")?(s=2,d=new Array(2),u=l):(s=5,d=new Array(4),a&&(-1!==a.indexOf("mp4a.40.29")||-1!==a.indexOf("mp4a.40.5"))||!a&&l>=6?u=l-3:((a&&-1!==a.indexOf("mp4a.40.2")&&(l>=6&&1===c||/vivaldi/i.test(f))||!a&&1===c)&&(s=2,d=new Array(2)),u=l)),d[0]=s<<3,d[0]|=(14&l)>>1,d[1]|=(1&l)<<7,d[1]|=c<<3,5===s&&(d[1]|=(14&u)>>1,d[2]=(1&u)<<7,d[2]|=8,d[3]=0),{config:d,samplerate:p[l],channelCount:c,codec:"mp4a.40."+s,manifestCodec:h};e.trigger(o.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+l})}function s(e,t){return 255===e[t]&&240==(246&e[t+1])}function l(e,t){return 1&e[t+1]?7:9}function u(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function c(e){return 9216e4/e}function d(e,t,r,n,i){var o,a,s=e.length;if(o=l(e,t),a=u(e,t),(a-=o)>0&&t+o+a<=s)return{headerLength:o,frameLength:a,stamp:r+n*i}}t.getAudioConfig=a,t.isHeaderPattern=s,t.getHeaderLength=l,t.getFullFrameLength=u,t.isHeader=function(e,t){return!!(t+1<e.length&&s(e,t))},t.probe=function(e,t){if(t+1<e.length&&s(e,t)){var r=l(e,t);t+5<e.length&&(r=u(e,t));var n=t+r;if(n===e.length||n+1<e.length&&s(e,n))return!0}return!1},t.initTrackConfig=function(e,t,r,i,o){if(!e.samplerate){var s=a(t,r,i,o);e.config=s.config,e.samplerate=s.samplerate,e.channelCount=s.channelCount,e.codec=s.codec,e.manifestCodec=s.manifestCodec,n.logger.log("parsed codec:"+e.codec+",rate:"+s.samplerate+",nb channel:"+s.channelCount)}},t.getFrameDuration=c,t.parseFrameHeader=d,t.appendFrame=function(e,t,r,n,i){var o=d(t,r,n,i,c(e.samplerate));if(o){var a=o.stamp,s=o.headerLength,l=o.frameLength,u={unit:t.subarray(r+s,r+s+l),pts:a,dts:a};return e.samples.push(u),e.len+=l,{sample:u,length:l+s}}}},"./src/demux/demuxer-inline.js": -/*!*************************************!*\ - !*** ./src/demux/demuxer-inline.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,i=r(/*! ../events */"./src/events.js"),o=r(/*! ../errors */"./src/errors.js"),a=r(/*! ../crypt/decrypter */"./src/crypt/decrypter.js"),s=r(/*! ../demux/aacdemuxer */"./src/demux/aacdemuxer.js"),l=r(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.js"),u=r(/*! ../demux/tsdemuxer */"./src/demux/tsdemuxer.js"),c=r(/*! ../demux/mp3demuxer */"./src/demux/mp3demuxer.js"),d=r(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.js"),f=r(/*! ../remux/passthrough-remuxer */"./src/remux/passthrough-remuxer.js"),h=r(/*! ../utils/get-self-scope */"./src/utils/get-self-scope.js"),p=r(/*! ../utils/logger */"./src/utils/logger.js"),m=h.getSelfScope();try{n=m.performance.now.bind(m.performance)}catch(e){p.logger.debug("Unable to use Performance API on this environment"),n=m.Date.now}var g=function(){function e(e,t,r,n){this.observer=e,this.typeSupported=t,this.config=r,this.vendor=n}return e.prototype.destroy=function(){var e=this.demuxer;e&&e.destroy()},e.prototype.push=function(e,t,r,o,s,l,u,c,d,f,h,p){var m=this;if(e.byteLength>0&&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<k;w++){var x=S[w],C=x.demux.probe;if(C(e)){var R=this.remuxer=new x.remux(A,T,E,this.vendor);_=new x.demux(A,R,T,E),this.probe=C;break}}if(!_)return void A.trigger(i.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});this.demuxer=_}var j=this.remuxer;(p||m)&&(_.resetInitSegment(r,n,a,y),j.resetInitSegment()),p&&(_.resetTimeStamp(b),j.resetTimeStamp(b)),"function"==typeof _.setDecryptData&&_.setDecryptData(t),_.append(e,h,g,v)},e}();t.default=g},"./src/demux/demuxer-worker.js": -/*!*************************************!*\ - !*** ./src/demux/demuxer-worker.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(/*! ../demux/demuxer-inline */"./src/demux/demuxer-inline.js"),i=r(/*! ../events */"./src/events.js"),o=r(/*! ../utils/logger */"./src/utils/logger.js"),a=r(/*! events */"./node_modules/node-libs-browser/node_modules/events/events.js");t.default=function(e){var t=new a.EventEmitter;t.trigger=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];t.emit.apply(t,[e,e].concat(r))},t.off=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];t.removeListener.apply(t,[e].concat(r))};var r=function(t,r){e.postMessage({event:t,data:r})};e.addEventListener("message",(function(i){var a=i.data;switch(a.cmd){case"init":var s=JSON.parse(a.config);e.demuxer=new n.default(t,a.typeSupported,s,a.vendor),o.enableLogs(s.debug),r("init",null);break;case"demux":e.demuxer.push(a.data,a.decryptdata,a.initSegment,a.audioCodec,a.videoCodec,a.timeOffset,a.discontinuity,a.trackSwitch,a.contiguous,a.duration,a.accurateTimeOffset,a.defaultInitPTS)}})),t.on(i.default.FRAG_DECRYPTED,r),t.on(i.default.FRAG_PARSING_INIT_SEGMENT,r),t.on(i.default.FRAG_PARSED,r),t.on(i.default.ERROR,r),t.on(i.default.FRAG_PARSING_METADATA,r),t.on(i.default.FRAG_PARSING_USERDATA,r),t.on(i.default.INIT_PTS_FOUND,r),t.on(i.default.FRAG_PARSING_DATA,(function(t,r){var n=[],i={event:t,data:r};r.data1&&(i.data1=r.data1.buffer,n.push(r.data1.buffer),delete r.data1),r.data2&&(i.data2=r.data2.buffer,n.push(r.data2.buffer),delete r.data2),e.postMessage(i,n)}))}},"./src/demux/demuxer.js": -/*!******************************!*\ - !*** ./src/demux/demuxer.js ***! - \******************************/ -/*! no static exports found */ -/*! 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(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),i=r(/*! ../events */"./src/events.js"),o=r(/*! ../demux/demuxer-inline */"./src/demux/demuxer-inline.js"),a=r(/*! ../utils/logger */"./src/utils/logger.js"),s=r(/*! ../errors */"./src/errors.js"),l=r(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.js"),u=r(/*! ../utils/get-self-scope */"./src/utils/get-self-scope.js"),c=r(/*! ../observer */"./src/observer.js"),d=u.getSelfScope(),f=l.getMediaSource(),h=function(){function t(e,t){var r=this;this.hls=e,this.id=t;var l=this.observer=new c.Observer,u=e.config,h=function(t,n){(n=n||{}).frag=r.frag,n.id=r.id,e.trigger(t,n)};l.on(i.default.FRAG_DECRYPTED,h),l.on(i.default.FRAG_PARSING_INIT_SEGMENT,h),l.on(i.default.FRAG_PARSING_DATA,h),l.on(i.default.FRAG_PARSED,h),l.on(i.default.ERROR,h),l.on(i.default.FRAG_PARSING_METADATA,h),l.on(i.default.FRAG_PARSING_USERDATA,h),l.on(i.default.INIT_PTS_FOUND,h);var p={mp4:f.isTypeSupported("video/mp4"),mpeg:f.isTypeSupported("audio/mpeg"),mp3:f.isTypeSupported('audio/mp4; codecs="mp3"')},m=navigator.vendor;if(u.enableWorker&&"undefined"!=typeof Worker){a.logger.log("demuxing in webworker");var g=void 0;try{g=this.w=n(/*! ../demux/demuxer-worker.js */"./src/demux/demuxer-worker.js"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(t){e.trigger(i.default.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:t.message+" ("+t.filename+":"+t.lineno+")"}})},g.postMessage({cmd:"init",typeSupported:p,vendor:m,id:t,config:JSON.stringify(u)})}catch(e){a.logger.warn("Error in worker:",e),a.logger.error("Error while initializing DemuxerWorker, fallback on DemuxerInline"),g&&d.URL.revokeObjectURL(g.objectURL),this.demuxer=new o.default(l,p,u,m),this.w=void 0}}else this.demuxer=new o.default(l,p,u,m)}return t.prototype.destroy=function(){var e=this.w;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.w=null;else{var t=this.demuxer;t&&(t.destroy(),this.demuxer=null)}var r=this.observer;r&&(r.removeAllListeners(),this.observer=null)},t.prototype.push=function(t,r,n,i,o,s,l,u){var c=this.w,d=e.isFinite(o.startPTS)?o.startPTS:o.start,f=o.decryptdata,h=this.frag,p=!(h&&o.cc===h.cc),m=!(h&&o.level===h.level),g=h&&o.sn===h.sn+1,y=!m&&g;if(p&&a.logger.log(this.id+":discontinuity detected"),m&&a.logger.log(this.id+":switch detected"),this.frag=o,c)c.postMessage({cmd:"demux",data:t,decryptdata:f,initSegment:r,audioCodec:n,videoCodec:i,timeOffset:d,discontinuity:p,trackSwitch:m,contiguous:y,duration:s,accurateTimeOffset:l,defaultInitPTS:u},t instanceof ArrayBuffer?[t]:[]);else{var v=this.demuxer;v&&v.push(t,f,r,n,i,d,p,m,y,s,l,u)}},t.prototype.onWorkerMessage=function(e){var t=e.data,r=this.hls;switch(t.event){case"init":d.URL.revokeObjectURL(this.w.objectURL);break;case i.default.FRAG_PARSING_DATA:t.data.data1=new Uint8Array(t.data1),t.data2&&(t.data.data2=new Uint8Array(t.data2));default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,r.trigger(t.event,t.data)}},t}();t.default=h}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/demux/exp-golomb.js": -/*!*********************************!*\ - !*** ./src/demux/exp-golomb.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(/*! ../utils/logger */"./src/utils/logger.js"),i=function(){function e(e){this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}return e.prototype.loadWord=function(){var e=this.data,t=this.bytesAvailable,r=e.byteLength-t,n=new Uint8Array(4),i=Math.min(4,t);if(0===i)throw new Error("no bytes available");n.set(e.subarray(r,r+i)),this.word=new DataView(n.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i},e.prototype.skipBits=function(e){var t;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},e.prototype.readBits=function(e){var t=Math.min(this.bitsAvailable,e),r=this.word>>>32-t;return e>32&&n.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?r<<t|this.readBits(t):r},e.prototype.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},e.prototype.skipUEG=function(){this.skipBits(1+this.skipLZ())},e.prototype.skipEG=function(){this.skipBits(1+this.skipLZ())},e.prototype.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},e.prototype.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},e.prototype.readBoolean=function(){return 1===this.readBits(1)},e.prototype.readUByte=function(){return this.readBits(8)},e.prototype.readUShort=function(){return this.readBits(16)},e.prototype.readUInt=function(){return this.readBits(32)},e.prototype.skipScalingList=function(e){var t,r=8,n=8;for(t=0;t<e;t++)0!==n&&(n=(r+this.readEG()+256)%256),r=0===n?r:n},e.prototype.readSPS=function(){var e,t,r,n,i,o,a,s=0,l=0,u=0,c=0,d=this.readUByte.bind(this),f=this.readBits.bind(this),h=this.readUEG.bind(this),p=this.readBoolean.bind(this),m=this.skipBits.bind(this),g=this.skipEG.bind(this),y=this.skipUEG.bind(this),v=this.skipScalingList.bind(this);if(d(),e=d(),f(5),m(3),d(),y(),100===e||110===e||122===e||244===e||44===e||83===e||86===e||118===e||128===e){var b=h();if(3===b&&m(1),y(),y(),m(1),p())for(o=3!==b?8:12,a=0;a<o;a++)p()&&v(a<6?16:64)}y();var _=h();if(0===_)h();else if(1===_)for(m(1),g(),g(),t=h(),a=0;a<t;a++)g();y(),m(1),r=h(),n=h(),0===(i=f(1))&&m(1),m(1),p()&&(s=h(),l=h(),u=h(),c=h());var A=[1,1];if(p()&&p())switch(d()){case 1:A=[1,1];break;case 2:A=[12,11];break;case 3:A=[10,11];break;case 4:A=[16,11];break;case 5:A=[40,33];break;case 6:A=[24,11];break;case 7:A=[20,11];break;case 8:A=[32,11];break;case 9:A=[80,33];break;case 10:A=[18,11];break;case 11:A=[15,11];break;case 12:A=[64,33];break;case 13:A=[160,99];break;case 14:A=[4,3];break;case 15:A=[3,2];break;case 16:A=[2,1];break;case 255:A=[d()<<8|d(),d()<<8|d()]}return{width:Math.ceil(16*(r+1)-2*s-2*l),height:(2-i)*(n+1)*16-(i?2:4)*(u+c),pixelRatio:A}},e.prototype.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}();t.default=i},"./src/demux/id3.js": -/*!**************************!*\ - !*** ./src/demux/id3.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=function(){function e(){}return e.isHeader=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.isFooter=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.getID3Data=function(t,r){for(var n=r,i=0;e.isHeader(t,r);)i+=10,i+=e._readSize(t,r+6),e.isFooter(t,r+10)&&(i+=10),r+=i;if(i>0)return t.subarray(n,n+i)},e._readSize=function(e,t){var r=0;return r=(127&e[t])<<21,r|=(127&e[t+1])<<14,r|=(127&e[t+2])<<7,r|=127&e[t+3]},e.getTimeStamp=function(t){for(var r=e.getID3Frames(t),n=0;n<r.length;n++){var i=r[n];if(e.isTimeStampFrame(i))return e._readTimeStamp(i)}},e.isTimeStampFrame=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},e._getFrameData=function(t){var r=String.fromCharCode(t[0],t[1],t[2],t[3]),n=e._readSize(t,4);return{type:r,size:n,data:t.subarray(10,10+n)}},e.getID3Frames=function(t){for(var r=0,n=[];e.isHeader(t,r);){for(var i=e._readSize(t,r+6),o=(r+=10)+i;r+8<o;){var a=e._getFrameData(t.subarray(r)),s=e._decodeFrame(a);s&&n.push(s),r+=a.size+10}e.isFooter(t,r)&&(r+=10)}return n},e._decodeFrame=function(t){return"PRIV"===t.type?e._decodePrivFrame(t):"T"===t.type[0]?e._decodeTextFrame(t):"W"===t.type[0]?e._decodeURLFrame(t):void 0},e._readTimeStamp=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),r=1&t[3],n=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return n/=45,r&&(n+=47721858.84),Math.round(n)}},e._decodePrivFrame=function(t){if(!(t.size<2)){var r=e._utf8ArrayToStr(t.data,!0),n=new Uint8Array(t.data.subarray(r.length+1));return{key:t.type,info:r,data:n.buffer}}},e._decodeTextFrame=function(t){if(!(t.size<2)){if("TXXX"===t.type){var r=1,n=e._utf8ArrayToStr(t.data.subarray(r));r+=n.length+1;var i=e._utf8ArrayToStr(t.data.subarray(r));return{key:t.type,info:n,data:i}}var o=e._utf8ArrayToStr(t.data.subarray(1));return{key:t.type,data:o}}},e._decodeURLFrame=function(t){if("WXXX"===t.type){if(t.size<2)return;var r=1,n=e._utf8ArrayToStr(t.data.subarray(r));r+=n.length+1;var i=e._utf8ArrayToStr(t.data.subarray(r));return{key:t.type,info:n,data:i}}var o=e._utf8ArrayToStr(t.data);return{key:t.type,data:o}},e._utf8ArrayToStr=function(e,t){void 0===t&&(t=!1);for(var r,n,i,o=e.length,a="",s=0;s<o;){if(0===(r=e[s++])&&t)return a;if(0!==r&&3!==r)switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:a+=String.fromCharCode(r);break;case 12:case 13:n=e[s++],a+=String.fromCharCode((31&r)<<6|63&n);break;case 14:n=e[s++],i=e[s++],a+=String.fromCharCode((15&r)<<12|(63&n)<<6|(63&i)<<0)}}return a},e}(),i=n._utf8ArrayToStr;t.utf8ArrayToStr=i,t.default=n},"./src/demux/mp3demuxer.js": -/*!*********************************!*\ - !*** ./src/demux/mp3demuxer.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(/*! ../demux/id3 */"./src/demux/id3.js"),i=r(/*! ../utils/logger */"./src/utils/logger.js"),o=r(/*! ./mpegaudio */"./src/demux/mpegaudio.js"),a=function(){function e(e,t,r){this.observer=e,this.config=r,this.remuxer=t}return e.prototype.resetInitSegment=function(e,t,r,n){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:t,duration:n,inputTimeScale:9e4}},e.prototype.resetTimeStamp=function(){},e.probe=function(e){var t,r,a=n.default.getID3Data(e,0);if(a&&void 0!==n.default.getTimeStamp(a))for(t=a.length,r=Math.min(e.length-1,t+100);t<r;t++)if(o.default.probe(e,t))return i.logger.log("MPEG Audio sync word found !"),!0;return!1},e.prototype.append=function(e,t,r,i){for(var a=n.default.getID3Data(e,0),s=n.default.getTimeStamp(a),l=s?90*s:9e4*t,u=a.length,c=e.length,d=0,f=0,h=this._audioTrack,p=[{pts:l,dts:l,data:a}];u<c;)if(o.default.isHeader(e,u)){var m=o.default.appendFrame(h,e,u,l,d);if(!m)break;u+=m.length,f=m.sample.pts,d++}else n.default.isHeader(e,u)?(a=n.default.getID3Data(e,u),p.push({pts:f,dts:f,data:a}),u+=a.length):u++;this.remuxer.remux(h,{samples:[]},{samples:p,inputTimeScale:9e4},{samples:[]},t,r,i)},e.prototype.destroy=function(){},e}();t.default=a},"./src/demux/mp4demuxer.js": -/*!*********************************!*\ - !*** ./src/demux/mp4demuxer.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(/*! ../utils/logger */"./src/utils/logger.js"),i=r(/*! ../events */"./src/events.js"),o=Math.pow(2,32)-1,a=function(){function e(e,t){this.observer=e,this.remuxer=t}return e.prototype.resetTimeStamp=function(e){this.initPTS=e},e.prototype.resetInitSegment=function(t,r,n,o){if(t&&t.byteLength){var a=this.initData=e.parseInitSegment(t);null==r&&(r="mp4a.40.5"),null==n&&(n="avc1.42e01e");var s={};a.audio&&a.video?s.audiovideo={container:"video/mp4",codec:r+","+n,initSegment:o?t:null}:(a.audio&&(s.audio={container:"audio/mp4",codec:r,initSegment:o?t:null}),a.video&&(s.video={container:"video/mp4",codec:n,initSegment:o?t:null})),this.observer.trigger(i.default.FRAG_PARSING_INIT_SEGMENT,{tracks:s})}else r&&(this.audioCodec=r),n&&(this.videoCodec=n)},e.probe=function(t){return e.findBox({data:t,start:0,end:Math.min(t.length,16384)},["moof"]).length>0},e.bin2str=function(e){return String.fromCharCode.apply(null,e)},e.readUint16=function(e,t){e.data&&(t+=e.start,e=e.data);var r=e[t]<<8|e[t+1];return r<0?65536+r:r},e.readUint32=function(e,t){e.data&&(t+=e.start,e=e.data);var r=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return r<0?4294967296+r:r},e.writeUint32=function(e,t,r){e.data&&(t+=e.start,e=e.data),e[t]=r>>24,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r},e.findBox=function(t,r){var n,i,o,a,s,l,u=[];if(t.data?(s=t.start,o=t.end,t=t.data):(s=0,o=t.byteLength),!r.length)return null;for(n=s;n<o;)l=(i=e.readUint32(t,n))>1?n+i:o,e.bin2str(t.subarray(n+4,n+8))===r[0]&&(1===r.length?u.push({data:t,start:n+8,end:l}):(a=e.findBox({data:t,start:n+8,end:l},r.slice(1))).length&&(u=u.concat(a))),n=l;return u},e.parseSegmentIndex=function(t){var r,n=e.findBox(t,["moov"])[0],i=n?n.end:null,o=0,a=e.findBox(t,["sidx"]);if(!a||!a[0])return null;r=[];var s=(a=a[0]).data[0];o=0===s?8:16;var l=e.readUint32(a,o);o+=4,o+=0===s?8:16,o+=2;var u=a.end+0,c=e.readUint16(a,o);o+=2;for(var d=0;d<c;d++){var f=o,h=e.readUint32(a,f);f+=4;var p=2147483647&h;if(1==(2147483648&h)>>>31)return void console.warn("SIDX has hierarchical references (not supported)");var m=e.readUint32(a,f);f+=4,r.push({referenceSize:p,subsegmentDuration:m,info:{duration:m/l,start:u,end:u+p-1}}),u+=p,o=f+=4}return{earliestPresentationTime:0,timescale:l,version:s,referencesCount:c,references:r,moovEndOffset:i}},e.parseInitSegment=function(t){var r=[];return e.findBox(t,["moov","trak"]).forEach((function(t){var i=e.findBox(t,["tkhd"])[0];if(i){var o=i.data[i.start],a=0===o?12:20,s=e.readUint32(i,a),l=e.findBox(t,["mdia","mdhd"])[0];if(l){a=0===(o=l.data[l.start])?12:20;var u=e.readUint32(l,a),c=e.findBox(t,["mdia","hdlr"])[0];if(c){var d={soun:"audio",vide:"video"}[e.bin2str(c.data.subarray(c.start+8,c.start+12))];if(d){var f=e.findBox(t,["mdia","minf","stbl","stsd"]);if(f.length){f=f[0];var h=e.bin2str(f.data.subarray(f.start+12,f.start+16));n.logger.log("MP4Demuxer:"+d+":"+h+" found")}r[s]={timescale:u,type:d},r[d]={timescale:u,id:s}}}}}})),r},e.getStartDTS=function(t,r){var n,i,o;return n=e.findBox(r,["moof","traf"]),i=[].concat.apply([],n.map((function(r){return e.findBox(r,["tfhd"]).map((function(n){var i,o;return i=e.readUint32(n,4),o=t[i].timescale||9e4,e.findBox(r,["tfdt"]).map((function(t){var r,n;return r=t.data[t.start],n=e.readUint32(t,4),1===r&&(n*=Math.pow(2,32),n+=e.readUint32(t,8)),n}))[0]/o}))}))),o=Math.min.apply(null,i),isFinite(o)?o:0},e.offsetStartDTS=function(t,r,n){e.findBox(r,["moof","traf"]).map((function(r){return e.findBox(r,["tfhd"]).map((function(i){var a=e.readUint32(i,4),s=t[a].timescale||9e4;e.findBox(r,["tfdt"]).map((function(t){var r=t.data[t.start],i=e.readUint32(t,4);if(0===r)e.writeUint32(t,4,i-n*s);else{i*=Math.pow(2,32),i+=e.readUint32(t,8),i-=n*s,i=Math.max(i,0);var a=Math.floor(i/(o+1)),l=Math.floor(i%(o+1));e.writeUint32(t,4,a),e.writeUint32(t,8,l)}}))}))}))},e.prototype.append=function(t,r,n,o){var a=this.initData;a||(this.resetInitSegment(t,this.audioCodec,this.videoCodec,!1),a=this.initData);var s,l=this.initPTS;if(void 0===l){var u=e.getStartDTS(a,t);this.initPTS=l=u-r,this.observer.trigger(i.default.INIT_PTS_FOUND,{initPTS:l})}e.offsetStartDTS(a,t,l),s=e.getStartDTS(a,t),this.remuxer.remux(a.audio,a.video,null,null,s,n,o,t)},e.prototype.destroy=function(){},e}();t.default=a},"./src/demux/mpegaudio.js": -/*!********************************!*\ - !*** ./src/demux/mpegaudio.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={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(e,t,r,n,i){if(!(r+24>t.length)){var o=this.parseHeader(t,r);if(o&&r+o.frameLength<=t.length){var a=n+i*(9e4*o.samplesPerFrame/o.sampleRate),s={unit:t.subarray(r,r+o.frameLength),pts:a,dts:a};return e.config=[],e.channelCount=o.channelCount,e.samplerate=o.sampleRate,e.samples.push(s),e.len+=o.frameLength,{sample:s,length:o.frameLength}}}},parseHeader:function(e,t){var r=e[t+1]>>3&3,i=e[t+1]>>1&3,o=e[t+2]>>4&15,a=e[t+2]>>2&3,s=e[t+2]>>1&1;if(1!==r&&0!==o&&15!==o&&3!==a){var l=3===r?3-i:3===i?3:4,u=1e3*n.BitratesMap[14*l+o-1],c=3===r?0:2===r?1:2,d=n.SamplingRateMap[3*c+a],f=e[t+3]>>6==3?1:2,h=n.SamplesCoefficients[r][i],p=n.BytesInSlot[i],m=8*h*p;return{sampleRate:d,channelCount:f,frameLength:parseInt(h*u/d+s,10)*p,samplesPerFrame:m}}},isHeaderPattern:function(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])},isHeader:function(e,t){return!!(t+1<e.length&&this.isHeaderPattern(e,t))},probe:function(e,t){if(t+1<e.length&&this.isHeaderPattern(e,t)){var r=this.parseHeader(e,t),n=4;r&&r.frameLength&&(n=r.frameLength);var i=t+n;if(i===e.length||i+1<e.length&&this.isHeaderPattern(e,i))return!0}return!1}};t.default=n},"./src/demux/sample-aes.js": -/*!*********************************!*\ - !*** ./src/demux/sample-aes.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(/*! ../crypt/decrypter */"./src/crypt/decrypter.js"),i=function(){function e(e,t,r,i){this.decryptdata=r,this.discardEPB=i,this.decrypter=new n.default(e,t,{removePKCS7Padding:!1})}return e.prototype.decryptBuffer=function(e,t){this.decrypter.decrypt(e,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,t)},e.prototype.decryptAacSample=function(e,t,r,n){var i=e[t].unit,o=i.subarray(16,i.length-i.length%16),a=o.buffer.slice(o.byteOffset,o.byteOffset+o.length),s=this;this.decryptBuffer(a,(function(o){o=new Uint8Array(o),i.set(o,16),n||s.decryptAacSamples(e,t+1,r)}))},e.prototype.decryptAacSamples=function(e,t,r){for(;;t++){if(t>=e.length)return void r();if(!(e[t].unit.length<32)){var n=this.decrypter.isSync();if(this.decryptAacSample(e,t,r,n),!n)return}}},e.prototype.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,r=new Int8Array(t),n=0,i=32;i<=e.length-16;i+=160,n+=16)r.set(e.subarray(i,i+16),n);return r},e.prototype.getAvcDecryptedUnit=function(e,t){t=new Uint8Array(t);for(var r=0,n=32;n<=e.length-16;n+=160,r+=16)e.set(t.subarray(r,r+16),n);return e},e.prototype.decryptAvcSample=function(e,t,r,n,i,o){var a=this.discardEPB(i.data),s=this.getAvcEncryptedData(a),l=this;this.decryptBuffer(s.buffer,(function(s){i.data=l.getAvcDecryptedUnit(a,s),o||l.decryptAvcSamples(e,t,r+1,n)}))},e.prototype.decryptAvcSamples=function(e,t,r,n){for(;;t++,r=0){if(t>=e.length)return void n();for(var i=e[t].units;!(r>=i.length);r++){var o=i[r];if(!(o.length<=48||1!==o.type&&5!==o.type)){var a=this.decrypter.isSync();if(this.decryptAvcSample(e,t,r,n,o,a),!a)return}}}},e}();t.default=i},"./src/demux/tsdemuxer.js": -/*!********************************!*\ - !*** ./src/demux/tsdemuxer.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(/*! ./adts */"./src/demux/adts.js"),i=r(/*! ./mpegaudio */"./src/demux/mpegaudio.js"),o=r(/*! ../events */"./src/events.js"),a=r(/*! ./exp-golomb */"./src/demux/exp-golomb.js"),s=r(/*! ./sample-aes */"./src/demux/sample-aes.js"),l=r(/*! ../utils/logger */"./src/utils/logger.js"),u=r(/*! ../errors */"./src/errors.js"),c={video:1,audio:2,id3:3,text:4},d=function(){function e(e,t,r,n){this.observer=e,this.config=r,this.typeSupported=n,this.remuxer=t,this.sampleAes=null}return e.prototype.setDecryptData=function(e){null!=e&&null!=e.key&&"SAMPLE-AES"===e.method?this.sampleAes=new s.default(this.observer,this.config,e,this.discardEPB):this.sampleAes=null},e.probe=function(t){var r=e._syncOffset(t);return!(r<0||(r&&l.logger.warn("MPEG2-TS detected but first sync word found @ offset "+r+", junk ahead ?"),0))},e._syncOffset=function(e){for(var t=Math.min(1e3,e.length-564),r=0;r<t;){if(71===e[r]&&71===e[r+188]&&71===e[r+376])return r;r++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:c[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0,dropped:"video"===e?0:void 0,isAAC:"audio"===e||void 0,duration:"audio"===e?t:void 0}},e.prototype.resetInitSegment=function(t,r,n,i){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=e.createTrack("video",i),this._audioTrack=e.createTrack("audio",i),this._id3Track=e.createTrack("id3",i),this._txtTrack=e.createTrack("text",i),this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=r,this.videoCodec=n,this._duration=i},e.prototype.resetTimeStamp=function(){},e.prototype.append=function(t,r,n,i){var a,s,c,d,f,h=t.length,p=!1;this.contiguous=n;var m=this.pmtParsed,g=this._avcTrack,y=this._audioTrack,v=this._id3Track,b=g.pid,_=y.pid,A=v.pid,E=this._pmtId,T=g.pesData,S=y.pesData,w=v.pesData,k=this._parsePAT,x=this._parsePMT,C=this._parsePES,R=this._parseAVCPES.bind(this),j=this._parseAACPES.bind(this),L=this._parseMPEGPES.bind(this),I=this._parseID3PES.bind(this),P=e._syncOffset(t);for(h-=(h+P)%188,a=P;a<h;a+=188)if(71===t[a]){if(s=!!(64&t[a+1]),c=((31&t[a+1])<<8)+t[a+2],(48&t[a+3])>>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]);t<i;){switch(o=(31&e[t+1])<<8|e[t+2],e[t]){case 207:if(!n){l.logger.log("unkown stream type:"+e[t]);break}case 15:-1===a.audio&&(a.audio=o);break;case 21:-1===a.id3&&(a.id3=o);break;case 219:if(!n){l.logger.log("unkown stream type:"+e[t]);break}case 27:-1===a.avc&&(a.avc=o);break;case 3:case 4:r?-1===a.audio&&(a.audio=o,a.isAAC=!1):l.logger.log("MPEG audio found, not supported in this browser for now");break;case 36:l.logger.warn("HEVC stream type found, not supported for now");break;default:l.logger.log("unkown stream type:"+e[t])}t+=5+((15&e[t+3])<<8|e[t+4])}return a},e.prototype._parsePES=function(e){var t,r,n,i,o,a,s,u,c=0,d=e.data;if(!e||0===e.size)return null;for(;d[0].length<19&&d.length>1;){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;h<p;h++){var m=(t=d[h]).byteLength;if(u){if(u>m){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;i<b;i++)_.push(r.readUByte()),_.push(r.readUByte()),_.push(r.readUByte());o._insertSampleInOrder(o._txtTrack.samples,{type:3,pts:e.pts,bytes:_})}}else if(m<r.bytesAvailable)for(i=0;i<m;i++)r.readUByte()}break;case 7:if(n=!0,c=!0,!s.sps){var A=(r=new a.default(t.data)).readSPS();s.width=A.width,s.height=A.height,s.pixelRatio=A.pixelRatio,s.sps=[t.data],s.duration=o._duration;var E=t.data.subarray(1,4),T="avc1.";for(i=0;i<3;i++){var S=E[i].toString(16);S.length<2&&(S="0"+S),T+=S}s.codec=T}break;case 8:n=!0,s.pps||(s.pps=[t.data]);break;case 9:n=!1,s.audFound=!0,u&&d(u,s),u=o.avcSample=f(!1,e.pts,e.dts,"");break;case 12:n=!1;break;default:n=!1,u&&(u.debug+="unknown NAL "+t.type+" ")}u&&n&&u.units.push(t)})),t&&u&&(d(u,s),this.avcSample=null)},e.prototype._insertSampleInOrder=function(e,t){var r=e.length;if(r>0){if(t.pts>=e[r-1].pts)e.push(t);else for(var n=r-1;n>=0;n--)if(t.pts<e[n].pts){e.splice(n,0,t);break}}else e.push(t)},e.prototype._getLastNalUnit=function(){var e,t=this.avcSample;if(!t||0===t.units.length){var r=this._avcTrack.samples;t=r[r.length-1]}if(t){var n=t.units;e=n[n.length-1]}return e},e.prototype._parseAVCNALu=function(e){var t,r,n,i,o=0,a=e.byteLength,s=this._avcTrack,l=s.naluState||0,u=l,c=[],d=-1;for(-1===l&&(d=0,i=31&e[0],l=0,o=1);o<a;)if(t=e[o++],l)if(1!==l)if(t)if(1===t){var f,h;d>=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<a?(d=o,i=31&e[o],l=0):l=-1}else l=0;else l=3;else l=t?0:2;else l=t?0:1;return d>=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;o<n-2;)0===e[o]&&0===e[o+1]&&3===e[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return e;t=n-i.length,r=new Uint8Array(t);var a=0;for(o=0;o<t;a++,o++)a===i[0]&&(a++,i.shift()),r[o]=e[a];return r},e.prototype._parseAACPES=function(e){var t,r,i,a,s,c=this._audioTrack,d=e.data,f=e.pts,h=this.aacOverFlow,p=this.aacLastPTS;if(h){var m=new Uint8Array(h.byteLength+d.byteLength);m.set(h,0),m.set(d,h.byteLength),d=m}for(i=0,s=d.length;i<s-1&&!n.isHeader(d,i);i++);if(i){var g=void 0,y=void 0;if(i<s-1?(g="AAC PES did not start with ADTS header,offset:"+i,y=!1):(g="no ADTS header found in AAC PES",y=!0),l.logger.warn("parsing error:"+g),this.observer.trigger(o.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:y,reason:g}),y)return}if(n.initTrackConfig(c,this.observer,d,i,this.audioCodec),r=0,t=n.getFrameDuration(c.samplerate),h&&p){var v=p+t;Math.abs(v-f)>1&&(l.logger.log("AAC: align PTS for overlapping frames by "+Math.round((v-f)/90)),f=v)}for(;i<s;)if(n.isHeader(d,i)&&i+5<s){var b=n.appendFrame(c,d,i,f,r);if(!b)break;i+=b.length,a=b.sample.pts,r++}else i++;h=i<s?d.subarray(i,s):null,this.aacOverFlow=h,this.aacLastPTS=a},e.prototype._parseMPEGPES=function(e){for(var t=e.data,r=t.length,n=0,o=0,a=e.pts;o<r;)if(i.default.isHeader(t,o)){var s=i.default.appendFrame(this._audioTrack,t,o,a,n);if(!s)break;o+=s.length,n++}else o++},e.prototype._parseID3PES=function(e){this._id3Track.samples.push(e)},e}();t.default=d},"./src/errors.js": -/*!***********************!*\ - !*** ./src/errors.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}),t.ErrorTypes={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",KEY_SYSTEM_ERROR:"keySystemError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},t.ErrorDetails={KEY_SYSTEM_NO_KEYS:"keySystemNoKeys",KEY_SYSTEM_NO_ACCESS:"keySystemNoAccess",KEY_SYSTEM_NO_SESSION:"keySystemNoSession",KEY_SYSTEM_LICENSE_REQUEST_FAILED:"keySystemLicenseRequestFailed",MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",REMUX_ALLOC_ERROR:"remuxAllocError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",BUFFER_NUDGE_ON_STALL:"bufferNudgeOnStall",INTERNAL_EXCEPTION:"internalException"}},"./src/event-handler.js": -/*!******************************!*\ - !*** ./src/event-handler.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(/*! ./utils/logger */"./src/utils/logger.js"),i=r(/*! ./errors */"./src/errors.js"),o=r(/*! ./events */"./src/events.js"),a={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},s=function(){function e(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.hls=e,this.onEvent=this.onEvent.bind(this),this.handledEvents=t,this.useGenericHandler=!0,this.registerListeners()}return e.prototype.destroy=function(){this.onHandlerDestroying(),this.unregisterListeners(),this.onHandlerDestroyed()},e.prototype.onHandlerDestroying=function(){},e.prototype.onHandlerDestroyed=function(){},e.prototype.isEventHandler=function(){return"object"==typeof this.handledEvents&&this.handledEvents.length&&"function"==typeof this.onEvent},e.prototype.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(e){if(a[e])throw new Error("Forbidden event-name: "+e);this.hls.on(e,this.onEvent)}),this)},e.prototype.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(e){this.hls.off(e,this.onEvent)}),this)},e.prototype.onEvent=function(e,t){this.onEventGeneric(e,t)},e.prototype.onEventGeneric=function(e,t){try{(function(e,t){var r="on"+e.replace("hls","");if("function"!=typeof this[r])throw new Error("Event "+e+" has no generic handler in this "+this.constructor.name+" class (tried "+r+")");return this[r].bind(this,t)}).call(this,e,t).call()}catch(t){n.logger.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.hls.trigger(o.default.ERROR,{type:i.ErrorTypes.OTHER_ERROR,details:i.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,err:t})}},e}();t.default=s},"./src/events.js": -/*!***********************!*\ - !*** ./src/events.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}),t.default={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition"}},"./src/hls.js": -/*!********************!*\ - !*** ./src/hls.js ***! - \********************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";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(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),a=r(/*! ./errors */"./src/errors.js"),s=r(/*! ./loader/playlist-loader */"./src/loader/playlist-loader.js"),l=r(/*! ./loader/fragment-loader */"./src/loader/fragment-loader.js"),u=r(/*! ./loader/key-loader */"./src/loader/key-loader.js"),c=r(/*! ./controller/fragment-tracker */"./src/controller/fragment-tracker.js"),d=r(/*! ./controller/stream-controller */"./src/controller/stream-controller.js"),f=r(/*! ./controller/level-controller */"./src/controller/level-controller.js"),h=r(/*! ./controller/id3-track-controller */"./src/controller/id3-track-controller.js"),p=r(/*! ./is-supported */"./src/is-supported.js"),m=r(/*! ./utils/logger */"./src/utils/logger.js"),g=r(/*! ./config */"./src/config.js"),y=r(/*! ./events */"./src/events.js"),v=function(e){function t(r){void 0===r&&(r={});var n=e.call(this)||this,i=t.DefaultConfig;if((r.liveSyncDurationCount||r.liveMaxLatencyDurationCount)&&(r.liveSyncDuration||r.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var o in i)o in r||(r[o]=i[o]);if(void 0!==r.liveMaxLatencyDurationCount&&r.liveMaxLatencyDurationCount<=r.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==r.liveMaxLatencyDuration&&(r.liveMaxLatencyDuration<=r.liveSyncDuration||void 0===r.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');m.enableLogs(r.debug),n.config=r,n._autoLevelCapping=-1;var a=n.abrController=new r.abrController(n),p=new r.bufferController(n),g=new r.capLevelController(n),y=new r.fpsController(n),v=new s.default(n),b=new l.default(n),_=new u.default(n),A=new h.default(n),E=n.levelController=new f.default(n),T=new c.FragmentTracker(n),S=[E,n.streamController=new d.default(n,T)],w=r.audioStreamController;w&&S.push(new w(n,T)),n.networkControllers=S;var k=[v,b,_,a,p,g,y,A,T];if(w=r.audioTrackController){var x=new w(n);n.audioTrackController=x,k.push(x)}if(w=r.subtitleTrackController){var C=new w(n);n.subtitleTrackController=C,k.push(C)}if(w=r.emeController){var R=new w(n);n.emeController=R,k.push(R)}return(w=r.subtitleStreamController)&&k.push(new w(n,T)),(w=r.timelineController)&&k.push(new w(n)),n.coreComponents=k,n}return i(t,e),Object.defineProperty(t,"version",{get:function(){return"0.12.2"},enumerable:!0,configurable:!0}),t.isSupported=function(){return p.isSupported()},Object.defineProperty(t,"Events",{get:function(){return y.default},enumerable:!0,configurable:!0}),Object.defineProperty(t,"ErrorTypes",{get:function(){return a.ErrorTypes},enumerable:!0,configurable:!0}),Object.defineProperty(t,"ErrorDetails",{get:function(){return a.ErrorDetails},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DefaultConfig",{get:function(){return t.defaultConfig?t.defaultConfig:g.hlsDefaultConfig},set:function(e){t.defaultConfig=e},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){m.logger.log("destroy"),this.trigger(y.default.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach((function(e){e.destroy()})),this.url=null,this.removeAllListeners(),this._autoLevelCapping=-1},t.prototype.attachMedia=function(e){m.logger.log("attachMedia"),this.media=e,this.trigger(y.default.MEDIA_ATTACHING,{media:e})},t.prototype.detachMedia=function(){m.logger.log("detachMedia"),this.trigger(y.default.MEDIA_DETACHING),this.media=null},t.prototype.loadSource=function(e){e=o.buildAbsoluteURL(window.location.href,e,{alwaysNormalize:!0}),m.logger.log("loadSource:"+e),this.url=e,this.trigger(y.default.MANIFEST_LOADING,{url:e})},t.prototype.startLoad=function(e){void 0===e&&(e=-1),m.logger.log("startLoad("+e+")"),this.networkControllers.forEach((function(t){t.startLoad(e)}))},t.prototype.stopLoad=function(){m.logger.log("stopLoad"),this.networkControllers.forEach((function(e){e.stopLoad()}))},t.prototype.swapAudioCodec=function(){m.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},t.prototype.recoverMediaError=function(){m.logger.log("recoverMediaError");var e=this.media;this.detachMedia(),this.attachMedia(e)},Object.defineProperty(t.prototype,"levels",{get:function(){return this.levelController.levels},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentLevel",{get:function(){return this.streamController.currentLevel},set:function(e){m.logger.log("set currentLevel:"+e),this.loadLevel=e,this.streamController.immediateLevelSwitch()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextLevel",{get:function(){return this.streamController.nextLevel},set:function(e){m.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"loadLevel",{get:function(){return this.levelController.level},set:function(e){m.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextLoadLevel",{get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstLevel",{get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){m.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"startLevel",{get:function(){return this.levelController.startLevel},set:function(e){m.logger.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autoLevelCapping",{get:function(){return this._autoLevelCapping},set:function(e){m.logger.log("set autoLevelCapping:"+e),this._autoLevelCapping=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autoLevelEnabled",{get:function(){return-1===this.levelController.manualLevel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"manualLevel",{get:function(){return this.levelController.manualLevel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minAutoLevel",{get:function(){for(var e=this.levels,t=this.config.minAutoBitrate,r=e?e.length:0,n=0;n<r;n++)if((e[n].realBitrate?Math.max(e[n].realBitrate,e[n].bitrate):e[n].bitrate)>t)return n;return 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxAutoLevel",{get:function(){var e=this.levels,t=this.autoLevelCapping;return-1===t&&e&&e.length?e.length-1:t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextAutoLevel",{get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"audioTracks",{get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"audioTrack",{get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"liveSyncPosition",{get:function(){return this.streamController.liveSyncPosition},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subtitleTracks",{get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subtitleTrack",{get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subtitleDisplay",{get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)},enumerable:!0,configurable:!0}),t}(r(/*! ./observer */"./src/observer.js").Observer);t.default=v},"./src/is-supported.js": -/*!*****************************!*\ - !*** ./src/is-supported.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(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.js");t.isSupported=function(){var e=n.getMediaSource(),t=window.SourceBuffer||window.WebKitSourceBuffer,r=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!r&&!!i}},"./src/loader/fragment-loader.js": -/*!***************************************!*\ - !*** ./src/loader/fragment-loader.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(/*! ../events */"./src/events.js"),a=r(/*! ../event-handler */"./src/event-handler.js"),s=r(/*! ../errors */"./src/errors.js"),l=r(/*! ../utils/logger */"./src/utils/logger.js"),u=function(t){function r(e){var r=t.call(this,e,o.default.FRAG_LOADING)||this;return r.loaders={},r}return i(r,t),r.prototype.destroy=function(){var e=this.loaders;for(var r in e){var n=e[r];n&&n.destroy()}this.loaders={},t.prototype.destroy.call(this)},r.prototype.onFragLoading=function(t){var r=t.frag,n=r.type,i=this.loaders,o=this.hls.config,a=o.fLoader,s=o.loader;r.loaded=0;var u,c,d,f=i[n];f&&(l.logger.warn("abort previous fragment loader for type: "+n),f.abort()),f=i[n]=r.loader=o.fLoader?new a(o):new s(o),u={url:r.url,frag:r,responseType:"arraybuffer",progressData:!1};var h=r.byteRangeStartOffset,p=r.byteRangeEndOffset;e.isFinite(h)&&e.isFinite(p)&&(u.rangeStart=h,u.rangeEnd=p),c={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:o.fragLoadingMaxRetryTimeout},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},f.load(u,c,d)},r.prototype.loadsuccess=function(e,t,r,n){void 0===n&&(n=null);var i=e.data,a=r.frag;a.loader=void 0,this.loaders[a.type]=void 0,this.hls.trigger(o.default.FRAG_LOADED,{payload:i,frag:a,stats:t,networkDetails:n})},r.prototype.loaderror=function(e,t,r){void 0===r&&(r=null);var n=t.frag,i=n.loader;i&&i.abort(),this.loaders[n.type]=void 0,this.hls.trigger(o.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t.frag,response:e,networkDetails:r})},r.prototype.loadtimeout=function(e,t,r){void 0===r&&(r=null);var n=t.frag,i=n.loader;i&&i.abort(),this.loaders[n.type]=void 0,this.hls.trigger(o.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t.frag,networkDetails:r})},r.prototype.loadprogress=function(e,t,r,n){void 0===n&&(n=null);var i=t.frag;i.loaded=e.loaded,this.hls.trigger(o.default.FRAG_LOAD_PROGRESS,{frag:i,stats:e,networkDetails:n})},r}(a.default);t.default=u}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/loader/fragment.js": -/*!********************************!*\ - !*** ./src/loader/fragment.js ***! - \********************************/ -/*! no static exports found */ -/*! 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(/*! ./level-key */"./src/loader/level-key.js"),o=function(){function t(){var e;this._url=null,this._byteRange=null,this._decryptdata=null,this.tagList=[],this.programDateTime=null,this.rawProgramDateTime=null,this._elementaryStreams=((e={})[t.ElementaryStreamTypes.AUDIO]=!1,e[t.ElementaryStreamTypes.VIDEO]=!1,e)}return Object.defineProperty(t,"ElementaryStreamTypes",{get:function(){return{AUDIO:"audio",VIDEO:"video"}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return!this._url&&this.relurl&&(this._url=n.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(e){this._url=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"byteRange",{get:function(){if(!this._byteRange&&!this.rawByteRange)return[];if(this._byteRange)return this._byteRange;var e=[];if(this.rawByteRange){var t=this.rawByteRange.split("@",2);if(1===t.length){var r=this.lastByteRangeEndOffset;e[0]=r||0}else e[0]=parseInt(t[1]);e[1]=parseInt(t[0])+e[0],this._byteRange=e}return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"byteRangeStartOffset",{get:function(){return this.byteRange[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"byteRangeEndOffset",{get:function(){return this.byteRange[1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"decryptdata",{get:function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"endProgramDateTime",{get:function(){if(!e.isFinite(this.programDateTime))return null;var t=e.isFinite(this.duration)?this.duration:0;return this.programDateTime+1e3*t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"encrypted",{get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)},enumerable:!0,configurable:!0}),t.prototype.addElementaryStream=function(e){this._elementaryStreams[e]=!0},t.prototype.hasElementaryStream=function(e){return!0===this._elementaryStreams[e]},t.prototype.createInitializationVector=function(e){for(var t=new Uint8Array(16),r=12;r<16;r++)t[r]=e>>8*(15-r)&255;return t},t.prototype.fragmentDecryptdataFromLevelkey=function(e,t){var r=e;return e&&e.method&&e.uri&&!e.iv&&((r=new i.default).method=e.method,r.baseuri=e.baseuri,r.reluri=e.reluri,r.iv=this.createInitializationVector(t)),r},t}();t.default=o}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/loader/key-loader.js": -/*!**********************************!*\ - !*** ./src/loader/key-loader.js ***! - \**********************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";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(/*! ../events */"./src/events.js"),a=r(/*! ../event-handler */"./src/event-handler.js"),s=r(/*! ../errors */"./src/errors.js"),l=r(/*! ../utils/logger */"./src/utils/logger.js"),u=function(e){function t(t){var r=e.call(this,t,o.default.KEY_LOADING)||this;return r.loaders={},r.decryptkey=null,r.decrypturl=null,r}return i(t,e),t.prototype.destroy=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={},a.default.prototype.destroy.call(this)},t.prototype.onKeyLoading=function(e){var t=e.frag,r=t.type,n=this.loaders[r],i=t.decryptdata,a=i.uri;if(a!==this.decrypturl||null===this.decryptkey){var s,u,c,d=this.hls.config;n&&(l.logger.warn("abort previous key loader for type:"+r),n.abort()),t.loader=this.loaders[r]=new d.loader(d),this.decrypturl=a,this.decryptkey=null,s={url:a,frag:t,responseType:"arraybuffer"},u={timeout:d.fragLoadingTimeOut,maxRetry:0,retryDelay:d.fragLoadingRetryDelay,maxRetryDelay:d.fragLoadingMaxRetryTimeout},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},t.loader.load(s,u,c)}else this.decryptkey&&(i.key=this.decryptkey,this.hls.trigger(o.default.KEY_LOADED,{frag:t}))},t.prototype.loadsuccess=function(e,t,r){var n=r.frag;this.decryptkey=n.decryptdata.key=new Uint8Array(e.data),n.loader=void 0,this.loaders[n.type]=void 0,this.hls.trigger(o.default.KEY_LOADED,{frag:n})},t.prototype.loaderror=function(e,t){var r=t.frag,n=r.loader;n&&n.abort(),this.loaders[t.type]=void 0,this.hls.trigger(o.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:r,response:e})},t.prototype.loadtimeout=function(e,t){var r=t.frag,n=r.loader;n&&n.abort(),this.loaders[t.type]=void 0,this.hls.trigger(o.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},t}(a.default);t.default=u},"./src/loader/level-key.js": -/*!*********************************!*\ - !*** ./src/loader/level-key.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(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),i=function(){function e(){this.method=null,this.key=null,this.iv=null,this._uri=null}return Object.defineProperty(e.prototype,"uri",{get:function(){return!this._uri&&this.reluri&&(this._uri=n.buildAbsoluteURL(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri},enumerable:!0,configurable:!0}),e}();t.default=i},"./src/loader/level.js": -/*!*****************************!*\ - !*** ./src/loader/level.js ***! - \*****************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function t(e){this.endCC=0,this.endSN=0,this.fragments=[],this.initSegment=null,this.live=!0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=e,this.version=null}return Object.defineProperty(t.prototype,"hasProgramDateTime",{get:function(){return!(!this.fragments[0]||!e.isFinite(this.fragments[0].programDateTime))},enumerable:!0,configurable:!0}),t}();t.default=r}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/loader/m3u8-parser.js": -/*!***********************************!*\ - !*** ./src/loader/m3u8-parser.js ***! - \***********************************/ -/*! no static exports found */ -/*! 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;n<e.length;n++){var i=e[n];i.id===t&&(r=i)}return r},t.convertAVC1ToAVCOTI=function(e){var t,r=e.split(".");return r.length>2?(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<d.length&&void 0===d[m];m++);var R=(" "+d[m+1]).slice(1),j=(" "+d[m+2]).slice(1);switch(d[m]){case"#":T.tagList.push(j?[R,j]:[R]);break;case"PLAYLIST-TYPE":b.type=R.toUpperCase();break;case"MEDIA-SEQUENCE":y=b.startSN=parseInt(R);break;case"TARGETDURATION":b.targetduration=parseFloat(R);break;case"VERSION":b.version=parseInt(R);break;case"EXTM3U":break;case"ENDLIST":b.live=!1;break;case"DIS":A++,T.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":A=parseInt(R);break;case"KEY":var L=R,I=new s.default(L),P=I.enumeratedString("METHOD"),O=I.URI,D=I.hexadecimalInteger("IV");P&&(_=new a.default,O&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(P)>=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 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 ***! - \***************************************/ -/*! 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(/*! ../events */"./src/events.js"),a=r(/*! ../event-handler */"./src/event-handler.js"),s=r(/*! ../errors */"./src/errors.js"),l=r(/*! ../utils/logger */"./src/utils/logger.js"),u=r(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.js"),c=r(/*! ./m3u8-parser */"./src/loader/m3u8-parser.js"),d=window.performance,f={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},h={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"},p=function(t){function r(e){var r=t.call(this,e,o.default.MANIFEST_LOADING,o.default.LEVEL_LOADING,o.default.AUDIO_TRACK_LOADING,o.default.SUBTITLE_TRACK_LOADING)||this;return r.loaders={},r}return i(r,t),Object.defineProperty(r,"ContextType",{get:function(){return f},enumerable:!0,configurable:!0}),Object.defineProperty(r,"LevelType",{get:function(){return h},enumerable:!0,configurable:!0}),r.canHaveQualityLevels=function(e){return e!==f.AUDIO_TRACK&&e!==f.SUBTITLE_TRACK},r.mapContextToLevelType=function(e){switch(e.type){case f.AUDIO_TRACK:return h.AUDIO;case f.SUBTITLE_TRACK:return h.SUBTITLE;default:return h.MAIN}},r.getResponseUrl=function(e,t){var r=e.url;return void 0!==r&&0!==r.indexOf("data:")||(r=t.url),r},r.prototype.createInternalLoader=function(e){var t=this.hls.config,r=t.pLoader,n=t.loader,i=new(r||n)(t);return e.loader=i,this.loaders[e.type]=i,i},r.prototype.getInternalLoader=function(e){return this.loaders[e.type]},r.prototype.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},r.prototype.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},r.prototype.destroy=function(){this.destroyInternalLoaders(),t.prototype.destroy.call(this)},r.prototype.onManifestLoading=function(e){this.load(e.url,{type:f.MANIFEST,level:0,id:null})},r.prototype.onLevelLoading=function(e){this.load(e.url,{type:f.LEVEL,level:e.level,id:e.id})},r.prototype.onAudioTrackLoading=function(e){this.load(e.url,{type:f.AUDIO_TRACK,level:null,id:e.id})},r.prototype.onSubtitleTrackLoading=function(e){this.load(e.url,{type:f.SUBTITLE_TRACK,level:null,id:e.id})},r.prototype.load=function(e,t){var r=this.hls.config;l.logger.debug("Loading playlist of type "+t.type+", level: "+t.level+", id: "+t.id);var n,i,o,a,s=this.getInternalLoader(t);if(s){var u=s.context;if(u&&u.url===e)return l.logger.trace("playlist request ongoing"),!1;l.logger.warn("aborting previous loader for type: "+t.type),s.abort()}switch(t.type){case f.MANIFEST:n=r.manifestLoadingMaxRetry,i=r.manifestLoadingTimeOut,o=r.manifestLoadingRetryDelay,a=r.manifestLoadingMaxRetryTimeout;break;case f.LEVEL:n=0,i=r.levelLoadingTimeOut;break;default:n=r.levelLoadingMaxRetry,i=r.levelLoadingTimeOut,o=r.levelLoadingRetryDelay,a=r.levelLoadingMaxRetryTimeout}s=this.createInternalLoader(t),t.url=e,t.responseType=t.responseType||"";var c={timeout:i,maxRetry:n,retryDelay:o,maxRetryDelay:a},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return l.logger.debug("Calling internal loader delegate for URL: "+e),s.load(t,c,d),!0},r.prototype.loadsuccess=function(e,t,r,n){if(void 0===n&&(n=null),r.isSidxRequest)return this._handleSidxRequest(e,r),void this._handlePlaylistLoaded(e,t,r,n);this.resetInternalLoader(r.type);var i=e.data;t.tload=d.now(),0===i.indexOf("#EXTM3U")?i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(e,t,r,n):this._handleMasterPlaylist(e,t,r,n):this._handleManifestParsingError(e,r,"no EXTM3U delimiter",n)},r.prototype.loaderror=function(e,t,r){void 0===r&&(r=null),this._handleNetworkError(t,r,!1,e)},r.prototype.loadtimeout=function(e,t,r){void 0===r&&(r=null),this._handleNetworkError(t,r,!0)},r.prototype._handleMasterPlaylist=function(e,t,n,i){var a=this.hls,s=e.data,u=r.getResponseUrl(e,n),d=c.default.parseMasterPlaylist(s,u);if(d.length){var f=d.map((function(e){return{id:e.attrs.AUDIO,codec:e.audioCodec}})),h=c.default.parseMasterPlaylistMedia(s,u,"AUDIO",f),p=c.default.parseMasterPlaylistMedia(s,u,"SUBTITLES");if(h.length){var m=!1;h.forEach((function(e){e.url||(m=!0)})),!1===m&&d[0].audioCodec&&!d[0].attrs.AUDIO&&(l.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),h.unshift({type:"main",name:"main"}))}a.trigger(o.default.MANIFEST_LOADED,{levels:d,audioTracks:h,subtitles:p,url:u,stats:t,networkDetails:i})}else this._handleManifestParsingError(e,n,"no level found in manifest",i)},r.prototype._handleTrackOrLevelPlaylist=function(t,n,i,a){var s=this.hls,l=i.id,u=i.level,h=i.type,p=r.getResponseUrl(t,i),m=e.isFinite(l)?l:0,g=e.isFinite(u)?u:m,y=r.mapContextToLevelType(i),v=c.default.parseLevelPlaylist(t.data,p,g,y,m);if(v.tload=n.tload,h===f.MANIFEST){var b={url:p,details:v};s.trigger(o.default.MANIFEST_LOADED,{levels:[b],audioTracks:[],url:p,stats:n,networkDetails:a})}if(n.tparsed=d.now(),v.needSidxRanges){var _=v.initSegment.url;this.load(_,{isSidxRequest:!0,type:h,level:u,levelDetails:v,id:l,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}else i.levelDetails=v,this._handlePlaylistLoaded(t,n,i,a)},r.prototype._handleSidxRequest=function(e,t){var r=u.default.parseSegmentIndex(new Uint8Array(e.data));if(r){var n=r.references,i=t.levelDetails;n.forEach((function(e,t){var r=e.info,n=i.fragments[t];0===n.byteRange.length&&(n.rawByteRange=String(1+r.end-r.start)+"@"+String(r.start))})),i.initSegment.rawByteRange=String(r.moovEndOffset)+"@0"}},r.prototype._handleManifestParsingError=function(e,t,r,n){this.hls.trigger(o.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:e.url,reason:r,networkDetails:n})},r.prototype._handleNetworkError=function(e,t,r,n){var i,a;void 0===r&&(r=!1),void 0===n&&(n=null),l.logger.info("A network error occured while loading a "+e.type+"-type playlist");var u=this.getInternalLoader(e);switch(e.type){case f.MANIFEST:i=r?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,a=!0;break;case f.LEVEL:i=r?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,a=!1;break;case f.AUDIO_TRACK:i=r?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,a=!1;break;default:a=!1}u&&(u.abort(),this.resetInternalLoader(e.type));var c={type:s.ErrorTypes.NETWORK_ERROR,details:i,fatal:a,url:u.url,loader:u,context:e,networkDetails:t};n&&(c.response=n),this.hls.trigger(o.default.ERROR,c)},r.prototype._handlePlaylistLoaded=function(e,t,n,i){var a=n.type,s=n.level,l=n.id,u=n.levelDetails;if(u.targetduration)if(r.canHaveQualityLevels(n.type))this.hls.trigger(o.default.LEVEL_LOADED,{details:u,level:s||0,id:l||0,stats:t,networkDetails:i});else switch(a){case f.AUDIO_TRACK:this.hls.trigger(o.default.AUDIO_TRACK_LOADED,{details:u,id:l,stats:t,networkDetails:i});break;case f.SUBTITLE_TRACK:this.hls.trigger(o.default.SUBTITLE_TRACK_LOADED,{details:u,id:l,stats:t,networkDetails:i})}else this._handleManifestParsingError(e,n,"invalid target duration",i)},r}(a.default);t.default=p}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/observer.js": -/*!*************************!*\ - !*** ./src/observer.js ***! - \*************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";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=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.trigger=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.emit.apply(this,[e,e].concat(t))},t}(r(/*! eventemitter3 */"./node_modules/eventemitter3/index.js").EventEmitter);t.Observer=o},"./src/polyfills/number.js": -/*!*********************************!*\ - !*** ./src/polyfills/number.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(/*! ../utils/get-self-scope */"./src/utils/get-self-scope.js").getSelfScope().Number;t.Number=n,n.isFinite=n.isFinite||function(e){return"number"==typeof e&&isFinite(e)}},"./src/remux/aac-helper.js": -/*!*********************************!*\ - !*** ./src/remux/aac-helper.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=function(){function e(){}return e.getSilentFrame=function(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},e}();t.default=n},"./src/remux/mp4-generator.js": -/*!************************************!*\ - !*** ./src/remux/mp4-generator.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=Math.pow(2,32)-1,i=function(){function e(){}return e.init=function(){var t;for(t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var r=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:r,audio:n};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),o=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=o,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var a=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,a,l,a,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,i))},e.box=function(e){for(var t,r=Array.prototype.slice.call(arguments,1),n=8,i=r.length,o=i;i--;)n+=r[i].byteLength;for((t=new Uint8Array(n))[0]=n>>24&255,t[1]=n>>16&255,t[2]=n>>8&255,t[3]=255&n,t.set(e,4),i=0,n=8;i<o;i++)t.set(r[i],n),n+=r[i].byteLength;return t},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(t){return e.box(e.types.mdat,t)},e.mdhd=function(t,r){r*=t;var i=Math.floor(r/(n+1)),o=Math.floor(r%(n+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,o>>24,o>>16&255,o>>8&255,255&o,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,r,n){return e.box(e.types.moof,e.mfhd(t),e.traf(n,r))},e.moov=function(t){for(var r=t.length,n=[];r--;)n[r]=e.trak(t[r]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(n).concat(e.mvex(t)))},e.mvex=function(t){for(var r=t.length,n=[];r--;)n[r]=e.trex(t[r]);return e.box.apply(null,[e.types.mvex].concat(n))},e.mvhd=function(t,r){r*=t;var i=Math.floor(r/(n+1)),o=Math.floor(r%(n+1)),a=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,o>>24,o>>16&255,o>>8&255,255&o,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,a)},e.sdtp=function(t){var r,n,i=t.samples||[],o=new Uint8Array(4+i.length);for(n=0;n<i.length;n++)r=i[n].flags,o[n+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return e.box(e.types.sdtp,o)},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(t){var r,n,i,o=[],a=[];for(r=0;r<t.sps.length;r++)i=(n=t.sps[r]).byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(n));for(r=0;r<t.pps.length;r++)i=(n=t.pps[r]).byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(n));var s=e.box(e.types.avcC,new Uint8Array([1,o[3],o[4],o[5],255,224|t.sps.length].concat(o).concat([t.pps.length]).concat(a))),l=t.width,u=t.height,c=t.pixelRatio[0],d=t.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,d>>24,d>>16&255,d>>8&255,255&d])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var r=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var r=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))},e.stsd=function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var r=t.id,i=t.duration*t.timescale,o=t.width,a=t.height,s=Math.floor(i/(n+1)),l=Math.floor(i%(n+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,l>>24,l>>16&255,l>>8&255,255&l,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,o>>8&255,255&o,0,0,a>>8&255,255&a,0,0]))},e.traf=function(t,r){var i=e.sdtp(t),o=t.id,a=Math.floor(r/(n+1)),s=Math.floor(r%(n+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,i.length+16+20+8+16+8+8),i)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var r=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,r){var n,i,o,a,s,l,u=t.samples||[],c=u.length,d=12+16*c,f=new Uint8Array(d);for(r+=8+d,f.set([0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),n=0;n<c;n++)o=(i=u[n]).duration,a=i.size,s=i.flags,l=i.cts,f.set([o>>>24&255,o>>>16&255,o>>>8&255,255&o,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*n);return e.box(e.types.trun,f)},e.initSegment=function(t){e.types||e.init();var r,n=e.moov(t);return(r=new Uint8Array(e.FTYP.byteLength+n.byteLength)).set(e.FTYP),r.set(n,e.FTYP.byteLength),r},e}();t.default=i},"./src/remux/mp4-remuxer.js": -/*!**********************************!*\ - !*** ./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)<y/5)),r||(T=t*y),v.forEach((function(e){e.pts=A(e.pts-E,T),e.dts=A(e.dts-E,T)})),v.sort((function(e,t){var r=e.dts-t.dts,n=e.pts-t.pts;return r||n||e.id-t.id}));var w=v.reduce((function(e,t){return Math.max(Math.min(e,t.pts-t.dts),-18e3)}),0);if(w<0){s.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(w/90)+" ms to overcome this issue");for(var k=0;k<v.length;k++)v[k].dts+=w}var x=v[0];h=Math.max(x.dts,0),f=Math.max(x.pts,0);var C=Math.round((h-T)/90);r&&C&&(C>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;D<P;D++)O+=I[D].data.length;j+=O,R+=P,L.length=O,L.dts=S?h+k*u:Math.max(L.dts,h),L.pts=Math.max(L.pts,L.dts)}var M=j+4*R+8;try{c=new Uint8Array(M)}catch(e){return void this.observer.trigger(o.default.ERROR,{type:a.ErrorTypes.MUX_ERROR,details:a.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:M,reason:"fail allocating video mdat "+M})}var N=new DataView(c.buffer);for(N.setUint32(0,M),c.set(i.default.types.mdat,4),k=0;k<_;k++){var U=v[k],F=U.units,B=0,K=void 0;for(D=0,P=F.length;D<P;D++){var G=F[D],V=G.data,H=G.data.byteLength;N.setUint32(g,H),g+=4,c.set(V,g),g+=H,B+=4+H}if(S)K=Math.max(0,u*Math.round((U.pts-U.dts)/u));else{if(k<_-1)u=v[k+1].dts-U.dts;else{var Y=this.config,z=U.dts-v[k>0?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<T.length;){var R,j=T[x];R=(U=j.pts)-C;var L=Math.abs(1e3*R/g);if(R<=-k*b)s.logger.warn("Dropping 1 audio frame @ "+(C/g).toFixed(3)+"s due to "+Math.round(L)+" ms overlap."),T.splice(x,1),e.len-=j.unit.length;else if(R>=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;P<I;P++){var O=Math.max(C,0);(d=n.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(s.logger.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),d=j.unit.subarray()),T.splice(x,0,{unit:d,pts:O,dts:O}),e.len+=d.length,C+=b,x++}j.pts=j.dts=C,C+=b,x++}else Math.abs(R),j.pts=j.dts=C,C+=b,x++}P=0;for(var D=T.length;P<D;P++){var M=T[P],N=M.unit,U=M.pts;if(void 0!==m)c.duration=Math.round((U-m)/v);else{var F=Math.round(1e3*(U-w)/g),B=0;if(r&&e.isAAC&&F){if(F>0&&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<B;x++)(d=n.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(s.logger.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),d=N.subarray()),f.set(d,u),u+=d.byteLength,c={size:d.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},S.push(c)}f.set(N,u);var G=N.byteLength;u+=G,c={size:G,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},S.push(c),m=U}var V=0,H=S.length;if(H>=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;m<f;m++){var g=u+m*d;p.push({unit:h,pts:g,dts:g}),e.len+=h.length}e.samples=p,this.remuxAudio(e,t,r)}else s.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!")},e.prototype.remuxID3=function(e){var t,r=e.samples.length,n=e.inputTimeScale,i=this._initPTS,a=this._initDTS;if(r){for(var s=0;s<r;s++)(t=e.samples[s]).pts=(t.pts-i)/n,t.dts=(t.dts-a)/n;this.observer.trigger(o.default.FRAG_PARSING_METADATA,{samples:e.samples})}e.samples=[]},e.prototype.remuxText=function(e){e.samples.sort((function(e,t){return e.pts-t.pts}));var t,r=e.samples.length,n=e.inputTimeScale,i=this._initPTS;if(r){for(var a=0;a<r;a++)(t=e.samples[a]).pts=(t.pts-i)/n;this.observer.trigger(o.default.FRAG_PARSING_USERDATA,{samples:e.samples})}e.samples=[]},e.prototype._PTSNormalize=function(e,t){var r;if(void 0===t)return e;for(r=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=r;return e},e}();t.default=l},"./src/remux/passthrough-remuxer.js": -/*!******************************************!*\ - !*** ./src/remux/passthrough-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(/*! ../events */"./src/events.js"),i=function(){function e(e){this.observer=e}return e.prototype.destroy=function(){},e.prototype.resetTimeStamp=function(){},e.prototype.resetInitSegment=function(){},e.prototype.remux=function(e,t,r,i,o,a,s,l){var u=this.observer,c="";e&&(c+="audio"),t&&(c+="video"),u.trigger(n.default.FRAG_PARSING_DATA,{data1:l,startPTS:o,startDTS:o,type:c,hasAudio:!!e,hasVideo:!!t,nb:1,dropped:0}),u.trigger(n.default.FRAG_PARSED)},e}();t.default=i},"./src/task-loop.js": -/*!**************************!*\ - !*** ./src/task-loop.js ***! - \**************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";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=function(e){function t(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=e.apply(this,[t].concat(r))||this;return i._tickInterval=null,i._tickTimer=null,i._tickCallCount=0,i._boundTick=i.tick.bind(i),i}return i(t,e),t.prototype.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},t.prototype.hasInterval=function(){return!!this._tickInterval},t.prototype.hasNextTick=function(){return!!this._tickTimer},t.prototype.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=setInterval(this._boundTick,e),!0)},t.prototype.clearInterval=function(){return!!this._tickInterval&&(clearInterval(this._tickInterval),this._tickInterval=null,!0)},t.prototype.clearNextTick=function(){return!!this._tickTimer&&(clearTimeout(this._tickTimer),this._tickTimer=null,!0)},t.prototype.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&(this.clearNextTick(),this._tickTimer=setTimeout(this._boundTick,0)),this._tickCallCount=0)},t.prototype.doTick=function(){},t}(r(/*! ./event-handler */"./src/event-handler.js").default);t.default=o},"./src/utils/attr-list.js": -/*!********************************!*\ - !*** ./src/utils/attr-list.js ***! - \********************************/ -/*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=/^(\d+)x(\d+)$/,n=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,i=function(){function t(e){for(var r in"string"==typeof e&&(e=t.parseAttrList(e)),e)e.hasOwnProperty(r)&&(this[r]=e[r])}return t.prototype.decimalInteger=function(t){var r=parseInt(this[t],10);return r>e.MAX_SAFE_INTEGER?1/0:r},t.prototype.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var r=new Uint8Array(t.length/2),n=0;n<t.length/2;n++)r[n]=parseInt(t.slice(2*n,2*n+2),16);return r}return null},t.prototype.hexadecimalIntegerAsNumber=function(t){var r=parseInt(this[t],16);return r>e.MAX_SAFE_INTEGER?1/0:r},t.prototype.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.prototype.enumeratedString=function(e){return this[e]},t.prototype.decimalResolution=function(e){var t=r.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},t.parseAttrList=function(e){var t,r={};for(n.lastIndex=0;null!==(t=n.exec(e));){var i=t[2];0===i.indexOf('"')&&i.lastIndexOf('"')===i.length-1&&(i=i.slice(1,-1)),r[t[1]]=i}return r},t}();t.default=i}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/utils/binary-search.js": -/*!************************************!*\ - !*** ./src/utils/binary-search.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}),t.default={search:function(e,t){for(var r=0,n=e.length-1,i=null,o=null;r<=n;){var a=t(o=e[i=(r+n)/2|0]);if(a>0)r=i+1;else{if(!(a<0))return o;n=i-1}}return null}}},"./src/utils/buffer-helper.js": -/*!************************************!*\ - !*** ./src/utils/buffer-helper.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=function(){function e(){}return e.isBuffered=function(e,t){try{if(e)for(var r=e.buffered,n=0;n<r.length;n++)if(t>=r.start(n)&&t<=r.end(n))return!0}catch(e){}return!1},e.bufferInfo=function(e,t,r){try{if(e){var n=e.buffered,i=[],o=void 0;for(o=0;o<n.length;o++)i.push({start:n.start(o),end:n.end(o)});return this.bufferedInfo(i,t,r)}}catch(e){}return{len:0,start:t,end:t,nextStart:void 0}},e.bufferedInfo=function(e,t,r){var n,i,o,a,s,l=[];for(e.sort((function(e,t){var r=e.start-t.start;return r||t.end-e.end})),s=0;s<e.length;s++){var u=l.length;if(u){var c=l[u-1].end;e[s].start-c<r?e[s].end>c&&(l[u-1].end=e[s].end):l.push(e[s])}else l.push(e[s])}for(s=0,n=0,i=o=t;s<l.length;s++){var d=l[s].start,f=l[s].end;if(t+r>=d&&t<f)i=d,n=(o=f)-t;else if(t+r<d){a=d;break}}return{len:n,start:i,end:o,nextStart:a}},e}();t.BufferHelper=n},"./src/utils/cea-608-parser.js": -/*!*************************************!*\ - !*** ./src/utils/cea-608-parser.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={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},i=function(e){var t=e;return n.hasOwnProperty(e)&&(t=n[e]),String.fromCharCode(t)},o={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},a={17:2,18:4,21:6,22:8,23:10,19:13,20:15},s={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},l={25:2,26:4,29:6,30:8,31:10,27:13,28:15},u=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],c={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){this.verboseFilter[e],this.verboseLevel}},d=function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].toString(16));return t},f=function(){function e(e,t,r,n,i){this.foreground=e||"white",this.underline=t||!1,this.italics=r||!1,this.background=n||"black",this.flash=i||!1}return e.prototype.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},e.prototype.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],r=0;r<t.length;r++){var n=t[r];e.hasOwnProperty(n)&&(this[n]=e[n])}},e.prototype.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},e.prototype.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},e.prototype.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},e.prototype.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),h=function(){function e(e,t,r,n,i,o){this.uchar=e||" ",this.penState=new f(t,r,n,i,o)}return e.prototype.reset=function(){this.uchar=" ",this.penState.reset()},e.prototype.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},e.prototype.setPenState=function(e){this.penState.copy(e)},e.prototype.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},e.prototype.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},e.prototype.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),p=function(){function e(){this.chars=[];for(var e=0;e<100;e++)this.chars.push(new h);this.pos=0,this.currPenState=new f}return e.prototype.equals=function(e){for(var t=!0,r=0;r<100;r++)if(!this.chars[r].equals(e.chars[r])){t=!1;break}return t},e.prototype.copy=function(e){for(var t=0;t<100;t++)this.chars[t].copy(e.chars[t])},e.prototype.isEmpty=function(){for(var e=!0,t=0;t<100;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},e.prototype.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(c.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>100&&(c.log("ERROR","Too large cursor position "+this.pos),this.pos=100)},e.prototype.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var r=this.pos+1;r<t+1;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(t)},e.prototype.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},e.prototype.insertChar=function(e){e>=144&&this.backSpace();var t=i(e);this.pos>=100?c.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},e.prototype.clearFromPos=function(e){var t;for(t=e;t<100;t++)this.chars[t].reset()},e.prototype.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},e.prototype.clearToEndOfRow=function(){this.clearFromPos(this.pos)},e.prototype.getTextString=function(){for(var e=[],t=!0,r=0;r<100;r++){var n=this.chars[r].uchar;" "!==n&&(t=!1),e.push(n)}return t?"":e.join("")},e.prototype.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),m=function(){function e(){this.rows=[];for(var e=0;e<15;e++)this.rows.push(new p);this.currRow=14,this.nrRollUpRows=null,this.reset()}return e.prototype.reset=function(){for(var e=0;e<15;e++)this.rows[e].clear();this.currRow=14},e.prototype.equals=function(e){for(var t=!0,r=0;r<15;r++)if(!this.rows[r].equals(e.rows[r])){t=!1;break}return t},e.prototype.copy=function(e){for(var t=0;t<15;t++)this.rows[t].copy(e.rows[t])},e.prototype.isEmpty=function(){for(var e=!0,t=0;t<15;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},e.prototype.backSpace=function(){this.rows[this.currRow].backSpace()},e.prototype.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},e.prototype.insertChar=function(e){this.rows[this.currRow].insertChar(e)},e.prototype.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},e.prototype.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},e.prototype.setCursor=function(e){c.log("INFO","setCursor: "+e),this.rows[this.currRow].setCursor(e)},e.prototype.setPAC=function(e){c.log("INFO","pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var r=0;r<15;r++)this.rows[r].clear();var n=this.currRow+1-this.nrRollUpRows,i=this.lastOutputScreen;if(i){var o=i.rows[n].cueStartTime;if(o&&o<c.time)for(r=0;r<this.nrRollUpRows;r++)this.rows[t-this.nrRollUpRows+r+1].copy(i.rows[n+r])}}this.currRow=t;var a=this.rows[this.currRow];if(null!==e.indent){var s=e.indent,l=Math.max(s-1,0);a.setCursor(e.indent),e.color=a.chars[l].penState.foreground}var u={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(u)},e.prototype.setBkgData=function(e){c.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},e.prototype.setRollUpRows=function(e){this.nrRollUpRows=e},e.prototype.rollUp=function(){if(null!==this.nrRollUpRows){c.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),c.log("INFO","Rolling up")}else c.log("DEBUG","roll_up but nrRollUpRows not set yet")},e.prototype.getDisplayText=function(e){e=e||!1;for(var t=[],r="",n=-1,i=0;i<15;i++){var o=this.rows[i].getTextString();o&&(n=i+1,e?t.push("Row "+n+": '"+o+"'"):t.push(o.trim()))}return t.length>0&&(r=e?"["+t.join(" | ")+"]":t.join("\n")),r},e.prototype.getTextAndFormat=function(){return this.rows},e}(),g=function(){function e(e,t){this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new m,this.nonDisplayedMemory=new m,this.lastOutputScreen=new m,this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return e.prototype.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},e.prototype.getHandler=function(){return this.outputFilter},e.prototype.setHandler=function(e){this.outputFilter=e},e.prototype.setPAC=function(e){this.writeScreen.setPAC(e)},e.prototype.setBkgData=function(e){this.writeScreen.setBkgData(e)},e.prototype.setMode=function(e){e!==this.mode&&(this.mode=e,c.log("INFO","MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},e.prototype.insertChars=function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var r=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";c.log("INFO",r+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(c.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},e.prototype.ccRCL=function(){c.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},e.prototype.ccBS=function(){c.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},e.prototype.ccAOF=function(){},e.prototype.ccAON=function(){},e.prototype.ccDER=function(){c.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},e.prototype.ccRU=function(e){c.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},e.prototype.ccFON=function(){c.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},e.prototype.ccRDC=function(){c.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},e.prototype.ccTR=function(){c.log("INFO","TR"),this.setMode("MODE_TEXT")},e.prototype.ccRTD=function(){c.log("INFO","RTD"),this.setMode("MODE_TEXT")},e.prototype.ccEDM=function(){c.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},e.prototype.ccCR=function(){c.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},e.prototype.ccENM=function(){c.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},e.prototype.ccEOC=function(){if(c.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,c.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},e.prototype.ccTO=function(e){c.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},e.prototype.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var r=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][r]}c.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},e.prototype.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=c.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),!0===e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue()),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},e.prototype.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),y=function(){function e(e,t,r){this.field=e||1,this.outputs=[t,r],this.channels=[new g(1,t),new g(2,r)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}return e.prototype.getHandler=function(e){return this.channels[e].getHandler()},e.prototype.setHandler=function(e,t){this.channels[e].setHandler(t)},e.prototype.addData=function(e,t){var r,n,i,o=!1;this.lastTime=e,c.setTime(e);for(var a=0;a<t.length;a+=2)n=127&t[a],i=127&t[a+1],0!==n||0!==i?(c.log("DATA","["+d([t[a],t[a+1]])+"] -> ("+d([n,i])+")"),(r=this.parseCmd(n,i))||(r=this.parseMidrow(n,i)),r||(r=this.parsePAC(n,i)),r||(r=this.parseBackgroundAttributes(n,i)),r||(o=this.parseChars(n,i))&&(this.currChNr&&this.currChNr>=0?this.channels[this.currChNr-1].insertChars(o):c.log("WARNING","No channel found yet. TEXT-MODE?")),r?this.dataCounters.cmd+=2:o?this.dataCounters.char+=2:(this.dataCounters.other+=2,c.log("WARNING","Couldn't parse cleaned data "+d([n,i])+" orig: "+d([t[a],t[a+1]])))):this.dataCounters.padding+=2},e.prototype.parseCmd=function(e,t){var r=null;if(!((20===e||28===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,c.log("DEBUG","Repeated command ("+d([e,t])+") is dropped"),!0;r=20===e||23===e?1:2;var n=this.channels[r-1];return 20===e||28===e?32===t?n.ccRCL():33===t?n.ccBS():34===t?n.ccAOF():35===t?n.ccAON():36===t?n.ccDER():37===t?n.ccRU(2):38===t?n.ccRU(3):39===t?n.ccRU(4):40===t?n.ccFON():41===t?n.ccRDC():42===t?n.ccTR():43===t?n.ccRTD():44===t?n.ccEDM():45===t?n.ccCR():46===t?n.ccENM():47===t&&n.ccEOC():n.ccTO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=r,!0},e.prototype.parseMidrow=function(e,t){var r=null;return(17===e||25===e)&&t>=32&&t<=47&&((r=17===e?1:2)!==this.currChNr?(c.log("ERROR","Mismatch channel in midrow parsing"),!1):(this.channels[r-1].ccMIDROW(t),c.log("DEBUG","MIDROW ("+d([e,t])+")"),!0))},e.prototype.parsePAC=function(e,t){var r,n=null;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;r=e<=23?1:2,n=t>=64&&t<=95?1===r?o[e]:s[e]:1===r?a[e]:l[e];var i=this.interpretPAC(n,t);return this.channels[r-1].setPAC(i),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=r,!0},e.prototype.interpretPAC=function(e,t){var r=t,n={color:null,italics:!1,indent:null,underline:!1,row:e};return r=t>95?t-96:t-64,n.underline=1==(1&r),r<=13?n.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(n.italics=!0,n.color="white"):n.indent=4*Math.floor((r-16)/2),n},e.prototype.parseChars=function(e,t){var r=null,n=null,o=null;if(e>=25?(r=2,o=e-8):(r=1,o=e),o>=17&&o<=19){var a=t;a=17===o?t+80:18===o?t+112:t+144,c.log("INFO","Special char '"+i(a)+"' in channel "+r),n=[a]}else e>=32&&e<=127&&(n=0===t?[e]:[e,t]);if(n){var s=d(n);c.log("DEBUG","Char codes = "+s.join(",")),this.lastCmdA=null,this.lastCmdB=null}return n},e.prototype.parseBackgroundAttributes=function(e,t){var r,n,i;return((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47)&&(r={},16===e||24===e?(n=Math.floor((t-32)/2),r.background=u[n],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0)),i=e<24?1:2,this.channels[i-1].setBkgData(r),this.lastCmdA=null,this.lastCmdB=null,!0)},e.prototype.reset=function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null},e.prototype.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)},e}();t.default=y},"./src/utils/codecs.js": -/*!*****************************!*\ - !*** ./src/utils/codecs.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={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};t.isCodecType=function(e,t){var r=n[t];return!!r&&!0===r[e.slice(0,4)]},t.isCodecSupportedInMp4=function(e,t){return window.MediaSource.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"')}},"./src/utils/cues.js": -/*!***************************!*\ - !*** ./src/utils/cues.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(/*! ./vttparser */"./src/utils/vttparser.js");t.newCue=function(e,t,r,i){for(var o,a,s,l,u,c=window.VTTCue||window.TextTrackCue,d=0;d<i.rows.length;d++)if(s=!0,l=0,u="",!(o=i.rows[d]).isEmpty()){for(var f=0;f<o.chars.length;f++)o.chars[f].uchar.match(/\s/)&&s?l++:(u+=o.chars[f].uchar,s=!1);o.cueStartTime=t,t===r&&(r+=1e-4),a=new c(t,r,n.fixLineBreaks(u.trim())),l>=16?l--:l++,navigator.userAgent.match(/Firefox\//)?a.line=d+1:a.line=d>7?d-2:d+1,a.align="left",a.position=Math.max(0,Math.min(100,l/32*100+(navigator.userAgent.match(/Firefox\//)?50:0))),e.addCue(a)}}},"./src/utils/discontinuities.js": -/*!**************************************!*\ - !*** ./src/utils/discontinuities.js ***! - \**************************************/ -/*! no static exports found */ -/*! 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(/*! ./binary-search */"./src/utils/binary-search.js"),i=r(/*! ../utils/logger */"./src/utils/logger.js");function o(e,t){for(var r=null,n=0;n<e.length;n+=1){var i=e[n];if(i&&i.cc===t){r=i;break}}return r}function a(e,t,r){var n=!1;return t&&t.details&&r&&(r.endCC>r.startCC||e&&e.cc<r.startCC)&&(n=!0),n}function s(e,t){var r=e.fragments,n=t.fragments;if(n.length&&r.length){var a=o(r,n[0].cc);if(a&&(!a||a.startPTS))return a;i.logger.log("No frag in previous level to align on")}else i.logger.log("No fragments to align")}function l(e,t){t.fragments.forEach((function(t){if(t){var r=t.start+e;t.start=t.startPTS=r,t.endPTS=r+t.duration}})),t.PTSKnown=!0}function u(e,t,r){if(a(e,r,t)){var n=s(r.details,t);n&&(i.logger.log("Adjusting PTS using last level due to CC increase within current level"),l(n.start,t))}}function c(t,r){if(r&&r.fragments.length){if(!t.hasProgramDateTime||!r.hasProgramDateTime)return;var n=r.fragments[0].programDateTime,o=(t.fragments[0].programDateTime-n)/1e3+r.fragments[0].start;e.isFinite(o)&&(i.logger.log("adjusting PTS using programDateTime delta, sliding:"+o.toFixed(3)),l(o,t))}}t.findFirstFragWithCC=o,t.findFragWithCC=function(e,t){return n.default.search(e,(function(e){return e.cc<t?1:e.cc>t?-1:0}))},t.shouldAlignOnDiscontinuities=a,t.findDiscontinuousReferenceFrag=s,t.adjustPts=l,t.alignStream=function(e,t,r){u(e,r,t),!r.PTSKnown&&t&&c(r,t.details)},t.alignDiscontinuities=u,t.alignPDT=c}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/utils/ewma-bandwidth-estimator.js": -/*!***********************************************!*\ - !*** ./src/utils/ewma-bandwidth-estimator.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(/*! ../utils/ewma */"./src/utils/ewma.js"),i=function(){function e(e,t,r,i){this.hls=e,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new n.default(t),this.fast_=new n.default(r)}return e.prototype.sample=function(e,t){var r=8e3*t/(e=Math.max(e,this.minDelayMs_)),n=e/1e3;this.fast_.sample(n,r),this.slow_.sample(n,r)},e.prototype.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},e.prototype.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},e.prototype.destroy=function(){},e}();t.default=i},"./src/utils/ewma.js": -/*!***************************!*\ - !*** ./src/utils/ewma.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=function(){function e(e){this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}return e.prototype.sample=function(e,t){var r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*this.estimate_,this.totalWeight_+=e},e.prototype.getTotalWeight=function(){return this.totalWeight_},e.prototype.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/e}return this.estimate_},e}();t.default=n},"./src/utils/get-self-scope.js": -/*!*************************************!*\ - !*** ./src/utils/get-self-scope.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}),t.getSelfScope=function(){return"undefined"==typeof window?self:window}},"./src/utils/logger.js": -/*!*****************************!*\ - !*** ./src/utils/logger.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(/*! ./get-self-scope */"./src/utils/get-self-scope.js");function i(){}var o={trace:i,debug:i,log:i,warn:i,info:i,error:i},a=o;function s(e,t){return t="["+e+"] > "+t}var l=n.getSelfScope();function u(e){var t=l.console[e];return t?function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];r[0]&&(r[0]=s(e,r[0])),t.apply(l.console,r)}:i}t.enableLogs=function(e){if(!0===e||"object"==typeof e){!function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];t.forEach((function(t){a[t]=e[t]?e[t].bind(e):u(t)}))}(e,"debug","log","info","warn","error");try{a.log()}catch(e){a=o}}else a=o},t.logger=a},"./src/utils/mediakeys-helper.js": -/*!***************************************!*\ - !*** ./src/utils/mediakeys-helper.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="undefined"!=typeof window&&window.navigator&&window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess.bind(window.navigator):null;t.requestMediaKeySystemAccess=n},"./src/utils/mediasource-helper.js": -/*!*****************************************!*\ - !*** ./src/utils/mediasource-helper.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}),t.getMediaSource=function(){if("undefined"!=typeof window)return window.MediaSource||window.WebKitMediaSource}},"./src/utils/output-filter.js": -/*!************************************!*\ - !*** ./src/utils/output-filter.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=function(){function e(e,t){this.timelineController=e,this.trackName=t,this.startTime=null,this.endTime=null,this.screen=null}return e.prototype.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen),this.startTime=null)},e.prototype.newCue=function(e,t,r){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)},e}();t.default=n},"./src/utils/texttrack-utils.js": -/*!**************************************!*\ - !*** ./src/utils/texttrack-utils.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}),t.sendAddTrackEvent=function(e,t){var r=null;try{r=new window.Event("addtrack")}catch(e){(r=document.createEvent("Event")).initEvent("addtrack",!1,!1)}r.track=e,t.dispatchEvent(r)},t.clearCurrentCues=function(e){if(e&&e.cues)for(;e.cues.length>0;)e.removeCue(e.cues[0])}},"./src/utils/time-ranges.js": -/*!**********************************!*\ - !*** ./src/utils/time-ranges.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}),t.default={toString:function(e){for(var t="",r=e.length,n=0;n<r;n++)t+="["+e.start(n).toFixed(3)+","+e.end(n).toFixed(3)+"]";return t}}},"./src/utils/vttcue.js": -/*!*****************************!*\ - !*** ./src/utils/vttcue.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}),t.default=function(){if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var e={"":!0,lr:!0,rl:!0},t={start:!0,middle:!0,end:!0,left:!0,right:!0};function r(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}function n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}function i(t,i,o){var a=this,s=function(){if("undefined"!=typeof navigator)return/MSIE\s8\.0/.test(navigator.userAgent)}(),l={};s?a=document.createElement("custom"):l.enumerable=!0,a.hasBeenReset=!1;var u="",c=!1,d=t,f=i,h=o,p=null,m="",g=!0,y="auto",v="start",b=50,_="middle",A=50,E="middle";if(Object.defineProperty(a,"id",n({},l,{get:function(){return u},set:function(e){u=""+e}})),Object.defineProperty(a,"pauseOnExit",n({},l,{get:function(){return c},set:function(e){c=!!e}})),Object.defineProperty(a,"startTime",n({},l,{get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"endTime",n({},l,{get:function(){return f},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");f=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"text",n({},l,{get:function(){return h},set:function(e){h=""+e,this.hasBeenReset=!0}})),Object.defineProperty(a,"region",n({},l,{get:function(){return p},set:function(e){p=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"vertical",n({},l,{get:function(){return m},set:function(t){var r=function(t){return"string"==typeof t&&!!e[t.toLowerCase()]&&t.toLowerCase()}(t);if(!1===r)throw new SyntaxError("An invalid or illegal string was specified.");m=r,this.hasBeenReset=!0}})),Object.defineProperty(a,"snapToLines",n({},l,{get:function(){return g},set:function(e){g=!!e,this.hasBeenReset=!0}})),Object.defineProperty(a,"line",n({},l,{get:function(){return y},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"lineAlign",n({},l,{get:function(){return v},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");v=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"position",n({},l,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",n({},l,{get:function(){return _},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");_=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",n({},l,{get:function(){return A},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");A=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",n({},l,{get:function(){return E},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");E=t,this.hasBeenReset=!0}})),a.displayState=void 0,s)return a}return i.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},i}()},"./src/utils/vttparser.js": -/*!********************************!*\ - !*** ./src/utils/vttparser.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(/*! ./vttcue */"./src/utils/vttcue.js"),i=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}};function o(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new i,this.regionList=[]}function a(){this.values=Object.create(null)}function s(e,t,r,n){var i=n?e.split(n):[e];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(r);2===a.length&&t(a[0],a[1])}}a.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,r){return r?this.has(e)?this.values[e]:t[r]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,r){for(var n=0;n<r.length;++n)if(t===r[n]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var l=new n.default(0,0,0),u="middle"===l.align?"middle":"center";function c(e,t,r){var n=e;function i(){var t=function(e){function t(e,t,r,n){return 3600*(0|e)+60*(0|t)+(0|r)+(0|n)/1e3}var r=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return r?r[3]?t(r[1],r[2],r[3].replace(":",""),r[4]):r[1]>59?t(r[1],r[2],0,r[4]):t(0,r[1],r[2],r[4]):null}(e);if(null===t)throw new Error("Malformed timestamp: "+n);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function o(){e=e.replace(/^\s+/,"")}if(o(),t.startTime=i(),o(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+n);e=e.substr(3),o(),t.endTime=i(),o(),function(e,t){var n=new a;s(e,(function(e,t){switch(e){case"region":for(var i=r.length-1;i>=0;i--)if(r[i].id===t){n.set(e,r[i].region);break}break;case"vertical":n.alt(e,t,["rl","lr"]);break;case"line":var o=t.split(","),a=o[0];n.integer(e,a),n.percent(e,a)&&n.set("snapToLines",!1),n.alt(e,a,["auto"]),2===o.length&&n.alt("lineAlign",o[1],["start",u,"end"]);break;case"position":o=t.split(","),n.percent(e,o[0]),2===o.length&&n.alt("positionAlign",o[1],["start",u,"end","line-left","line-right","auto"]);break;case"size":n.percent(e,t);break;case"align":n.alt(e,t,["start",u,"end","left","right"])}}),/:/,/\s/),t.region=n.get("region",null),t.vertical=n.get("vertical","");var i=n.get("line","auto");"auto"===i&&-1===l.line&&(i=-1),t.line=i,t.lineAlign=n.get("lineAlign","start"),t.snapToLines=n.get("snapToLines",!0),t.size=n.get("size",100),t.align=n.get("align",u);var o=n.get("position","auto");"auto"===o&&50===l.position&&(o="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=o}(e,t)}function d(e){return e.replace(/<br(?: \/)?>/gi,"\n")}t.fixLineBreaks=d,o.prototype={parse:function(e){var t=this;function r(){var e=t.buffer,r=0;for(e=d(e);r<e.length&&"\r"!==e[r]&&"\n"!==e[r];)++r;var n=e.substr(0,r);return"\r"===e[r]&&++r,"\n"===e[r]&&++r,t.buffer=e.substr(r),n}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i=void 0;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var o=(i=r()).match(/^()?WEBVTT([ \t].*)?$/);if(!o||!o[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var a=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:i=r(),t.state){case"HEADER":/:/.test(i)?s(i,(function(e,t){}),/:/):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new n.default(0,0,""),t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":try{c(i,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var l=-1!==i.indexOf("--\x3e");if(!i||l&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i;continue;case"BADCUE":i||(t.state="ID");continue}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new Error("Malformed WebVTT signature.")}catch(e){throw e}return this.onflush&&this.onflush(),this}},t.default=o},"./src/utils/webvtt-parser.js": -/*!************************************!*\ - !*** ./src/utils/webvtt-parser.js ***! - \************************************/ -/*! no static exports found */ -/*! 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(/*! ./vttparser */"./src/utils/vttparser.js"),i=r(/*! ../demux/id3 */"./src/demux/id3.js"),o=function(e,t,r){return e.substr(r||0,t.length)===t},a=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return(t>>>0).toString()},s={parse:function(t,r,s,l,u,c){var d,f=i.utf8ArrayToStr(new Uint8Array(t)).trim().replace(/\r\n|\n\r|\n|\r/g,"\n").split("\n"),h="00:00.000",p=0,m=0,g=0,y=[],v=!0,b=new n.default;b.oncue=function(e){var t=s[l],r=s.ccOffset;t&&t.new&&(void 0!==m?r=s.ccOffset=t.start:function(e,t,r){var n=e[t],i=e[n.prevCC];if(!i||!i.new&&n.new)return e.ccOffset=e.presentationOffset=n.start,void(n.new=!1);for(;i&&i.new;)e.ccOffset+=n.start-i.start,n.new=!1,i=e[(n=i).prevCC];e.presentationOffset=r}(s,l,g)),g&&(r=g-s.presentationOffset),e.startTime+=r-m,e.endTime+=r-m,e.id=a(e.startTime.toString())+a(e.endTime.toString())+a(e.text),e.text=decodeURIComponent(encodeURIComponent(e.text)),e.endTime>0&&y.push(e)},b.onparsingerror=function(e){d=e},b.onflush=function(){d&&c?c(d):u(y)},f.forEach((function(t){if(v){if(o(t,"X-TIMESTAMP-MAP=")){v=!1,t.substr(16).split(",").forEach((function(e){o(e,"LOCAL:")?h=e.substr(6):o(e,"MPEGTS:")&&(p=parseInt(e.substr(7)))}));try{r+(9e4*s[l].start||0)<0&&(r+=8589934592),p-=r,n=h,i=parseInt(n.substr(-3)),a=parseInt(n.substr(-6,2)),u=parseInt(n.substr(-9,2)),c=n.length>9?parseInt(n.substr(0,n.indexOf(":"))):0,m=(e.isFinite(i)&&e.isFinite(a)&&e.isFinite(u)&&e.isFinite(c)?(i+=1e3*a,i+=6e4*u,i+=36e5*c):-1)/1e3,g=p/9e4,-1===m&&(d=new Error("Malformed X-TIMESTAMP-MAP: "+t))}catch(e){d=new Error("Malformed X-TIMESTAMP-MAP: "+t)}return}""===t&&(v=!1)}var n,i,a,u,c;b.parse(t+"\n")})),b.flush()}};t.default=s}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/utils/xhr-loader.js": -/*!*********************************!*\ - !*** ./src/utils/xhr-loader.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(/*! ../utils/logger */"./src/utils/logger.js"),i=window.performance,o=window.XMLHttpRequest,a=function(){function e(e){e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}return e.prototype.destroy=function(){this.abort(),this.loader=null},e.prototype.abort=function(){var e=this.loader;e&&4!==e.readyState&&(this.stats.aborted=!0,e.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},e.prototype.load=function(e,t,r){this.context=e,this.config=t,this.callbacks=r,this.stats={trequest:i.now(),retry:0},this.retryDelay=t.retryDelay,this.loadInternal()},e.prototype.loadInternal=function(){var e,t=this.context;e=this.loader=new o;var r=this.stats;r.tfirst=0,r.loaded=0;var n=this.xhrSetup;try{if(n)try{n(e,t.url)}catch(r){e.open("GET",t.url,!0),n(e,t.url)}e.readyState||e.open("GET",t.url,!0)}catch(r){return void this.callbacks.onError({code:e.status,text:r.message},t,e)}t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),e.send()},e.prototype.readystatechange=function(e){var t=e.currentTarget,r=t.readyState,o=this.stats,a=this.context,s=this.config;if(!o.aborted&&r>=2)if(window.clearTimeout(this.requestTimeout),0===o.tfirst&&(o.tfirst=Math.max(i.now(),o.trequest)),4===r){var l=t.status;if(l>=200&&l<300){o.tload=Math.max(o.tfirst,i.now());var u=void 0,c=void 0;c="arraybuffer"===a.responseType?(u=t.response).byteLength:(u=t.responseText).length,o.loaded=o.total=c;var d={url:t.responseURL,data:u};this.callbacks.onSuccess(d,o,a,t)}else o.retry>=s.maxRetry||l>=400&&l<499?(n.logger.error(l+" while loading "+a.url),this.callbacks.onError({code:l,text:t.statusText},a,t)):(n.logger.warn(l+" while loading "+a.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),o.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),s.timeout)},e.prototype.loadtimeout=function(){n.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},e.prototype.loadprogress=function(e){var t=e.currentTarget,r=this.stats;r.loaded=e.loaded,e.lengthComputable&&(r.total=e.total);var n=this.callbacks.onProgress;n&&n(r,this.context,null,t)},e}();t.default=a}}).default},e.exports=n())},"./node_modules/node-libs-browser/node_modules/process/browser.js": -/*!************************************************************************!*\ - !*** ./node_modules/node-libs-browser/node_modules/process/browser.js ***! - \************************************************************************/ -/*! no static exports found */function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l,u=[],c=!1,d=-1;function f(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&h())}function h(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new p(e,t)),1!==u.length||c||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},"./node_modules/style-loader/lib/addStyles.js": -/*!****************************************************!*\ - !*** ./node_modules/style-loader/lib/addStyles.js ***! - \****************************************************/ -/*! no static exports found */function(e,t,r){var n,i,o={},a=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=n.apply(this,arguments)),i}),s=function(e){return document.querySelector(e)},l=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var r=s.call(this,e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}(),u=null,c=0,d=[],f=r(/*! ./urls */"./node_modules/style-loader/lib/urls.js");function h(e,t){for(var r=0;r<e.length;r++){var n=e[r],i=o[n.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](n.parts[a]);for(;a<n.parts.length;a++)i.parts.push(b(n.parts[a],t))}else{var s=[];for(a=0;a<n.parts.length;a++)s.push(b(n.parts[a],t));o[n.id]={id:n.id,refs:1,parts:s}}}}function p(e,t){for(var r=[],n={},i=0;i<e.length;i++){var o=e[i],a=t.base?o[0]+t.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};n[a]?n[a].parts.push(s):r.push(n[a]={id:a,parts:[s]})}return r}function m(e,t){var r=l(e.insertInto);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=d[d.length-1];if("top"===e.insertAt)n?n.nextSibling?r.insertBefore(t,n.nextSibling):r.appendChild(t):r.insertBefore(t,r.firstChild),d.push(t);else if("bottom"===e.insertAt)r.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=l(e.insertInto+" "+e.insertAt.before);r.insertBefore(t,i)}}function g(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=d.indexOf(e);t>=0&&d.splice(t,1)}function y(e){var t=document.createElement("style");return e.attrs.type="text/css",v(t,e.attrs),m(e,t),t}function v(e,t){Object.keys(t).forEach((function(r){e.setAttribute(r,t[r])}))}function b(e,t){var r,n,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var a=c++;r=u||(u=y(t)),n=E.bind(null,r,a,!1),i=E.bind(null,r,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",v(t,e.attrs),m(e,t),t}(t),n=S.bind(null,r,t),i=function(){g(r),r.href&&URL.revokeObjectURL(r.href)}):(r=y(t),n=T.bind(null,r),i=function(){g(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var r=p(e,t);return h(r,t),function(e){for(var n=[],i=0;i<r.length;i++){var a=r[i];(s=o[a.id]).refs--,n.push(s)}for(e&&h(p(e,t),t),i=0;i<n.length;i++){var s;if(0===(s=n[i]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete o[s.id]}}}};var _,A=(_=[],function(e,t){return _[e]=t,_.filter(Boolean).join("\n")});function E(e,t,r,n){var i=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=A(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function T(e,t){var r=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}function S(e,t,r){var n=r.css,i=r.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(n=f(n)),i&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([n],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}},"./node_modules/style-loader/lib/urls.js": -/*!***********************************************!*\ - !*** ./node_modules/style-loader/lib/urls.js ***! - \***********************************************/ -/*! no static exports found */function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var r=t.protocol+"//"+t.host,n=r+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var i,o=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?r+o:n+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},"./src/base/base_object.js": -/*!*********************************!*\ - !*** ./src/base/base_object.js ***! - \*********************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=l(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=l(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=l(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=l(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=r(/*! ./utils */"./src/base/utils.js");function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.default)(this,t);var o=(0,i.default)(this,e.call(this,r));return o._options=r,o.uniqueId=(0,s.uniqueId)("o"),o}return(0,a.default)(t,e),(0,o.default)(t,[{key:"options",get:function(){return this._options}}]),t}(l(r(/*! ./events */"./src/base/events.js")).default);t.default=u,e.exports=t.default},"./src/base/container_plugin.js": -/*!**************************************!*\ - !*** ./src/base/container_plugin.js ***! - \**************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=d(r(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=d(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=d(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=d(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=d(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=d(r(/*! ./base_object */"./src/base/base_object.js")),u=r(/*! ./utils */"./src/base/utils.js"),c=d(r(/*! ./error_mixin */"./src/base/error_mixin.js"));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(r){(0,i.default)(this,t);var n=(0,o.default)(this,e.call(this,r.options));return n.container=r,n.enabled=!0,n.bindEvents(),n}return(0,s.default)(t,e),(0,a.default)(t,[{key:"playerError",get:function(){return this.container.playerError}}]),t.prototype.enable=function(){this.enabled||(this.bindEvents(),this.enabled=!0)},t.prototype.disable=function(){this.enabled&&(this.stopListening(),this.enabled=!1)},t.prototype.bindEvents=function(){},t.prototype.destroy=function(){this.stopListening()},t}(l.default);t.default=f,(0,n.default)(f.prototype,c.default),f.extend=function(e){return(0,u.extend)(f,e)},f.type="container",e.exports=t.default},"./src/base/core_plugin.js": -/*!*********************************!*\ - !*** ./src/base/core_plugin.js ***! - \*********************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=d(r(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=d(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=d(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=d(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=d(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=r(/*! ./utils */"./src/base/utils.js"),u=d(r(/*! ./base_object */"./src/base/base_object.js")),c=d(r(/*! ./error_mixin */"./src/base/error_mixin.js"));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(r){(0,i.default)(this,t);var n=(0,o.default)(this,e.call(this,r.options));return n.core=r,n.enabled=!0,n.bindEvents(),n}return(0,s.default)(t,e),(0,a.default)(t,[{key:"playerError",get:function(){return this.core.playerError}}]),t.prototype.bindEvents=function(){},t.prototype.enable=function(){this.enabled||(this.bindEvents(),this.enabled=!0)},t.prototype.disable=function(){this.enabled&&(this.stopListening(),this.enabled=!1)},t.prototype.getExternalInterface=function(){return{}},t.prototype.destroy=function(){this.stopListening()},t}(u.default);t.default=f,(0,n.default)(f.prototype,c.default),f.extend=function(e){return(0,l.extend)(f,e)},f.type="core",e.exports=t.default},"./src/base/error_mixin.js": -/*!*********************************!*\ - !*** ./src/base/error_mixin.js ***! - \*********************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(r(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=a(r(/*! ../plugins/log */"./src/plugins/log/index.js")),o=a(r(/*! ../components/error */"./src/components/error/index.js"));function a(e){return e&&e.__esModule?e:{default:e}}var s={createError:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{useCodePrefix:!0},r=this.constructor&&this.constructor.type||"",a=this.name||r,s=this.i18n||this.core&&this.core.i18n||this.container&&this.container.i18n,l=a+":"+(e&&e.code||"unknown"),u={description:"",level:o.default.Levels.FATAL,origin:a,scope:r,raw:{}},c=(0,n.default)({},u,e,{code:t.useCodePrefix?l:e.code});if(s&&c.level==o.default.Levels.FATAL&&!c.UI){var d={title:s.t("default_error_title"),message:s.t("default_error_message")};c.UI=d}return this.playerError?this.playerError.createError(c):i.default.warn(a,"PlayerError is not defined. Error: ",c),c}};t.default=s,e.exports=t.default},"./src/base/events.js": -/*!****************************!*\ - !*** ./src/base/events.js ***! - \****************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=l(r(/*! babel-runtime/core-js/object/keys */"./node_modules/babel-runtime/core-js/object/keys.js")),i=l(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=l(r(/*! babel-runtime/helpers/typeof */"./node_modules/babel-runtime/helpers/typeof.js")),a=l(r(/*! ../plugins/log */"./src/plugins/log/index.js")),s=r(/*! ./utils */"./src/base/utils.js");function l(e){return e&&e.__esModule?e:{default:e}}var u=Array.prototype.slice,c=/\s+/,d=function(e,t,r,n){if(!r)return!0;if("object"===(void 0===r?"undefined":(0,o.default)(r))){for(var i in r)e[t].apply(e,[i,r[i]].concat(n));return!1}if(c.test(r)){for(var a=r.split(c),s=0,l=a.length;s<l;s++)e[t].apply(e,[a[s]].concat(n));return!1}return!0},f=function(e,t,r,n){var i=void 0,o=-1,s=e.length,l=t[0],u=t[1],c=t[2];!function d(){try{switch(t.length){case 0:for(;++o<s;)(i=e[o]).callback.call(i.ctx);return;case 1:for(;++o<s;)(i=e[o]).callback.call(i.ctx,l);return;case 2:for(;++o<s;)(i=e[o]).callback.call(i.ctx,l,u);return;case 3:for(;++o<s;)(i=e[o]).callback.call(i.ctx,l,u,c);return;default:for(;++o<s;)(i=e[o]).callback.apply(i.ctx,t);return}}catch(e){a.default.error.apply(a.default,[r,"error on event",n,"trigger","-",e]),d()}}()},h=function(){function e(){(0,i.default)(this,e)}return e.prototype.on=function(e,t,r){return d(this,"on",e,[t,r])&&t?(this._events||(this._events={}),(this._events[e]||(this._events[e]=[])).push({callback:t,context:r,ctx:r||this}),this):this},e.prototype.once=function(e,t,r){var n=this,i=void 0;if(!d(this,"once",e,[t,r])||!t)return this;var o=function(){return n.off(e,i)};return i=function(){o(),t.apply(this,arguments)},this.on(e,i,r)},e.prototype.off=function(e,t,r){var i,o,a=void 0,s=void 0,l=void 0,u=void 0,c=void 0,f=void 0;if(!this._events||!d(this,"off",e,[t,r]))return this;if(!e&&!t&&!r)return this._events=void 0,this;for(u=0,o=(i=e?[e]:(0,n.default)(this._events)).length;u<o;u++)if(e=i[u],l=this._events[e]){if(this._events[e]=a=[],t||r)for(c=0,f=l.length;c<f;c++)s=l[c],(t&&t!==s.callback&&t!==s.callback._callback||r&&r!==s.context)&&a.push(s);a.length||delete this._events[e]}return this},e.prototype.trigger=function(e){var t=this.name||this.constructor.name;if(a.default.debug.apply(a.default,[t].concat(Array.prototype.slice.call(arguments))),!this._events)return this;var r=u.call(arguments,1);if(!d(this,"trigger",e,r))return this;var n=this._events[e],i=this._events.all;return n&&f(n,r,t,e),i&&f(i,arguments,t,e),this},e.prototype.stopListening=function(e,t,r){var i=this._listeningTo;if(!i)return this;var a=!t&&!r;for(var s in r||"object"!==(void 0===t?"undefined":(0,o.default)(t))||(r=this),e&&((i={})[e._listenId]=e),i)(e=i[s]).off(t,r,this),(a||0===(0,n.default)(e._events).length)&&delete this._listeningTo[s];return this},e.register=function(t){e.Custom||(e.Custom={});var r="string"==typeof t&&t.toUpperCase().trim();r&&!e.Custom[r]?e.Custom[r]=r.toLowerCase().split("_").map((function(e,t){return 0===t?e:e=e[0].toUpperCase()+e.slice(1)})).join(""):a.default.error("Events","Error when register event: "+t)},e.listAvailableCustomEvents=function(){return e.Custom||(e.Custom={}),(0,n.default)(e.Custom).filter((function(t){return"string"==typeof e.Custom[t]}))},e}();t.default=h;var p={listenTo:"on",listenToOnce:"once"};(0,n.default)(p).forEach((function(e){h.prototype[e]=function(t,r,n){return(this._listeningTo||(this._listeningTo={}))[t._listenId||(t._listenId=(0,s.uniqueId)("l"))]=t,n||"object"!==(void 0===r?"undefined":(0,o.default)(r))||(n=this),t[p[e]](r,n,this),this}})),h.PLAYER_READY="ready",h.PLAYER_RESIZE="resize",h.PLAYER_FULLSCREEN="fullscreen",h.PLAYER_PLAY="play",h.PLAYER_PAUSE="pause",h.PLAYER_STOP="stop",h.PLAYER_ENDED="ended",h.PLAYER_SEEK="seek",h.PLAYER_ERROR="playererror",h.ERROR="error",h.PLAYER_TIMEUPDATE="timeupdate",h.PLAYER_VOLUMEUPDATE="volumeupdate",h.PLAYER_SUBTITLE_AVAILABLE="subtitleavailable",h.PLAYBACK_PROGRESS="playback:progress",h.PLAYBACK_TIMEUPDATE="playback:timeupdate",h.PLAYBACK_READY="playback:ready",h.PLAYBACK_BUFFERING="playback:buffering",h.PLAYBACK_BUFFERFULL="playback:bufferfull",h.PLAYBACK_SETTINGSUPDATE="playback:settingsupdate",h.PLAYBACK_LOADEDMETADATA="playback:loadedmetadata",h.PLAYBACK_HIGHDEFINITIONUPDATE="playback:highdefinitionupdate",h.PLAYBACK_BITRATE="playback:bitrate",h.PLAYBACK_LEVELS_AVAILABLE="playback:levels:available",h.PLAYBACK_LEVEL_SWITCH_START="playback:levels:switch:start",h.PLAYBACK_LEVEL_SWITCH_END="playback:levels:switch:end",h.PLAYBACK_PLAYBACKSTATE="playback:playbackstate",h.PLAYBACK_DVR="playback:dvr",h.PLAYBACK_MEDIACONTROL_DISABLE="playback:mediacontrol:disable",h.PLAYBACK_MEDIACONTROL_ENABLE="playback:mediacontrol:enable",h.PLAYBACK_ENDED="playback:ended",h.PLAYBACK_PLAY_INTENT="playback:play:intent",h.PLAYBACK_PLAY="playback:play",h.PLAYBACK_PAUSE="playback:pause",h.PLAYBACK_SEEK="playback:seek",h.PLAYBACK_SEEKED="playback:seeked",h.PLAYBACK_STOP="playback:stop",h.PLAYBACK_ERROR="playback:error",h.PLAYBACK_STATS_ADD="playback:stats:add",h.PLAYBACK_FRAGMENT_LOADED="playback:fragment:loaded",h.PLAYBACK_LEVEL_SWITCH="playback:level:switch",h.PLAYBACK_SUBTITLE_AVAILABLE="playback:subtitle:available",h.PLAYBACK_SUBTITLE_CHANGED="playback:subtitle:changed",h.CORE_CONTAINERS_CREATED="core:containers:created",h.CORE_ACTIVE_CONTAINER_CHANGED="core:active:container:changed",h.CORE_OPTIONS_CHANGE="core:options:change",h.CORE_READY="core:ready",h.CORE_FULLSCREEN="core:fullscreen",h.CORE_RESIZE="core:resize",h.CORE_SCREEN_ORIENTATION_CHANGED="core:screen:orientation:changed",h.CORE_MOUSE_MOVE="core:mousemove",h.CORE_MOUSE_LEAVE="core:mouseleave",h.CONTAINER_PLAYBACKSTATE="container:playbackstate",h.CONTAINER_PLAYBACKDVRSTATECHANGED="container:dvr",h.CONTAINER_BITRATE="container:bitrate",h.CONTAINER_STATS_REPORT="container:stats:report",h.CONTAINER_DESTROYED="container:destroyed",h.CONTAINER_READY="container:ready",h.CONTAINER_ERROR="container:error",h.CONTAINER_LOADEDMETADATA="container:loadedmetadata",h.CONTAINER_SUBTITLE_AVAILABLE="container:subtitle:available",h.CONTAINER_SUBTITLE_CHANGED="container:subtitle:changed",h.CONTAINER_TIMEUPDATE="container:timeupdate",h.CONTAINER_PROGRESS="container:progress",h.CONTAINER_PLAY="container:play",h.CONTAINER_STOP="container:stop",h.CONTAINER_PAUSE="container:pause",h.CONTAINER_ENDED="container:ended",h.CONTAINER_CLICK="container:click",h.CONTAINER_DBLCLICK="container:dblclick",h.CONTAINER_CONTEXTMENU="container:contextmenu",h.CONTAINER_MOUSE_ENTER="container:mouseenter",h.CONTAINER_MOUSE_LEAVE="container:mouseleave",h.CONTAINER_SEEK="container:seek",h.CONTAINER_SEEKED="container:seeked",h.CONTAINER_VOLUME="container:volume",h.CONTAINER_FULLSCREEN="container:fullscreen",h.CONTAINER_STATE_BUFFERING="container:state:buffering",h.CONTAINER_STATE_BUFFERFULL="container:state:bufferfull",h.CONTAINER_SETTINGSUPDATE="container:settingsupdate",h.CONTAINER_HIGHDEFINITIONUPDATE="container:highdefinitionupdate",h.CONTAINER_MEDIACONTROL_SHOW="container:mediacontrol:show",h.CONTAINER_MEDIACONTROL_HIDE="container:mediacontrol:hide",h.CONTAINER_MEDIACONTROL_DISABLE="container:mediacontrol:disable",h.CONTAINER_MEDIACONTROL_ENABLE="container:mediacontrol:enable",h.CONTAINER_STATS_ADD="container:stats:add",h.CONTAINER_OPTIONS_CHANGE="container:options:change",h.MEDIACONTROL_RENDERED="mediacontrol:rendered",h.MEDIACONTROL_FULLSCREEN="mediacontrol:fullscreen",h.MEDIACONTROL_SHOW="mediacontrol:show",h.MEDIACONTROL_HIDE="mediacontrol:hide",h.MEDIACONTROL_MOUSEMOVE_SEEKBAR="mediacontrol:mousemove:seekbar",h.MEDIACONTROL_MOUSELEAVE_SEEKBAR="mediacontrol:mouseleave:seekbar",h.MEDIACONTROL_PLAYING="mediacontrol:playing",h.MEDIACONTROL_NOTPLAYING="mediacontrol:notplaying",h.MEDIACONTROL_CONTAINERCHANGED="mediacontrol:containerchanged",h.MEDIACONTROL_OPTIONS_CHANGE="mediacontrol:options:change",e.exports=t.default},"./src/base/media.js": -/*!***************************!*\ - !*** ./src/base/media.js ***! - \***************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=t.mp4="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=";t.default={mp4:n}},"./src/base/playback.js": -/*!******************************!*\ - !*** ./src/base/playback.js ***! - \******************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=f(r(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=f(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=f(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=f(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=f(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=r(/*! ./utils */"./src/base/utils.js"),u=f(r(/*! ./ui_object */"./src/base/ui_object.js")),c=f(r(/*! ./error_mixin */"./src/base/error_mixin.js")),d=f(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(r,n,a){(0,i.default)(this,t);var s=(0,o.default)(this,e.call(this,r));return s.settings={},s._i18n=n,s.playerError=a,s._consented=!1,s}return(0,s.default)(t,e),(0,a.default)(t,[{key:"isAudioOnly",get:function(){return!1}},{key:"isAdaptive",get:function(){return!1}},{key:"ended",get:function(){return!1}},{key:"i18n",get:function(){return this._i18n}},{key:"buffering",get:function(){return!1}},{key:"consented",get:function(){return this._consented}}]),t.prototype.consent=function(){this._consented=!0},t.prototype.play=function(){},t.prototype.pause=function(){},t.prototype.stop=function(){},t.prototype.seek=function(e){},t.prototype.seekPercentage=function(e){},t.prototype.getStartTimeOffset=function(){return 0},t.prototype.getDuration=function(){return 0},t.prototype.isPlaying=function(){return!1},t.prototype.getPlaybackType=function(){return t.NO_OP},t.prototype.isHighDefinitionInUse=function(){return!1},t.prototype.volume=function(e){},t.prototype.configure=function(e){this._options=d.default.extend(this._options,e)},t.prototype.attemptAutoPlay=function(){var e=this;this.canAutoPlay((function(t,r){t&&e.play()}))},t.prototype.canAutoPlay=function(e){e(!0,null)},(0,a.default)(t,[{key:"isReady",get:function(){return!1}},{key:"hasClosedCaptionsTracks",get:function(){return this.closedCaptionsTracks.length>0}},{key:"closedCaptionsTracks",get:function(){return[]}},{key:"closedCaptionsTrackId",get:function(){return-1},set:function(e){}}]),t}(u.default);t.default=h,(0,n.default)(h.prototype,c.default),h.extend=function(e){return(0,l.extend)(h,e)},h.canPlay=function(e,t){return!1},h.VOD="vod",h.AOD="aod",h.LIVE="live",h.NO_OP="no_op",h.type="playback",e.exports=t.default},"./src/base/polyfills.js": -/*!*******************************!*\ - !*** ./src/base/polyfills.js ***! - \*******************************/ -/*! no static exports found */function(e,t,r){"use strict";Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=arguments[1],i=0;i<r;){var o=t[i];if(e.call(n,o,i,t))return o;i++}}})},"./src/base/styler.js": -/*!****************************!*\ - !*** ./src/base/styler.js ***! - \****************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),i=o(r(/*! ./template */"./src/base/template.js"));function o(e){return e&&e.__esModule?e:{default:e}}var a={getStyleFor:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{baseUrl:""};return(0,n.default)('<style class="clappr-style"></style>').html((0,i.default)(e.toString())(t))}};t.default=a,e.exports=t.default},"./src/base/svg_icons.js": -/*!*******************************!*\ - !*** ./src/base/svg_icons.js ***! - \*******************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.volumeMute=t.volume=t.stop=t.reload=t.play=t.pause=t.hd=t.fullscreen=t.exitFullscreen=t.cc=void 0;var n=h(r(/*! ../icons/01-play.svg */"./src/icons/01-play.svg")),i=h(r(/*! ../icons/02-pause.svg */"./src/icons/02-pause.svg")),o=h(r(/*! ../icons/03-stop.svg */"./src/icons/03-stop.svg")),a=h(r(/*! ../icons/04-volume.svg */"./src/icons/04-volume.svg")),s=h(r(/*! ../icons/05-mute.svg */"./src/icons/05-mute.svg")),l=h(r(/*! ../icons/06-expand.svg */"./src/icons/06-expand.svg")),u=h(r(/*! ../icons/07-shrink.svg */"./src/icons/07-shrink.svg")),c=h(r(/*! ../icons/08-hd.svg */"./src/icons/08-hd.svg")),d=h(r(/*! ../icons/09-cc.svg */"./src/icons/09-cc.svg")),f=h(r(/*! ../icons/10-reload.svg */"./src/icons/10-reload.svg"));function h(e){return e&&e.__esModule?e:{default:e}}t.cc=d.default,t.exitFullscreen=u.default,t.fullscreen=l.default,t.hd=c.default,t.pause=i.default,t.play=n.default,t.reload=f.default,t.stop=o.default,t.volume=a.default,t.volumeMute=s.default,t.default={cc:d.default,exitFullscreen:u.default,fullscreen:l.default,hd:c.default,pause:i.default,play:n.default,reload:f.default,stop:o.default,volume:a.default,volumeMute:s.default}},"./src/base/template.js": -/*!******************************!*\ - !*** ./src/base/template.js ***! - \******************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},i=/(.)^/,o={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},a=/\\|'|\r|\n|\t|\u2028|\u2029/g,s={"&":"&","<":"<",">":">",'"':""","'":"'"},l=new RegExp("[&<>\"']","g"),u=function(e){return null===e?"":(""+e).replace(l,(function(e){return s[e]}))},c=0,d=function(e,t){var r,s=new RegExp([(n.escape||i).source,(n.interpolate||i).source,(n.evaluate||i).source].join("|")+"|$","g"),l=0,d="__p+='";e.replace(s,(function(t,r,n,i,s){return d+=e.slice(l,s).replace(a,(function(e){return"\\"+o[e]})),r&&(d+="'+\n((__t=("+r+"))==null?'':escapeExpr(__t))+\n'"),n&&(d+="'+\n((__t=("+n+"))==null?'':__t)+\n'"),i&&(d+="';\n"+i+"\n__p+='"),l=s+t.length,t})),d+="';\n",n.variable||(d="with(obj||{}){\n"+d+"}\n"),d="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+d+"return __p;\n//# sourceURL=/microtemplates/source["+c+++"]";try{r=new Function(n.variable||"obj","escapeExpr",d)}catch(e){throw e.source=d,e}if(t)return r(t,u);var f=function(e){return r.call(this,e,u)};return f.source="function("+(n.variable||"obj")+"){\n"+d+"}",f};d.settings=n,t.default=d,e.exports=t.default},"./src/base/ui_container_plugin.js": -/*!*****************************************!*\ - !*** ./src/base/ui_container_plugin.js ***! - \*****************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=d(r(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=d(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=d(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=d(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=d(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=r(/*! ./utils */"./src/base/utils.js"),u=d(r(/*! ./ui_object */"./src/base/ui_object.js")),c=d(r(/*! ./error_mixin */"./src/base/error_mixin.js"));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(r){(0,i.default)(this,t);var n=(0,o.default)(this,e.call(this,r.options));return n.container=r,n.enabled=!0,n.bindEvents(),n}return(0,s.default)(t,e),(0,a.default)(t,[{key:"playerError",get:function(){return this.container.playerError}}]),t.prototype.enable=function(){this.enabled||(this.bindEvents(),this.$el.show(),this.enabled=!0)},t.prototype.disable=function(){this.stopListening(),this.$el.hide(),this.enabled=!1},t.prototype.bindEvents=function(){},t}(u.default);t.default=f,(0,n.default)(f.prototype,c.default),f.extend=function(e){return(0,l.extend)(f,e)},f.type="container",e.exports=t.default},"./src/base/ui_core_plugin.js": -/*!************************************!*\ - !*** ./src/base/ui_core_plugin.js ***! - \************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=d(r(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=d(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=d(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=d(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=d(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=r(/*! ./utils */"./src/base/utils.js"),u=d(r(/*! ./ui_object */"./src/base/ui_object.js")),c=d(r(/*! ./error_mixin */"./src/base/error_mixin.js"));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(r){(0,i.default)(this,t);var n=(0,o.default)(this,e.call(this,r.options));return n.core=r,n.enabled=!0,n.bindEvents(),n.render(),n}return(0,s.default)(t,e),(0,a.default)(t,[{key:"playerError",get:function(){return this.core.playerError}}]),t.prototype.bindEvents=function(){},t.prototype.getExternalInterface=function(){return{}},t.prototype.enable=function(){this.enabled||(this.bindEvents(),this.$el.show(),this.enabled=!0)},t.prototype.disable=function(){this.stopListening(),this.$el.hide(),this.enabled=!1},t.prototype.render=function(){return this},t}(u.default);t.default=f,(0,n.default)(f.prototype,c.default),f.extend=function(e){return(0,l.extend)(f,e)},f.type="core",e.exports=t.default},"./src/base/ui_object.js": -/*!*******************************!*\ - !*** ./src/base/ui_object.js ***! - \*******************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=c(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=c(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=c(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=c(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=c(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),l=r(/*! ./utils */"./src/base/utils.js"),u=c(r(/*! ./base_object */"./src/base/base_object.js"));function c(e){return e&&e.__esModule?e:{default:e}}var d=/^(\S+)\s*(.*)$/,f=function(e){function t(r){(0,n.default)(this,t);var o=(0,i.default)(this,e.call(this,r));return o.cid=(0,l.uniqueId)("c"),o._ensureElement(),o.delegateEvents(),o}return(0,a.default)(t,e),(0,o.default)(t,[{key:"tagName",get:function(){return"div"}},{key:"events",get:function(){return{}}},{key:"attributes",get:function(){return{}}}]),t.prototype.$=function(e){return this.$el.find(e)},t.prototype.render=function(){return this},t.prototype.destroy=function(){return this.$el.remove(),this.stopListening(),this.undelegateEvents(),this},t.prototype.setElement=function(e,t){return this.$el&&this.undelegateEvents(),this.$el=s.default.zepto.isZ(e)?e:(0,s.default)(e),this.el=this.$el[0],!1!==t&&this.delegateEvents(),this},t.prototype.delegateEvents=function(e){if(!e&&!(e=this.events))return this;for(var t in this.undelegateEvents(),e){var r=e[t];if(r&&r.constructor!==Function&&(r=this[e[t]]),r){var n=t.match(d),i=n[1],o=n[2];i+=".delegateEvents"+this.cid,""===o?this.$el.on(i,r.bind(this)):this.$el.on(i,o,r.bind(this))}}return this},t.prototype.undelegateEvents=function(){return this.$el.off(".delegateEvents"+this.cid),this},t.prototype._ensureElement=function(){if(this.el)this.setElement(this.el,!1);else{var e=s.default.extend({},this.attributes);this.id&&(e.id=this.id),this.className&&(e.class=this.className);var t=l.DomRecycler.create(this.tagName).attr(e);this.setElement(t,!1)}},t}(u.default);t.default=f,e.exports=t.default},"./src/base/utils.js": -/*!***************************!*\ - !*** ./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;s<n;s++)i[s]=arguments[s];var l=(0,a.default)(this,e.call.apply(e,[this].concat(i)));return t.initialize&&t.initialize.apply(l,i),l}return(0,s.default)(r,e),r}(e);return m(r.prototype,t),r}function y(e,t){if(!isFinite(e))return"--:--";e*=1e3;var r=(e=parseInt(e/1e3))%60,n=(e=parseInt(e/60))%60,i=(e=parseInt(e/60))%24,o=parseInt(e/24),a="";return o&&o>0&&(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;i<this.delay&&i>0&&(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": -/*!*******************************************!*\ - !*** ./src/components/browser/browser.js ***! - \*******************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDevice=t.getViewportSize=t.getOsData=t.getBrowserData=t.getBrowserInfo=void 0;var n=s(r(/*! babel-runtime/core-js/get-iterator */"./node_modules/babel-runtime/core-js/get-iterator.js")),i=s(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),o=s(r(/*! ./browser_data */"./src/components/browser/browser_data.js")),a=s(r(/*! ./os_data */"./src/components/browser/os_data.js"));function s(e){return e&&e.__esModule?e:{default:e}}var l={},u=t.getBrowserInfo=function(e){var t=e.match(/\b(playstation 4|nx|opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[],r=void 0;if(/trident/i.test(t[1]))return r=/\brv[ :]+(\d+)/g.exec(e)||[],{name:"IE",version:parseInt(r[1]||"")};if("Chrome"===t[1]){if(null!=(r=e.match(/\bOPR\/(\d+)/)))return{name:"Opera",version:parseInt(r[1])};if(null!=(r=e.match(/\bEdge\/(\d+)/)))return{name:"Edge",version:parseInt(r[1])}}else/android/i.test(e)&&(r=e.match(/version\/(\d+)/i))&&(t.splice(1,1,"Android WebView"),t.splice(2,1,r[1]));return{name:(t=t[2]?[t[1],t[2]]:[navigator.appName,navigator.appVersion,"-?"])[0],version:parseInt(t[1])}},c=t.getBrowserData=function(){var e={},t=l.userAgent.toLowerCase(),r=!0,i=!1,a=void 0;try{for(var s,u=(0,n.default)(o.default);!(r=(s=u.next()).done);r=!0){var c=s.value,f=new RegExp(c.identifier.toLowerCase()).exec(t);if(null!=f&&f[1]){if(e.name=c.name,e.group=c.group,c.versionIdentifier){var h=new RegExp(c.versionIdentifier.toLowerCase()).exec(t);null!=h&&h[1]&&d(h[1],e)}else d(f[1],e);break}}}catch(e){i=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw a}}return e},d=function(e,t){var r=e.split(".",2);t.fullVersion=e,r[0]&&(t.majorVersion=parseInt(r[0])),r[1]&&(t.minorVersion=parseInt(r[1]))},f=t.getOsData=function(){var e={},t=l.userAgent.toLowerCase(),r=!0,i=!1,o=void 0;try{for(var s,u=(0,n.default)(a.default);!(r=(s=u.next()).done);r=!0){var c=s.value,d=new RegExp(c.identifier.toLowerCase()).exec(t);if(null!=d){if(e.name=c.name,e.group=c.group,c.version)h(c.version,c.versionSeparator?c.versionSeparator:".",e);else if(d[1])h(d[1],c.versionSeparator?c.versionSeparator:".",e);else if(c.versionIdentifier){var f=new RegExp(c.versionIdentifier.toLowerCase()).exec(t);null!=f&&f[1]&&h(f[1],c.versionSeparator?c.versionSeparator:".",e)}break}}}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return e},h=function(e,t,r){var n="["==t.substr(0,1)?new RegExp(t,"g"):t,i=e.split(n,2);"."!=t&&(e=e.replace(new RegExp(t,"g"),".")),r.fullVersion=e,i&&i[0]&&(r.majorVersion=parseInt(i[0])),i&&i[1]&&(r.minorVersion=parseInt(i[1]))},p=t.getViewportSize=function(){var e={};return e.width=(0,i.default)(window).width(),e.height=(0,i.default)(window).height(),e},m=t.getDevice=function(e){var t=/\((iP(?:hone|ad|od))?(?:[^;]*; ){0,2}([^)]+(?=\)))/.exec(e);return t&&(t[1]||t[2])||""},g=u(navigator.userAgent);l.isEdge=/edge/i.test(navigator.userAgent),l.isChrome=/chrome|CriOS/i.test(navigator.userAgent)&&!l.isEdge,l.isSafari=/safari/i.test(navigator.userAgent)&&!l.isChrome&&!l.isEdge,l.isFirefox=/firefox/i.test(navigator.userAgent),l.isLegacyIE=!!window.ActiveXObject,l.isIE=l.isLegacyIE||/trident.*rv:1\d/i.test(navigator.userAgent),l.isIE11=/trident.*rv:11/i.test(navigator.userAgent),l.isChromecast=l.isChrome&&/CrKey/i.test(navigator.userAgent),l.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone|IEMobile|Mobile Safari|Opera Mini/i.test(navigator.userAgent),l.isiOS=/iPad|iPhone|iPod/i.test(navigator.userAgent),l.isAndroid=/Android/i.test(navigator.userAgent),l.isWindowsPhone=/Windows Phone/i.test(navigator.userAgent),l.isWin8App=/MSAppHost/i.test(navigator.userAgent),l.isWiiU=/WiiU/i.test(navigator.userAgent),l.isPS4=/PlayStation 4/i.test(navigator.userAgent),l.hasLocalstorage=function(){try{return localStorage.setItem("clappr","clappr"),localStorage.removeItem("clappr"),!0}catch(e){return!1}}(),l.hasFlash=function(){try{return!!new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){return!(!navigator.mimeTypes||void 0===navigator.mimeTypes["application/x-shockwave-flash"]||!navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)}}(),l.name=g.name,l.version=g.version,l.userAgent=navigator.userAgent,l.data=c(),l.os=f(),l.viewport=p(),l.device=m(l.userAgent),void 0!==window.orientation&&function(){switch(window.orientation){case-90:case 90:l.viewport.orientation="landscape";break;default:l.viewport.orientation="portrait"}}(),t.default=l},"./src/components/browser/browser_data.js": -/*!************************************************!*\ - !*** ./src/components/browser/browser_data.js ***! - \************************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{name:"Chromium",group:"Chrome",identifier:"Chromium/([0-9.]*)"},{name:"Chrome Mobile",group:"Chrome",identifier:"Chrome/([0-9.]*) Mobile",versionIdentifier:"Chrome/([0-9.]*)"},{name:"Chrome",group:"Chrome",identifier:"Chrome/([0-9.]*)"},{name:"Chrome for iOS",group:"Chrome",identifier:"CriOS/([0-9.]*)"},{name:"Android Browser",group:"Chrome",identifier:"CrMo/([0-9.]*)"},{name:"Firefox",group:"Firefox",identifier:"Firefox/([0-9.]*)"},{name:"Opera Mini",group:"Opera",identifier:"Opera Mini/([0-9.]*)"},{name:"Opera",group:"Opera",identifier:"Opera ([0-9.]*)"},{name:"Opera",group:"Opera",identifier:"Opera/([0-9.]*)",versionIdentifier:"Version/([0-9.]*)"},{name:"IEMobile",group:"Explorer",identifier:"IEMobile/([0-9.]*)"},{name:"Internet Explorer",group:"Explorer",identifier:"MSIE ([a-zA-Z0-9.]*)"},{name:"Internet Explorer",group:"Explorer",identifier:"Trident/([0-9.]*)",versionIdentifier:"rv:([0-9.]*)"},{name:"Spartan",group:"Spartan",identifier:"Edge/([0-9.]*)",versionIdentifier:"Edge/([0-9.]*)"},{name:"Safari",group:"Safari",identifier:"Safari/([0-9.]*)",versionIdentifier:"Version/([0-9.]*)"}],e.exports=t.default},"./src/components/browser/index.js": -/*!*****************************************!*\ - !*** ./src/components/browser/index.js ***! - \*****************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./browser */"./src/components/browser/browser.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/components/browser/os_data.js": -/*!*******************************************!*\ - !*** ./src/components/browser/os_data.js ***! - \*******************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{name:"Windows 2000",group:"Windows",identifier:"Windows NT 5.0",version:"5.0"},{name:"Windows XP",group:"Windows",identifier:"Windows NT 5.1",version:"5.1"},{name:"Windows Vista",group:"Windows",identifier:"Windows NT 6.0",version:"6.0"},{name:"Windows 7",group:"Windows",identifier:"Windows NT 6.1",version:"7.0"},{name:"Windows 8",group:"Windows",identifier:"Windows NT 6.2",version:"8.0"},{name:"Windows 8.1",group:"Windows",identifier:"Windows NT 6.3",version:"8.1"},{name:"Windows 10",group:"Windows",identifier:"Windows NT 10.0",version:"10.0"},{name:"Windows Phone",group:"Windows Phone",identifier:"Windows Phone ([0-9.]*)"},{name:"Windows Phone",group:"Windows Phone",identifier:"Windows Phone OS ([0-9.]*)"},{name:"Windows",group:"Windows",identifier:"Windows"},{name:"Chrome OS",group:"Chrome OS",identifier:"CrOS"},{name:"Android",group:"Android",identifier:"Android",versionIdentifier:"Android ([a-zA-Z0-9.-]*)"},{name:"iPad",group:"iOS",identifier:"iPad",versionIdentifier:"OS ([0-9_]*)",versionSeparator:"[_|.]"},{name:"iPod",group:"iOS",identifier:"iPod",versionIdentifier:"OS ([0-9_]*)",versionSeparator:"[_|.]"},{name:"iPhone",group:"iOS",identifier:"iPhone OS",versionIdentifier:"OS ([0-9_]*)",versionSeparator:"[_|.]"},{name:"Mac OS X High Sierra",group:"Mac OS",identifier:"Mac OS X (10([_|.])13([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Sierra",group:"Mac OS",identifier:"Mac OS X (10([_|.])12([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X El Capitan",group:"Mac OS",identifier:"Mac OS X (10([_|.])11([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Yosemite",group:"Mac OS",identifier:"Mac OS X (10([_|.])10([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Mavericks",group:"Mac OS",identifier:"Mac OS X (10([_|.])9([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Mountain Lion",group:"Mac OS",identifier:"Mac OS X (10([_|.])8([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Lion",group:"Mac OS",identifier:"Mac OS X (10([_|.])7([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Snow Leopard",group:"Mac OS",identifier:"Mac OS X (10([_|.])6([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Leopard",group:"Mac OS",identifier:"Mac OS X (10([_|.])5([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Tiger",group:"Mac OS",identifier:"Mac OS X (10([_|.])4([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Panther",group:"Mac OS",identifier:"Mac OS X (10([_|.])3([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Jaguar",group:"Mac OS",identifier:"Mac OS X (10([_|.])2([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Puma",group:"Mac OS",identifier:"Mac OS X (10([_|.])1([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Cheetah",group:"Mac OS",identifier:"Mac OS X (10([_|.])0([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS",group:"Mac OS",identifier:"Mac OS"},{name:"Ubuntu",group:"Linux",identifier:"Ubuntu",versionIdentifier:"Ubuntu/([0-9.]*)"},{name:"Debian",group:"Linux",identifier:"Debian"},{name:"Gentoo",group:"Linux",identifier:"Gentoo"},{name:"Linux",group:"Linux",identifier:"Linux"},{name:"BlackBerry",group:"BlackBerry",identifier:"BlackBerry"}],e.exports=t.default},"./src/components/container/container.js": -/*!***********************************************!*\ - !*** ./src/components/container/container.js ***! - \***********************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=h(r(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=h(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=h(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=h(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=h(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=h(r(/*! ../../base/events */"./src/base/events.js")),u=h(r(/*! ../../base/ui_object */"./src/base/ui_object.js")),c=h(r(/*! ../../base/error_mixin */"./src/base/error_mixin.js")),d=r(/*! ../../base/utils */"./src/base/utils.js");r(/*! ./public/style.scss */"./src/components/container/public/style.scss");var f=h(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function h(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(r,n,a){(0,i.default)(this,t);var s=(0,o.default)(this,e.call(this,r));return s._i18n=n,s.currentTime=0,s.volume=100,s.playback=r.playback,s.playerError=a,s.settings=f.default.extend({},s.playback.settings),s.isReady=!1,s.mediaControlDisabled=!1,s.plugins=[s.playback],s.dblTapHandler=new d.DoubleEventHandler(500),s.clickTimer=null,s.clickDelay=200,s.bindEvents(),s}return(0,s.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"Container"}},{key:"attributes",get:function(){return{class:"container","data-container":""}}},{key:"events",get:function(){return{click:"clicked",dblclick:"dblClicked",touchend:"dblTap",contextmenu:"onContextMenu",mouseenter:"mouseEnter",mouseleave:"mouseLeave"}}},{key:"ended",get:function(){return this.playback.ended}},{key:"buffering",get:function(){return this.playback.buffering}},{key:"i18n",get:function(){return this._i18n}},{key:"hasClosedCaptionsTracks",get:function(){return this.playback.hasClosedCaptionsTracks}},{key:"closedCaptionsTracks",get:function(){return this.playback.closedCaptionsTracks}},{key:"closedCaptionsTrackId",get:function(){return this.playback.closedCaptionsTrackId},set:function(e){this.playback.closedCaptionsTrackId=e}}]),t.prototype.bindEvents=function(){this.listenTo(this.playback,l.default.PLAYBACK_PROGRESS,this.onProgress),this.listenTo(this.playback,l.default.PLAYBACK_TIMEUPDATE,this.timeUpdated),this.listenTo(this.playback,l.default.PLAYBACK_READY,this.ready),this.listenTo(this.playback,l.default.PLAYBACK_BUFFERING,this.onBuffering),this.listenTo(this.playback,l.default.PLAYBACK_BUFFERFULL,this.bufferfull),this.listenTo(this.playback,l.default.PLAYBACK_SETTINGSUPDATE,this.settingsUpdate),this.listenTo(this.playback,l.default.PLAYBACK_LOADEDMETADATA,this.loadedMetadata),this.listenTo(this.playback,l.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinitionUpdate),this.listenTo(this.playback,l.default.PLAYBACK_BITRATE,this.updateBitrate),this.listenTo(this.playback,l.default.PLAYBACK_PLAYBACKSTATE,this.playbackStateChanged),this.listenTo(this.playback,l.default.PLAYBACK_DVR,this.playbackDvrStateChanged),this.listenTo(this.playback,l.default.PLAYBACK_MEDIACONTROL_DISABLE,this.disableMediaControl),this.listenTo(this.playback,l.default.PLAYBACK_MEDIACONTROL_ENABLE,this.enableMediaControl),this.listenTo(this.playback,l.default.PLAYBACK_SEEKED,this.onSeeked),this.listenTo(this.playback,l.default.PLAYBACK_ENDED,this.onEnded),this.listenTo(this.playback,l.default.PLAYBACK_PLAY,this.playing),this.listenTo(this.playback,l.default.PLAYBACK_PAUSE,this.paused),this.listenTo(this.playback,l.default.PLAYBACK_STOP,this.stopped),this.listenTo(this.playback,l.default.PLAYBACK_ERROR,this.error),this.listenTo(this.playback,l.default.PLAYBACK_SUBTITLE_AVAILABLE,this.subtitleAvailable),this.listenTo(this.playback,l.default.PLAYBACK_SUBTITLE_CHANGED,this.subtitleChanged)},t.prototype.subtitleAvailable=function(){this.trigger(l.default.CONTAINER_SUBTITLE_AVAILABLE)},t.prototype.subtitleChanged=function(e){this.trigger(l.default.CONTAINER_SUBTITLE_CHANGED,e)},t.prototype.playbackStateChanged=function(e){this.trigger(l.default.CONTAINER_PLAYBACKSTATE,e)},t.prototype.playbackDvrStateChanged=function(e){this.settings=this.playback.settings,this.dvrInUse=e,this.trigger(l.default.CONTAINER_PLAYBACKDVRSTATECHANGED,e)},t.prototype.updateBitrate=function(e){this.trigger(l.default.CONTAINER_BITRATE,e)},t.prototype.statsReport=function(e){this.trigger(l.default.CONTAINER_STATS_REPORT,e)},t.prototype.getPlaybackType=function(){return this.playback.getPlaybackType()},t.prototype.isDvrEnabled=function(){return!!this.playback.dvrEnabled},t.prototype.isDvrInUse=function(){return!!this.dvrInUse},t.prototype.destroy=function(){this.trigger(l.default.CONTAINER_DESTROYED,this,this.name),this.stopListening(),this.plugins.forEach((function(e){return e.destroy()})),this.$el.remove()},t.prototype.setStyle=function(e){this.$el.css(e)},t.prototype.animate=function(e,t){return this.$el.animate(e,t).promise()},t.prototype.ready=function(){this.isReady=!0,this.trigger(l.default.CONTAINER_READY,this.name)},t.prototype.isPlaying=function(){return this.playback.isPlaying()},t.prototype.getStartTimeOffset=function(){return this.playback.getStartTimeOffset()},t.prototype.getCurrentTime=function(){return this.currentTime},t.prototype.getDuration=function(){return this.playback.getDuration()},t.prototype.error=function(e){this.isReady||this.ready(),this.trigger(l.default.CONTAINER_ERROR,e,this.name)},t.prototype.loadedMetadata=function(e){this.trigger(l.default.CONTAINER_LOADEDMETADATA,e)},t.prototype.timeUpdated=function(e){this.currentTime=e.current,this.trigger(l.default.CONTAINER_TIMEUPDATE,e,this.name)},t.prototype.onProgress=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];this.trigger.apply(this,[l.default.CONTAINER_PROGRESS].concat(t,[this.name]))},t.prototype.playing=function(){this.trigger(l.default.CONTAINER_PLAY,this.name)},t.prototype.paused=function(){this.trigger(l.default.CONTAINER_PAUSE,this.name)},t.prototype.play=function(){this.playback.play()},t.prototype.stop=function(){this.playback.stop(),this.currentTime=0},t.prototype.pause=function(){this.playback.pause()},t.prototype.onEnded=function(){this.trigger(l.default.CONTAINER_ENDED,this,this.name),this.currentTime=0},t.prototype.stopped=function(){this.trigger(l.default.CONTAINER_STOP)},t.prototype.clicked=function(){var e=this;this.options.chromeless&&!this.options.allowUserInteraction||(this.clickTimer=setTimeout((function(){e.clickTimer&&e.trigger(l.default.CONTAINER_CLICK,e,e.name)}),this.clickDelay))},t.prototype.cancelClicked=function(){clearTimeout(this.clickTimer),this.clickTimer=null},t.prototype.dblClicked=function(){this.options.chromeless&&!this.options.allowUserInteraction||(this.cancelClicked(),this.trigger(l.default.CONTAINER_DBLCLICK,this,this.name))},t.prototype.dblTap=function(e){var t=this;this.options.chromeless&&!this.options.allowUserInteraction||this.dblTapHandler.handle(e,(function(){t.cancelClicked(),t.trigger(l.default.CONTAINER_DBLCLICK,t,t.name)}))},t.prototype.onContextMenu=function(e){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(l.default.CONTAINER_CONTEXTMENU,e,this.name)},t.prototype.seek=function(e){this.trigger(l.default.CONTAINER_SEEK,e,this.name),this.playback.seek(e)},t.prototype.onSeeked=function(){this.trigger(l.default.CONTAINER_SEEKED,this.name)},t.prototype.seekPercentage=function(e){var t=this.getDuration();if(e>=0&&e<=100){var r=t*(e/100);this.seek(r)}},t.prototype.setVolume=function(e){this.volume=parseFloat(e),this.trigger(l.default.CONTAINER_VOLUME,this.volume,this.name),this.playback.volume(this.volume)},t.prototype.fullscreen=function(){this.trigger(l.default.CONTAINER_FULLSCREEN,this.name)},t.prototype.onBuffering=function(){this.trigger(l.default.CONTAINER_STATE_BUFFERING,this.name)},t.prototype.bufferfull=function(){this.trigger(l.default.CONTAINER_STATE_BUFFERFULL,this.name)},t.prototype.addPlugin=function(e){this.plugins.push(e)},t.prototype.hasPlugin=function(e){return!!this.getPlugin(e)},t.prototype.getPlugin=function(e){return this.plugins.filter((function(t){return t.name===e}))[0]},t.prototype.mouseEnter=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(l.default.CONTAINER_MOUSE_ENTER)},t.prototype.mouseLeave=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(l.default.CONTAINER_MOUSE_LEAVE)},t.prototype.settingsUpdate=function(){this.settings=this.playback.settings,this.trigger(l.default.CONTAINER_SETTINGSUPDATE)},t.prototype.highDefinitionUpdate=function(e){this.trigger(l.default.CONTAINER_HIGHDEFINITIONUPDATE,e)},t.prototype.isHighDefinitionInUse=function(){return this.playback.isHighDefinitionInUse()},t.prototype.disableMediaControl=function(){this.mediaControlDisabled||(this.mediaControlDisabled=!0,this.trigger(l.default.CONTAINER_MEDIACONTROL_DISABLE))},t.prototype.enableMediaControl=function(){this.mediaControlDisabled&&(this.mediaControlDisabled=!1,this.trigger(l.default.CONTAINER_MEDIACONTROL_ENABLE))},t.prototype.updateStyle=function(){!this.options.chromeless||this.options.allowUserInteraction?this.$el.removeClass("chromeless"):this.$el.addClass("chromeless")},t.prototype.configure=function(e){this._options=f.default.extend(this._options,e),this.updateStyle(),this.playback.configure(this.options),this.trigger(l.default.CONTAINER_OPTIONS_CHANGE)},t.prototype.render=function(){return this.$el.append(this.playback.render().el),this.updateStyle(),this},t}(u.default);t.default=p,(0,n.default)(p.prototype,c.default),e.exports=t.default},"./src/components/container/index.js": -/*!*******************************************!*\ - !*** ./src/components/container/index.js ***! - \*******************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./container */"./src/components/container/container.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/components/container/public/style.scss": -/*!****************************************************!*\ - !*** ./src/components/container/public/style.scss ***! - \****************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./style.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/components/container/public/style.scss");"string"==typeof n&&(n=[[e.i,n,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};r(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(n,i),n.locals&&(e.exports=n.locals)},"./src/components/container_factory/container_factory.js": -/*!***************************************************************!*\ - !*** ./src/components/container_factory/container_factory.js ***! - \***************************************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=f(r(/*! babel-runtime/helpers/typeof */"./node_modules/babel-runtime/helpers/typeof.js")),i=f(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=f(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=f(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=f(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=f(r(/*! ../../base/base_object */"./src/base/base_object.js")),u=f(r(/*! ../../base/events */"./src/base/events.js")),c=f(r(/*! ../../components/container */"./src/components/container/index.js")),d=f(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(r,n,a,s){(0,i.default)(this,t);var l=(0,o.default)(this,e.call(this,r));return l._i18n=a,l.loader=n,l.playerError=s,l}return(0,s.default)(t,e),(0,a.default)(t,[{key:"options",get:function(){return this._options},set:function(e){this._options=e}}]),t.prototype.createContainers=function(){var e=this;return d.default.Deferred((function(t){t.resolve(e.options.sources.map((function(t){return e.createContainer(t)})))}))},t.prototype.findPlaybackPlugin=function(e,t){return this.loader.playbackPlugins.filter((function(r){return r.canPlay(e,t)}))[0]},t.prototype.createContainer=function(e){var t=null,r=this.options.mimeType;"object"===(void 0===e?"undefined":(0,n.default)(e))?(t=e.source.toString(),e.mimeType&&(r=e.mimeType)):t=e.toString(),t.match(/^\/\//)&&(t=window.location.protocol+t);var i=d.default.extend({},this.options,{src:t,mimeType:r}),o=new(this.findPlaybackPlugin(t,r))(i,this._i18n,this.playerError);i=d.default.extend({},i,{playback:o});var a=new c.default(i,this._i18n,this.playerError),s=d.default.Deferred();return s.promise(a),this.addContainerPlugins(a),this.listenToOnce(a,u.default.CONTAINER_READY,(function(){return s.resolve(a)})),a},t.prototype.addContainerPlugins=function(e){this.loader.containerPlugins.forEach((function(t){e.addPlugin(new t(e))}))},t}(l.default);t.default=h,e.exports=t.default},"./src/components/container_factory/index.js": -/*!***************************************************!*\ - !*** ./src/components/container_factory/index.js ***! - \***************************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./container_factory */"./src/components/container_factory/container_factory.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/components/core/core.js": -/*!*************************************!*\ - !*** ./src/components/core/core.js ***! - \*************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=A(r(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=A(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=A(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=A(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=A(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=r(/*! ../../base/utils */"./src/base/utils.js"),u=A(r(/*! ../../base/styler */"./src/base/styler.js")),c=A(r(/*! ../../base/events */"./src/base/events.js")),d=A(r(/*! ../../base/ui_object */"./src/base/ui_object.js")),f=A(r(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),h=A(r(/*! ../../components/browser */"./src/components/browser/index.js")),p=A(r(/*! ../../components/container_factory */"./src/components/container_factory/index.js")),m=A(r(/*! ../../components/mediator */"./src/components/mediator.js")),g=A(r(/*! ../../components/player_info */"./src/components/player_info.js")),y=A(r(/*! ../../components/error */"./src/components/error/index.js")),v=A(r(/*! ../../base/error_mixin */"./src/base/error_mixin.js")),b=A(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));r(/*! ./public/style.scss */"./src/components/core/public/style.scss");var _=A(r(/*! ./public/fonts.css */"./src/components/core/public/fonts.css"));function A(e){return e&&e.__esModule?e:{default:e}}var E=void 0,T=function(e){function t(r){(0,i.default)(this,t);var n=(0,o.default)(this,e.call(this,r));return n.playerError=new y.default(r,n),n.configureDomRecycler(),n.playerInfo=g.default.getInstance(r.playerId),n.firstResize=!0,n.plugins=[],n.containers=[],n._boundFullscreenHandler=function(){return n.handleFullscreenChange()},(0,b.default)(document).bind("fullscreenchange",n._boundFullscreenHandler),(0,b.default)(document).bind("MSFullscreenChange",n._boundFullscreenHandler),(0,b.default)(document).bind("mozfullscreenchange",n._boundFullscreenHandler),h.default.isMobile&&(0,b.default)(window).bind("resize",(function(e){n.handleWindowResize(e)})),n}return(0,s.default)(t,e),(0,a.default)(t,[{key:"events",get:function(){return{webkitfullscreenchange:"handleFullscreenChange",mousemove:"onMouseMove",mouseleave:"onMouseLeave"}}},{key:"attributes",get:function(){return{"data-player":"",tabindex:9999}}},{key:"isReady",get:function(){return!!this.ready}},{key:"i18n",get:function(){return this.getPlugin("strings")||{t:function(e){return e}}}},{key:"mediaControl",get:function(){return this.getPlugin("media_control")||this.dummyMediaControl}},{key:"dummyMediaControl",get:function(){return this._dummyMediaControl||(this._dummyMediaControl=new f.default(this)),this._dummyMediaControl}},{key:"activeContainer",get:function(){return this._activeContainer},set:function(e){this._activeContainer=e,this.trigger(c.default.CORE_ACTIVE_CONTAINER_CHANGED,this._activeContainer)}},{key:"activePlayback",get:function(){return this.activeContainer&&this.activeContainer.playback}}]),t.prototype.configureDomRecycler=function(){var e=this.options&&this.options.playback&&this.options.playback.recycleVideo;l.DomRecycler.configure({recycleVideo:e})},t.prototype.createContainers=function(e){this.defer=b.default.Deferred(),this.defer.promise(this),this.containerFactory=new p.default(e,e.loader,this.i18n,this.playerError),this.prepareContainers()},t.prototype.prepareContainers=function(){var e=this;this.containerFactory.createContainers().then((function(t){return e.setupContainers(t)})).then((function(t){return e.resolveOnContainersReady(t)}))},t.prototype.updateSize=function(){this.isFullscreen()?this.setFullscreen():this.setPlayerSize()},t.prototype.setFullscreen=function(){h.default.isiOS||(this.$el.addClass("fullscreen"),this.$el.removeAttr("style"),this.playerInfo.previousSize={width:this.options.width,height:this.options.height},this.playerInfo.currentSize={width:(0,b.default)(window).width(),height:(0,b.default)(window).height()})},t.prototype.setPlayerSize=function(){this.$el.removeClass("fullscreen"),this.playerInfo.currentSize=this.playerInfo.previousSize,this.playerInfo.previousSize={width:(0,b.default)(window).width(),height:(0,b.default)(window).height()},this.resize(this.playerInfo.currentSize)},t.prototype.resize=function(e){(0,l.isNumber)(e.height)||(0,l.isNumber)(e.width)?(this.el.style.height=e.height+"px",this.el.style.width=e.width+"px"):(this.el.style.height=""+e.height,this.el.style.width=""+e.width),this.playerInfo.previousSize={width:this.options.width,height:this.options.height},this.options.width=e.width,this.options.height=e.height,this.playerInfo.currentSize=e,this.triggerResize(this.playerInfo.currentSize)},t.prototype.enableResizeObserver=function(){var e=this;this.resizeObserverInterval=setInterval((function(){e.triggerResize({width:e.el.clientWidth,height:e.el.clientHeight})}),500)},t.prototype.triggerResize=function(e){(this.firstResize||this.oldHeight!==e.height||this.oldWidth!==e.width)&&(this.oldHeight=e.height,this.oldWidth=e.width,this.playerInfo.computedSize=e,this.firstResize=!1,m.default.trigger(this.options.playerId+":"+c.default.PLAYER_RESIZE,e),this.trigger(c.default.CORE_RESIZE,e))},t.prototype.disableResizeObserver=function(){this.resizeObserverInterval&&clearInterval(this.resizeObserverInterval)},t.prototype.resolveOnContainersReady=function(e){var t=this;b.default.when.apply(b.default,e).done((function(){t.defer.resolve(t),t.ready=!0,t.trigger(c.default.CORE_READY)}))},t.prototype.addPlugin=function(e){this.plugins.push(e)},t.prototype.hasPlugin=function(e){return!!this.getPlugin(e)},t.prototype.getPlugin=function(e){return this.plugins.filter((function(t){return t.name===e}))[0]},t.prototype.load=function(e,t){this.options.mimeType=t,e=e&&e.constructor===Array?e:[e],this.options.sources=e,this.containers.forEach((function(e){return e.destroy()})),this.containerFactory.options=b.default.extend(this.options,{sources:e}),this.prepareContainers()},t.prototype.destroy=function(){this.disableResizeObserver(),this.containers.forEach((function(e){return e.destroy()})),this.plugins.forEach((function(e){return e.destroy()})),this.$el.remove(),(0,b.default)(document).unbind("fullscreenchange",this._boundFullscreenHandler),(0,b.default)(document).unbind("MSFullscreenChange",this._boundFullscreenHandler),(0,b.default)(document).unbind("mozfullscreenchange",this._boundFullscreenHandler),this.stopListening()},t.prototype.handleFullscreenChange=function(){this.trigger(c.default.CORE_FULLSCREEN,this.isFullscreen()),this.updateSize()},t.prototype.handleWindowResize=function(e){var t=window.innerWidth>window.innerHeight?"landscape":"portrait";this._screenOrientation!==t&&(this._screenOrientation=t,this.triggerResize({width:this.el.clientWidth,height:this.el.clientHeight}),this.trigger(c.default.CORE_SCREEN_ORIENTATION_CHANGED,{event:e,orientation:this._screenOrientation}))},t.prototype.removeContainer=function(e){this.stopListening(e),this.containers=this.containers.filter((function(t){return t!==e}))},t.prototype.setupContainer=function(e){this.listenTo(e,c.default.CONTAINER_DESTROYED,this.removeContainer),this.containers.push(e)},t.prototype.setupContainers=function(e){return e.forEach(this.setupContainer.bind(this)),this.trigger(c.default.CORE_CONTAINERS_CREATED),this.renderContainers(),this.activeContainer=e[0],this.render(),this.appendToParent(),this.containers},t.prototype.renderContainers=function(){var e=this;this.containers.forEach((function(t){return e.el.appendChild(t.render().el)}))},t.prototype.createContainer=function(e,t){var r=this.containerFactory.createContainer(e,t);return this.setupContainer(r),this.el.appendChild(r.render().el),r},t.prototype.getCurrentContainer=function(){return this.activeContainer},t.prototype.getCurrentPlayback=function(){return this.activePlayback},t.prototype.getPlaybackType=function(){return this.activeContainer&&this.activeContainer.getPlaybackType()},t.prototype.isFullscreen=function(){var e=h.default.isiOS&&this.activeContainer&&this.activeContainer.el||this.el;return l.Fullscreen.fullscreenElement()===e},t.prototype.toggleFullscreen=function(){this.isFullscreen()?(l.Fullscreen.cancelFullscreen(),!h.default.isiOS&&this.$el.removeClass("fullscreen nocursor")):(l.Fullscreen.requestFullscreen(h.default.isiOS?this.activeContainer.el:this.el),!h.default.isiOS&&this.$el.addClass("fullscreen"))},t.prototype.onMouseMove=function(e){this.trigger(c.default.CORE_MOUSE_MOVE,e)},t.prototype.onMouseLeave=function(e){this.trigger(c.default.CORE_MOUSE_LEAVE,e)},t.prototype.configure=function(e){var t=this;this._options=b.default.extend(this._options,e),this.configureDomRecycler();var r=e.source||e.sources;r&&this.load(r,e.mimeType||this.options.mimeType),this.trigger(c.default.CORE_OPTIONS_CHANGE,e),this.containers.forEach((function(e){return e.configure(t.options)}))},t.prototype.appendToParent=function(){(!this.$el.parent()||!this.$el.parent().length)&&this.$el.appendTo(this.options.parentElement)},t.prototype.render=function(){E||(E=u.default.getStyleFor(_.default,{baseUrl:this.options.baseUrl})),(0,b.default)("head").append(E),this.options.width=this.options.width||this.$el.width(),this.options.height=this.options.height||this.$el.height();var e={width:this.options.width,height:this.options.height};return this.playerInfo.previousSize=this.playerInfo.currentSize=this.playerInfo.computedSize=e,this.updateSize(),this.previousSize={width:this.$el.width(),height:this.$el.height()},this.enableResizeObserver(),this},t}(d.default);t.default=T,(0,n.default)(T.prototype,v.default),e.exports=t.default},"./src/components/core/index.js": -/*!**************************************!*\ - !*** ./src/components/core/index.js ***! - \**************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./core */"./src/components/core/core.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/components/core/public/Roboto.ttf": -/*!***********************************************!*\ - !*** ./src/components/core/public/Roboto.ttf ***! - \***********************************************/ -/*! no static exports found */function(e,t){e.exports="<%=baseUrl%>/38861cba61c66739c1452c3a71e39852.ttf"},"./src/components/core/public/fonts.css": -/*!**********************************************!*\ - !*** ./src/components/core/public/fonts.css ***! - \**********************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! ../../../../node_modules/css-loader/lib/url/escape.js */"./node_modules/css-loader/lib/url/escape.js");(e.exports=r(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,'@font-face {\n font-family: "Roboto";\n font-style: normal;\n font-weight: 400;\n src: local("Roboto"), local("Roboto-Regular"), url('+n(r(/*! ./Roboto.ttf */"./src/components/core/public/Roboto.ttf"))+') format("truetype");\n}\n',""])},"./src/components/core/public/style.scss": -/*!***********************************************!*\ - !*** ./src/components/core/public/style.scss ***! - \***********************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./style.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/components/core/public/style.scss");"string"==typeof n&&(n=[[e.i,n,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};r(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(n,i),n.locals&&(e.exports=n.locals)},"./src/components/core_factory/core_factory.js": -/*!*****************************************************!*\ - !*** ./src/components/core_factory/core_factory.js ***! - \*****************************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=u(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=u(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=u(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=u(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=u(r(/*! ../../base/base_object */"./src/base/base_object.js")),l=u(r(/*! ../core */"./src/components/core/index.js"));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(r){(0,n.default)(this,t);var o=(0,i.default)(this,e.call(this));return o.player=r,o._options=r.options,o}return(0,a.default)(t,e),(0,o.default)(t,[{key:"loader",get:function(){return this.player.loader}}]),t.prototype.create=function(){return this.options.loader=this.loader,this.core=new l.default(this.options),this.addCorePlugins(),this.core.createContainers(this.options),this.core},t.prototype.addCorePlugins=function(){var e=this;return this.loader.corePlugins.forEach((function(t){var r=new t(e.core);e.core.addPlugin(r),e.setupExternalInterface(r)})),this.core},t.prototype.setupExternalInterface=function(e){var t=e.getExternalInterface();for(var r in t)this.player[r]=t[r].bind(e),this.core[r]=t[r].bind(e)},t}(s.default);t.default=c,e.exports=t.default},"./src/components/core_factory/index.js": -/*!**********************************************!*\ - !*** ./src/components/core_factory/index.js ***! - \**********************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./core_factory */"./src/components/core_factory/core_factory.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/components/error/error.js": -/*!***************************************!*\ - !*** ./src/components/error/error.js ***! - \***************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=c(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=c(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=c(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=c(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=c(r(/*! ../../base/events */"./src/base/events.js")),l=c(r(/*! ../../base/base_object */"./src/base/base_object.js")),u=c(r(/*! ../../plugins/log */"./src/plugins/log/index.js"));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments[1];(0,n.default)(this,t);var a=(0,i.default)(this,e.call(this,r));return a.core=o,a}return(0,a.default)(t,e),(0,o.default)(t,[{key:"name",get:function(){return"error"}}],[{key:"Levels",get:function(){return{FATAL:"FATAL",WARN:"WARN",INFO:"INFO"}}}]),t.prototype.createError=function(e){this.core?this.core.trigger(s.default.ERROR,e):u.default.warn(this.name,"Core is not set. Error: ",e)},t}(l.default);t.default=d,e.exports=t.default},"./src/components/error/index.js": -/*!***************************************!*\ - !*** ./src/components/error/index.js ***! - \***************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./error */"./src/components/error/error.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/components/loader/index.js": -/*!****************************************!*\ - !*** ./src/components/loader/index.js ***! - \****************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./loader */"./src/components/loader/loader.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/components/loader/loader.js": -/*!*****************************************!*\ - !*** ./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": -/*!************************************!*\ - !*** ./src/components/mediator.js ***! - \************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js"));function i(e){return e&&e.__esModule?e:{default:e}}var o=new(i(r(/*! ../base/events */"./src/base/events.js")).default),a=function e(){(0,n.default)(this,e)};t.default=a,a.on=function(e,t,r){o.on(e,t,r)},a.once=function(e,t,r){o.once(e,t,r)},a.off=function(e,t,r){o.off(e,t,r)},a.trigger=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.trigger.apply(o,[e].concat(r))},a.stopListening=function(e,t,r){o.stopListening(e,t,r)},e.exports=t.default},"./src/components/player.js": -/*!**********************************!*\ - !*** ./src/components/player.js ***! - \**********************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=v(r(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=v(r(/*! babel-runtime/core-js/object/keys */"./node_modules/babel-runtime/core-js/object/keys.js")),o=v(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=v(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=v(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),l=v(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),u=r(/*! ../base/utils */"./src/base/utils.js"),c=v(r(/*! ../base/base_object */"./src/base/base_object.js")),d=v(r(/*! ../base/events */"./src/base/events.js")),f=v(r(/*! ./browser */"./src/components/browser/index.js")),h=v(r(/*! ./core_factory */"./src/components/core_factory/index.js")),p=v(r(/*! ./loader */"./src/components/loader/index.js")),m=v(r(/*! ./player_info */"./src/components/player_info.js")),g=v(r(/*! ../base/error_mixin */"./src/base/error_mixin.js")),y=v(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function v(e){return e&&e.__esModule?e:{default:e}}var b=(0,u.currentScriptUrl)().replace(/\/[^/]+$/,""),_=function(e){function t(r){(0,o.default)(this,t);var n=(0,a.default)(this,e.call(this,r)),i={playerId:(0,u.uniqueId)(""),persistConfig:!0,width:640,height:360,baseUrl:b,allowUserInteraction:f.default.isMobile,playback:{recycleVideo:!0}};return n._options=y.default.extend(i,r),n.options.sources=n._normalizeSources(r),n.options.chromeless||(n.options.allowUserInteraction=!0),n.options.allowUserInteraction||(n.options.disableKeyboardShortcuts=!0),n._registerOptionEventListeners(n.options.events),n._coreFactory=new h.default(n),n.playerInfo=m.default.getInstance(n.options.playerId),n.playerInfo.currentSize={width:r.width,height:r.height},n.playerInfo.options=n.options,n.options.parentId?n.setParentId(n.options.parentId):n.options.parent&&n.attachTo(n.options.parent),n}return(0,l.default)(t,e),(0,s.default)(t,[{key:"loader",set:function(e){this._loader=e},get:function(){return this._loader||(this._loader=new p.default(this.options.plugins||{},this.options.playerId)),this._loader}},{key:"ended",get:function(){return this.core.activeContainer.ended}},{key:"buffering",get:function(){return this.core.activeContainer.buffering}},{key:"isReady",get:function(){return!!this._ready}},{key:"eventsMapping",get:function(){return{onReady:d.default.PLAYER_READY,onResize:d.default.PLAYER_RESIZE,onPlay:d.default.PLAYER_PLAY,onPause:d.default.PLAYER_PAUSE,onStop:d.default.PLAYER_STOP,onEnded:d.default.PLAYER_ENDED,onSeek:d.default.PLAYER_SEEK,onError:d.default.PLAYER_ERROR,onTimeUpdate:d.default.PLAYER_TIMEUPDATE,onVolumeUpdate:d.default.PLAYER_VOLUMEUPDATE,onSubtitleAvailable:d.default.PLAYER_SUBTITLE_AVAILABLE}}}]),t.prototype.setParentId=function(e){var t=document.querySelector(e);return t&&this.attachTo(t),this},t.prototype.attachTo=function(e){return this.options.parentElement=e,this.core=this._coreFactory.create(),this._addEventListeners(),this},t.prototype._addEventListeners=function(){return this.core.isReady?this._onReady():this.listenToOnce(this.core,d.default.CORE_READY,this._onReady),this.listenTo(this.core,d.default.CORE_ACTIVE_CONTAINER_CHANGED,this._containerChanged),this.listenTo(this.core,d.default.CORE_FULLSCREEN,this._onFullscreenChange),this.listenTo(this.core,d.default.CORE_RESIZE,this._onResize),this},t.prototype._addContainerEventListeners=function(){var e=this.core.activeContainer;return e&&(this.listenTo(e,d.default.CONTAINER_PLAY,this._onPlay),this.listenTo(e,d.default.CONTAINER_PAUSE,this._onPause),this.listenTo(e,d.default.CONTAINER_STOP,this._onStop),this.listenTo(e,d.default.CONTAINER_ENDED,this._onEnded),this.listenTo(e,d.default.CONTAINER_SEEK,this._onSeek),this.listenTo(e,d.default.CONTAINER_ERROR,this._onError),this.listenTo(e,d.default.CONTAINER_TIMEUPDATE,this._onTimeUpdate),this.listenTo(e,d.default.CONTAINER_VOLUME,this._onVolumeUpdate),this.listenTo(e,d.default.CONTAINER_SUBTITLE_AVAILABLE,this._onSubtitleAvailable)),this},t.prototype._registerOptionEventListeners=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,i.default)(t).length>0;return n&&(0,i.default)(r).forEach((function(t){var n=e.eventsMapping[t];n&&e.off(n,r[t])})),(0,i.default)(t).forEach((function(r){var n=e.eventsMapping[r];if(n){var i=t[r];(i="function"==typeof i&&i)&&e.on(n,i)}})),this},t.prototype._containerChanged=function(){this.stopListening(),this._addEventListeners()},t.prototype._onReady=function(){this._ready=!0,this._addContainerEventListeners(),this.trigger(d.default.PLAYER_READY)},t.prototype._onFullscreenChange=function(e){this.trigger(d.default.PLAYER_FULLSCREEN,e)},t.prototype._onVolumeUpdate=function(e){this.trigger(d.default.PLAYER_VOLUMEUPDATE,e)},t.prototype._onSubtitleAvailable=function(){this.trigger(d.default.PLAYER_SUBTITLE_AVAILABLE)},t.prototype._onResize=function(e){this.trigger(d.default.PLAYER_RESIZE,e)},t.prototype._onPlay=function(){this.trigger(d.default.PLAYER_PLAY)},t.prototype._onPause=function(){this.trigger(d.default.PLAYER_PAUSE)},t.prototype._onStop=function(){this.trigger(d.default.PLAYER_STOP,this.getCurrentTime())},t.prototype._onEnded=function(){this.trigger(d.default.PLAYER_ENDED)},t.prototype._onSeek=function(e){this.trigger(d.default.PLAYER_SEEK,e)},t.prototype._onTimeUpdate=function(e){this.trigger(d.default.PLAYER_TIMEUPDATE,e)},t.prototype._onError=function(e){this.trigger(d.default.PLAYER_ERROR,e)},t.prototype._normalizeSources=function(e){var t=e.sources||(void 0!==e.source?[e.source]:[]);return 0===t.length?[{source:"",mimeType:""}]:t},t.prototype.resize=function(e){return this.core.resize(e),this},t.prototype.load=function(e,t,r){return void 0!==r&&this.configure({autoPlay:!!r}),this.core.load(e,t),this},t.prototype.destroy=function(){return this.stopListening(),this.core.destroy(),this},t.prototype.consent=function(){return this.core.getCurrentPlayback().consent(),this},t.prototype.play=function(){return this.core.activeContainer.play(),this},t.prototype.pause=function(){return this.core.activeContainer.pause(),this},t.prototype.stop=function(){return this.core.activeContainer.stop(),this},t.prototype.seek=function(e){return this.core.activeContainer.seek(e),this},t.prototype.seekPercentage=function(e){return this.core.activeContainer.seekPercentage(e),this},t.prototype.mute=function(){return this._mutedVolume=this.getVolume(),this.setVolume(0),this},t.prototype.unmute=function(){return this.setVolume("number"==typeof this._mutedVolume?this._mutedVolume:100),this._mutedVolume=null,this},t.prototype.isPlaying=function(){return this.core.activeContainer.isPlaying()},t.prototype.isDvrEnabled=function(){return this.core.activeContainer.isDvrEnabled()},t.prototype.isDvrInUse=function(){return this.core.activeContainer.isDvrInUse()},t.prototype.configure=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._registerOptionEventListeners(e.events,this.options.events),this.core.configure(e),this},t.prototype.getPlugin=function(e){return this.core.plugins.concat(this.core.activeContainer.plugins).filter((function(t){return t.name===e}))[0]},t.prototype.getCurrentTime=function(){return this.core.activeContainer.getCurrentTime()},t.prototype.getStartTimeOffset=function(){return this.core.activeContainer.getStartTimeOffset()},t.prototype.getDuration=function(){return this.core.activeContainer.getDuration()},t}(c.default);t.default=_,(0,n.default)(_.prototype,g.default),e.exports=t.default},"./src/components/player_info.js": -/*!***************************************!*\ - !*** ./src/components/player_info.js ***! - \***************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js"),o=(n=i)&&n.__esModule?n:{default:n},a=function e(){(0,o.default)(this,e),this.options={},this.playbackPlugins=[],this.currentSize={width:0,height:0}};a._players={},a.getInstance=function(e){return a._players[e]||(a._players[e]=new a)},t.default=a,e.exports=t.default},"./src/icons/01-play.svg": -/*!*******************************!*\ - !*** ./src/icons/01-play.svg ***! - \*******************************/ -/*! no static exports found */function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M1.425.35L14.575 8l-13.15 7.65V.35z"></path></svg>'},"./src/icons/02-pause.svg": -/*!********************************!*\ - !*** ./src/icons/02-pause.svg ***! - \********************************/ -/*! no static exports found */function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M1.712 14.76H6.43V1.24H1.71v13.52zm7.86-13.52v13.52h4.716V1.24H9.573z"></path></svg>'},"./src/icons/03-stop.svg": -/*!*******************************!*\ - !*** ./src/icons/03-stop.svg ***! - \*******************************/ -/*! no static exports found */function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M1.712 1.24h12.6v13.52h-12.6z"></path></svg>'},"./src/icons/04-volume.svg": -/*!*********************************!*\ - !*** ./src/icons/04-volume.svg ***! - \*********************************/ -/*! no static exports found */function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M11.5 11h-.002v1.502L7.798 10H4.5V6h3.297l3.7-2.502V4.5h.003V11zM11 4.49L7.953 6.5H5v3h2.953L11 11.51V4.49z"></path></svg>'},"./src/icons/05-mute.svg": -/*!*******************************!*\ - !*** ./src/icons/05-mute.svg ***! - \*******************************/ -/*! no static exports found */function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M9.75 11.51L6.7 9.5H3.75v-3H6.7L9.75 4.49v.664l.497.498V3.498L6.547 6H3.248v4h3.296l3.7 2.502v-2.154l-.497.5v.662zm3-5.165L12.404 6l-1.655 1.653L9.093 6l-.346.345L10.402 8 8.747 9.654l.346.347 1.655-1.653L12.403 10l.348-.346L11.097 8l1.655-1.655z"></path></svg>'},"./src/icons/06-expand.svg": -/*!*********************************!*\ - !*** ./src/icons/06-expand.svg ***! - \*********************************/ -/*! no static exports found */function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M7.156 8L4 11.156V8.5H3V13h4.5v-1H4.844L8 8.844 7.156 8zM8.5 3v1h2.657L8 7.157 8.846 8 12 4.844V7.5h1V3H8.5z"></path></svg>'},"./src/icons/07-shrink.svg": -/*!*********************************!*\ - !*** ./src/icons/07-shrink.svg ***! - \*********************************/ -/*! no static exports found */function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M13.5 3.344l-.844-.844L9.5 5.656V3h-1v4.5H13v-1h-2.656L13.5 3.344zM3 9.5h2.656L2.5 12.656l.844.844L6.5 10.344V13h1V8.5H3v1z"></path></svg>'},"./src/icons/08-hd.svg": -/*!*****************************!*\ - !*** ./src/icons/08-hd.svg ***! - \*****************************/ -/*! no static exports found */function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M5.375 7.062H2.637V4.26H.502v7.488h2.135V8.9h2.738v2.848h2.133V4.26H5.375v2.802zm5.97-2.81h-2.84v7.496h2.798c2.65 0 4.195-1.607 4.195-3.77v-.022c0-2.162-1.523-3.704-4.154-3.704zm2.06 3.758c0 1.21-.81 1.896-2.03 1.896h-.83V6.093h.83c1.22 0 2.03.696 2.03 1.896v.02z"></path></svg>'},"./src/icons/09-cc.svg": -/*!*****************************!*\ - !*** ./src/icons/09-cc.svg ***! - \*****************************/ -/*! no static exports found */function(e,t){e.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 49 41.8" style="enable-background:new 0 0 49 41.8;" xml:space="preserve"><path d="M47.1,0H3.2C1.6,0,0,1.2,0,2.8v31.5C0,35.9,1.6,37,3.2,37h11.9l3.2,1.9l4.7,2.7c0.9,0.5,2-0.1,2-1.1V37h22.1 c1.6,0,1.9-1.1,1.9-2.7V2.8C49,1.2,48.7,0,47.1,0z M7.2,18.6c0-4.8,3.5-9.3,9.9-9.3c4.8,0,7.1,2.7,7.1,2.7l-2.5,4 c0,0-1.7-1.7-4.2-1.7c-2.8,0-4.3,2.1-4.3,4.3c0,2.1,1.5,4.4,4.5,4.4c2.5,0,4.9-2.1,4.9-2.1l2.2,4.2c0,0-2.7,2.9-7.6,2.9 C10.8,27.9,7.2,23.5,7.2,18.6z M36.9,27.9c-6.4,0-9.9-4.4-9.9-9.3c0-4.8,3.5-9.3,9.9-9.3C41.7,9.3,44,12,44,12l-2.5,4 c0,0-1.7-1.7-4.2-1.7c-2.8,0-4.3,2.1-4.3,4.3c0,2.1,1.5,4.4,4.5,4.4c2.5,0,4.9-2.1,4.9-2.1l2.2,4.2C44.5,25,41.9,27.9,36.9,27.9z"></path></svg>'},"./src/icons/10-reload.svg": -/*!*********************************!*\ - !*** ./src/icons/10-reload.svg ***! - \*********************************/ -/*! no static exports found */function(e,t){e.exports='<svg fill="#FFFFFF" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg>'},"./src/main.js": -/*!*********************!*\ - !*** ./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")),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: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: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 ***! - \******************************************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=d(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=d(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=d(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=d(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=d(r(/*! ../../base/playback */"./src/base/playback.js")),l=d(r(/*! ../../base/template */"./src/base/template.js")),u=d(r(/*! ../../components/browser */"./src/components/browser/index.js")),c=d(r(/*! ./public/flash.html */"./src/playbacks/base_flash_playback/public/flash.html"));function d(e){return e&&e.__esModule?e:{default:e}}r(/*! ./public/flash.scss */"./src/playbacks/base_flash_playback/public/flash.scss");var f=function(e){function t(){return(0,n.default)(this,t),(0,o.default)(this,e.apply(this,arguments))}return(0,a.default)(t,e),t.prototype.setElement=function(e){this.$el=e,this.el=e[0]},t.prototype.render=function(){return this.$el.attr("data",this.swfPath),this.$el.html(this.template({cid:this.cid,swfPath:this.swfPath,baseUrl:this.baseUrl,playbackId:this.uniqueId,wmode:this.wmode,callbackName:"window.Clappr.flashlsCallbacks."+this.cid})),u.default.isIE&&(this.$("embed").remove(),u.default.isLegacyIE&&this.$el.attr("classid","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000")),this.el.id=this.cid,this},(0,i.default)(t,[{key:"tagName",get:function(){return"object"}},{key:"swfPath",get:function(){return""}},{key:"wmode",get:function(){return"transparent"}},{key:"template",get:function(){return(0,l.default)(c.default)}},{key:"attributes",get:function(){var e="application/x-shockwave-flash";return u.default.isLegacyIE&&(e=""),{class:"clappr-flash-playback",type:e,width:"100%",height:"100%",data:this.swfPath,"data-flash-playback":this.name}}}]),t}(s.default);t.default=f,e.exports=t.default},"./src/playbacks/base_flash_playback/index.js": -/*!****************************************************!*\ - !*** ./src/playbacks/base_flash_playback/index.js ***! - \****************************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=r(/*! ./base_flash_playback */"./src/playbacks/base_flash_playback/base_flash_playback.js"),e.exports=t.default},"./src/playbacks/base_flash_playback/public/flash.html": -/*!*************************************************************!*\ - !*** ./src/playbacks/base_flash_playback/public/flash.html ***! - \*************************************************************/ -/*! no static exports found */function(e,t){e.exports='<param name="movie" value="<%= swfPath %>">\n<param name="quality" value="autohigh">\n<param name="swliveconnect" value="true">\n<param name="allowScriptAccess" value="always">\n<param name="bgcolor" value="#000000">\n<param name="allowFullScreen" value="false">\n<param name="wmode" value="<%= wmode %>">\n<param name="tabindex" value="1">\n<param name="FlashVars" value="playbackId=<%= playbackId %>&callback=<%= callbackName %>">\n<embed\n name="<%= cid %>"\n type="application/x-shockwave-flash"\n disabled="disabled"\n tabindex="-1"\n enablecontextmenu="false"\n allowScriptAccess="always"\n quality="autohigh"\n pluginspage="http://www.macromedia.com/go/getflashplayer"\n wmode="<%= wmode %>"\n swliveconnect="true"\n allowfullscreen="false"\n bgcolor="#000000"\n FlashVars="playbackId=<%= playbackId %>&callback=<%= callbackName %>"\n data="<%= swfPath %>"\n src="<%= swfPath %>"\n width="100%"\n height="100%">\n</embed>\n'},"./src/playbacks/base_flash_playback/public/flash.scss": -/*!*************************************************************!*\ - !*** ./src/playbacks/base_flash_playback/public/flash.scss ***! - \*************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./flash.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/base_flash_playback/public/flash.scss");"string"==typeof n&&(n=[[e.i,n,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};r(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(n,i),n.locals&&(e.exports=n.locals)},"./src/playbacks/flash/flash.js": -/*!**************************************!*\ - !*** ./src/playbacks/flash/flash.js ***! - \**************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=g(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=g(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=g(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=g(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=r(/*! ../../base/utils */"./src/base/utils.js"),l=g(r(/*! ../../playbacks/base_flash_playback */"./src/playbacks/base_flash_playback/index.js")),u=g(r(/*! ../../components/browser */"./src/components/browser/index.js")),c=g(r(/*! ../../components/mediator */"./src/components/mediator.js")),d=g(r(/*! ../../base/template */"./src/base/template.js")),f=g(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),h=g(r(/*! ../../base/events */"./src/base/events.js")),p=g(r(/*! ../../base/playback */"./src/base/playback.js")),m=g(r(/*! ./public/Player.swf */"./src/playbacks/flash/public/Player.swf"));function g(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(){(0,n.default)(this,t);for(var r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];var s=(0,i.default)(this,e.call.apply(e,[this].concat(o)));return s._src=s.options.src,s._baseUrl=s.options.baseUrl,s._autoPlay=s.options.autoPlay,s.settings={default:["seekbar"]},s.settings.left=["playpause","position","duration"],s.settings.right=["fullscreen","volume"],s.settings.seekEnabled=!0,s._isReadyState=!1,s._addListeners(),s}return(0,a.default)(t,e),(0,o.default)(t,[{key:"name",get:function(){return"flash"}},{key:"swfPath",get:function(){return(0,d.default)(m.default)({baseUrl:this._baseUrl})}},{key:"ended",get:function(){return"ENDED"===this._currentState}},{key:"buffering",get:function(){return!!this._bufferingState&&"ENDED"!==this._currentState}}]),t.prototype._bootstrap=function(){var e=this;this.el.playerPlay?(this.el.width="100%",this.el.height="100%","PLAYING"===this._currentState?this._firstPlay():(this._currentState="IDLE",this._autoPlay&&this.play()),(0,f.default)('<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%" />').insertAfter(this.$el),this.getDuration()>0?this._metadataLoaded():c.default.once(this.uniqueId+":timeupdate",this._metadataLoaded,this)):(this._attempts=this._attempts||0,++this._attempts<=60?setTimeout((function(){return e._bootstrap()}),50):this.trigger(h.default.PLAYBACK_ERROR,{message:"Max number of attempts reached"},this.name))},t.prototype._metadataLoaded=function(){this._isReadyState=!0,this.trigger(h.default.PLAYBACK_READY,this.name),this.trigger(h.default.PLAYBACK_SETTINGSUPDATE,this.name)},t.prototype.getPlaybackType=function(){return p.default.VOD},t.prototype.isHighDefinitionInUse=function(){return!1},t.prototype._updateTime=function(){this.trigger(h.default.PLAYBACK_TIMEUPDATE,{current:this.el.getPosition(),total:this.el.getDuration()},this.name)},t.prototype._addListeners=function(){c.default.on(this.uniqueId+":progress",this._progress,this),c.default.on(this.uniqueId+":timeupdate",this._updateTime,this),c.default.on(this.uniqueId+":statechanged",this._checkState,this),c.default.on(this.uniqueId+":flashready",this._bootstrap,this)},t.prototype.stopListening=function(){e.prototype.stopListening.call(this),c.default.off(this.uniqueId+":progress"),c.default.off(this.uniqueId+":timeupdate"),c.default.off(this.uniqueId+":statechanged"),c.default.off(this.uniqueId+":flashready")},t.prototype._checkState=function(){this._isIdle||"PAUSED"===this._currentState||("PLAYING_BUFFERING"!==this._currentState&&"PLAYING_BUFFERING"===this.el.getState()?(this._bufferingState=!0,this.trigger(h.default.PLAYBACK_BUFFERING,this.name),this._currentState="PLAYING_BUFFERING"):"PLAYING"===this.el.getState()?(this._bufferingState=!1,this.trigger(h.default.PLAYBACK_BUFFERFULL,this.name),this._currentState="PLAYING"):"IDLE"===this.el.getState()?this._currentState="IDLE":"ENDED"===this.el.getState()&&(this.trigger(h.default.PLAYBACK_ENDED,this.name),this.trigger(h.default.PLAYBACK_TIMEUPDATE,{current:0,total:this.el.getDuration()},this.name),this._currentState="ENDED",this._isIdle=!0))},t.prototype._progress=function(){"IDLE"!==this._currentState&&"ENDED"!==this._currentState&&this.trigger(h.default.PLAYBACK_PROGRESS,{start:0,current:this.el.getBytesLoaded(),total:this.el.getBytesTotal()})},t.prototype._firstPlay=function(){var e=this;this.el.playerPlay?(this._isIdle=!1,this.el.playerPlay(this._src),this.listenToOnce(this,h.default.PLAYBACK_BUFFERFULL,(function(){return e._checkInitialSeek()})),this._currentState="PLAYING"):this.listenToOnce(this,h.default.PLAYBACK_READY,this._firstPlay)},t.prototype._checkInitialSeek=function(){var e=(0,s.seekStringToSeconds)(window.location.href);0!==e&&this.seekSeconds(e)},t.prototype.play=function(){this.trigger(h.default.PLAYBACK_PLAY_INTENT),"PAUSED"===this._currentState||"PLAYING_BUFFERING"===this._currentState?(this._currentState="PLAYING",this.el.playerResume(),this.trigger(h.default.PLAYBACK_PLAY,this.name)):"PLAYING"!==this._currentState&&(this._firstPlay(),this.trigger(h.default.PLAYBACK_PLAY,this.name))},t.prototype.volume=function(e){var t=this;this.isReady?this.el.playerVolume(e):this.listenToOnce(this,h.default.PLAYBACK_BUFFERFULL,(function(){return t.volume(e)}))},t.prototype.pause=function(){this._currentState="PAUSED",this.el.playerPause(),this.trigger(h.default.PLAYBACK_PAUSE,this.name)},t.prototype.stop=function(){this.el.playerStop(),this.trigger(h.default.PLAYBACK_STOP),this.trigger(h.default.PLAYBACK_TIMEUPDATE,{current:0,total:0},this.name)},t.prototype.isPlaying=function(){return!!(this.isReady&&this._currentState.indexOf("PLAYING")>-1)},t.prototype.getDuration=function(){return this.el.getDuration()},t.prototype.seekPercentage=function(e){var t=this;if(this.el.getDuration()>0){var r=this.el.getDuration()*(e/100);this.seek(r)}else this.listenToOnce(this,h.default.PLAYBACK_BUFFERFULL,(function(){return t.seekPercentage(e)}))},t.prototype.seek=function(e){var t=this;this.isReady&&this.el.playerSeek?(this.el.playerSeek(e),this.trigger(h.default.PLAYBACK_TIMEUPDATE,{current:e,total:this.el.getDuration()},this.name),"PAUSED"===this._currentState&&this.el.playerPause()):this.listenToOnce(this,h.default.PLAYBACK_BUFFERFULL,(function(){return t.seek(e)}))},t.prototype.destroy=function(){clearInterval(this.bootstrapId),e.prototype.stopListening.call(this),this.$el.remove()},(0,o.default)(t,[{key:"isReady",get:function(){return this._isReadyState}}]),t}(l.default);t.default=y,y.canPlay=function(e){if(u.default.hasFlash&&e&&e.constructor===String){var t=e.split("?")[0].match(/.*\.(.*)$/)||[];return t.length>1&&!u.default.isMobile&&t[1].toLowerCase().match(/^(mp4|mov|f4v|3gpp|3gp)$/)}return!1},e.exports=t.default},"./src/playbacks/flash/index.js": -/*!**************************************!*\ - !*** ./src/playbacks/flash/index.js ***! - \**************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./flash */"./src/playbacks/flash/flash.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/playbacks/flash/public/Player.swf": -/*!***********************************************!*\ - !*** ./src/playbacks/flash/public/Player.swf ***! - \***********************************************/ -/*! no static exports found */function(e,t){e.exports="<%=baseUrl%>/4b76590b32dab62bc95c1b7951efae78.swf"},"./src/playbacks/flashls/flashls.js": -/*!******************************************!*\ - !*** ./src/playbacks/flashls/flashls.js ***! - \******************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=y(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=y(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=y(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=y(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=y(r(/*! ../../playbacks/base_flash_playback */"./src/playbacks/base_flash_playback/index.js")),l=y(r(/*! ../../base/events */"./src/base/events.js")),u=y(r(/*! ../../base/template */"./src/base/template.js")),c=y(r(/*! ../../base/playback */"./src/base/playback.js")),d=y(r(/*! ../../components/mediator */"./src/components/mediator.js")),f=y(r(/*! ../../components/browser */"./src/components/browser/index.js")),h=y(r(/*! ../../components/error */"./src/components/error/index.js")),p=y(r(/*! ./flashls_events */"./src/playbacks/flashls/flashls_events.js")),m=y(r(/*! ./public/HLSPlayer.swf */"./src/playbacks/flashls/public/HLSPlayer.swf")),g=y(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function y(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(){(0,n.default)(this,t);for(var r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];var s=(0,i.default)(this,e.call.apply(e,[this].concat(o)));return s._src=s.options.src,s._baseUrl=s.options.baseUrl,s._initHlsParameters(s.options),s.highDefinition=!1,s._autoPlay=s.options.autoPlay,s._loop=s.options.loop,s._defaultSettings={left:["playstop"],default:["seekbar"],right:["fullscreen","volume","hd-indicator"],seekEnabled:!1},s.settings=g.default.extend({},s._defaultSettings),s._playbackType=c.default.LIVE,s._hasEnded=!1,s._addListeners(),s}return(0,a.default)(t,e),(0,o.default)(t,[{key:"name",get:function(){return"flashls"}},{key:"swfPath",get:function(){return(0,u.default)(m.default)({baseUrl:this._baseUrl})}},{key:"levels",get:function(){return this._levels||[]}},{key:"currentLevel",get:function(){return null===this._currentLevel||void 0===this._currentLevel?-1:this._currentLevel},set:function(e){this._currentLevel=e,this.trigger(l.default.PLAYBACK_LEVEL_SWITCH_START),this.el.playerSetCurrentLevel(e)}},{key:"ended",get:function(){return this._hasEnded}},{key:"buffering",get:function(){return!!this._bufferingState&&!this._hasEnded}}]),t.prototype._initHlsParameters=function(e){this._autoStartLoad=void 0===e.autoStartLoad||e.autoStartLoad,this._capLevelToStage=void 0!==e.capLevelToStage&&e.capLevelToStage,this._maxLevelCappingMode=void 0===e.maxLevelCappingMode?"downscale":e.maxLevelCappingMode,this._minBufferLength=void 0===e.minBufferLength?-1:e.minBufferLength,this._minBufferLengthCapping=void 0===e.minBufferLengthCapping?-1:e.minBufferLengthCapping,this._maxBufferLength=void 0===e.maxBufferLength?120:e.maxBufferLength,this._maxBackBufferLength=void 0===e.maxBackBufferLength?30:e.maxBackBufferLength,this._lowBufferLength=void 0===e.lowBufferLength?3:e.lowBufferLength,this._mediaTimePeriod=void 0===e.mediaTimePeriod?100:e.mediaTimePeriod,this._fpsDroppedMonitoringPeriod=void 0===e.fpsDroppedMonitoringPeriod?5e3:e.fpsDroppedMonitoringPeriod,this._fpsDroppedMonitoringThreshold=void 0===e.fpsDroppedMonitoringThreshold?.2:e.fpsDroppedMonitoringThreshold,this._capLevelonFPSDrop=void 0!==e.capLevelonFPSDrop&&e.capLevelonFPSDrop,this._smoothAutoSwitchonFPSDrop=void 0===e.smoothAutoSwitchonFPSDrop?this.capLevelonFPSDrop:e.smoothAutoSwitchonFPSDrop,this._switchDownOnLevelError=void 0===e.switchDownOnLevelError||e.switchDownOnLevelError,this._seekMode=void 0===e.seekMode?"ACCURATE":e.seekMode,this._keyLoadMaxRetry=void 0===e.keyLoadMaxRetry?3:e.keyLoadMaxRetry,this._keyLoadMaxRetryTimeout=void 0===e.keyLoadMaxRetryTimeout?64e3:e.keyLoadMaxRetryTimeout,this._fragmentLoadMaxRetry=void 0===e.fragmentLoadMaxRetry?3:e.fragmentLoadMaxRetry,this._fragmentLoadMaxRetryTimeout=void 0===e.fragmentLoadMaxRetryTimeout?4e3:e.fragmentLoadMaxRetryTimeout,this._fragmentLoadSkipAfterMaxRetry=void 0===e.fragmentLoadSkipAfterMaxRetry||e.fragmentLoadSkipAfterMaxRetry,this._maxSkippedFragments=void 0===e.maxSkippedFragments?5:e.maxSkippedFragments,this._flushLiveURLCache=void 0!==e.flushLiveURLCache&&e.flushLiveURLCache,this._initialLiveManifestSize=void 0===e.initialLiveManifestSize?1:e.initialLiveManifestSize,this._manifestLoadMaxRetry=void 0===e.manifestLoadMaxRetry?3:e.manifestLoadMaxRetry,this._manifestLoadMaxRetryTimeout=void 0===e.manifestLoadMaxRetryTimeout?64e3:e.manifestLoadMaxRetryTimeout,this._manifestRedundantLoadmaxRetry=void 0===e.manifestRedundantLoadmaxRetry?3:e.manifestRedundantLoadmaxRetry,this._startFromBitrate=void 0===e.startFromBitrate?-1:e.startFromBitrate,this._startFromLevel=void 0===e.startFromLevel?-1:e.startFromLevel,this._autoStartMaxDuration=void 0===e.autoStartMaxDuration?-1:e.autoStartMaxDuration,this._seekFromLevel=void 0===e.seekFromLevel?-1:e.seekFromLevel,this._useHardwareVideoDecoder=void 0!==e.useHardwareVideoDecoder&&e.useHardwareVideoDecoder,this._hlsLogEnabled=void 0===e.hlsLogEnabled||e.hlsLogEnabled,this._logDebug=void 0!==e.logDebug&&e.logDebug,this._logDebug2=void 0!==e.logDebug2&&e.logDebug2,this._logWarn=void 0===e.logWarn||e.logWarn,this._logError=void 0===e.logError||e.logError,this._hlsMinimumDvrSize=void 0===e.hlsMinimumDvrSize?60:e.hlsMinimumDvrSize},t.prototype._addListeners=function(){var e=this;d.default.on(this.cid+":flashready",(function(){return e._bootstrap()})),d.default.on(this.cid+":timeupdate",(function(t){return e._updateTime(t)})),d.default.on(this.cid+":playbackstate",(function(t){return e._setPlaybackState(t)})),d.default.on(this.cid+":levelchanged",(function(t){return e._levelChanged(t)})),d.default.on(this.cid+":error",(function(t,r,n){return e._flashPlaybackError(t,r,n)})),d.default.on(this.cid+":fragmentloaded",(function(t){return e._onFragmentLoaded(t)})),d.default.on(this.cid+":levelendlist",(function(t){return e._onLevelEndlist(t)}))},t.prototype.stopListening=function(){e.prototype.stopListening.call(this),d.default.off(this.cid+":flashready"),d.default.off(this.cid+":timeupdate"),d.default.off(this.cid+":playbackstate"),d.default.off(this.cid+":levelchanged"),d.default.off(this.cid+":playbackerror"),d.default.off(this.cid+":fragmentloaded"),d.default.off(this.cid+":manifestloaded"),d.default.off(this.cid+":levelendlist")},t.prototype._bootstrap=function(){var e=this;if(this.el.playerLoad)this.el.width="100%",this.el.height="100%",this._isReadyState=!0,this._srcLoaded=!1,this._currentState="IDLE",this._setFlashSettings(),this._updatePlaybackType(),(this._autoPlay||this._shouldPlayOnManifestLoaded)&&this.play(),this.trigger(l.default.PLAYBACK_READY,this.name);else if(this._bootstrapAttempts=this._bootstrapAttempts||0,++this._bootstrapAttempts<=60)setTimeout((function(){return e._bootstrap()}),50);else{var t=this.createError({code:"playerLoadFail_maxNumberAttemptsReached",description:this.name+" error: Max number of attempts reached",level:h.default.Levels.FATAL,raw:{}});this.trigger(l.default.PLAYBACK_ERROR,t)}},t.prototype._setFlashSettings=function(){this.el.playerSetAutoStartLoad(this._autoStartLoad),this.el.playerSetCapLevelToStage(this._capLevelToStage),this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode),this.el.playerSetMinBufferLength(this._minBufferLength),this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping),this.el.playerSetMaxBufferLength(this._maxBufferLength),this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength),this.el.playerSetLowBufferLength(this._lowBufferLength),this.el.playerSetMediaTimePeriod(this._mediaTimePeriod),this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod),this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold),this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop),this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop),this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError),this.el.playerSetSeekMode(this._seekMode),this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry),this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout),this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry),this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout),this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry),this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments),this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache),this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize),this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry),this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout),this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry),this.el.playerSetStartFromBitrate(this._startFromBitrate),this.el.playerSetStartFromLevel(this._startFromLevel),this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration),this.el.playerSetSeekFromLevel(this._seekFromLevel),this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder),this.el.playerSetLogInfo(this._hlsLogEnabled),this.el.playerSetLogDebug(this._logDebug),this.el.playerSetLogDebug2(this._logDebug2),this.el.playerSetLogWarn(this._logWarn),this.el.playerSetLogError(this._logError)},t.prototype.setAutoStartLoad=function(e){this._autoStartLoad=e,this.el.playerSetAutoStartLoad(this._autoStartLoad)},t.prototype.setCapLevelToStage=function(e){this._capLevelToStage=e,this.el.playerSetCapLevelToStage(this._capLevelToStage)},t.prototype.setMaxLevelCappingMode=function(e){this._maxLevelCappingMode=e,this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode)},t.prototype.setSetMinBufferLength=function(e){this._minBufferLength=e,this.el.playerSetMinBufferLength(this._minBufferLength)},t.prototype.setMinBufferLengthCapping=function(e){this._minBufferLengthCapping=e,this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping)},t.prototype.setMaxBufferLength=function(e){this._maxBufferLength=e,this.el.playerSetMaxBufferLength(this._maxBufferLength)},t.prototype.setMaxBackBufferLength=function(e){this._maxBackBufferLength=e,this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength)},t.prototype.setLowBufferLength=function(e){this._lowBufferLength=e,this.el.playerSetLowBufferLength(this._lowBufferLength)},t.prototype.setMediaTimePeriod=function(e){this._mediaTimePeriod=e,this.el.playerSetMediaTimePeriod(this._mediaTimePeriod)},t.prototype.setFpsDroppedMonitoringPeriod=function(e){this._fpsDroppedMonitoringPeriod=e,this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod)},t.prototype.setFpsDroppedMonitoringThreshold=function(e){this._fpsDroppedMonitoringThreshold=e,this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold)},t.prototype.setCapLevelonFPSDrop=function(e){this._capLevelonFPSDrop=e,this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop)},t.prototype.setSmoothAutoSwitchonFPSDrop=function(e){this._smoothAutoSwitchonFPSDrop=e,this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop)},t.prototype.setSwitchDownOnLevelError=function(e){this._switchDownOnLevelError=e,this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError)},t.prototype.setSeekMode=function(e){this._seekMode=e,this.el.playerSetSeekMode(this._seekMode)},t.prototype.setKeyLoadMaxRetry=function(e){this._keyLoadMaxRetry=e,this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry)},t.prototype.setKeyLoadMaxRetryTimeout=function(e){this._keyLoadMaxRetryTimeout=e,this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout)},t.prototype.setFragmentLoadMaxRetry=function(e){this._fragmentLoadMaxRetry=e,this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry)},t.prototype.setFragmentLoadMaxRetryTimeout=function(e){this._fragmentLoadMaxRetryTimeout=e,this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout)},t.prototype.setFragmentLoadSkipAfterMaxRetry=function(e){this._fragmentLoadSkipAfterMaxRetry=e,this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry)},t.prototype.setMaxSkippedFragments=function(e){this._maxSkippedFragments=e,this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments)},t.prototype.setFlushLiveURLCache=function(e){this._flushLiveURLCache=e,this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache)},t.prototype.setInitialLiveManifestSize=function(e){this._initialLiveManifestSize=e,this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize)},t.prototype.setManifestLoadMaxRetry=function(e){this._manifestLoadMaxRetry=e,this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry)},t.prototype.setManifestLoadMaxRetryTimeout=function(e){this._manifestLoadMaxRetryTimeout=e,this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout)},t.prototype.setManifestRedundantLoadmaxRetry=function(e){this._manifestRedundantLoadmaxRetry=e,this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry)},t.prototype.setStartFromBitrate=function(e){this._startFromBitrate=e,this.el.playerSetStartFromBitrate(this._startFromBitrate)},t.prototype.setStartFromLevel=function(e){this._startFromLevel=e,this.el.playerSetStartFromLevel(this._startFromLevel)},t.prototype.setAutoStartMaxDuration=function(e){this._autoStartMaxDuration=e,this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration)},t.prototype.setSeekFromLevel=function(e){this._seekFromLevel=e,this.el.playerSetSeekFromLevel(this._seekFromLevel)},t.prototype.setUseHardwareVideoDecoder=function(e){this._useHardwareVideoDecoder=e,this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder)},t.prototype.setSetLogInfo=function(e){this._hlsLogEnabled=e,this.el.playerSetLogInfo(this._hlsLogEnabled)},t.prototype.setLogDebug=function(e){this._logDebug=e,this.el.playerSetLogDebug(this._logDebug)},t.prototype.setLogDebug2=function(e){this._logDebug2=e,this.el.playerSetLogDebug2(this._logDebug2)},t.prototype.setLogWarn=function(e){this._logWarn=e,this.el.playerSetLogWarn(this._logWarn)},t.prototype.setLogError=function(e){this._logError=e,this.el.playerSetLogError(this._logError)},t.prototype._levelChanged=function(e){var t=this.el.getLevels()[e];t&&(this.highDefinition=t.height>=720||t.bitrate/1e3>=2e3,this.trigger(l.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this._levels&&0!==this._levels.length||this._fillLevels(),this.trigger(l.default.PLAYBACK_BITRATE,{height:t.height,width:t.width,bandwidth:t.bitrate,bitrate:t.bitrate,level:e}),this.trigger(l.default.PLAYBACK_LEVEL_SWITCH_END))},t.prototype._updateTime=function(e){if("IDLE"!==this._currentState){var t=this._normalizeDuration(e.duration),r=Math.min(Math.max(e.position,0),t),n=this._dvrEnabled,i=this._playbackType===c.default.LIVE;this._dvrEnabled=i&&t>this._hlsMinimumDvrSize,100!==t&&void 0!==i&&(this._dvrEnabled!==n&&(this._updateSettings(),this.trigger(l.default.PLAYBACK_SETTINGSUPDATE,this.name)),i&&!this._dvrEnabled&&(r=t),this.trigger(l.default.PLAYBACK_TIMEUPDATE,{current:r,total:t},this.name))}},t.prototype.play=function(){this.trigger(l.default.PLAYBACK_PLAY_INTENT),"PAUSED"===this._currentState?this.el.playerResume():this._srcLoaded||"PLAYING"===this._currentState?this.el.playerPlay():this._firstPlay()},t.prototype.getPlaybackType=function(){return this._playbackType?this._playbackType:null},t.prototype.getCurrentTime=function(){return this.el.getPosition()},t.prototype.getCurrentLevelIndex=function(){return this._currentLevel},t.prototype.getCurrentLevel=function(){return this.levels[this.currentLevel]},t.prototype.getCurrentBitrate=function(){return this.levels[this.currentLevel].bitrate},t.prototype.setCurrentLevel=function(e){this.currentLevel=e},t.prototype.isHighDefinitionInUse=function(){return this.highDefinition},t.prototype.getLevels=function(){return this.levels},t.prototype._setPlaybackState=function(e){["PLAYING_BUFFERING","PAUSED_BUFFERING"].indexOf(e)>=0?(this._bufferingState=!0,this.trigger(l.default.PLAYBACK_BUFFERING,this.name),this._updateCurrentState(e)):["PLAYING","PAUSED"].indexOf(e)>=0?(["PLAYING_BUFFERING","PAUSED_BUFFERING","IDLE"].indexOf(this._currentState)>=0&&(this._bufferingState=!1,this.trigger(l.default.PLAYBACK_BUFFERFULL,this.name)),this._updateCurrentState(e)):"IDLE"===e&&(this._srcLoaded=!1,this._loop&&["PLAYING_BUFFERING","PLAYING"].indexOf(this._currentState)>=0?(this.play(),this.seek(0)):(this._updateCurrentState(e),this._hasEnded=!0,this.trigger(l.default.PLAYBACK_TIMEUPDATE,{current:0,total:this.getDuration()},this.name),this.trigger(l.default.PLAYBACK_ENDED,this.name)))},t.prototype._updateCurrentState=function(e){this._currentState=e,"IDLE"!==e&&(this._hasEnded=!1),this._updatePlaybackType(),"PLAYING"===e?this.trigger(l.default.PLAYBACK_PLAY,this.name):"PAUSED"===e&&this.trigger(l.default.PLAYBACK_PAUSE,this.name)},t.prototype._updatePlaybackType=function(){this._playbackType=this.el.getType(),this._playbackType&&(this._playbackType=this._playbackType.toLowerCase(),this._playbackType===c.default.VOD?this._startReportingProgress():this._stopReportingProgress()),this.trigger(l.default.PLAYBACK_PLAYBACKSTATE,{type:this._playbackType})},t.prototype._startReportingProgress=function(){this._reportingProgress||(this._reportingProgress=!0)},t.prototype._stopReportingProgress=function(){this._reportingProgress=!1},t.prototype._onFragmentLoaded=function(e){if(this.trigger(l.default.PLAYBACK_FRAGMENT_LOADED,e),this._reportingProgress&&this.getCurrentTime()){var t=this.getCurrentTime()+this.el.getbufferLength();this.trigger(l.default.PLAYBACK_PROGRESS,{start:this.getCurrentTime(),current:t,total:this.el.getDuration()})}},t.prototype._onLevelEndlist=function(){this._updatePlaybackType()},t.prototype._firstPlay=function(){var e=this;this._shouldPlayOnManifestLoaded=!0,this.el.playerLoad&&(d.default.once(this.cid+":manifestloaded",(function(t,r){return e._manifestLoaded(t,r)})),this._setFlashSettings(),this.el.playerLoad(this._src),this._srcLoaded=!0)},t.prototype.volume=function(e){var t=this;this.isReady?this.el.playerVolume(e):this.listenToOnce(this,l.default.PLAYBACK_BUFFERFULL,(function(){return t.volume(e)}))},t.prototype.pause=function(){(this._playbackType!==c.default.LIVE||this._dvrEnabled)&&(this.el.playerPause(),this._playbackType===c.default.LIVE&&this._dvrEnabled&&this._updateDvr(!0))},t.prototype.stop=function(){this._srcLoaded=!1,this.el.playerStop(),this.trigger(l.default.PLAYBACK_STOP),this.trigger(l.default.PLAYBACK_TIMEUPDATE,{current:0,total:0},this.name)},t.prototype.isPlaying=function(){return!!this._currentState&&!!this._currentState.match(/playing/i)},t.prototype.getDuration=function(){return this._normalizeDuration(this.el.getDuration())},t.prototype._normalizeDuration=function(e){return this._playbackType===c.default.LIVE&&(e=Math.max(0,e-10)),e},t.prototype.seekPercentage=function(e){var t=this.el.getDuration(),r=0;e>0&&(r=t*e/100),this.seek(r)},t.prototype.seek=function(e){var t=this.getDuration();if(this._playbackType===c.default.LIVE){var r=t-e>3;this._updateDvr(r)}this.el.playerSeek(e),this.trigger(l.default.PLAYBACK_TIMEUPDATE,{current:e,total:t},this.name)},t.prototype._updateDvr=function(e){var t=!!this._dvrInUse;this._dvrInUse=e,this._dvrInUse!==t&&(this._updateSettings(),this.trigger(l.default.PLAYBACK_DVR,this._dvrInUse),this.trigger(l.default.PLAYBACK_STATS_ADD,{dvr:this._dvrInUse}))},t.prototype._flashPlaybackError=function(e,t,r){var n={code:e,description:r,level:h.default.Levels.FATAL,raw:{code:e,url:t,message:r}},i=this.createError(n);this.trigger(l.default.PLAYBACK_ERROR,i),this.trigger(l.default.PLAYBACK_STOP)},t.prototype._manifestLoaded=function(e,t){this._shouldPlayOnManifestLoaded&&(this._shouldPlayOnManifestLoaded=!1,this.el.playerPlay()),this._fillLevels(),this.trigger(l.default.PLAYBACK_LOADEDMETADATA,{duration:e,data:t})},t.prototype._fillLevels=function(){var e=this.el.getLevels(),t=e.length;this._levels=[];for(var r=0;r<t;r++)this._levels.push({id:r,label:e[r].height+"p",level:e[r]});this.trigger(l.default.PLAYBACK_LEVELS_AVAILABLE,this._levels)},t.prototype.destroy=function(){this.stopListening(),this.$el.remove()},t.prototype._updateSettings=function(){this.settings=g.default.extend({},this._defaultSettings),this._playbackType===c.default.VOD||this._dvrInUse?(this.settings.left=["playpause","position","duration"],this.settings.seekEnabled=!0):this._dvrEnabled?(this.settings.left=["playpause"],this.settings.seekEnabled=!0):this.settings.seekEnabled=!1},t.prototype._createCallbacks=function(){var e=this;window.Clappr||(window.Clappr={}),window.Clappr.flashlsCallbacks||(window.Clappr.flashlsCallbacks={}),this.flashlsEvents=new p.default(this.cid),window.Clappr.flashlsCallbacks[this.cid]=function(t,r){e.flashlsEvents[t].apply(e.flashlsEvents,r)}},t.prototype.render=function(){return e.prototype.render.call(this),this._createCallbacks(),this},(0,o.default)(t,[{key:"isReady",get:function(){return this._isReadyState}},{key:"dvrEnabled",get:function(){return!!this._dvrEnabled}}]),t}(s.default);t.default=v,v.canPlay=function(e,t){var r=e.split("?")[0].match(/.*\.(.*)$/)||[];return f.default.hasFlash&&(r.length>1&&"m3u8"===r[1].toLowerCase()||"application/x-mpegURL"===t||"application/vnd.apple.mpegurl"===t)},e.exports=t.default},"./src/playbacks/flashls/flashls_events.js": -/*!*************************************************!*\ - !*** ./src/playbacks/flashls/flashls_events.js ***! - \*************************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=o(r(/*! ../../components/mediator */"./src/components/mediator.js"));function o(e){return e&&e.__esModule?e:{default:e}}var a=function(){function e(t){(0,n.default)(this,e),this.instanceId=t}return e.prototype.ready=function(){i.default.trigger(this.instanceId+":flashready")},e.prototype.videoSize=function(e,t){i.default.trigger(this.instanceId+":videosizechanged",e,t)},e.prototype.complete=function(){i.default.trigger(this.instanceId+":complete")},e.prototype.error=function(e,t,r){i.default.trigger(this.instanceId+":error",e,t,r)},e.prototype.manifest=function(e,t){i.default.trigger(this.instanceId+":manifestloaded",e,t)},e.prototype.audioLevelLoaded=function(e){i.default.trigger(this.instanceId+":audiolevelloaded",e)},e.prototype.levelLoaded=function(e){i.default.trigger(this.instanceId+":levelloaded",e)},e.prototype.levelEndlist=function(e){i.default.trigger(this.instanceId+":levelendlist",e)},e.prototype.fragmentLoaded=function(e){i.default.trigger(this.instanceId+":fragmentloaded",e)},e.prototype.fragmentPlaying=function(e){i.default.trigger(this.instanceId+":fragmentplaying",e)},e.prototype.position=function(e){i.default.trigger(this.instanceId+":timeupdate",e)},e.prototype.state=function(e){i.default.trigger(this.instanceId+":playbackstate",e)},e.prototype.seekState=function(e){i.default.trigger(this.instanceId+":seekstate",e)},e.prototype.switch=function(e){i.default.trigger(this.instanceId+":levelchanged",e)},e.prototype.audioTracksListChange=function(e){i.default.trigger(this.instanceId+":audiotracklistchanged",e)},e.prototype.audioTrackChange=function(e){i.default.trigger(this.instanceId+":audiotrackchanged",e)},e}();t.default=a,e.exports=t.default},"./src/playbacks/flashls/index.js": -/*!****************************************!*\ - !*** ./src/playbacks/flashls/index.js ***! - \****************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./flashls */"./src/playbacks/flashls/flashls.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/playbacks/flashls/public/HLSPlayer.swf": -/*!****************************************************!*\ - !*** ./src/playbacks/flashls/public/HLSPlayer.swf ***! - \****************************************************/ -/*! no static exports found */function(e,t){e.exports="<%=baseUrl%>/8fa12a459188502b9f0d39b8a67d9e6c.swf"},"./src/playbacks/hls/hls.js": -/*!**********************************!*\ - !*** ./src/playbacks/hls/hls.js ***! - \**********************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=y(r(/*! babel-runtime/helpers/toConsumableArray */"./node_modules/babel-runtime/helpers/toConsumableArray.js")),i=y(r(/*! babel-runtime/core-js/json/stringify */"./node_modules/babel-runtime/core-js/json/stringify.js")),o=y(r(/*! babel-runtime/helpers/extends */"./node_modules/babel-runtime/helpers/extends.js")),a=y(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),s=y(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),l=y(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),u=y(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),c=y(r(/*! ../../playbacks/html5_video */"./src/playbacks/html5_video/index.js")),d=y(r(/*! hls.js */"./node_modules/hls.js/dist/hls.js")),f=y(r(/*! ../../base/events */"./src/base/events.js")),h=y(r(/*! ../../base/playback */"./src/base/playback.js")),p=r(/*! ../../base/utils */"./src/base/utils.js"),m=y(r(/*! ../../plugins/log */"./src/plugins/log/index.js")),g=y(r(/*! ../../components/error */"./src/components/error/index.js"));function y(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(){(0,a.default)(this,t);for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];var l=(0,s.default)(this,e.call.apply(e,[this].concat(n)));return l.options.playback=(0,o.default)({},l.options,l.options.playback),l._minDvrSize=void 0===l.options.hlsMinimumDvrSize?60:l.options.hlsMinimumDvrSize,l._extrapolatedWindowNumSegments=l.options.playback&&void 0!==l.options.playback.extrapolatedWindowNumSegments?l.options.playback.extrapolatedWindowNumSegments:2,l._playbackType=h.default.VOD,l._lastTimeUpdate={current:0,total:0},l._lastDuration=null,l._playableRegionStartTime=0,l._localStartTimeCorrelation=null,l._localEndTimeCorrelation=null,l._playableRegionDuration=0,l._programDateTime=0,l._durationExcludesAfterLiveSyncPoint=!1,l._segmentTargetDuration=null,l._playlistType=null,l._recoverAttemptsRemaining=l.options.hlsRecoverAttempts||16,l}return(0,u.default)(t,e),(0,l.default)(t,[{key:"name",get:function(){return"hls"}},{key:"levels",get:function(){return this._levels||[]}},{key:"currentLevel",get:function(){return null===this._currentLevel||void 0===this._currentLevel?-1:this._currentLevel},set:function(e){this._currentLevel=e,this.trigger(f.default.PLAYBACK_LEVEL_SWITCH_START),this.options.playback.hlsUseNextLevel?this._hls.nextLevel=this._currentLevel:this._hls.currentLevel=this._currentLevel}},{key:"isReady",get:function(){return this._isReadyState}},{key:"_startTime",get:function(){return this._playbackType===h.default.LIVE&&"EVENT"!==this._playlistType?this._extrapolatedStartTime:this._playableRegionStartTime}},{key:"_now",get:function(){return(0,p.now)()}},{key:"_extrapolatedStartTime",get:function(){if(!this._localStartTimeCorrelation)return this._playableRegionStartTime;var e=this._localStartTimeCorrelation,t=this._now-e.local,r=(e.remote+t)/1e3;return Math.min(r,this._playableRegionStartTime+this._extrapolatedWindowDuration)}},{key:"_extrapolatedEndTime",get:function(){var e=this._playableRegionStartTime+this._playableRegionDuration;if(!this._localEndTimeCorrelation)return e;var t=this._localEndTimeCorrelation,r=this._now-t.local,n=(t.remote+r)/1e3;return Math.max(e-this._extrapolatedWindowDuration,Math.min(n,e))}},{key:"_duration",get:function(){return this._extrapolatedEndTime-this._startTime}},{key:"_extrapolatedWindowDuration",get:function(){return null===this._segmentTargetDuration?0:this._extrapolatedWindowNumSegments*this._segmentTargetDuration}}],[{key:"HLSJS",get:function(){return d.default}}]),t.prototype._setup=function(){var e=this;this._ccIsSetup=!1,this._ccTracksUpdated=!1,this._hls=new d.default((0,p.assign)({},this.options.playback.hlsjsConfig)),this._hls.on(d.default.Events.MEDIA_ATTACHED,(function(){return e._hls.loadSource(e.options.src)})),this._hls.on(d.default.Events.LEVEL_LOADED,(function(t,r){return e._updatePlaybackType(t,r)})),this._hls.on(d.default.Events.LEVEL_UPDATED,(function(t,r){return e._onLevelUpdated(t,r)})),this._hls.on(d.default.Events.LEVEL_SWITCHING,(function(t,r){return e._onLevelSwitch(t,r)})),this._hls.on(d.default.Events.FRAG_LOADED,(function(t,r){return e._onFragmentLoaded(t,r)})),this._hls.on(d.default.Events.ERROR,(function(t,r){return e._onHLSJSError(t,r)})),this._hls.on(d.default.Events.SUBTITLE_TRACK_LOADED,(function(t,r){return e._onSubtitleLoaded(t,r)})),this._hls.on(d.default.Events.SUBTITLE_TRACKS_UPDATED,(function(){return e._ccTracksUpdated=!0})),this._hls.attachMedia(this.el)},t.prototype.render=function(){return this._ready(),e.prototype.render.call(this)},t.prototype._ready=function(){this._isReadyState=!0,this.trigger(f.default.PLAYBACK_READY,this.name)},t.prototype._recover=function(e,t,r){if(this._recoveredDecodingError)if(this._recoveredAudioCodecError){m.default.error("hlsjs: failed to recover",{evt:e,data:t}),r.level=g.default.Levels.FATAL;var n=this.createError(r);this.trigger(f.default.PLAYBACK_ERROR,n),this.stop()}else this._recoveredAudioCodecError=!0,this._hls.swapAudioCodec(),this._hls.recoverMediaError();else this._recoveredDecodingError=!0,this._hls.recoverMediaError()},t.prototype._setupSrc=function(e){},t.prototype._startTimeUpdateTimer=function(){var e=this;this._timeUpdateTimer||(this._timeUpdateTimer=setInterval((function(){e._onDurationChange(),e._onTimeUpdate()}),100))},t.prototype._stopTimeUpdateTimer=function(){this._timeUpdateTimer&&(clearInterval(this._timeUpdateTimer),this._timeUpdateTimer=null)},t.prototype.getProgramDateTime=function(){return this._programDateTime},t.prototype.getDuration=function(){return this._duration},t.prototype.getCurrentTime=function(){return Math.max(0,this.el.currentTime-this._startTime)},t.prototype.getStartTimeOffset=function(){return this._startTime},t.prototype.seekPercentage=function(e){var t=this._duration;e>0&&(t=this._duration*(e/100)),this.seek(t)},t.prototype.seek=function(t){t<0&&(m.default.warn("Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point."),t=this.getDuration()),this.dvrEnabled&&this._updateDvr(t<this.getDuration()-3),t+=this._startTime,e.prototype.seek.call(this,t)},t.prototype.seekToLivePoint=function(){this.seek(this.getDuration())},t.prototype._updateDvr=function(e){this.trigger(f.default.PLAYBACK_DVR,e),this.trigger(f.default.PLAYBACK_STATS_ADD,{dvr:e})},t.prototype._updateSettings=function(){this._playbackType===h.default.VOD?this.settings.left=["playpause","position","duration"]:this.dvrEnabled?this.settings.left=["playpause"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(f.default.PLAYBACK_SETTINGSUPDATE)},t.prototype._onHLSJSError=function(e,t){var r={code:t.type+"_"+t.details,description:this.name+" error: type: "+t.type+", details: "+t.details,raw:t},n=void 0;if(t.response&&(r.description+=", response: "+(0,i.default)(t.response)),t.fatal)if(this._recoverAttemptsRemaining>0)switch(this._recoverAttemptsRemaining-=1,t.type){case d.default.ErrorTypes.NETWORK_ERROR:switch(t.details){case d.default.ErrorDetails.MANIFEST_LOAD_ERROR:case d.default.ErrorDetails.MANIFEST_LOAD_TIMEOUT:case d.default.ErrorDetails.MANIFEST_PARSING_ERROR:case d.default.ErrorDetails.LEVEL_LOAD_ERROR:case d.default.ErrorDetails.LEVEL_LOAD_TIMEOUT:m.default.error("hlsjs: unrecoverable network fatal error.",{evt:e,data:t}),n=this.createError(r),this.trigger(f.default.PLAYBACK_ERROR,n),this.stop();break;default:m.default.warn("hlsjs: trying to recover from network error.",{evt:e,data:t}),r.level=g.default.Levels.WARN,this.createError(r),this._hls.startLoad()}break;case d.default.ErrorTypes.MEDIA_ERROR:m.default.warn("hlsjs: trying to recover from media error.",{evt:e,data:t}),r.level=g.default.Levels.WARN,this.createError(r),this._recover(e,t,r);break;default:m.default.error("hlsjs: could not recover from error.",{evt:e,data:t}),n=this.createError(r),this.trigger(f.default.PLAYBACK_ERROR,n),this.stop()}else m.default.error("hlsjs: could not recover from error after maximum number of attempts.",{evt:e,data:t}),n=this.createError(r),this.trigger(f.default.PLAYBACK_ERROR,n),this.stop();else{if(this.options.playback.triggerFatalErrorOnResourceDenied&&this._keyIsDenied(t))return m.default.error("hlsjs: could not load decrypt key.",{evt:e,data:t}),n=this.createError(r),this.trigger(f.default.PLAYBACK_ERROR,n),void this.stop();r.level=g.default.Levels.WARN,this.createError(r),m.default.warn("hlsjs: non-fatal error occurred",{evt:e,data:t})}},t.prototype._keyIsDenied=function(e){return e.type===d.default.ErrorTypes.NETWORK_ERROR&&e.details===d.default.ErrorDetails.KEY_LOAD_ERROR&&e.response&&e.response.code>=400},t.prototype._onTimeUpdate=function(){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(f.default.PLAYBACK_TIMEUPDATE,e,this.name))},t.prototype._onDurationChange=function(){var t=this.getDuration();this._lastDuration!==t&&(this._lastDuration=t,e.prototype._onDurationChange.call(this))},t.prototype._onProgress=function(){if(this.el.buffered.length){for(var e=[],t=0,r=0;r<this.el.buffered.length;r++)e=[].concat((0,n.default)(e),[{start:Math.max(0,this.el.buffered.start(r)-this._playableRegionStartTime),end:Math.max(0,this.el.buffered.end(r)-this._playableRegionStartTime)}]),this.el.currentTime>=e[r].start&&this.el.currentTime<=e[r].end&&(t=r);var i={start:e[t].start,current:e[t].end,total:this.getDuration()};this.trigger(f.default.PLAYBACK_PROGRESS,i,e)}},t.prototype.play=function(){this._hls||this._setup(),e.prototype.play.call(this),this._startTimeUpdateTimer()},t.prototype.pause=function(){this._hls&&(e.prototype.pause.call(this),this.dvrEnabled&&this._updateDvr(!0))},t.prototype.stop=function(){this._stopTimeUpdateTimer(),this._hls&&(e.prototype.stop.call(this),this._hls.destroy(),delete this._hls)},t.prototype.destroy=function(){this._stopTimeUpdateTimer(),this._hls&&(this._hls.destroy(),delete this._hls),e.prototype.destroy.call(this)},t.prototype._updatePlaybackType=function(e,t){this._playbackType=t.details.live?h.default.LIVE:h.default.VOD,this._onLevelUpdated(e,t),this._ccTracksUpdated&&this._playbackType===h.default.LIVE&&this.hasClosedCaptionsTracks&&this._onSubtitleLoaded()},t.prototype._fillLevels=function(){this._levels=this._hls.levels.map((function(e,t){return{id:t,level:e,label:e.bitrate/1e3+"Kbps"}})),this.trigger(f.default.PLAYBACK_LEVELS_AVAILABLE,this._levels)},t.prototype._onLevelUpdated=function(e,t){this._segmentTargetDuration=t.details.targetduration,this._playlistType=t.details.type||null;var r=!1,n=!1,i=t.details.fragments,o=this._playableRegionStartTime,a=this._playableRegionDuration;if(0!==i.length){if(i[0].rawProgramDateTime&&(this._programDateTime=i[0].rawProgramDateTime),this._playableRegionStartTime!==i[0].start&&(r=!0,this._playableRegionStartTime=i[0].start),r)if(this._localStartTimeCorrelation){var s=this._localStartTimeCorrelation,l=this._now-s.local,u=(s.remote+l)/1e3;u<i[0].start?this._localStartTimeCorrelation={local:this._now,remote:1e3*i[0].start}:u>o+this._extrapolatedWindowDuration&&(this._localStartTimeCorrelation={local:this._now,remote:1e3*Math.max(i[0].start,o+this._extrapolatedWindowDuration)})}else this._localStartTimeCorrelation={local:this._now,remote:1e3*(i[0].start+this._extrapolatedWindowDuration/2)};var c=t.details.totalduration;if(this._playbackType===h.default.LIVE){var f=t.details.targetduration*((this.options.playback.hlsjsConfig||{}).liveSyncDurationCount||d.default.DefaultConfig.liveSyncDurationCount);f<=c?(c-=f,this._durationExcludesAfterLiveSyncPoint=!0):this._durationExcludesAfterLiveSyncPoint=!1}c!==this._playableRegionDuration&&(n=!0,this._playableRegionDuration=c);var p=i[0].start+c,m=o+a;if(p!==m)if(this._localEndTimeCorrelation){var g=this._localEndTimeCorrelation,y=this._now-g.local,v=(g.remote+y)/1e3;v>p?this._localEndTimeCorrelation={local:this._now,remote:1e3*p}:v<p-this._extrapolatedWindowDuration?this._localEndTimeCorrelation={local:this._now,remote:1e3*(p-this._extrapolatedWindowDuration)}:v>m&&(this._localEndTimeCorrelation={local:this._now,remote:1e3*m})}else this._localEndTimeCorrelation={local:this._now,remote:1e3*p};n&&this._onDurationChange(),r&&this._onProgress()}},t.prototype._onFragmentLoaded=function(e,t){this.trigger(f.default.PLAYBACK_FRAGMENT_LOADED,t)},t.prototype._onSubtitleLoaded=function(){if(!this._ccIsSetup){this.trigger(f.default.PLAYBACK_SUBTITLE_AVAILABLE);var e=this._playbackType===h.default.LIVE?-1:this.closedCaptionsTrackId;this.closedCaptionsTrackId=e,this._ccIsSetup=!0}},t.prototype._onLevelSwitch=function(e,t){this.levels.length||this._fillLevels(),this.trigger(f.default.PLAYBACK_LEVEL_SWITCH_END),this.trigger(f.default.PLAYBACK_LEVEL_SWITCH,t);var r=this._hls.levels[t.level];r&&(this.highDefinition=r.height>=720||r.bitrate/1e3>=2e3,this.trigger(f.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(f.default.PLAYBACK_BITRATE,{height:r.height,width:r.width,bandwidth:r.bitrate,bitrate:r.bitrate,level:t.level}))},t.prototype.getPlaybackType=function(){return this._playbackType},t.prototype.isSeekEnabled=function(){return this._playbackType===h.default.VOD||this.dvrEnabled},(0,l.default)(t,[{key:"dvrEnabled",get:function(){return this._durationExcludesAfterLiveSyncPoint&&this._duration>=this._minDvrSize&&this.getPlaybackType()===h.default.LIVE}}]),t}(c.default);t.default=v,v.canPlay=function(e,t){var r=e.split("?")[0].match(/.*\.(.*)$/)||[],n=r.length>1&&"m3u8"===r[1].toLowerCase()||(0,p.listContainsIgnoreCase)(t,["application/vnd.apple.mpegurl","application/x-mpegURL"]);return!(!d.default.isSupported()||!n)},e.exports=t.default},"./src/playbacks/hls/index.js": -/*!************************************!*\ - !*** ./src/playbacks/hls/index.js ***! - \************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./hls */"./src/playbacks/hls/hls.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/playbacks/html5_audio/html5_audio.js": -/*!**************************************************!*\ - !*** ./src/playbacks/html5_audio/html5_audio.js ***! - \**************************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=c(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=c(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=c(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=c(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=c(r(/*! ../../base/events */"./src/base/events.js")),l=c(r(/*! ../../base/playback */"./src/base/playback.js")),u=c(r(/*! ../../playbacks/html5_video */"./src/playbacks/html5_video/index.js"));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(){return(0,n.default)(this,t),(0,o.default)(this,e.apply(this,arguments))}return(0,a.default)(t,e),t.prototype.updateSettings=function(){this.settings.left=["playpause","position","duration"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(s.default.PLAYBACK_SETTINGSUPDATE)},t.prototype.getPlaybackType=function(){return l.default.AOD},(0,i.default)(t,[{key:"name",get:function(){return"html5_audio"}},{key:"tagName",get:function(){return"audio"}},{key:"isAudioOnly",get:function(){return!0}}]),t}(u.default);t.default=d,d.canPlay=function(e,t){return u.default._canPlay("audio",{wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]},e,t)},e.exports=t.default},"./src/playbacks/html5_audio/index.js": -/*!********************************************!*\ - !*** ./src/playbacks/html5_audio/index.js ***! - \********************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./html5_audio */"./src/playbacks/html5_audio/html5_audio.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/playbacks/html5_video/html5_video.js": -/*!**************************************************!*\ - !*** ./src/playbacks/html5_video/html5_video.js ***! - \**************************************************/ -/*! no static exports found */function(e,t,r){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0});var i=_(r(/*! babel-runtime/core-js/array/from */"./node_modules/babel-runtime/core-js/array/from.js")),o=_(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=_(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=_(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),l=_(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),u=_(r(/*! babel-runtime/helpers/toConsumableArray */"./node_modules/babel-runtime/helpers/toConsumableArray.js")),c=_(r(/*! babel-runtime/core-js/object/keys */"./node_modules/babel-runtime/core-js/object/keys.js")),d=r(/*! ../../base/utils */"./src/base/utils.js"),f=_(r(/*! ../../base/playback */"./src/base/playback.js")),h=_(r(/*! ../../components/browser */"./src/components/browser/index.js")),p=_(r(/*! ../../components/error */"./src/components/error/index.js")),m=_(r(/*! ../../base/events */"./src/base/events.js")),g=_(r(/*! ../../plugins/log */"./src/plugins/log/index.js")),y=_(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),v=_(r(/*! ../../base/template */"./src/base/template.js")),b=_(r(/*! ./public/tracks.html */"./src/playbacks/html5_video/public/tracks.html"));function _(e){return e&&e.__esModule?e:{default:e}}r(/*! ./public/style.scss */"./src/playbacks/html5_video/public/style.scss");var A={mp4:["avc1.42E01E","avc1.58A01E","avc1.4D401E","avc1.64001E","mp4v.20.8","mp4v.20.240","mp4a.40.2"].map((function(e){return'video/mp4; codecs="'+e+', mp4a.40.2"'})),ogg:['video/ogg; codecs="theora, vorbis"','video/ogg; codecs="dirac"','video/ogg; codecs="theora, speex"'],"3gpp":['video/3gpp; codecs="mp4v.20.8, samr"'],webm:['video/webm; codecs="vp8, vorbis"'],mkv:['video/x-matroska; codecs="theora, vorbis"'],m3u8:["application/x-mpegurl"]};A.ogv=A.ogg,A["3gp"]=A["3gpp"];var E={wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]},T=(0,c.default)(E).reduce((function(e,t){return[].concat((0,u.default)(e),(0,u.default)(E[t]))}),[]),S={code:"unknown",message:"unknown"},w=function(e){function t(){(0,o.default)(this,t);for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=(0,a.default)(this,e.call.apply(e,[this].concat(n)));s._destroyed=!1,s._loadStarted=!1,s._isBuffering=!1,s._playheadMoving=!1,s._playheadMovingTimer=null,s._stopped=!1,s._ccTrackId=-1,s._setupSrc(s.options.src),s.options.playback||(s.options.playback=s.options||{}),s.options.playback.disableContextMenu=s.options.playback.disableContextMenu||s.options.disableVideoTagContextMenu;var l=s.options.playback,u=l.preload||(h.default.isSafari?"auto":s.options.preload),c=void 0;return s.options.poster&&("string"==typeof s.options.poster?c=s.options.poster:"string"==typeof s.options.poster.url&&(c=s.options.poster.url)),y.default.extend(s.el,{muted:s.options.mute,defaultMuted:s.options.mute,loop:s.options.loop,poster:c,preload:u||"metadata",controls:(l.controls||s.options.useVideoTagDefaultControls)&&"controls",crossOrigin:l.crossOrigin,"x-webkit-playsinline":l.playInline}),l.playInline&&s.$el.attr({playsinline:"playsinline"}),l.crossOrigin&&s.$el.attr({crossorigin:l.crossOrigin}),s.settings={default:["seekbar"]},s.settings.left=["playpause","position","duration"],s.settings.right=["fullscreen","volume","hd-indicator"],l.externalTracks&&s._setupExternalTracks(l.externalTracks),s.options.autoPlay&&s.attemptAutoPlay(),s}return(0,l.default)(t,e),(0,s.default)(t,[{key:"name",get:function(){return"html5_video"}},{key:"tagName",get:function(){return this.isAudioOnly?"audio":"video"}},{key:"isAudioOnly",get:function(){var e=this.options.src,r=t._mimeTypesForUrl(e,E,this.options.mimeType);return this.options.playback&&this.options.playback.audioOnly||this.options.audioOnly||T.indexOf(r[0])>=0}},{key:"attributes",get:function(){return{"data-html5-video":""}}},{key:"events",get:function(){return{canplay:"_onCanPlay",canplaythrough:"_handleBufferingEvents",durationchange:"_onDurationChange",ended:"_onEnded",error:"_onError",loadeddata:"_onLoadedData",loadedmetadata:"_onLoadedMetadata",pause:"_onPause",playing:"_onPlaying",progress:"_onProgress",seeking:"_onSeeking",seeked:"_onSeeked",stalled:"_handleBufferingEvents",timeupdate:"_onTimeUpdate",waiting:"_onWaiting"}}},{key:"ended",get:function(){return this.el.ended}},{key:"buffering",get:function(){return this._isBuffering}}]),t.prototype.configure=function(t){e.prototype.configure.call(this,t),this.el.loop=!!t.loop},t.prototype.attemptAutoPlay=function(){var e=this;this.canAutoPlay((function(t,r){r&&g.default.warn(e.name,"autoplay error.",{result:t,error:r}),t&&n.nextTick((function(){return!e._destroyed&&e.play()}))}))},t.prototype.canAutoPlay=function(e){this.options.disableCanAutoPlay&&e(!0,null);var t={timeout:this.options.autoPlayTimeout||500,inline:this.options.playback.playInline||!1,muted:this.options.mute||!1};h.default.isMobile&&d.DomRecycler.options.recycleVideo&&(t.element=this.el),(0,d.canAutoPlayMedia)(e,t)},t.prototype._setupExternalTracks=function(e){this._externalTracks=e.map((function(e){return{kind:e.kind||"subtitles",label:e.label,lang:e.lang,src:e.src}}))},t.prototype._setupSrc=function(e){this.el.src!==e&&(this._ccIsSetup=!1,this.el.src=e,this._src=this.el.src)},t.prototype._onLoadedMetadata=function(e){this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_LOADEDMETADATA,{duration:e.target.duration,data:e}),this._updateSettings();var t=void 0===this._options.autoSeekFromUrl||this._options.autoSeekFromUrl;this.getPlaybackType()!==f.default.LIVE&&t&&this._checkInitialSeek()},t.prototype._onDurationChange=function(){this._updateSettings(),this._onTimeUpdate(),this._onProgress()},t.prototype._updateSettings=function(){this.getPlaybackType()===f.default.VOD||this.getPlaybackType()===f.default.AOD?this.settings.left=["playpause","position","duration"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(m.default.PLAYBACK_SETTINGSUPDATE)},t.prototype.isSeekEnabled=function(){return isFinite(this.getDuration())},t.prototype.getPlaybackType=function(){var e="audio"===this.tagName?f.default.AOD:f.default.VOD;return[0,void 0,1/0].indexOf(this.el.duration)>=0?f.default.LIVE:e},t.prototype.isHighDefinitionInUse=function(){return!1},t.prototype.consent=function(){this.isPlaying()||(e.prototype.consent.call(this),this.el.load())},t.prototype.play=function(){this.trigger(m.default.PLAYBACK_PLAY_INTENT),this._stopped=!1,this._setupSrc(this._src),this._handleBufferingEvents();var e=this.el.play();e&&e.catch&&e.catch((function(){}))},t.prototype.pause=function(){this.el.pause()},t.prototype.stop=function(){this.pause(),this._stopped=!0,this.el.removeAttribute("src"),this.el.load(),this._stopPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_STOP)},t.prototype.volume=function(e){0===e?(this.$el.attr({muted:"true"}),this.el.muted=!0):(this.$el.attr({muted:null}),this.el.muted=!1,this.el.volume=e/100)},t.prototype.mute=function(){this.el.muted=!0},t.prototype.unmute=function(){this.el.muted=!1},t.prototype.isMuted=function(){return!0===this.el.muted||0===this.el.volume},t.prototype.isPlaying=function(){return!this.el.paused&&!this.el.ended},t.prototype._startPlayheadMovingChecks=function(){null===this._playheadMovingTimer&&(this._playheadMovingTimeOnCheck=null,this._determineIfPlayheadMoving(),this._playheadMovingTimer=setInterval(this._determineIfPlayheadMoving.bind(this),500))},t.prototype._stopPlayheadMovingChecks=function(){null!==this._playheadMovingTimer&&(clearInterval(this._playheadMovingTimer),this._playheadMovingTimer=null,this._playheadMoving=!1)},t.prototype._determineIfPlayheadMoving=function(){var e=this._playheadMovingTimeOnCheck,t=this.el.currentTime;this._playheadMoving=e!==t,this._playheadMovingTimeOnCheck=t,this._handleBufferingEvents()},t.prototype._onWaiting=function(){this._loadStarted=!0,this._handleBufferingEvents()},t.prototype._onLoadedData=function(){this._loadStarted=!0,this._handleBufferingEvents()},t.prototype._onCanPlay=function(){this._handleBufferingEvents()},t.prototype._onPlaying=function(){this._checkForClosedCaptions(),this._startPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_PLAY)},t.prototype._onPause=function(){this._stopPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_PAUSE)},t.prototype._onSeeking=function(){this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_SEEK)},t.prototype._onSeeked=function(){this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_SEEKED)},t.prototype._onEnded=function(){this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_ENDED,this.name)},t.prototype._handleBufferingEvents=function(){var e=!this.el.ended&&!this.el.paused,t=this._loadStarted&&!this.el.ended&&!this._stopped&&(e&&!this._playheadMoving||this.el.readyState<this.el.HAVE_FUTURE_DATA);this._isBuffering!==t&&(this._isBuffering=t,t?this.trigger(m.default.PLAYBACK_BUFFERING,this.name):this.trigger(m.default.PLAYBACK_BUFFERFULL,this.name))},t.prototype._onError=function(){var e=this.el.error||S,t=e.code,r=e.message,n=t===S.code,i=this.createError({code:t,description:r,raw:this.el.error,level:n?p.default.Levels.WARN:p.default.Levels.FATAL});n?g.default.warn(this.name,"HTML5 unknown error: ",i):this.trigger(m.default.PLAYBACK_ERROR,i)},t.prototype.destroy=function(){this._destroyed=!0,this.handleTextTrackChange&&this.el.textTracks.removeEventListener("change",this.handleTextTrackChange),e.prototype.destroy.call(this),this.el.removeAttribute("src"),this.el.load(),this._src=null,d.DomRecycler.garbage(this.$el)},t.prototype.seek=function(e){this.el.currentTime=e},t.prototype.seekPercentage=function(e){var t=this.el.duration*(e/100);this.seek(t)},t.prototype._checkInitialSeek=function(){var e=(0,d.seekStringToSeconds)();0!==e&&this.seek(e)},t.prototype.getCurrentTime=function(){return this.el.currentTime},t.prototype.getDuration=function(){return this.el.duration},t.prototype._onTimeUpdate=function(){this.getPlaybackType()===f.default.LIVE?this.trigger(m.default.PLAYBACK_TIMEUPDATE,{current:1,total:1},this.name):this.trigger(m.default.PLAYBACK_TIMEUPDATE,{current:this.el.currentTime,total:this.el.duration},this.name)},t.prototype._onProgress=function(){if(this.el.buffered.length){for(var e=[],t=0,r=0;r<this.el.buffered.length;r++)e=[].concat((0,u.default)(e),[{start:this.el.buffered.start(r),end:this.el.buffered.end(r)}]),this.el.currentTime>=e[r].start&&this.el.currentTime<=e[r].end&&(t=r);var n={start:e[t].start,current:e[t].end,total:this.el.duration};this.trigger(m.default.PLAYBACK_PROGRESS,n,e)}},t.prototype._typeFor=function(e){var r=t._mimeTypesForUrl(e,A,this.options.mimeType);return 0===r.length&&(r=t._mimeTypesForUrl(e,E,this.options.mimeType)),(r[0]||"").split(";")[0]},t.prototype._ready=function(){this._isReadyState||(this._isReadyState=!0,this.trigger(m.default.PLAYBACK_READY,this.name))},t.prototype._checkForClosedCaptions=function(){if(this.isHTML5Video&&!this._ccIsSetup){if(this.hasClosedCaptionsTracks){this.trigger(m.default.PLAYBACK_SUBTITLE_AVAILABLE);var e=this.closedCaptionsTrackId;this.closedCaptionsTrackId=e,this.handleTextTrackChange=this._handleTextTrackChange.bind(this),this.el.textTracks.addEventListener("change",this.handleTextTrackChange)}this._ccIsSetup=!0}},t.prototype._handleTextTrackChange=function(){var e=this.closedCaptionsTracks.find((function(e){return"showing"===e.track.mode}))||{id:-1};this._ccTrackId!==e.id&&(this._ccTrackId=e.id,this.trigger(m.default.PLAYBACK_SUBTITLE_CHANGED,{id:e.id}))},t.prototype.render=function(){return this.options.playback.disableContextMenu&&this.$el.on("contextmenu",(function(){return!1})),this._externalTracks&&this._externalTracks.length>0&&this.$el.html(this.template({tracks:this._externalTracks})),this._ready(),this},(0,s.default)(t,[{key:"isReady",get:function(){return this._isReadyState}},{key:"isHTML5Video",get:function(){return this.name===t.prototype.name}},{key:"closedCaptionsTracks",get:function(){var e=0;return(this.el.textTracks?(0,i.default)(this.el.textTracks):[]).filter((function(e){return"subtitles"===e.kind||"captions"===e.kind})).map((function(t){return{id:e++,name:t.label,track:t}}))}},{key:"closedCaptionsTrackId",get:function(){return this._ccTrackId},set:function(e){if((0,d.isNumber)(e)){var t=this.closedCaptionsTracks,r=void 0;if(-1!==e){if(!(r=t.find((function(t){return t.id===e}))))return;if("showing"===r.track.mode)return}t.filter((function(e){return"hidden"!==e.track.mode})).forEach((function(e){return e.track.mode="hidden"})),r&&(r.track.mode="showing"),this._ccTrackId=e,this.trigger(m.default.PLAYBACK_SUBTITLE_CHANGED,{id:e})}}},{key:"template",get:function(){return(0,v.default)(b.default)}}]),t}(f.default);t.default=w,w._mimeTypesForUrl=function(e,t,r){var n=(e.split("?")[0].match(/.*\.(.*)$/)||[])[1],i=r||n&&t[n.toLowerCase()]||[];return i.constructor===Array?i:[i]},w._canPlay=function(e,t,r,n){var i=w._mimeTypesForUrl(r,t,n),o=document.createElement(e);return!!i.filter((function(e){return!!o.canPlayType(e).replace(/no/,"")}))[0]},w.canPlay=function(e,t){return w._canPlay("audio",E,e,t)||w._canPlay("video",A,e,t)},e.exports=t.default}).call(this,r(/*! ./../../../node_modules/node-libs-browser/node_modules/process/browser.js */"./node_modules/node-libs-browser/node_modules/process/browser.js"))},"./src/playbacks/html5_video/index.js": -/*!********************************************!*\ - !*** ./src/playbacks/html5_video/index.js ***! - \********************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./html5_video */"./src/playbacks/html5_video/html5_video.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/playbacks/html5_video/public/style.scss": -/*!*****************************************************!*\ - !*** ./src/playbacks/html5_video/public/style.scss ***! - \*****************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./style.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/html5_video/public/style.scss");"string"==typeof n&&(n=[[e.i,n,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};r(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(n,i),n.locals&&(e.exports=n.locals)},"./src/playbacks/html5_video/public/tracks.html": -/*!******************************************************!*\ - !*** ./src/playbacks/html5_video/public/tracks.html ***! - \******************************************************/ -/*! no static exports found */function(e,t){e.exports='<% for (var i = 0; i < tracks.length; i++) { %>\n <track data-html5-video-track="<%= i %>" kind="<%= tracks[i].kind %>" label="<%= tracks[i].label %>" srclang="<%= tracks[i].lang %>" src="<%= tracks[i].src %>" />\n<% }; %>\n'},"./src/playbacks/html_img/html_img.js": -/*!********************************************!*\ - !*** ./src/playbacks/html_img/html_img.js ***! - \********************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=u(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=u(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=u(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=u(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=u(r(/*! ../../base/playback */"./src/base/playback.js")),l=u(r(/*! ../../base/events */"./src/base/events.js"));function u(e){return e&&e.__esModule?e:{default:e}}r(/*! ./public/style.scss */"./src/playbacks/html_img/public/style.scss");var c=function(e){function t(r){(0,n.default)(this,t);var o=(0,i.default)(this,e.call(this,r));return o.el.src=r.src,o}return(0,a.default)(t,e),t.prototype.getPlaybackType=function(){return s.default.NO_OP},(0,o.default)(t,[{key:"name",get:function(){return"html_img"}},{key:"tagName",get:function(){return"img"}},{key:"attributes",get:function(){return{"data-html-img":""}}},{key:"events",get:function(){return{load:"_onLoad",abort:"_onError",error:"_onError"}}}]),t.prototype.render=function(){return this.trigger(l.default.PLAYBACK_READY,this.name),this},t.prototype._onLoad=function(){this.trigger(l.default.PLAYBACK_ENDED,this.name)},t.prototype._onError=function(e){var t="error"===e.type?"load error":"loading aborted";this.trigger(l.default.PLAYBACK_ERROR,{message:t},this.name)},t}(s.default);t.default=c,c.canPlay=function(e){return/\.(png|jpg|jpeg|gif|bmp|tiff|pgm|pnm|webp)(|\?.*)$/i.test(e)},e.exports=t.default},"./src/playbacks/html_img/index.js": -/*!*****************************************!*\ - !*** ./src/playbacks/html_img/index.js ***! - \*****************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./html_img */"./src/playbacks/html_img/html_img.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/playbacks/html_img/public/style.scss": -/*!**************************************************!*\ - !*** ./src/playbacks/html_img/public/style.scss ***! - \**************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./style.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/html_img/public/style.scss");"string"==typeof n&&(n=[[e.i,n,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};r(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(n,i),n.locals&&(e.exports=n.locals)},"./src/playbacks/no_op/index.js": -/*!**************************************!*\ - !*** ./src/playbacks/no_op/index.js ***! - \**************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./no_op */"./src/playbacks/no_op/no_op.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/playbacks/no_op/no_op.js": -/*!**************************************!*\ - !*** ./src/playbacks/no_op/no_op.js ***! - \**************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=f(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=f(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=f(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=f(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=r(/*! ../../base/utils */"./src/base/utils.js"),l=f(r(/*! ../../base/playback */"./src/base/playback.js")),u=f(r(/*! ../../base/template */"./src/base/template.js")),c=f(r(/*! ../../base/events */"./src/base/events.js")),d=f(r(/*! ./public/error.html */"./src/playbacks/no_op/public/error.html"));function f(e){return e&&e.__esModule?e:{default:e}}r(/*! ./public/style.scss */"./src/playbacks/no_op/public/style.scss");var h=function(e){function t(){(0,n.default)(this,t);for(var r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];var s=(0,i.default)(this,e.call.apply(e,[this].concat(o)));return s._noiseFrameNum=-1,s}return(0,a.default)(t,e),(0,o.default)(t,[{key:"name",get:function(){return"no_op"}},{key:"template",get:function(){return(0,u.default)(d.default)}},{key:"attributes",get:function(){return{"data-no-op":""}}}]),t.prototype.render=function(){var e=this.options.playbackNotSupportedMessage||this.i18n.t("playback_not_supported");this.$el.html(this.template({message:e})),this.trigger(c.default.PLAYBACK_READY,this.name);var t=!(!this.options.poster||!this.options.poster.showForNoOp);return!this.options.autoPlay&&t||this._animate(),this},t.prototype._noise=function(){if(this._noiseFrameNum=(this._noiseFrameNum+1)%5,!this._noiseFrameNum){var e=this.context.createImageData(this.context.canvas.width,this.context.canvas.height),t=void 0;try{t=new Uint32Array(e.data.buffer)}catch(i){t=new Uint32Array(this.context.canvas.width*this.context.canvas.height*4);for(var r=e.data,n=0;n<r.length;n++)t[n]=r[n]}for(var i=t.length,o=6*Math.random()+4,a=0,s=0,l=0;l<i;)a<0&&(a=o*Math.random(),s=255*Math.pow(Math.random(),.4)<<24),a-=1,t[l++]=s;this.context.putImageData(e,0,0)}},t.prototype._loop=function(){var e=this;this._stop||(this._noise(),this._animationHandle=(0,s.requestAnimationFrame)((function(){return e._loop()})))},t.prototype.destroy=function(){this._animationHandle&&((0,s.cancelAnimationFrame)(this._animationHandle),this._stop=!0)},t.prototype._animate=function(){this.canvas=this.$el.find("canvas[data-no-op-canvas]")[0],this.context=this.canvas.getContext("2d"),this._loop()},t}(l.default);t.default=h,h.canPlay=function(e){return!0},e.exports=t.default},"./src/playbacks/no_op/public/error.html": -/*!***********************************************!*\ - !*** ./src/playbacks/no_op/public/error.html ***! - \***********************************************/ -/*! no static exports found */function(e,t){e.exports="<canvas data-no-op-canvas></canvas>\n<p data-no-op-msg><%=message%><p>\n"},"./src/playbacks/no_op/public/style.scss": -/*!***********************************************!*\ - !*** ./src/playbacks/no_op/public/style.scss ***! - \***********************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./style.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/no_op/public/style.scss");"string"==typeof n&&(n=[[e.i,n,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};r(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(n,i),n.locals&&(e.exports=n.locals)},"./src/plugins/click_to_pause/click_to_pause.js": -/*!******************************************************!*\ - !*** ./src/plugins/click_to_pause/click_to_pause.js ***! - \******************************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=c(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=c(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=c(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=c(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=c(r(/*! ../../base/container_plugin */"./src/base/container_plugin.js")),l=c(r(/*! ../../base/events */"./src/base/events.js")),u=c(r(/*! ../../base/playback */"./src/base/playback.js"));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(r){return(0,n.default)(this,t),(0,i.default)(this,e.call(this,r))}return(0,a.default)(t,e),(0,o.default)(t,[{key:"name",get:function(){return"click_to_pause"}}]),t.prototype.bindEvents=function(){this.listenTo(this.container,l.default.CONTAINER_CLICK,this.click),this.listenTo(this.container,l.default.CONTAINER_SETTINGSUPDATE,this.settingsUpdate)},t.prototype.click=function(){(this.container.getPlaybackType()!==u.default.LIVE||this.container.isDvrEnabled())&&(this.container.isPlaying()?this.container.pause():this.container.play())},t.prototype.settingsUpdate=function(){var e=this.container.getPlaybackType()!==u.default.LIVE||this.container.isDvrEnabled();if(e!==this.pointerEnabled){var t=e?"addClass":"removeClass";this.container.$el[t]("pointer-enabled"),this.pointerEnabled=e}},t}(s.default);t.default=d,e.exports=t.default},"./src/plugins/click_to_pause/index.js": -/*!*********************************************!*\ - !*** ./src/plugins/click_to_pause/index.js ***! - \*********************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./click_to_pause */"./src/plugins/click_to_pause/click_to_pause.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/plugins/closed_captions/closed_captions.js": -/*!********************************************************!*\ - !*** ./src/plugins/closed_captions/closed_captions.js ***! - \********************************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=f(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=f(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=f(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=f(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=f(r(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),l=f(r(/*! ../../base/template */"./src/base/template.js")),u=f(r(/*! ../../base/events */"./src/base/events.js")),c=r(/*! ../../base/utils */"./src/base/utils.js"),d=f(r(/*! ./public/closed_captions.html */"./src/plugins/closed_captions/public/closed_captions.html"));function f(e){return e&&e.__esModule?e:{default:e}}r(/*! ./public/closed_captions.scss */"./src/plugins/closed_captions/public/closed_captions.scss");var h=function(e){function t(r){(0,n.default)(this,t);var o=(0,i.default)(this,e.call(this,r)),a=r.options.closedCaptionsConfig;return o._title=a&&a.title?a.title:null,o._ariaLabel=a&&a.ariaLabel?a.ariaLabel:"cc-button",o._labelCb=a&&a.labelCallback&&"function"==typeof a.labelCallback?a.labelCallback:function(e){return e.name},o}return(0,a.default)(t,e),(0,o.default)(t,[{key:"name",get:function(){return"closed_captions"}},{key:"template",get:function(){return(0,l.default)(d.default)}},{key:"events",get:function(){return{"click [data-cc-button]":"toggleContextMenu","click [data-cc-select]":"onTrackSelect"}}},{key:"attributes",get:function(){return{class:"cc-controls","data-cc-controls":""}}}]),t.prototype.bindEvents=function(){this.listenTo(this.core,u.default.CORE_ACTIVE_CONTAINER_CHANGED,this.containerChanged),this.listenTo(this.core.mediaControl,u.default.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.core.mediaControl,u.default.MEDIACONTROL_HIDE,this.hideContextMenu),this.container=this.core.getCurrentContainer(),this.container&&(this.listenTo(this.container,u.default.CONTAINER_SUBTITLE_AVAILABLE,this.onSubtitleAvailable),this.listenTo(this.container,u.default.CONTAINER_SUBTITLE_CHANGED,this.onSubtitleChanged),this.listenTo(this.container,u.default.CONTAINER_STOP,this.onContainerStop))},t.prototype.onContainerStop=function(){this.ccAvailable(!1)},t.prototype.containerChanged=function(){this.ccAvailable(!1),this.stopListening(),this.bindEvents()},t.prototype.onSubtitleAvailable=function(){this.renderCcButton(),this.ccAvailable(!0)},t.prototype.onSubtitleChanged=function(e){this.setCurrentContextMenuElement(e.id)},t.prototype.onTrackSelect=function(e){var t=parseInt(e.target.dataset.ccSelect,10);return this.container.closedCaptionsTrackId=t,this.hideContextMenu(),e.stopPropagation(),!1},t.prototype.ccAvailable=function(e){var t=e?"addClass":"removeClass";this.$el[t]("available")},t.prototype.toggleContextMenu=function(){this.$el.find("ul").toggle()},t.prototype.hideContextMenu=function(){this.$el.find("ul").hide()},t.prototype.contextMenuElement=function(e){return this.$el.find("ul a"+(isNaN(e)?"":'[data-cc-select="'+e+'"]')).parent()},t.prototype.setCurrentContextMenuElement=function(e){if(this._trackId!==e){this.contextMenuElement().removeClass("current"),this.contextMenuElement(e).addClass("current");var t=e>-1?"addClass":"removeClass";this.$ccButton[t]("enabled"),this._trackId=e}},t.prototype.renderCcButton=function(){for(var e=this.container?this.container.closedCaptionsTracks:[],t=0;t<e.length;t++)e[t].label=this._labelCb(e[t]);this.$el.html(this.template({ariaLabel:this._ariaLabel,disabledLabel:this.core.i18n.t("disabled"),title:this._title,tracks:e})),this.$ccButton=this.$el.find("button.cc-button[data-cc-button]"),this.$ccButton.append(c.SvgIcons.cc),this.$el.append(this.style)},t.prototype.render=function(){this.renderCcButton();var e=this.core.mediaControl.$el.find("button[data-fullscreen]");return e[0]?this.$el.insertAfter(e):this.core.mediaControl.$el.find(".media-control-right-panel[data-media-control]").prepend(this.$el),this},t}(s.default);t.default=h,e.exports=t.default},"./src/plugins/closed_captions/index.js": -/*!**********************************************!*\ - !*** ./src/plugins/closed_captions/index.js ***! - \**********************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./closed_captions */"./src/plugins/closed_captions/closed_captions.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/plugins/closed_captions/public/closed_captions.html": -/*!*****************************************************************!*\ - !*** ./src/plugins/closed_captions/public/closed_captions.html ***! - \*****************************************************************/ -/*! no static exports found */function(e,t){e.exports='<button type="button" class="cc-button media-control-button media-control-icon" data-cc-button aria-label="<%= ariaLabel %>"></button>\n<ul>\n <% if (title) { %>\n <li data-title><%= title %></li>\n <% }; %>\n <li><a href="#" data-cc-select="-1"><%= disabledLabel %></a></li>\n <% for (var i = 0; i < tracks.length; i++) { %>\n <li><a href="#" data-cc-select="<%= tracks[i].id %>"><%= tracks[i].label %></a></li>\n <% }; %>\n</ul>\n'},"./src/plugins/closed_captions/public/closed_captions.scss": -/*!*****************************************************************!*\ - !*** ./src/plugins/closed_captions/public/closed_captions.scss ***! - \*****************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./closed_captions.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/closed_captions/public/closed_captions.scss");"string"==typeof n&&(n=[[e.i,n,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};r(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(n,i),n.locals&&(e.exports=n.locals)},"./src/plugins/dvr_controls/dvr_controls.js": -/*!**************************************************!*\ - !*** ./src/plugins/dvr_controls/dvr_controls.js ***! - \**************************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=f(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=f(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=f(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=f(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=f(r(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),l=f(r(/*! ../../base/template */"./src/base/template.js")),u=f(r(/*! ../../base/playback */"./src/base/playback.js")),c=f(r(/*! ../../base/events */"./src/base/events.js")),d=f(r(/*! ./public/index.html */"./src/plugins/dvr_controls/public/index.html"));function f(e){return e&&e.__esModule?e:{default:e}}r(/*! ./public/dvr_controls.scss */"./src/plugins/dvr_controls/public/dvr_controls.scss");var h=function(e){function t(r){(0,n.default)(this,t);var o=(0,i.default)(this,e.call(this,r));return o.settingsUpdate(),o}return(0,a.default)(t,e),(0,o.default)(t,[{key:"template",get:function(){return(0,l.default)(d.default)}},{key:"name",get:function(){return"dvr_controls"}},{key:"events",get:function(){return{"click .live-button":"click"}}},{key:"attributes",get:function(){return{class:"dvr-controls","data-dvr-controls":""}}}]),t.prototype.bindEvents=function(){this.listenTo(this.core.mediaControl,c.default.MEDIACONTROL_CONTAINERCHANGED,this.containerChanged),this.listenTo(this.core.mediaControl,c.default.MEDIACONTROL_RENDERED,this.settingsUpdate),this.listenTo(this.core,c.default.CORE_OPTIONS_CHANGE,this.render),this.core.getCurrentContainer()&&(this.listenToOnce(this.core.getCurrentContainer(),c.default.CONTAINER_TIMEUPDATE,this.render),this.listenTo(this.core.getCurrentContainer(),c.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.dvrChanged))},t.prototype.containerChanged=function(){this.stopListening(),this.bindEvents()},t.prototype.dvrChanged=function(e){this.core.getPlaybackType()===u.default.LIVE&&(this.settingsUpdate(),this.core.mediaControl.$el.addClass("live"),e?(this.core.mediaControl.$el.addClass("dvr"),this.core.mediaControl.$el.find(".media-control-indicator[data-position], .media-control-indicator[data-duration]").hide()):this.core.mediaControl.$el.removeClass("dvr"))},t.prototype.click=function(){var e=this.core.mediaControl,t=e.container;t.isPlaying()||t.play(),e.$el.hasClass("dvr")&&t.seek(t.getDuration())},t.prototype.settingsUpdate=function(){var e=this;this.stopListening(),this.core.mediaControl.$el.removeClass("live"),this.shouldRender()&&(this.render(),this.$el.click((function(){return e.click()}))),this.bindEvents()},t.prototype.shouldRender=function(){return(void 0===this.core.options.useDvrControls||!!this.core.options.useDvrControls)&&this.core.getPlaybackType()===u.default.LIVE},t.prototype.render=function(){return this.$el.html(this.template({live:this.core.i18n.t("live"),backToLive:this.core.i18n.t("back_to_live")})),this.shouldRender()&&(this.core.mediaControl.$el.addClass("live"),this.core.mediaControl.$(".media-control-left-panel[data-media-control]").append(this.$el)),this},t}(s.default);t.default=h,e.exports=t.default},"./src/plugins/dvr_controls/index.js": -/*!*******************************************!*\ - !*** ./src/plugins/dvr_controls/index.js ***! - \*******************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./dvr_controls */"./src/plugins/dvr_controls/dvr_controls.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/plugins/dvr_controls/public/dvr_controls.scss": -/*!***********************************************************!*\ - !*** ./src/plugins/dvr_controls/public/dvr_controls.scss ***! - \***********************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./dvr_controls.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/dvr_controls/public/dvr_controls.scss");"string"==typeof n&&(n=[[e.i,n,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};r(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(n,i),n.locals&&(e.exports=n.locals)},"./src/plugins/dvr_controls/public/index.html": -/*!****************************************************!*\ - !*** ./src/plugins/dvr_controls/public/index.html ***! - \****************************************************/ -/*! no static exports found */function(e,t){e.exports='<div class="live-info"><%= live %></div>\n<button type="button" class="live-button" aria-label="<%= backToLive %>"><%= backToLive %></button>\n'},"./src/plugins/end_video.js": -/*!**********************************!*\ - !*** ./src/plugins/end_video.js ***! - \**********************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=l(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=l(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=l(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=l(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=l(r(/*! ../base/events */"./src/base/events.js"));function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(){return(0,n.default)(this,t),(0,o.default)(this,e.apply(this,arguments))}return(0,a.default)(t,e),t.prototype.bindEvents=function(){this.listenTo(this.core,s.default.CORE_ACTIVE_CONTAINER_CHANGED,this.containerChanged);var e=this.core.activeContainer;e&&(this.listenTo(e,s.default.CONTAINER_ENDED,this.ended),this.listenTo(e,s.default.CONTAINER_STOP,this.ended))},t.prototype.containerChanged=function(){this.stopListening(),this.bindEvents()},t.prototype.ended=function(){(void 0===this.core.options.exitFullscreenOnEnd||this.core.options.exitFullscreenOnEnd)&&this.core.isFullscreen()&&this.core.toggleFullscreen()},(0,i.default)(t,[{key:"name",get:function(){return"end_video"}}]),t}(l(r(/*! ../base/core_plugin */"./src/base/core_plugin.js")).default);t.default=u,e.exports=t.default},"./src/plugins/error_screen/error_screen.js": -/*!**************************************************!*\ - !*** ./src/plugins/error_screen/error_screen.js ***! - \**************************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=h(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=h(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=h(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=h(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=h(r(/*! ../../base/events */"./src/base/events.js")),l=h(r(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),u=h(r(/*! ../../base/template */"./src/base/template.js")),c=h(r(/*! ../../components/error/ */"./src/components/error/index.js")),d=r(/*! ../../base/utils */"./src/base/utils.js"),f=h(r(/*! ./public/error_screen.html */"./src/plugins/error_screen/public/error_screen.html"));function h(e){return e&&e.__esModule?e:{default:e}}r(/*! ./public/error_screen.scss */"./src/plugins/error_screen/public/error_screen.scss");var p=function(e){function t(r){var o;(0,n.default)(this,t);var a=(0,i.default)(this,e.call(this,r));return a.options.disableErrorScreen?(o=a.disable(),(0,i.default)(a,o)):a}return(0,a.default)(t,e),(0,o.default)(t,[{key:"name",get:function(){return"error_screen"}},{key:"template",get:function(){return(0,u.default)(f.default)}},{key:"container",get:function(){return this.core.getCurrentContainer()}},{key:"attributes",get:function(){return{class:"player-error-screen","data-error-screen":""}}}]),t.prototype.bindEvents=function(){this.listenTo(this.core,s.default.ERROR,this.onError),this.listenTo(this.core,s.default.CORE_ACTIVE_CONTAINER_CHANGED,this.onContainerChanged)},t.prototype.bindReload=function(){this.reloadButton=this.$el.find(".player-error-screen__reload"),this.reloadButton&&this.reloadButton.on("click",this.reload.bind(this))},t.prototype.reload=function(){var e=this;this.listenToOnce(this.core,s.default.CORE_READY,(function(){return e.container.play()})),this.core.load(this.options.sources,this.options.mimeType),this.unbindReload()},t.prototype.unbindReload=function(){this.reloadButton&&this.reloadButton.off("click")},t.prototype.onContainerChanged=function(){this.err=null,this.unbindReload(),this.hide()},t.prototype.onError=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.level===c.default.Levels.FATAL&&(this.err=e,this.container.disableMediaControl(),this.container.stop(),this.show())},t.prototype.show=function(){this.render(),this.$el.show()},t.prototype.hide=function(){this.$el.hide()},t.prototype.render=function(){if(this.err)return this.$el.html(this.template({title:this.err.UI.title,message:this.err.UI.message,code:this.err.code,icon:this.err.UI.icon||"",reloadIcon:d.SvgIcons.reload})),this.core.$el.append(this.el),this.bindReload(),this},t}(l.default);t.default=p,e.exports=t.default},"./src/plugins/error_screen/index.js": -/*!*******************************************!*\ - !*** ./src/plugins/error_screen/index.js ***! - \*******************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./error_screen */"./src/plugins/error_screen/error_screen.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/plugins/error_screen/public/error_screen.html": -/*!***********************************************************!*\ - !*** ./src/plugins/error_screen/public/error_screen.html ***! - \***********************************************************/ -/*! no static exports found */function(e,t){e.exports='<div class="player-error-screen__content" data-error-screen>\n <% if (icon) { %>\n <div class="player-error-screen__icon" data-error-screen><%= icon %></div>\n <% } %>\n <div class="player-error-screen__title" data-error-screen><%= title %></div>\n <div class="player-error-screen__message" data-error-screen><%= message %></div>\n <div class="player-error-screen__code" data-error-screen>Error code: <%= code %></div>\n <div class="player-error-screen__reload" data-error-screen><%= reloadIcon %></div>\n</div>\n'},"./src/plugins/error_screen/public/error_screen.scss": -/*!***********************************************************!*\ - !*** ./src/plugins/error_screen/public/error_screen.scss ***! - \***********************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./error_screen.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/error_screen/public/error_screen.scss");"string"==typeof n&&(n=[[e.i,n,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};r(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(n,i),n.locals&&(e.exports=n.locals)},"./src/plugins/favicon/favicon.js": -/*!****************************************!*\ - !*** ./src/plugins/favicon/favicon.js ***! - \****************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=d(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=d(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=d(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=d(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=d(r(/*! ../../base/core_plugin */"./src/base/core_plugin.js")),l=d(r(/*! ../../base/events */"./src/base/events.js")),u=d(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),c=r(/*! ../../base/utils */"./src/base/utils.js");function d(e){return e&&e.__esModule?e:{default:e}}var f=(0,u.default)('link[rel="shortcut icon"]'),h=function(e){function t(r){(0,n.default)(this,t);var o=(0,i.default)(this,e.call(this,r));return o._container=null,o.configure(),o}return(0,a.default)(t,e),(0,o.default)(t,[{key:"name",get:function(){return"favicon"}},{key:"oldIcon",get:function(){return f}}]),t.prototype.configure=function(){this.core.options.changeFavicon?this.enabled||(this.stopListening(this.core,l.default.CORE_OPTIONS_CHANGE),this.enable()):this.enabled&&(this.disable(),this.listenTo(this.core,l.default.CORE_OPTIONS_CHANGE,this.configure))},t.prototype.bindEvents=function(){this.listenTo(this.core,l.default.CORE_OPTIONS_CHANGE,this.configure),this.listenTo(this.core,l.default.CORE_ACTIVE_CONTAINER_CHANGED,this.containerChanged),this.core.activeContainer&&this.containerChanged()},t.prototype.containerChanged=function(){this._container&&this.stopListening(this._container),this._container=this.core.activeContainer,this.listenTo(this._container,l.default.CONTAINER_PLAY,this.setPlayIcon),this.listenTo(this._container,l.default.CONTAINER_PAUSE,this.setPauseIcon),this.listenTo(this._container,l.default.CONTAINER_STOP,this.resetIcon),this.listenTo(this._container,l.default.CONTAINER_ENDED,this.resetIcon),this.listenTo(this._container,l.default.CONTAINER_ERROR,this.resetIcon),this.resetIcon()},t.prototype.disable=function(){e.prototype.disable.call(this),this.resetIcon()},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.resetIcon()},t.prototype.createIcon=function(e){var t=(0,u.default)("<canvas/>");t[0].width=16,t[0].height=16;var r=t[0].getContext("2d");r.fillStyle="#000";var n=(0,u.default)(e).find("path").attr("d"),i=new Path2D(n);r.fill(i);var o=(0,u.default)('<link rel="shortcut icon" type="image/png"/>');return o.attr("href",t[0].toDataURL("image/png")),o},t.prototype.setPlayIcon=function(){this.playIcon||(this.playIcon=this.createIcon(c.SvgIcons.play)),this.changeIcon(this.playIcon)},t.prototype.setPauseIcon=function(){this.pauseIcon||(this.pauseIcon=this.createIcon(c.SvgIcons.pause)),this.changeIcon(this.pauseIcon)},t.prototype.resetIcon=function(){(0,u.default)('link[rel="shortcut icon"]').remove(),(0,u.default)("head").append(this.oldIcon)},t.prototype.changeIcon=function(e){e&&((0,u.default)('link[rel="shortcut icon"]').remove(),(0,u.default)("head").append(e))},t}(s.default);t.default=h,e.exports=t.default},"./src/plugins/favicon/index.js": -/*!**************************************!*\ - !*** ./src/plugins/favicon/index.js ***! - \**************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./favicon.js */"./src/plugins/favicon/favicon.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/plugins/google_analytics/google_analytics.js": -/*!**********************************************************!*\ - !*** ./src/plugins/google_analytics/google_analytics.js ***! - \**********************************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=u(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=u(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=u(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=u(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=u(r(/*! ../../base/container_plugin */"./src/base/container_plugin.js")),l=u(r(/*! ../../base/events */"./src/base/events.js"));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(r){(0,n.default)(this,t);var o=(0,i.default)(this,e.call(this,r));return o.container.options.gaAccount&&(o.account=o.container.options.gaAccount,o.trackerName=o.container.options.gaTrackerName?o.container.options.gaTrackerName+".":"Clappr.",o.domainName=o.container.options.gaDomainName,o.currentHDState=void 0,o.embedScript()),o}return(0,a.default)(t,e),(0,o.default)(t,[{key:"name",get:function(){return"google_analytics"}}]),t.prototype.embedScript=function(){var e=this;if(window._gat)this.addEventListeners();else{var t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("async","async"),t.setAttribute("src","//www.google-analytics.com/ga.js"),t.onload=function(){return e.addEventListeners()},document.body.appendChild(t)}},t.prototype.addEventListeners=function(){var e=this;this.container&&(this.listenTo(this.container,l.default.CONTAINER_READY,this.onReady),this.listenTo(this.container,l.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,l.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,l.default.CONTAINER_PAUSE,this.onPause),this.listenTo(this.container,l.default.CONTAINER_ENDED,this.onEnded),this.listenTo(this.container,l.default.CONTAINER_STATE_BUFFERING,this.onBuffering),this.listenTo(this.container,l.default.CONTAINER_STATE_BUFFERFULL,this.onBufferFull),this.listenTo(this.container,l.default.CONTAINER_ERROR,this.onError),this.listenTo(this.container,l.default.CONTAINER_PLAYBACKSTATE,this.onPlaybackChanged),this.listenTo(this.container,l.default.CONTAINER_VOLUME,(function(t){return e.onVolumeChanged(t)})),this.listenTo(this.container,l.default.CONTAINER_SEEK,(function(t){return e.onSeek(t)})),this.listenTo(this.container,l.default.CONTAINER_FULL_SCREEN,this.onFullscreen),this.listenTo(this.container,l.default.CONTAINER_HIGHDEFINITIONUPDATE,this.onHD),this.listenTo(this.container,l.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.onDVR)),_gaq.push([this.trackerName+"_setAccount",this.account]),this.domainName&&_gaq.push([this.trackerName+"_setDomainName",this.domainName])},t.prototype.onReady=function(){this.push(["Video","Playback",this.container.playback.name])},t.prototype.onPlay=function(){this.push(["Video","Play",this.container.playback.src])},t.prototype.onStop=function(){this.push(["Video","Stop",this.container.playback.src])},t.prototype.onEnded=function(){this.push(["Video","Ended",this.container.playback.src])},t.prototype.onBuffering=function(){this.push(["Video","Buffering",this.container.playback.src])},t.prototype.onBufferFull=function(){this.push(["Video","Bufferfull",this.container.playback.src])},t.prototype.onError=function(){this.push(["Video","Error",this.container.playback.src])},t.prototype.onHD=function(e){var t=e?"ON":"OFF";t!==this.currentHDState&&(this.currentHDState=t,this.push(["Video","HD - "+t,this.container.playback.src]))},t.prototype.onPlaybackChanged=function(e){null!==e.type&&this.push(["Video","Playback Type - "+e.type,this.container.playback.src])},t.prototype.onDVR=function(e){var t=e?"ON":"OFF";this.push(["Interaction","DVR - "+t,this.container.playback.src])},t.prototype.onPause=function(){this.push(["Video","Pause",this.container.playback.src])},t.prototype.onSeek=function(){this.push(["Video","Seek",this.container.playback.src])},t.prototype.onVolumeChanged=function(){this.push(["Interaction","Volume",this.container.playback.src])},t.prototype.onFullscreen=function(){this.push(["Interaction","Fullscreen",this.container.playback.src])},t.prototype.push=function(e){var t=[this.trackerName+"_trackEvent"].concat(e);_gaq.push(t)},t}(s.default);t.default=c,e.exports=t.default},"./src/plugins/google_analytics/index.js": -/*!***********************************************!*\ - !*** ./src/plugins/google_analytics/index.js ***! - \***********************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./google_analytics */"./src/plugins/google_analytics/google_analytics.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/plugins/log/index.js": -/*!**********************************!*\ - !*** ./src/plugins/log/index.js ***! - \**********************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./log */"./src/plugins/log/log.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/plugins/log/log.js": -/*!********************************!*\ - !*** ./src/plugins/log/log.js ***! - \********************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js"),o=(n=i)&&n.__esModule?n:{default:n},a=r(/*! ../../vendor */"./src/vendor/index.js"),s="font-weight: bold; font-size: 13px;",l="color: #ff8000;"+s,u="color: #ff0000;"+s,c=["color: #0000ff;font-weight: bold; font-size: 13px;","color: #006600;font-weight: bold; font-size: 13px;",l,u,u],d=["debug","info","warn","error","disabled"],f=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;(0,o.default)(this,e),this.kibo=new a.Kibo,this.kibo.down(["ctrl shift d"],(function(){return t.onOff()})),this.BLACKLIST=["timeupdate","playback:timeupdate","playback:progress","container:hover","container:timeupdate","container:progress"],this.level=r,this.offLevel=n}return e.prototype.debug=function(e){this.log(e,0,Array.prototype.slice.call(arguments,1))},e.prototype.info=function(e){this.log(e,1,Array.prototype.slice.call(arguments,1))},e.prototype.warn=function(e){this.log(e,2,Array.prototype.slice.call(arguments,1))},e.prototype.error=function(e){this.log(e,3,Array.prototype.slice.call(arguments,1))},e.prototype.onOff=function(){this.level===this.offLevel?this.level=this.previousLevel:(this.previousLevel=this.level,this.level=this.offLevel),window.console&&window.console.log&&window.console.log("%c[Clappr.Log] set log level to "+d[this.level],l)},e.prototype.level=function(e){this.level=e},e.prototype.log=function(e,t,r){if(!(this.BLACKLIST.indexOf(r[0])>=0||t<this.level)){r||(r=e,e=null);var n=c[t],i="";e&&(i="["+e+"]"),window.console&&window.console.log&&window.console.log.apply(console,["%c["+d[t]+"]"+i,n].concat(r))}},e}();t.default=f,f.LEVEL_DEBUG=0,f.LEVEL_INFO=1,f.LEVEL_WARN=2,f.LEVEL_ERROR=3,f.getInstance=function(){return void 0===this._instance&&(this._instance=new this,this._instance.previousLevel=this._instance.level,this._instance.level=this._instance.offLevel),this._instance},f.setLevel=function(e){this.getInstance().level=e},f.debug=function(){this.getInstance().debug.apply(this.getInstance(),arguments)},f.info=function(){this.getInstance().info.apply(this.getInstance(),arguments)},f.warn=function(){this.getInstance().warn.apply(this.getInstance(),arguments)},f.error=function(){this.getInstance().error.apply(this.getInstance(),arguments)},e.exports=t.default},"./src/plugins/media_control/index.js": -/*!********************************************!*\ - !*** ./src/plugins/media_control/index.js ***! - \********************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./media_control */"./src/plugins/media_control/media_control.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/plugins/media_control/media_control.js": -/*!****************************************************!*\ - !*** ./src/plugins/media_control/media_control.js ***! - \****************************************************/ -/*! no static exports found */function(e,t,r){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0});var i=b(r(/*! babel-runtime/core-js/json/stringify */"./node_modules/babel-runtime/core-js/json/stringify.js")),o=b(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=b(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=b(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),l=b(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),u=r(/*! ../../base/utils */"./src/base/utils.js"),c=r(/*! ../../vendor */"./src/vendor/index.js"),d=b(r(/*! ../../base/events */"./src/base/events.js")),f=b(r(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),h=b(r(/*! ../../components/browser */"./src/components/browser/index.js")),p=b(r(/*! ../../components/mediator */"./src/components/mediator.js")),m=b(r(/*! ../../base/template */"./src/base/template.js")),g=b(r(/*! ../../base/playback */"./src/base/playback.js")),y=b(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));r(/*! ./public/media-control.scss */"./src/plugins/media_control/public/media-control.scss");var v=b(r(/*! ./public/media-control.html */"./src/plugins/media_control/public/media-control.html"));function b(e){return e&&e.__esModule?e:{default:e}}var _=function(e){function t(r){(0,o.default)(this,t);var n=(0,a.default)(this,e.call(this,r));return n.persistConfig=n.options.persistConfig,n.currentPositionValue=null,n.currentDurationValue=null,n.keepVisible=!1,n.fullScreenOnVideoTagSupported=null,n.setInitialVolume(),n.settings={left:["play","stop","pause"],right:["volume"],default:["position","seekbar","duration"]},n.kibo=new c.Kibo(n.options.focusElement),n.bindKeyEvents(),n.container?y.default.isEmptyObject(n.container.settings)||(n.settings=y.default.extend({},n.container.settings)):n.settings={},n.userDisabled=!1,(n.container&&n.container.mediaControlDisabled||n.options.chromeless)&&n.disable(),n.stopDragHandler=function(e){return n.stopDrag(e)},n.updateDragHandler=function(e){return n.updateDrag(e)},(0,y.default)(document).bind("mouseup",n.stopDragHandler),(0,y.default)(document).bind("mousemove",n.updateDragHandler),n}return(0,l.default)(t,e),(0,s.default)(t,[{key:"name",get:function(){return"media_control"}},{key:"disabled",get:function(){var e=this.container&&this.container.getPlaybackType()===g.default.NO_OP;return this.userDisabled||e}},{key:"container",get:function(){return this.core&&this.core.activeContainer}},{key:"playback",get:function(){return this.core&&this.core.activePlayback}},{key:"attributes",get:function(){return{class:"media-control","data-media-control":""}}},{key:"events",get:function(){return{"click [data-play]":"play","click [data-pause]":"pause","click [data-playpause]":"togglePlayPause","click [data-stop]":"stop","click [data-playstop]":"togglePlayStop","click [data-fullscreen]":"toggleFullscreen","click .bar-container[data-seekbar]":"seek","click .bar-container[data-volume]":"onVolumeClick","click .drawer-icon[data-volume]":"toggleMute","mouseenter .drawer-container[data-volume]":"showVolumeBar","mouseleave .drawer-container[data-volume]":"hideVolumeBar","mousedown .bar-container[data-volume]":"startVolumeDrag","mousemove .bar-container[data-volume]":"mousemoveOnVolumeBar","mousedown .bar-scrubber[data-seekbar]":"startSeekDrag","mousemove .bar-container[data-seekbar]":"mousemoveOnSeekBar","mouseleave .bar-container[data-seekbar]":"mouseleaveOnSeekBar","mouseenter .media-control-layer[data-controls]":"setUserKeepVisible","mouseleave .media-control-layer[data-controls]":"resetUserKeepVisible"}}},{key:"template",get:function(){return(0,m.default)(v.default)}},{key:"volume",get:function(){return this.container&&this.container.isReady?this.container.volume:this.intendedVolume}},{key:"muted",get:function(){return 0===this.volume}}]),t.prototype.getExternalInterface=function(){var e=this;return{setVolume:this.setVolume,getVolume:function(){return e.volume}}},t.prototype.bindEvents=function(){var e=this;this.stopListening(),this.listenTo(this.core,d.default.CORE_ACTIVE_CONTAINER_CHANGED,this.onActiveContainerChanged),this.listenTo(this.core,d.default.CORE_MOUSE_MOVE,this.show),this.listenTo(this.core,d.default.CORE_MOUSE_LEAVE,(function(){return e.hide(e.options.hideMediaControlDelay)})),this.listenTo(this.core,d.default.CORE_FULLSCREEN,this.show),this.listenTo(this.core,d.default.CORE_OPTIONS_CHANGE,this.configure),p.default.on(this.options.playerId+":"+d.default.PLAYER_RESIZE,this.playerResize,this),this.bindContainerEvents()},t.prototype.bindContainerEvents=function(){this.container&&(this.listenTo(this.container,d.default.CONTAINER_PLAY,this.changeTogglePlay),this.listenTo(this.container,d.default.CONTAINER_PAUSE,this.changeTogglePlay),this.listenTo(this.container,d.default.CONTAINER_STOP,this.changeTogglePlay),this.listenTo(this.container,d.default.CONTAINER_DBLCLICK,this.toggleFullscreen),this.listenTo(this.container,d.default.CONTAINER_TIMEUPDATE,this.onTimeUpdate),this.listenTo(this.container,d.default.CONTAINER_PROGRESS,this.updateProgressBar),this.listenTo(this.container,d.default.CONTAINER_SETTINGSUPDATE,this.settingsUpdate),this.listenTo(this.container,d.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.settingsUpdate),this.listenTo(this.container,d.default.CONTAINER_HIGHDEFINITIONUPDATE,this.highDefinitionUpdate),this.listenTo(this.container,d.default.CONTAINER_MEDIACONTROL_DISABLE,this.disable),this.listenTo(this.container,d.default.CONTAINER_MEDIACONTROL_ENABLE,this.enable),this.listenTo(this.container,d.default.CONTAINER_ENDED,this.ended),this.listenTo(this.container,d.default.CONTAINER_VOLUME,this.onVolumeChanged),this.listenTo(this.container,d.default.CONTAINER_OPTIONS_CHANGE,this.setInitialVolume),"video"===this.container.playback.el.nodeName.toLowerCase()&&this.listenToOnce(this.container,d.default.CONTAINER_LOADEDMETADATA,this.onLoadedMetadataOnVideoTag))},t.prototype.disable=function(){this.userDisabled=!0,this.hide(),this.unbindKeyEvents(),this.$el.hide()},t.prototype.enable=function(){this.options.chromeless||(this.userDisabled=!1,this.bindKeyEvents(),this.show())},t.prototype.play=function(){this.container&&this.container.play()},t.prototype.pause=function(){this.container&&this.container.pause()},t.prototype.stop=function(){this.container&&this.container.stop()},t.prototype.setInitialVolume=function(){var e=this.persistConfig?u.Config.restore("volume"):100,t=this.container&&this.container.options||this.options;this.setVolume(t.mute?0:e,!0)},t.prototype.onVolumeChanged=function(){this.updateVolumeUI()},t.prototype.onLoadedMetadataOnVideoTag=function(){var e=this.playback&&this.playback.el;!u.Fullscreen.fullscreenEnabled()&&e.webkitSupportsFullscreen&&(this.fullScreenOnVideoTagSupported=!0,this.settingsUpdate())},t.prototype.updateVolumeUI=function(){if(this.rendered){this.$volumeBarContainer.find(".bar-fill-2").css({});var e=this.$volumeBarContainer.width(),t=this.$volumeBarBackground.width(),r=(e-t)/2,n=t*this.volume/100+r;this.$volumeBarFill.css({width:this.volume+"%"}),this.$volumeBarScrubber.css({left:n}),this.$volumeBarContainer.find(".segmented-bar-element").removeClass("fill");var i=Math.ceil(this.volume/10);this.$volumeBarContainer.find(".segmented-bar-element").slice(0,i).addClass("fill"),this.$volumeIcon.html(""),this.$volumeIcon.removeClass("muted"),this.muted?(this.$volumeIcon.append(u.SvgIcons.volumeMute),this.$volumeIcon.addClass("muted")):this.$volumeIcon.append(u.SvgIcons.volume),this.applyButtonStyle(this.$volumeIcon)}},t.prototype.changeTogglePlay=function(){this.$playPauseToggle.html(""),this.$playStopToggle.html(""),this.container&&this.container.isPlaying()?(this.$playPauseToggle.append(u.SvgIcons.pause),this.$playStopToggle.append(u.SvgIcons.stop),this.trigger(d.default.MEDIACONTROL_PLAYING)):(this.$playPauseToggle.append(u.SvgIcons.play),this.$playStopToggle.append(u.SvgIcons.play),this.trigger(d.default.MEDIACONTROL_NOTPLAYING),h.default.isMobile&&this.show()),this.applyButtonStyle(this.$playPauseToggle),this.applyButtonStyle(this.$playStopToggle)},t.prototype.mousemoveOnSeekBar=function(e){if(this.settings.seekEnabled){var t=e.pageX-this.$seekBarContainer.offset().left-this.$seekBarHover.width()/2;this.$seekBarHover.css({left:t})}this.trigger(d.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR,e)},t.prototype.mouseleaveOnSeekBar=function(e){this.trigger(d.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR,e)},t.prototype.onVolumeClick=function(e){this.setVolume(this.getVolumeFromUIEvent(e))},t.prototype.mousemoveOnVolumeBar=function(e){this.draggingVolumeBar&&this.setVolume(this.getVolumeFromUIEvent(e))},t.prototype.playerResize=function(e){this.$fullscreenToggle.html("");var t=this.core.isFullscreen()?u.SvgIcons.exitFullscreen:u.SvgIcons.fullscreen;this.$fullscreenToggle.append(t),this.applyButtonStyle(this.$fullscreenToggle),0!==this.$el.find(".media-control").length&&this.$el.removeClass("w320"),(e.width<=320||this.options.hideVolumeBar)&&this.$el.addClass("w320")},t.prototype.togglePlayPause=function(){return this.container.isPlaying()?this.container.pause():this.container.play(),!1},t.prototype.togglePlayStop=function(){this.container.isPlaying()?this.container.stop():this.container.play()},t.prototype.startSeekDrag=function(e){this.settings.seekEnabled&&(this.draggingSeekBar=!0,this.$el.addClass("dragging"),this.$seekBarLoaded.addClass("media-control-notransition"),this.$seekBarPosition.addClass("media-control-notransition"),this.$seekBarScrubber.addClass("media-control-notransition"),e&&e.preventDefault())},t.prototype.startVolumeDrag=function(e){this.draggingVolumeBar=!0,this.$el.addClass("dragging"),e&&e.preventDefault()},t.prototype.stopDrag=function(e){this.draggingSeekBar&&this.seek(e),this.$el.removeClass("dragging"),this.$seekBarLoaded.removeClass("media-control-notransition"),this.$seekBarPosition.removeClass("media-control-notransition"),this.$seekBarScrubber.removeClass("media-control-notransition dragging"),this.draggingSeekBar=!1,this.draggingVolumeBar=!1},t.prototype.updateDrag=function(e){if(this.draggingSeekBar){e.preventDefault();var t=(e.pageX-this.$seekBarContainer.offset().left)/this.$seekBarContainer.width()*100;t=Math.min(100,Math.max(t,0)),this.setSeekPercentage(t)}else this.draggingVolumeBar&&(e.preventDefault(),this.setVolume(this.getVolumeFromUIEvent(e)))},t.prototype.getVolumeFromUIEvent=function(e){return(e.pageX-this.$volumeBarContainer.offset().left)/this.$volumeBarContainer.width()*100},t.prototype.toggleMute=function(){if(this.muted)return this.setVolume(this._mutedVolume||100),void(this._mutedVolume=null);this._mutedVolume=this.volume,this.setVolume(0)},t.prototype.setVolume=function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=Math.min(100,Math.max(e,0)),this.intendedVolume=e,this.persistConfig&&!r&&u.Config.persist("volume",e);var n=function(){t.container&&t.container.isReady?t.container.setVolume(e):t.listenToOnce(t.container,d.default.CONTAINER_READY,(function(){t.container.setVolume(e)}))};this.container?n():this.listenToOnce(this,d.default.MEDIACONTROL_CONTAINERCHANGED,(function(){return n()}))},t.prototype.toggleFullscreen=function(){this.trigger(d.default.MEDIACONTROL_FULLSCREEN,this.name),this.container.fullscreen(),this.core.toggleFullscreen(),this.resetUserKeepVisible()},t.prototype.onActiveContainerChanged=function(){this.fullScreenOnVideoTagSupported=null,p.default.off(this.options.playerId+":"+d.default.PLAYER_RESIZE,this.playerResize,this),this.bindEvents(),this.setInitialVolume(),this.changeTogglePlay(),this.bindContainerEvents(),this.settingsUpdate(),this.container&&this.container.trigger(d.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.container.isDvrInUse()),this.container&&this.container.mediaControlDisabled&&this.disable(),this.trigger(d.default.MEDIACONTROL_CONTAINERCHANGED)},t.prototype.showVolumeBar=function(){this.hideVolumeId&&clearTimeout(this.hideVolumeId),this.$volumeBarContainer.removeClass("volume-bar-hide")},t.prototype.hideVolumeBar=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:400;this.$volumeBarContainer&&(this.draggingVolumeBar?this.hideVolumeId=setTimeout((function(){return e.hideVolumeBar()}),t):(this.hideVolumeId&&clearTimeout(this.hideVolumeId),this.hideVolumeId=setTimeout((function(){return e.$volumeBarContainer.addClass("volume-bar-hide")}),t)))},t.prototype.ended=function(){this.changeTogglePlay()},t.prototype.updateProgressBar=function(e){var t=e.start/e.total*100,r=e.current/e.total*100;this.$seekBarLoaded.css({left:t+"%",width:r-t+"%"})},t.prototype.onTimeUpdate=function(e){if(!this.draggingSeekBar){var t=e.current<0?e.total:e.current;this.currentPositionValue=t,this.currentDurationValue=e.total,this.renderSeekBar()}},t.prototype.renderSeekBar=function(){if(null!==this.currentPositionValue&&null!==this.currentDurationValue){this.currentSeekBarPercentage=100,this.container&&(this.container.getPlaybackType()!==g.default.LIVE||this.container.isDvrInUse())&&(this.currentSeekBarPercentage=this.currentPositionValue/this.currentDurationValue*100),this.setSeekPercentage(this.currentSeekBarPercentage);var e=(0,u.formatTime)(this.currentPositionValue),t=(0,u.formatTime)(this.currentDurationValue);e!==this.displayedPosition&&(this.$position.text(e),this.displayedPosition=e),t!==this.displayedDuration&&(this.$duration.text(t),this.displayedDuration=t)}},t.prototype.seek=function(e){if(this.settings.seekEnabled){var t=(e.pageX-this.$seekBarContainer.offset().left)/this.$seekBarContainer.width()*100;return t=Math.min(100,Math.max(t,0)),this.container&&this.container.seekPercentage(t),this.setSeekPercentage(t),!1}},t.prototype.setKeepVisible=function(){this.keepVisible=!0},t.prototype.resetKeepVisible=function(){this.keepVisible=!1},t.prototype.setUserKeepVisible=function(){this.userKeepVisible=!0},t.prototype.resetUserKeepVisible=function(){this.userKeepVisible=!1},t.prototype.isVisible=function(){return!this.$el.hasClass("media-control-hide")},t.prototype.show=function(e){var t=this;if(!this.disabled){var r=e&&e.clientX!==this.lastMouseX&&e.clientY!==this.lastMouseY;(!e||r||navigator.userAgent.match(/firefox/i))&&(clearTimeout(this.hideId),this.$el.show(),this.trigger(d.default.MEDIACONTROL_SHOW,this.name),this.container&&this.container.trigger(d.default.CONTAINER_MEDIACONTROL_SHOW,this.name),this.$el.removeClass("media-control-hide"),this.hideId=setTimeout((function(){return t.hide()}),2e3),e&&(this.lastMouseX=e.clientX,this.lastMouseY=e.clientY)),this.updateCursorStyle(!0)}},t.prototype.hide=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.isVisible()){var r=t||2e3;if(clearTimeout(this.hideId),this.disabled||!1!==this.options.hideMediaControl){var n=this.userKeepVisible||this.keepVisible,i=this.draggingSeekBar||this.draggingVolumeBar;if(!this.disabled&&(t||n||i))this.hideId=setTimeout((function(){return e.hide()}),r);else{this.trigger(d.default.MEDIACONTROL_HIDE,this.name),this.container&&this.container.trigger(d.default.CONTAINER_MEDIACONTROL_HIDE,this.name),this.$el.addClass("media-control-hide"),this.hideVolumeBar(0);var o=!1;this.updateCursorStyle(o)}}}},t.prototype.updateCursorStyle=function(e){e?this.core.$el.removeClass("nocursor"):this.core.isFullscreen()&&this.core.$el.addClass("nocursor")},t.prototype.settingsUpdate=function(){var e=this.getSettings();!e||this.fullScreenOnVideoTagSupported||u.Fullscreen.fullscreenEnabled()||(e.default&&(0,u.removeArrayItem)(e.default,"fullscreen"),e.left&&(0,u.removeArrayItem)(e.left,"fullscreen"),e.right&&(0,u.removeArrayItem)(e.right,"fullscreen")),(0,i.default)(this.settings)!==(0,i.default)(e)&&(this.settings=e,this.render())},t.prototype.getSettings=function(){return y.default.extend(!0,{},this.container&&this.container.settings)},t.prototype.highDefinitionUpdate=function(e){this.isHD=e;var t=e?"addClass":"removeClass";this.$hdIndicator[t]("enabled")},t.prototype.createCachedElements=function(){var e=this.$el.find(".media-control-layer");this.$duration=e.find(".media-control-indicator[data-duration]"),this.$fullscreenToggle=e.find("button.media-control-button[data-fullscreen]"),this.$playPauseToggle=e.find("button.media-control-button[data-playpause]"),this.$playStopToggle=e.find("button.media-control-button[data-playstop]"),this.$position=e.find(".media-control-indicator[data-position]"),this.$seekBarContainer=e.find(".bar-container[data-seekbar]"),this.$seekBarHover=e.find(".bar-hover[data-seekbar]"),this.$seekBarLoaded=e.find(".bar-fill-1[data-seekbar]"),this.$seekBarPosition=e.find(".bar-fill-2[data-seekbar]"),this.$seekBarScrubber=e.find(".bar-scrubber[data-seekbar]"),this.$volumeBarContainer=e.find(".bar-container[data-volume]"),this.$volumeContainer=e.find(".drawer-container[data-volume]"),this.$volumeIcon=e.find(".drawer-icon[data-volume]"),this.$volumeBarBackground=this.$el.find(".bar-background[data-volume]"),this.$volumeBarFill=this.$el.find(".bar-fill-1[data-volume]"),this.$volumeBarScrubber=this.$el.find(".bar-scrubber[data-volume]"),this.$hdIndicator=this.$el.find("button.media-control-button[data-hd-indicator]"),this.resetIndicators(),this.initializeIcons()},t.prototype.resetIndicators=function(){this.displayedPosition=this.$position.text(),this.displayedDuration=this.$duration.text()},t.prototype.initializeIcons=function(){var e=this.$el.find(".media-control-layer");e.find("button.media-control-button[data-play]").append(u.SvgIcons.play),e.find("button.media-control-button[data-pause]").append(u.SvgIcons.pause),e.find("button.media-control-button[data-stop]").append(u.SvgIcons.stop),this.$playPauseToggle.append(u.SvgIcons.play),this.$playStopToggle.append(u.SvgIcons.play),this.$volumeIcon.append(u.SvgIcons.volume),this.$fullscreenToggle.append(u.SvgIcons.fullscreen),this.$hdIndicator.append(u.SvgIcons.hd)},t.prototype.setSeekPercentage=function(e){e=Math.max(Math.min(e,100),0),this.displayedSeekBarPercentage!==e&&(this.displayedSeekBarPercentage=e,this.$seekBarPosition.removeClass("media-control-notransition"),this.$seekBarScrubber.removeClass("media-control-notransition"),this.$seekBarPosition.css({width:e+"%"}),this.$seekBarScrubber.css({left:e+"%"}))},t.prototype.seekRelative=function(e){if(this.settings.seekEnabled){var t=this.container.getCurrentTime(),r=this.container.getDuration(),n=Math.min(Math.max(t+e,0),r);n=Math.min(100*n/r,100),this.container.seekPercentage(n)}},t.prototype.bindKeyAndShow=function(e,t){var r=this;this.kibo.down(e,(function(){return r.show(),t()}))},t.prototype.bindKeyEvents=function(){var e=this;h.default.isMobile||this.options.disableKeyboardShortcuts||(this.unbindKeyEvents(),this.kibo=new c.Kibo(this.options.focusElement||this.options.parentElement),this.bindKeyAndShow("space",(function(){return e.togglePlayPause()})),this.bindKeyAndShow("left",(function(){return e.seekRelative(-5)})),this.bindKeyAndShow("right",(function(){return e.seekRelative(5)})),this.bindKeyAndShow("shift left",(function(){return e.seekRelative(-10)})),this.bindKeyAndShow("shift right",(function(){return e.seekRelative(10)})),this.bindKeyAndShow("shift ctrl left",(function(){return e.seekRelative(-15)})),this.bindKeyAndShow("shift ctrl right",(function(){return e.seekRelative(15)})),["1","2","3","4","5","6","7","8","9","0"].forEach((function(t){e.bindKeyAndShow(t,(function(){e.settings.seekEnabled&&e.container&&e.container.seekPercentage(10*t)}))})))},t.prototype.unbindKeyEvents=function(){this.kibo&&(this.kibo.off("space"),this.kibo.off("left"),this.kibo.off("right"),this.kibo.off("shift left"),this.kibo.off("shift right"),this.kibo.off("shift ctrl left"),this.kibo.off("shift ctrl right"),this.kibo.off(["1","2","3","4","5","6","7","8","9","0"]))},t.prototype.parseColors=function(){if(this.options.mediacontrol){this.buttonsColor=this.options.mediacontrol.buttons;var e=this.options.mediacontrol.seekbar;this.$el.find(".bar-fill-2[data-seekbar]").css("background-color",e),this.$el.find(".media-control-icon svg path").css("fill",this.buttonsColor),this.$el.find(".segmented-bar-element[data-volume]").css("boxShadow","inset 2px 0 0 "+this.buttonsColor)}},t.prototype.applyButtonStyle=function(e){this.buttonsColor&&e&&(0,y.default)(e).find("svg path").css("fill",this.buttonsColor)},t.prototype.destroy=function(){(0,y.default)(document).unbind("mouseup",this.stopDragHandler),(0,y.default)(document).unbind("mousemove",this.updateDragHandler),this.unbindKeyEvents(),this.stopListening(),e.prototype.destroy.call(this)},t.prototype.configure=function(e){this.options.chromeless||e.source||e.sources?this.disable():this.enable(),this.trigger(d.default.MEDIACONTROL_OPTIONS_CHANGE)},t.prototype.render=function(){var e=this,t=this.options.hideMediaControlDelay||2e3;this.settings&&this.$el.html(this.template({settings:this.settings})),this.createCachedElements(),this.$playPauseToggle.addClass("paused"),this.$playStopToggle.addClass("stopped"),this.changeTogglePlay(),this.container&&(this.hideId=setTimeout((function(){return e.hide()}),t),this.disabled&&this.hide()),h.default.isSafari&&h.default.isMobile&&(h.default.version<10?this.$volumeContainer.css("display","none"):this.$volumeBarContainer.css("display","none")),this.$seekBarPosition.addClass("media-control-notransition"),this.$seekBarScrubber.addClass("media-control-notransition");var r=0;return this.displayedSeekBarPercentage&&(r=this.displayedSeekBarPercentage),this.displayedSeekBarPercentage=null,this.setSeekPercentage(r),n.nextTick((function(){!e.settings.seekEnabled&&e.$seekBarContainer.addClass("seek-disabled"),!h.default.isMobile&&!e.options.disableKeyboardShortcuts&&e.bindKeyEvents(),e.playerResize({width:e.options.width,height:e.options.height}),e.hideVolumeBar(0)})),this.parseColors(),this.highDefinitionUpdate(this.isHD),this.core.$el.append(this.el),this.rendered=!0,this.updateVolumeUI(),this.trigger(d.default.MEDIACONTROL_RENDERED),this},t}(f.default);t.default=_,_.extend=function(e){return(0,u.extend)(_,e)},e.exports=t.default}).call(this,r(/*! ./../../../node_modules/node-libs-browser/node_modules/process/browser.js */"./node_modules/node-libs-browser/node_modules/process/browser.js"))},"./src/plugins/media_control/public/closed-hand.cur": -/*!**********************************************************!*\ - !*** ./src/plugins/media_control/public/closed-hand.cur ***! - \**********************************************************/ -/*! no static exports found */function(e,t){e.exports="<%=baseUrl%>/a8c874b93b3d848f39a71260c57e3863.cur"},"./src/plugins/media_control/public/media-control.html": -/*!*************************************************************!*\ - !*** ./src/plugins/media_control/public/media-control.html ***! - \*************************************************************/ -/*! no static exports found */function(e,t){e.exports='<div class="media-control-background" data-background></div>\n<div class="media-control-layer" data-controls>\n <% var renderBar = function(name) { %>\n <div class="bar-container" data-<%= name %>>\n <div class="bar-background" data-<%= name %>>\n <div class="bar-fill-1" data-<%= name %>></div>\n <div class="bar-fill-2" data-<%= name %>></div>\n <div class="bar-hover" data-<%= name %>></div>\n </div>\n <div class="bar-scrubber" data-<%= name %>>\n <div class="bar-scrubber-icon" data-<%= name %>></div>\n </div>\n </div>\n <% }; %>\n <% var renderSegmentedBar = function(name, segments) {\n segments = segments || 10; %>\n <div class="bar-container" data-<%= name %>>\n <% for (var i = 0; i < segments; i++) { %>\n <div class="segmented-bar-element" data-<%= name %>></div>\n <% } %>\n </div>\n <% }; %>\n <% var renderDrawer = function(name, renderContent) { %>\n <div class="drawer-container" data-<%= name %>>\n <div class="drawer-icon-container" data-<%= name %>>\n <div class="drawer-icon media-control-icon" data-<%= name %>></div>\n <span class="drawer-text" data-<%= name %>></span>\n </div>\n <% renderContent(name); %>\n </div>\n <% }; %>\n <% var renderIndicator = function(name) { %>\n <div class="media-control-indicator" data-<%= name %>></div>\n <% }; %>\n <% var renderButton = function(name) { %>\n <button type="button" class="media-control-button media-control-icon" data-<%= name %> aria-label="<%= name %>"></button>\n <% }; %>\n <% var templates = {\n bar: renderBar,\n segmentedBar: renderSegmentedBar,\n };\n var render = function(settingsList) {\n settingsList.forEach(function(setting) {\n if(setting === "seekbar") {\n renderBar(setting);\n } else if (setting === "volume") {\n renderDrawer(setting, settings.volumeBarTemplate ? templates[settings.volumeBarTemplate] : function(name) { return renderSegmentedBar(name); });\n } else if (setting === "duration" || setting === "position") {\n renderIndicator(setting);\n } else {\n renderButton(setting);\n }\n });\n }; %>\n <% if (settings.default && settings.default.length) { %>\n <div class="media-control-center-panel" data-media-control>\n <% render(settings.default); %>\n </div>\n <% } %>\n <% if (settings.left && settings.left.length) { %>\n <div class="media-control-left-panel" data-media-control>\n <% render(settings.left); %>\n </div>\n <% } %>\n <% if (settings.right && settings.right.length) { %>\n <div class="media-control-right-panel" data-media-control>\n <% render(settings.right); %>\n </div>\n <% } %>\n</div>\n'},"./src/plugins/media_control/public/media-control.scss": -/*!*************************************************************!*\ - !*** ./src/plugins/media_control/public/media-control.scss ***! - \*************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./media-control.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/media_control/public/media-control.scss");"string"==typeof n&&(n=[[e.i,n,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};r(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(n,i),n.locals&&(e.exports=n.locals)},"./src/plugins/poster/index.js": -/*!*************************************!*\ - !*** ./src/plugins/poster/index.js ***! - \*************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./poster */"./src/plugins/poster/poster.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/plugins/poster/poster.js": -/*!**************************************!*\ - !*** ./src/plugins/poster/poster.js ***! - \**************************************/ -/*! no static exports found */function(e,t,r){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0});var i=m(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=m(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=m(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=m(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=m(r(/*! ../../base/ui_container_plugin */"./src/base/ui_container_plugin.js")),u=m(r(/*! ../../base/events */"./src/base/events.js")),c=m(r(/*! ../../base/template */"./src/base/template.js")),d=m(r(/*! ../../base/playback */"./src/base/playback.js")),f=m(r(/*! ../../components/error/error */"./src/components/error/error.js")),h=m(r(/*! ./public/poster.html */"./src/plugins/poster/public/poster.html")),p=r(/*! ../../base/utils */"./src/base/utils.js");function m(e){return e&&e.__esModule?e:{default:e}}r(/*! ./public/poster.scss */"./src/plugins/poster/public/poster.scss");var g=function(e){function t(r){(0,i.default)(this,t);var a=(0,o.default)(this,e.call(this,r));return a.hasStartedPlaying=!1,a.playRequested=!1,a.render(),n.nextTick((function(){return a.update()})),a}return(0,s.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"poster"}},{key:"template",get:function(){return(0,c.default)(h.default)}},{key:"shouldRender",get:function(){var e=!(!this.options.poster||!this.options.poster.showForNoOp);return"html_img"!==this.container.playback.name&&(this.container.playback.getPlaybackType()!==d.default.NO_OP||e)}},{key:"attributes",get:function(){return{class:"player-poster","data-poster":""}}},{key:"events",get:function(){return{click:"clicked"}}},{key:"showOnVideoEnd",get:function(){return!this.options.poster||this.options.poster.showOnVideoEnd||void 0===this.options.poster.showOnVideoEnd}}]),t.prototype.bindEvents=function(){this.listenTo(this.container,u.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,u.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,u.default.CONTAINER_STATE_BUFFERING,this.update),this.listenTo(this.container,u.default.CONTAINER_STATE_BUFFERFULL,this.update),this.listenTo(this.container,u.default.CONTAINER_OPTIONS_CHANGE,this.render),this.listenTo(this.container,u.default.CONTAINER_ERROR,this.onError),this.showOnVideoEnd&&this.listenTo(this.container,u.default.CONTAINER_ENDED,this.onStop)},t.prototype.onError=function(e){this.hasFatalError=e.level===f.default.Levels.FATAL,this.hasFatalError&&(this.hasStartedPlaying=!1,this.playRequested=!1,this.showPlayButton())},t.prototype.onPlay=function(){this.hasStartedPlaying=!0,this.update()},t.prototype.onStop=function(){this.hasStartedPlaying=!1,this.playRequested=!1,this.update()},t.prototype.updatePlayButton=function(e){!e||this.options.chromeless&&!this.options.allowUserInteraction?this.hidePlayButton():this.showPlayButton()},t.prototype.showPlayButton=function(){this.hasFatalError&&!this.options.disableErrorScreen||(this.$playButton.show(),this.$el.addClass("clickable"))},t.prototype.hidePlayButton=function(){this.$playButton.hide(),this.$el.removeClass("clickable")},t.prototype.clicked=function(){if(!this.hasStartedPlaying)return this.options.chromeless&&!this.options.allowUserInteraction||(this.playRequested=!0,this.update(),this.container.play()),!1},t.prototype.shouldHideOnPlay=function(){return!this.container.playback.isAudioOnly},t.prototype.update=function(){if(this.shouldRender){var e=!this.playRequested&&!this.hasStartedPlaying&&!this.container.buffering;this.updatePlayButton(e),this.updatePoster()}},t.prototype.updatePoster=function(){this.hasStartedPlaying?this.hidePoster():this.showPoster()},t.prototype.showPoster=function(){this.container.disableMediaControl(),this.$el.show()},t.prototype.hidePoster=function(){this.container.enableMediaControl(),this.shouldHideOnPlay()&&this.$el.hide()},t.prototype.render=function(){if(this.shouldRender){if(this.$el.html(this.template()),this.options.poster&&void 0===this.options.poster.custom){var e=this.options.poster.url||this.options.poster;this.$el.css({"background-image":"url("+e+")"})}else this.options.poster&&this.$el.css({background:this.options.poster.custom});this.container.$el.append(this.el),this.$playWrapper=this.$el.find(".play-wrapper"),this.$playWrapper.append(p.SvgIcons.play),this.$playButton=this.$playWrapper.find("svg"),this.$playButton.addClass("poster-icon"),this.$playButton.attr("data-poster","");var t=this.options.mediacontrol&&this.options.mediacontrol.buttons;return t&&this.$el.find("svg path").css("fill",t),this.options.mediacontrol&&this.options.mediacontrol.buttons&&(t=this.options.mediacontrol.buttons,this.$playButton.css("color",t)),this.update(),this}},t}(l.default);t.default=g,e.exports=t.default}).call(this,r(/*! ./../../../node_modules/node-libs-browser/node_modules/process/browser.js */"./node_modules/node-libs-browser/node_modules/process/browser.js"))},"./src/plugins/poster/public/poster.html": -/*!***********************************************!*\ - !*** ./src/plugins/poster/public/poster.html ***! - \***********************************************/ -/*! no static exports found */function(e,t){e.exports='<div class="play-wrapper" data-poster></div>\n'},"./src/plugins/poster/public/poster.scss": -/*!***********************************************!*\ - !*** ./src/plugins/poster/public/poster.scss ***! - \***********************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./poster.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/poster/public/poster.scss");"string"==typeof n&&(n=[[e.i,n,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};r(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(n,i),n.locals&&(e.exports=n.locals)},"./src/plugins/seek_time/index.js": -/*!****************************************!*\ - !*** ./src/plugins/seek_time/index.js ***! - \****************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./seek_time */"./src/plugins/seek_time/seek_time.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/plugins/seek_time/public/seek_time.html": -/*!*****************************************************!*\ - !*** ./src/plugins/seek_time/public/seek_time.html ***! - \*****************************************************/ -/*! no static exports found */function(e,t){e.exports="<span data-seek-time></span>\n<span data-duration></span>\n"},"./src/plugins/seek_time/public/seek_time.scss": -/*!*****************************************************!*\ - !*** ./src/plugins/seek_time/public/seek_time.scss ***! - \*****************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./seek_time.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/seek_time/public/seek_time.scss");"string"==typeof n&&(n=[[e.i,n,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};r(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(n,i),n.locals&&(e.exports=n.locals)},"./src/plugins/seek_time/seek_time.js": -/*!********************************************!*\ - !*** ./src/plugins/seek_time/seek_time.js ***! - \********************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=h(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=h(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=h(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=h(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=r(/*! ../../base/utils */"./src/base/utils.js"),l=h(r(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),u=h(r(/*! ../../base/template */"./src/base/template.js")),c=h(r(/*! ../../base/events */"./src/base/events.js")),d=h(r(/*! ../../base/playback */"./src/base/playback.js")),f=h(r(/*! ./public/seek_time.html */"./src/plugins/seek_time/public/seek_time.html"));function h(e){return e&&e.__esModule?e:{default:e}}r(/*! ./public/seek_time.scss */"./src/plugins/seek_time/public/seek_time.scss");var p=function(e){function t(r){(0,n.default)(this,t);var o=(0,i.default)(this,e.call(this,r));return o.hoveringOverSeekBar=!1,o.hoverPosition=null,o.duration=null,o.firstFragDateTime=null,o.actualLiveTime=!!o.mediaControl.options.actualLiveTime,o.actualLiveTime&&(o.mediaControl.options.actualLiveServerTime?o.actualLiveServerTimeDiff=(new Date).getTime()-new Date(o.mediaControl.options.actualLiveServerTime).getTime():o.actualLiveServerTimeDiff=0),o}return(0,a.default)(t,e),(0,o.default)(t,[{key:"name",get:function(){return"seek_time"}},{key:"template",get:function(){return(0,u.default)(f.default)}},{key:"attributes",get:function(){return{class:"seek-time","data-seek-time":""}}},{key:"mediaControl",get:function(){return this.core.mediaControl}},{key:"mediaControlContainer",get:function(){return this.mediaControl.container}},{key:"isLiveStreamWithDvr",get:function(){return this.mediaControlContainer&&this.mediaControlContainer.getPlaybackType()===d.default.LIVE&&this.mediaControlContainer.isDvrEnabled()}},{key:"durationShown",get:function(){return this.isLiveStreamWithDvr&&!this.actualLiveTime}},{key:"useActualLiveTime",get:function(){return this.actualLiveTime&&this.isLiveStreamWithDvr}}]),t.prototype.bindEvents=function(){this.listenTo(this.mediaControl,c.default.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.mediaControl,c.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR,this.showTime),this.listenTo(this.mediaControl,c.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR,this.hideTime),this.listenTo(this.mediaControl,c.default.MEDIACONTROL_CONTAINERCHANGED,this.onContainerChanged),this.mediaControlContainer&&(this.listenTo(this.mediaControlContainer,c.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.update),this.listenTo(this.mediaControlContainer,c.default.CONTAINER_TIMEUPDATE,this.updateDuration))},t.prototype.onContainerChanged=function(){this.stopListening(),this.bindEvents()},t.prototype.updateDuration=function(e){this.duration=e.total,this.firstFragDateTime=e.firstFragDateTime,this.update()},t.prototype.showTime=function(e){this.hoveringOverSeekBar=!0,this.calculateHoverPosition(e),this.update()},t.prototype.hideTime=function(){this.hoveringOverSeekBar=!1,this.update()},t.prototype.calculateHoverPosition=function(e){var t=e.pageX-this.mediaControl.$seekBarContainer.offset().left;this.hoverPosition=Math.min(1,Math.max(t/this.mediaControl.$seekBarContainer.width(),0))},t.prototype.getSeekTime=function(){var e=void 0,t=void 0,r=void 0,n=void 0;return this.useActualLiveTime?(this.firstFragDateTime?(n=new Date(this.firstFragDateTime),(r=new Date(this.firstFragDateTime)).setHours(0,0,0,0),t=(n.getTime()-r.getTime())/1e3+this.duration):(r=new Date((new Date).getTime()-this.actualLiveServerTimeDiff),t=((n=new Date(r))-r.setHours(0,0,0,0))/1e3),(e=t-this.duration+this.hoverPosition*this.duration)<0&&(e+=86400)):e=this.hoverPosition*this.duration,{seekTime:e,secondsSinceMidnight:t}},t.prototype.update=function(){if(this.rendered)if(this.shouldBeVisible()){var e=this.getSeekTime(),t=(0,s.formatTime)(e.seekTime,this.useActualLiveTime);if(t!==this.displayedSeekTime&&(this.$seekTimeEl.text(t),this.displayedSeekTime=t),this.durationShown){this.$durationEl.show();var r=(0,s.formatTime)(this.actualLiveTime?e.secondsSinceMidnight:this.duration,this.actualLiveTime);r!==this.displayedDuration&&(this.$durationEl.text(r),this.displayedDuration=r)}else this.$durationEl.hide();this.$el.show();var n=this.mediaControl.$seekBarContainer.width(),i=this.$el.width(),o=this.hoverPosition*n;o-=i/2,o=Math.max(0,Math.min(o,n-i)),this.$el.css("left",o)}else this.$el.hide(),this.$el.css("left","-100%")},t.prototype.shouldBeVisible=function(){return this.mediaControlContainer&&this.mediaControlContainer.settings.seekEnabled&&this.hoveringOverSeekBar&&null!==this.hoverPosition&&null!==this.duration},t.prototype.render=function(){this.rendered=!0,this.displayedDuration=null,this.displayedSeekTime=null,this.$el.html(this.template()),this.$el.hide(),this.mediaControl.$el.append(this.el),this.$seekTimeEl=this.$el.find("[data-seek-time]"),this.$durationEl=this.$el.find("[data-duration]"),this.$durationEl.hide(),this.update()},t}(l.default);t.default=p,e.exports=t.default},"./src/plugins/sources.js": -/*!********************************!*\ - !*** ./src/plugins/sources.js ***! - \********************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=u(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=u(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=u(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=u(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=u(r(/*! ../base/core_plugin */"./src/base/core_plugin.js")),l=u(r(/*! ../base/events */"./src/base/events.js"));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,n.default)(this,t),(0,o.default)(this,e.apply(this,arguments))}return(0,a.default)(t,e),t.prototype.bindEvents=function(){this.listenTo(this.core,l.default.CORE_CONTAINERS_CREATED,this.onContainersCreated)},t.prototype.onContainersCreated=function(){var e=this.core.containers.filter((function(e){return"no_op"!==e.playback.name}))[0]||this.core.containers[0];e&&this.core.containers.forEach((function(t){t!==e&&t.destroy()}))},(0,i.default)(t,[{key:"name",get:function(){return"sources"}}]),t}(s.default);t.default=c,e.exports=t.default},"./src/plugins/spinner_three_bounce/index.js": -/*!***************************************************!*\ - !*** ./src/plugins/spinner_three_bounce/index.js ***! - \***************************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./spinner_three_bounce */"./src/plugins/spinner_three_bounce/spinner_three_bounce.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/plugins/spinner_three_bounce/public/spinner.html": -/*!**************************************************************!*\ - !*** ./src/plugins/spinner_three_bounce/public/spinner.html ***! - \**************************************************************/ -/*! no static exports found */function(e,t){e.exports="<div data-bounce1></div><div data-bounce2></div><div data-bounce3></div>\n"},"./src/plugins/spinner_three_bounce/public/spinner.scss": -/*!**************************************************************!*\ - !*** ./src/plugins/spinner_three_bounce/public/spinner.scss ***! - \**************************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./spinner.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/spinner_three_bounce/public/spinner.scss");"string"==typeof n&&(n=[[e.i,n,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};r(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(n,i),n.locals&&(e.exports=n.locals)},"./src/plugins/spinner_three_bounce/spinner_three_bounce.js": -/*!******************************************************************!*\ - !*** ./src/plugins/spinner_three_bounce/spinner_three_bounce.js ***! - \******************************************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=d(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=d(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=d(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=d(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=d(r(/*! ../../base/ui_container_plugin */"./src/base/ui_container_plugin.js")),l=d(r(/*! ../../base/events */"./src/base/events.js")),u=d(r(/*! ../../base/template */"./src/base/template.js")),c=d(r(/*! ./public/spinner.html */"./src/plugins/spinner_three_bounce/public/spinner.html"));function d(e){return e&&e.__esModule?e:{default:e}}r(/*! ./public/spinner.scss */"./src/plugins/spinner_three_bounce/public/spinner.scss");var f=function(e){function t(r){(0,n.default)(this,t);var o=(0,i.default)(this,e.call(this,r));return o.template=(0,u.default)(c.default),o.showTimeout=null,o.listenTo(o.container,l.default.CONTAINER_STATE_BUFFERING,o.onBuffering),o.listenTo(o.container,l.default.CONTAINER_STATE_BUFFERFULL,o.onBufferFull),o.listenTo(o.container,l.default.CONTAINER_STOP,o.onStop),o.listenTo(o.container,l.default.CONTAINER_ENDED,o.onStop),o.listenTo(o.container,l.default.CONTAINER_ERROR,o.onStop),o.render(),o}return(0,a.default)(t,e),(0,o.default)(t,[{key:"name",get:function(){return"spinner"}},{key:"attributes",get:function(){return{"data-spinner":"",class:"spinner-three-bounce"}}}]),t.prototype.onBuffering=function(){this.show()},t.prototype.onBufferFull=function(){this.hide()},t.prototype.onStop=function(){this.hide()},t.prototype.show=function(){var e=this;null===this.showTimeout&&(this.showTimeout=setTimeout((function(){return e.$el.show()}),300))},t.prototype.hide=function(){null!==this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null),this.$el.hide()},t.prototype.render=function(){return this.$el.html(this.template()),this.container.$el.append(this.$el),this.$el.hide(),this.container.buffering&&this.onBuffering(),this},t}(s.default);t.default=f,e.exports=t.default},"./src/plugins/stats/index.js": -/*!************************************!*\ - !*** ./src/plugins/stats/index.js ***! - \************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./stats */"./src/plugins/stats/stats.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/plugins/stats/stats.js": -/*!************************************!*\ - !*** ./src/plugins/stats/stats.js ***! - \************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=c(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=c(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=c(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=c(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=c(r(/*! ../../base/container_plugin */"./src/base/container_plugin.js")),l=c(r(/*! ../../base/events */"./src/base/events.js")),u=c(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(r){(0,n.default)(this,t);var o=(0,i.default)(this,e.call(this,r));return o.setInitialAttrs(),o.reportInterval=o.options.reportInterval||5e3,o.state="IDLE",o}return(0,a.default)(t,e),(0,o.default)(t,[{key:"name",get:function(){return"stats"}}]),t.prototype.bindEvents=function(){this.listenTo(this.container.playback,l.default.PLAYBACK_PLAY,this.onPlay),this.listenTo(this.container,l.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,l.default.CONTAINER_ENDED,this.onStop),this.listenTo(this.container,l.default.CONTAINER_DESTROYED,this.onStop),this.listenTo(this.container,l.default.CONTAINER_STATE_BUFFERING,this.onBuffering),this.listenTo(this.container,l.default.CONTAINER_STATE_BUFFERFULL,this.onBufferFull),this.listenTo(this.container,l.default.CONTAINER_STATS_ADD,this.onStatsAdd),this.listenTo(this.container,l.default.CONTAINER_BITRATE,this.onStatsAdd),this.listenTo(this.container.playback,l.default.PLAYBACK_STATS_ADD,this.onStatsAdd)},t.prototype.setInitialAttrs=function(){this.firstPlay=!0,this.startupTime=0,this.rebufferingTime=0,this.watchingTime=0,this.rebuffers=0,this.externalMetrics={}},t.prototype.onPlay=function(){this.state="PLAYING",this.watchingTimeInit=Date.now(),this.intervalId||(this.intervalId=setInterval(this.report.bind(this),this.reportInterval))},t.prototype.onStop=function(){clearInterval(this.intervalId),this.report(),this.intervalId=void 0,this.state="STOPPED"},t.prototype.onBuffering=function(){this.firstPlay?this.startupTimeInit=Date.now():this.rebufferingTimeInit=Date.now(),this.state="BUFFERING",this.rebuffers++},t.prototype.onBufferFull=function(){this.firstPlay&&this.startupTimeInit?(this.firstPlay=!1,this.startupTime=Date.now()-this.startupTimeInit,this.watchingTimeInit=Date.now()):this.rebufferingTimeInit&&(this.rebufferingTime+=this.getRebufferingTime()),this.rebufferingTimeInit=void 0,this.state="PLAYING"},t.prototype.getRebufferingTime=function(){return Date.now()-this.rebufferingTimeInit},t.prototype.getWatchingTime=function(){return Date.now()-this.watchingTimeInit-this.rebufferingTime},t.prototype.isRebuffering=function(){return!!this.rebufferingTimeInit},t.prototype.onStatsAdd=function(e){u.default.extend(this.externalMetrics,e)},t.prototype.getStats=function(){var e={startupTime:this.startupTime,rebuffers:this.rebuffers,rebufferingTime:this.isRebuffering()?this.rebufferingTime+this.getRebufferingTime():this.rebufferingTime,watchingTime:this.isRebuffering()?this.getWatchingTime()-this.getRebufferingTime():this.getWatchingTime()};return u.default.extend(e,this.externalMetrics),e},t.prototype.report=function(){this.container.statsReport(this.getStats())},t}(s.default);t.default=d,e.exports=t.default},"./src/plugins/strings.js": -/*!********************************!*\ - !*** ./src/plugins/strings.js ***! - \********************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=u(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=u(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=u(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=u(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=r(/*! ../base/utils */"./src/base/utils.js"),l=u(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(r){(0,n.default)(this,t);var o=(0,i.default)(this,e.call(this,r));return o._initializeMessages(),o}return(0,a.default)(t,e),(0,o.default)(t,[{key:"name",get:function(){return"strings"}}]),t.prototype.t=function(e){var t=this._language(),r=this._messages.en;return(t&&this._messages[t]||r)[e]||r[e]||e},t.prototype._language=function(){return this.core.options.language||(0,s.getBrowserLanguage)()},t.prototype._initializeMessages=function(){this._messages=l.default.extend(!0,{en:{live:"live",back_to_live:"back to live",disabled:"Disabled",playback_not_supported:"Your browser does not support the playback of this video. Please try using a different browser.",default_error_title:"Could not play video.",default_error_message:"There was a problem trying to load the video."},pt:{live:"ao vivo",back_to_live:"voltar para o ao vivo",disabled:"Desativado",playback_not_supported:"Seu navegador não supporta a reprodução deste video. Por favor, tente usar um navegador diferente.",default_error_title:"Não foi possível reproduzir o vídeo.",default_error_message:"Ocorreu um problema ao tentar carregar o vídeo."},es:{live:"vivo",back_to_live:"volver en vivo",disabled:"Discapacitado",playback_not_supported:"Su navegador no soporta la reproducción de un video. Por favor, trate de usar un navegador diferente."},ru:{live:"прямой эфир",back_to_live:"к прямому эфиру",disabled:"Отключено",playback_not_supported:"Ваш браузер не поддерживает воспроизведение этого видео. Пожалуйста, попробуйте другой браузер."},fr:{live:"en direct",back_to_live:"retour au direct",disabled:"Désactivé",playback_not_supported:"Votre navigateur ne supporte pas la lecture de cette vidéo. Merci de tenter sur un autre navigateur.",default_error_title:"Impossible de lire la vidéo.",default_error_message:"Un problème est survenu lors du chargement de la vidéo."},tr:{live:"canlı",back_to_live:"canlı yayına dön",disabled:"Engelli",playback_not_supported:"Tarayıcınız bu videoyu oynatma desteğine sahip değil. Lütfen farklı bir tarayıcı ile deneyin."},et:{live:"Otseülekanne",back_to_live:"Tagasi otseülekande juurde",disabled:"Keelatud",playback_not_supported:"Teie brauser ei toeta selle video taasesitust. Proovige kasutada muud brauserit."},ar:{live:"مباشر",back_to_live:"الرجوع إلى المباشر",disabled:"معطّل",playback_not_supported:"المتصفح الذي تستخدمه لا يدعم تشغيل هذا الفيديو. الرجاء إستخدام متصفح آخر.",default_error_title:"غير قادر الى التشغيل.",default_error_message:"حدثت مشكلة أثناء تحميل الفيديو."}},this.core.options.strings||{}),this._messages["pt-BR"]=this._messages.pt,this._messages["en-US"]=this._messages.en,this._messages["es-419"]=this._messages.es,this._messages["fr-FR"]=this._messages.fr,this._messages["tr-TR"]=this._messages.tr,this._messages["et-EE"]=this._messages.et,this._messages["ar-IQ"]=this._messages.ar},t}(u(r(/*! ../base/core_plugin */"./src/base/core_plugin.js")).default);t.default=c,e.exports=t.default},"./src/plugins/watermark/index.js": -/*!****************************************!*\ - !*** ./src/plugins/watermark/index.js ***! - \****************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./watermark */"./src/plugins/watermark/watermark.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},"./src/plugins/watermark/public/watermark.html": -/*!*****************************************************!*\ - !*** ./src/plugins/watermark/public/watermark.html ***! - \*****************************************************/ -/*! no static exports found */function(e,t){e.exports='<div class="clappr-watermark" data-watermark data-watermark-<%=position %>>\n<% if(typeof imageLink !== \'undefined\') { %>\n<a target=_blank href="<%= imageLink %>">\n<% } %>\n<img src="<%= imageUrl %>">\n<% if(typeof imageLink !== \'undefined\') { %>\n</a>\n<% } %>\n</div>\n'},"./src/plugins/watermark/public/watermark.scss": -/*!*****************************************************!*\ - !*** ./src/plugins/watermark/public/watermark.scss ***! - \*****************************************************/ -/*! no static exports found */function(e,t,r){var n=r(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./watermark.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/watermark/public/watermark.scss");"string"==typeof n&&(n=[[e.i,n,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};r(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(n,i),n.locals&&(e.exports=n.locals)},"./src/plugins/watermark/watermark.js": -/*!********************************************!*\ - !*** ./src/plugins/watermark/watermark.js ***! - \********************************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=d(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=d(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=d(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=d(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=d(r(/*! ../../base/ui_container_plugin */"./src/base/ui_container_plugin.js")),l=d(r(/*! ../../base/events */"./src/base/events.js")),u=d(r(/*! ../../base/template */"./src/base/template.js")),c=d(r(/*! ./public/watermark.html */"./src/plugins/watermark/public/watermark.html"));function d(e){return e&&e.__esModule?e:{default:e}}r(/*! ./public/watermark.scss */"./src/plugins/watermark/public/watermark.scss");var f=function(e){function t(r){(0,n.default)(this,t);var o=(0,i.default)(this,e.call(this,r));return o.configure(),o}return(0,a.default)(t,e),(0,o.default)(t,[{key:"name",get:function(){return"watermark"}},{key:"template",get:function(){return(0,u.default)(c.default)}}]),t.prototype.bindEvents=function(){this.listenTo(this.container,l.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,l.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,l.default.CONTAINER_OPTIONS_CHANGE,this.configure)},t.prototype.configure=function(){this.position=this.options.position||"bottom-right",this.options.watermark?(this.imageUrl=this.options.watermark,this.imageLink=this.options.watermarkLink,this.render()):this.$el.remove()},t.prototype.onPlay=function(){this.hidden||this.$el.show()},t.prototype.onStop=function(){this.$el.hide()},t.prototype.render=function(){this.$el.hide();var e={position:this.position,imageUrl:this.imageUrl,imageLink:this.imageLink};return this.$el.html(this.template(e)),this.container.$el.append(this.$el),this},t}(s.default);t.default=f,e.exports=t.default},"./src/vendor/index.js": -/*!*****************************!*\ - !*** ./src/vendor/index.js ***! - \*****************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(/*! ./kibo */"./src/vendor/kibo.js"),o=(n=i)&&n.__esModule?n:{default:n};t.default={Kibo:o.default},e.exports=t.default},"./src/vendor/kibo.js": -/*!****************************!*\ - !*** ./src/vendor/kibo.js ***! - \****************************/ -/*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){this.element=e||window.document,this.initialize()};n.KEY_NAMES_BY_CODE={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"caps_lock",27:"esc",32:"space",37:"left",38:"up",39:"right",40:"down",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"},n.KEY_CODES_BY_NAME={},function(){for(var e in n.KEY_NAMES_BY_CODE)Object.prototype.hasOwnProperty.call(n.KEY_NAMES_BY_CODE,e)&&(n.KEY_CODES_BY_NAME[n.KEY_NAMES_BY_CODE[e]]=+e)}(),n.MODIFIERS=["shift","ctrl","alt"],n.registerEvent=document.addEventListener?function(e,t,r){e.addEventListener(t,r,!1)}:document.attachEvent?function(e,t,r){e.attachEvent("on"+t,r)}:void 0,n.unregisterEvent=document.removeEventListener?function(e,t,r){e.removeEventListener(t,r,!1)}:document.detachEvent?function(e,t,r){e.detachEvent("on"+t,r)}:void 0,n.stringContains=function(e,t){return-1!==e.indexOf(t)},n.neatString=function(e){return e.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")},n.capitalize=function(e){return e.toLowerCase().replace(/^./,(function(e){return e.toUpperCase()}))},n.isString=function(e){return n.stringContains(Object.prototype.toString.call(e),"String")},n.arrayIncludes=Array.prototype.indexOf?function(e,t){return-1!==e.indexOf(t)}:function(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1},n.extractModifiers=function(e){var t,r;for(t=[],r=0;r<n.MODIFIERS.length;r++)n.stringContains(e,n.MODIFIERS[r])&&t.push(n.MODIFIERS[r]);return t},n.extractKey=function(e){var t,r;for(t=n.neatString(e).split(" "),r=0;r<t.length;r++)if(!n.arrayIncludes(n.MODIFIERS,t[r]))return t[r]},n.modifiersAndKey=function(e){var t,r;return n.stringContains(e,"any")?n.neatString(e).split(" ").slice(0,2).join(" "):(t=n.extractModifiers(e),(r=n.extractKey(e))&&!n.arrayIncludes(n.MODIFIERS,r)&&t.push(r),t.join(" "))},n.keyName=function(e){return n.KEY_NAMES_BY_CODE[e+""]},n.keyCode=function(e){return+n.KEY_CODES_BY_NAME[e]},n.prototype.initialize=function(){var e,t=this;for(this.lastKeyCode=-1,this.lastModifiers={},e=0;e<n.MODIFIERS.length;e++)this.lastModifiers[n.MODIFIERS[e]]=!1;this.keysDown={any:[]},this.keysUp={any:[]},this.downHandler=this.handler("down"),this.upHandler=this.handler("up"),n.registerEvent(this.element,"keydown",this.downHandler),n.registerEvent(this.element,"keyup",this.upHandler),n.registerEvent(window,"unload",(function e(){n.unregisterEvent(t.element,"keydown",t.downHandler),n.unregisterEvent(t.element,"keyup",t.upHandler),n.unregisterEvent(window,"unload",e)}))},n.prototype.handler=function(e){var t=this;return function(r){var i,o,a;for(r=r||window.event,t.lastKeyCode=r.keyCode,i=0;i<n.MODIFIERS.length;i++)t.lastModifiers[n.MODIFIERS[i]]=r[n.MODIFIERS[i]+"Key"];for(n.arrayIncludes(n.MODIFIERS,n.keyName(t.lastKeyCode))&&(t.lastModifiers[n.keyName(t.lastKeyCode)]=!0),o=t["keys"+n.capitalize(e)],i=0;i<o.any.length;i++)!1===o.any[i](r)&&r.preventDefault&&r.preventDefault();if(o[a=t.lastModifiersAndKey()])for(i=0;i<o[a].length;i++)!1===o[a][i](r)&&r.preventDefault&&r.preventDefault()}},n.prototype.registerKeys=function(e,t,r){var i,o,a=this["keys"+n.capitalize(e)];for(n.isString(t)&&(t=[t]),i=0;i<t.length;i++)o=t[i],a[o=n.modifiersAndKey(o+"")]?a[o].push(r):a[o]=[r];return this},n.prototype.unregisterKeys=function(e,t,r){var i,o,a,s=this["keys"+n.capitalize(e)];for(n.isString(t)&&(t=[t]),i=0;i<t.length;i++)if(a=t[i],a=n.modifiersAndKey(a+""),null===r)delete s[a];else if(s[a])for(o=0;o<s[a].length;o++)if(String(s[a][o])===String(r)){s[a].splice(o,1);break}return this},n.prototype.off=function(e){return this.unregisterKeys("down",e,null)},n.prototype.delegate=function(e,t,r){return null!==r||void 0!==r?this.registerKeys(e,t,r):this.unregisterKeys(e,t,r)},n.prototype.down=function(e,t){return this.delegate("down",e,t)},n.prototype.up=function(e,t){return this.delegate("up",e,t)},n.prototype.lastKey=function(e){return e?this.lastModifiers[e]:n.keyName(this.lastKeyCode)},n.prototype.lastModifiersAndKey=function(){var e,t;for(e=[],t=0;t<n.MODIFIERS.length;t++)this.lastKey(n.MODIFIERS[t])&&e.push(n.MODIFIERS[t]);return n.arrayIncludes(e,this.lastKey())||e.push(this.lastKey()),e.join(" ")},t.default=n,e.exports=t.default}})},e.exports=n()},function(e,t,r){var n;window,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,{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/clappr-dash-shaka-playback.js")}({"./node_modules/shaka-player/dist/shaka-player.compiled.js": -/*!*****************************************************************!*\ - !*** ./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 t<e.length?{done:!1,value:e[t++]}:{done:!0}}))}function d(e){return u(),(e={next:e})[o.Symbol.iterator]=function(){return this},e}function f(e){u();var t=e[Symbol.iterator];return t?t.call(e):c(e)}function h(e,t){if(t){for(var r=o,n=e.split("."),a=0;a<n.length-1;a++){var s=n[a];s in r||(r[s]={}),r=r[s]}(s=t(a=r[n=n[n.length-1]]))!=a&&null!=s&&i(r,n,{configurable:!0,writable:!0,value:s})}}function p(e){return function(e){function t(t){return e.next(t)}function r(t){return e.throw(t)}return new Promise((function(n,i){!function e(o){o.done?n(o.value):Promise.resolve(o.value).then(t,r).then(e,i)}(e.next())}))}(e())}h("Promise",(function(e){function t(e){this.b=0,this.g=void 0,this.a=[];var t=this.c();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function r(){this.a=null}function n(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;r.prototype.b=function(e){null==this.a&&(this.a=[],this.f()),this.a.push(e)},r.prototype.f=function(){var e=this;this.c((function(){e.h()}))};var i=o.setTimeout;r.prototype.c=function(e){i(e,0)},r.prototype.h=function(){for(;this.a&&this.a.length;){var e=this.a;this.a=[];for(var t=0;t<e.length;++t){var r=e[t];e[t]=null;try{r()}catch(e){this.g(e)}}}this.a=null},r.prototype.g=function(e){this.c((function(){throw e}))},t.prototype.c=function(){function e(e){return function(n){r||(r=!0,e.call(t,n))}}var t=this,r=!1;return{resolve:e(this.s),reject:e(this.f)}},t.prototype.s=function(e){if(e===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.u(e);else{e:switch(typeof e){case"object":var r=null!=e;break e;case"function":r=!0;break e;default:r=!1}r?this.m(e):this.h(e)}},t.prototype.m=function(e){var t=void 0;try{t=e.then}catch(e){return void this.f(e)}"function"==typeof t?this.B(t,e):this.h(e)},t.prototype.f=function(e){this.i(2,e)},t.prototype.h=function(e){this.i(1,e)},t.prototype.i=function(e,t){if(0!=this.b)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.b);this.b=e,this.g=t,this.l()},t.prototype.l=function(){if(null!=this.a){for(var e=0;e<this.a.length;++e)a.b(this.a[e]);this.a=null}};var a=new r;return t.prototype.u=function(e){var t=this.c();e.cc(t.resolve,t.reject)},t.prototype.B=function(e,t){var r=this.c();try{e.call(t,r.resolve,r.reject)}catch(e){r.reject(e)}},t.prototype.then=function(e,r){function n(e,t){return"function"==typeof e?function(t){try{i(e(t))}catch(e){o(e)}}:t}var i,o,a=new t((function(e,t){i=e,o=t}));return this.cc(n(e,i),n(r,o)),a},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.cc=function(e,t){function r(){switch(n.b){case 1:e(n.g);break;case 2:t(n.g);break;default:throw Error("Unexpected state: "+n.b)}}var n=this;null==this.a?a.b(r):this.a.push(r)},t.resolve=n,t.reject=function(e){return new t((function(t,r){r(e)}))},t.race=function(e){return new t((function(t,r){for(var i=f(e),o=i.next();!o.done;o=i.next())n(o.value).cc(t,r)}))},t.all=function(e){var r=f(e),i=r.next();return i.done?n([]):new t((function(e,t){function o(t){return function(r){a[t]=r,0==--s&&e(a)}}var a=[],s=0;do{a.push(void 0),s++,n(i.value).cc(o(a.length-1),t),i=r.next()}while(!i.done)}))},t})),h("Promise.prototype.finally",(function(e){return e||function(e){return this.then((function(t){return Promise.resolve(e()).then((function(){return t}))}),(function(t){return Promise.resolve(e()).then((function(){throw t}))}))}}));var m,g="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)m=Object.setPrototypeOf;else{var y;e:{var v={};try{v.__proto__={Ae:!0},y=v.Ae;break e}catch(s){}y=!1}m=y?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var b=m;function _(e,t){if(e.prototype=g(t.prototype),e.prototype.constructor=e,b)b(e,t);else for(var r in t)if("prototype"!=r)if(Object.defineProperties){var n=Object.getOwnPropertyDescriptor(t,r);n&&Object.defineProperty(e,r,n)}else e[r]=t[r];e.tg=t.prototype}function A(){this.g=!1,this.c=null,this.o=void 0,this.j=1,this.b=this.f=0,this.i=this.a=null}function E(e){if(e.g)throw new TypeError("Generator is already running");e.g=!0}function T(e,t){e.a={Ld:t,Wd:!0},e.j=e.f||e.b}function S(e,t,r){return e.j=r,{value:t}}function w(e){e.j=0}function k(e,t,r){e.f=t,null!=r&&(e.b=r)}function x(e,t){e.f=0,e.b=t||0}function C(e,t){e.j=t,e.f=0}function R(e){e.f=0;var t=e.a.Ld;return e.a=null,t}function j(e){e.i=[e.a],e.f=0,e.b=0}function L(e,t){var r=e.i.splice(0)[0];(r=e.a=e.a||r)?r.Wd?e.j=e.f||e.b:null!=r.A&&e.b<r.A?(e.j=r.A,e.a=null):e.j=e.b:e.j=t}function I(e){this.a=new A,this.b=e}function P(e,t,r,n){try{var i=t.call(e.a.c,r);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return e.a.g=!1,i;var o=i.value}catch(t){return e.a.c=null,T(e.a,t),O(e)}return e.a.c=null,n.call(e.a,o),O(e)}function O(e){for(;e.a.j;)try{var t=e.b(e.a);if(t)return e.a.g=!1,{value:t.value,done:!1}}catch(t){e.a.o=void 0,T(e.a,t)}if(e.a.g=!1,e.a.a){if(t=e.a.a,e.a.a=null,t.Wd)throw t.Ld;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function D(e){this.next=function(t){return E(e.a),e.a.c?t=P(e,e.a.c.next,t,e.a.h):(e.a.h(t),t=O(e)),t},this.throw=function(t){return E(e.a),e.a.c?t=P(e,e.a.c.throw,t,e.a.h):(T(e.a,t),t=O(e)),t},this.return=function(t){return function(e,t){E(e.a);var r=e.a.c;return r?P(e,"return"in r?r.return:function(e){return{value:e,done:!0}},t,e.a.return):(e.a.return(t),O(e))}(e,t)},u(),this[Symbol.iterator]=function(){return this}}function M(e,t){return D.prototype=e.prototype,new D(new I(t))}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function U(e,t,r){e instanceof String&&(e=String(e));for(var n=e.length,i=0;i<n;i++){var o=e[i];if(t.call(r,o,i,e))return{Td:i,ve:o}}return{Td:-1,ve:void 0}}function F(e,t,r){if(null==e)throw new TypeError("The 'this' value for String.prototype."+r+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+r+" must not be a regular expression");return e+""}A.prototype.h=function(e){this.o=e},A.prototype.return=function(e){this.a={return:e},this.j=this.b},A.prototype.A=function(e){this.j=e},h("WeakMap",(function(e){function t(e){if(this.a=(s+=Math.random()+1).toString(),e){a(),u(),e=f(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function r(e){N(e,o)||i(e,o,{value:{}})}function n(e){var t=Object[e];t&&(Object[e]=function(e){return r(e),t(e)})}if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}),r=Object.seal({}),n=new e([[t,2],[r,3]]);return 2==n.get(t)&&3==n.get(r)&&(n.delete(t),n.set(r,4),!n.has(t)&&4==n.get(r))}catch(e){return!1}}())return e;var o="$jscomp_hidden_"+Math.random();n("freeze"),n("preventExtensions"),n("seal");var s=0;return t.prototype.set=function(e,t){if(r(e),!N(e,o))throw Error("WeakMap key fail: "+e);return e[o][this.a]=t,this},t.prototype.get=function(e){return N(e,o)?e[o][this.a]:void 0},t.prototype.has=function(e){return N(e,o)&&N(e[o],this.a)},t.prototype.delete=function(e){return!(!N(e,o)||!N(e[o],this.a))&&delete e[o][this.a]},t})),h("Map",(function(e){function t(){var e={};return e.Fa=e.next=e.head=e}function r(e,t){var r=e.a;return d((function(){if(r){for(;r.head!=e.a;)r=r.Fa;for(;r.next!=r.head;)return r=r.next,{done:!1,value:t(r)};r=null}return{done:!0,value:void 0}}))}function n(e,t){var r=t&&typeof t;"object"==r||"function"==r?o.has(t)?r=o.get(t):(r=""+ ++s,o.set(t,r)):r="p_"+t;var n=e.b[r];if(n&&N(e.b,r))for(var i=0;i<n.length;i++){var a=n[i];if(t!=t&&a.key!=a.key||t===a.key)return{id:r,list:n,index:i,X:a}}return{id:r,list:n,index:-1,X:void 0}}function i(e){if(this.b={},this.a=t(),this.size=0,e){e=f(e);for(var r;!(r=e.next()).done;)r=r.value,this.set(r[0],r[1])}}if(function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),r=new e(f([[t,"s"]]));if("s"!=r.get(t)||1!=r.size||r.get({x:4})||r.set({x:4},"t")!=r||2!=r.size)return!1;var n=r.entries(),i=n.next();return!i.done&&i.value[0]==t&&"s"==i.value[1]&&!((i=n.next()).done||4!=i.value[0].x||"t"!=i.value[1]||!n.next().done)}catch(e){return!1}}())return e;a(),u();var o=new WeakMap;i.prototype.set=function(e,t){var r=n(this,e);return r.list||(r.list=this.b[r.id]=[]),r.X?r.X.value=t:(r.X={next:this.a,Fa:this.a.Fa,head:this.a,key:e,value:t},r.list.push(r.X),this.a.Fa.next=r.X,this.a.Fa=r.X,this.size++),this},i.prototype.delete=function(e){return!(!(e=n(this,e)).X||!e.list||(e.list.splice(e.index,1),e.list.length||delete this.b[e.id],e.X.Fa.next=e.X.next,e.X.next.Fa=e.X.Fa,e.X.head=null,this.size--,0))},i.prototype.clear=function(){this.b={},this.a=this.a.Fa=t(),this.size=0},i.prototype.has=function(e){return!!n(this,e).X},i.prototype.get=function(e){return(e=n(this,e).X)&&e.value},i.prototype.entries=function(){return r(this,(function(e){return[e.key,e.value]}))},i.prototype.keys=function(){return r(this,(function(e){return e.key}))},i.prototype.values=function(){return r(this,(function(e){return e.value}))},i.prototype.forEach=function(e,t){for(var r,n=this.entries();!(r=n.next()).done;)r=r.value,e.call(t,r[1],r[0],this)},i.prototype[Symbol.iterator]=i.prototype.entries;var s=0;return i})),h("Set",(function(e){function t(e){if(this.a=new Map,e){e=f(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.a.size}return function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),r=new e(f([t]));if(!r.has(t)||1!=r.size||r.add(t)!=r||1!=r.size||r.add({x:4})!=r||2!=r.size)return!1;var n=r.entries(),i=n.next();return!i.done&&i.value[0]==t&&i.value[1]==t&&!(i=n.next()).done&&i.value[0]!=t&&4==i.value[0].x&&i.value[1]==i.value[0]&&n.next().done}catch(e){return!1}}()?e:(a(),u(),t.prototype.add=function(e){return this.a.set(e,e),this.size=this.a.size,this},t.prototype.delete=function(e){return e=this.a.delete(e),this.size=this.a.size,e},t.prototype.clear=function(){this.a.clear(),this.size=0},t.prototype.has=function(e){return this.a.has(e)},t.prototype.entries=function(){return this.a.entries()},t.prototype.values=function(){return this.a.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(e,t){var r=this;this.a.forEach((function(n){return e.call(t,n,n,r)}))},t)})),h("Array.prototype.findIndex",(function(e){return e||function(e,t){return U(this,e,t).Td}})),h("Array.prototype.keys",(function(e){return e||function(){return function(e,t){u(),e instanceof String&&(e+="");var r=0,n={next:function(){if(r<e.length){var i=r++;return{value:t(i,e[i]),done:!1}}return n.next=function(){return{done:!0,value:void 0}},n.next()}};return n[Symbol.iterator]=function(){return n},n}(this,(function(e){return e}))}})),h("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),h("Array.prototype.includes",(function(e){return e||function(e,t){var r=this;r instanceof String&&(r=String(r));var n=r.length,i=t||0;for(0>i&&(i=Math.max(i+n,0));i<n;i++){var o=r[i];if(o===e||Object.is(o,e))return!0}return!1}})),h("String.prototype.includes",(function(e){return e||function(e,t){return-1!==F(this,e,"includes").indexOf(e,t||0)}})),h("Array.from",(function(e){return e||function(e,t,r){u(),t=null!=t?t:function(e){return e};var n=[],i=e[Symbol.iterator];if("function"==typeof i)for(e=i.call(e);!(i=e.next()).done;)n.push(t.call(r,i.value));else{i=e.length;for(var o=0;o<i;o++)n.push(t.call(r,e[o]))}return n}})),h("String.prototype.startsWith",(function(e){return e||function(e,t){for(var r=F(this,e,"startsWith"),n=r.length,i=e.length,o=Math.max(0,Math.min(0|t,r.length)),a=0;a<i&&o<n;)if(r[o++]!=e[a++])return!1;return a>=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;r<arguments.length;r++){var n=arguments[r];if(n)for(var i in n)N(n,i)&&(e[i]=n[i])}return e};h("Object.assign",(function(e){return e||B}));var K=this;function G(e,t){var r,n=e.split("."),i=K;n[0]in i||!i.execScript||i.execScript("var "+n[0]);for(;n.length&&(r=n.shift());)n.length||void 0===t?i=i[r]?i[r]:i[r]={}:i[r]=t}function V(e,t){function r(){}r.prototype=t.prototype,e.tg=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.Eg=function(e,r,n){return t.prototype[r].apply(e,Array.prototype.slice.call(arguments,2))}}function H(e){this.c=Math.exp(Math.log(.5)/e),this.b=this.a=0}function Y(e,t,r){var n=Math.pow(e.c,t);r=r*(1-n)+n*e.a,isNaN(r)||(e.a=r,e.b+=t)}function z(e){return e.a/(1-Math.pow(e.c,e.b))}function W(){this.b=new H(2),this.c=new H(5),this.a=0}function $(){}function q(){}function X(){}K.a=!0,W.prototype.getBandwidthEstimate=function(e){return 128e3>this.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<n.length;){var s=n[a++];"."==s?i&&a==n.length&&o.push(""):".."==s?((1<o.length||1==o.length&&""!=o[0])&&o.pop(),i&&a==n.length&&o.push("")):(o.push(s),i=!0)}n=o.join("/")}}return r?t.ja=n:r=""!==e.a.toString(),r?te(t,e.a.clone()):r=!!e.Sa,r&&(t.Sa=e.Sa),t},n.clone=function(){return new Z(this)};var oe=/[#\/\?@]/g,ae=/[#\?:]/g,se=/[#\?]/g,le=/[#\?@]/g,ue=/#/g;function ce(e){this.a=e||null}function de(e){this.b=e,this.a=null}function fe(e){this.b=e,this.a=null}function he(e,t){var r={maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0};this.i=null==e.maxAttempts?r.maxAttempts:e.maxAttempts,this.f=null==e.baseDelay?r.baseDelay:e.baseDelay,this.h=null==e.fuzzFactor?r.fuzzFactor:e.fuzzFactor,this.g=null==e.backoffFactor?r.backoffFactor:e.backoffFactor,this.a=0,this.b=this.f,(this.c=void 0!==t&&t)&&(this.a=1)}function pe(e){return p((function t(){var r,n;return M(t,(function(t){switch(t.j){case 1:if(e.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<arguments.length;++o)i[o-3]=arguments[o];this.severity=e,this.category=t,this.code=r,this.data=i,this.handled=!1}function ge(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function ye(e,t){this.promise=e,this.Zd=t,this.a=!1}function ve(e){return new ye(Promise.reject(e),(function(){return Promise.resolve()}))}function be(){var e=Promise.reject(new me(2,7,7001));return e.catch((function(){})),new ye(e,(function(){return Promise.resolve()}))}function _e(e){return new ye(Promise.resolve(e),(function(){return Promise.resolve()}))}function Ae(e){return new ye(e,(function(){return e.catch((function(){}))}))}function Ee(e){return new ye(Promise.all(e.map((function(e){return e.promise}))),(function(){return Promise.all(e.map((function(e){return e.abort()})))}))}function Te(e,t,r){try{var n=e(t);return n&&n.promise&&n.abort?(r.resolve(n.promise),function(){return n.abort()}):(r.resolve(n),function(){return Promise.resolve(n).then((function(){})).catch((function(){}))})}catch(e){return r.reject(e),function(){return Promise.resolve()}}}function Se(t,r){for(var n in r=void 0===r?{}:r)this[n]=r[n];this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.a=!1}function we(){this.a={}}function ke(){this.Jc=new we,this.$b=this}function xe(e){var t=new Set;return function e(r){switch(typeof r){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return r;default:if(!r||r.buffer&&r.buffer.constructor==ArrayBuffer)return r;if(t.has(r))return null;var n=r.constructor==Array;if(r.constructor!=Object&&!n)return null;t.add(r);var i,o=n?[]:{};for(i in r)o[i]=e(r[i]);return n&&(o.length=r.length),o}}(e)}function Ce(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function Re(e,t){var r=e.indexOf(t);-1<r&&e.splice(r,1)}function je(e,t,r){if(r||(r=Ce),e.length!=t.length)return!1;t=t.slice();for(var n={},i=(e=f(e)).next();!i.done;n={item:n.item},i=e.next()){if(n.item=i.value,-1==(i=t.findIndex(function(e){return function(t){return r(e.item,t)}}(n))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function Le(){this.a=[]}function Ie(e,t){e.a.push(t.finally((function(){Re(e.a,t)})))}function Pe(e){ke.call(this),this.f=!1,this.g=new Le,this.a=new Set,this.b=new Set,this.c=e||null}(n=ce.prototype).ha=null,n.fc=null,n.add=function(e,t){if(!this.ha&&(this.ha={},this.fc=0,this.a))for(var r=this.a.split("&"),n=0;n<r.length;n++){var i=r[n].indexOf("="),o=null;if(0<=i){var a=r[n].substring(0,i);o=r[n].substring(i+1)}else a=r[n];a=decodeURIComponent(a.replace(/\+/g," ")),o=o||"",this.add(a,decodeURIComponent(o.replace(/\+/g," ")))}return this.a=null,(r=this.ha.hasOwnProperty(e)&&this.ha[e])||(this.ha[e]=r=[]),r.push(t),this.fc++,this},n.toString=function(){if(this.a)return this.a;if(!this.ha)return"";var e,t=[];for(e in this.ha)for(var r=encodeURIComponent(e),n=this.ha[e],i=0;i<n.length;i++){var o=r;""!==n[i]&&(o+="="+encodeURIComponent(n[i])),t.push(o)}return this.a=t.join("&")},n.clone=function(){var e=new ce;if(e.a=this.a,this.ha){var t,r={};for(t in this.ha)r[t]=this.ha[t].concat();e.ha=r,e.fc=this.fc}return e},de.prototype.R=function(t){var r=this;this.stop();var n=!0,i=null;return this.a=function(){e.clearTimeout(i),n=!1},i=e.setTimeout((function(){n&&r.b()}),1e3*t),this},de.prototype.stop=function(){this.a&&(this.a(),this.a=null)},G("shaka.util.Timer",fe),fe.prototype.yc=function(){return this.stop(),this.b(),this},fe.prototype.tickNow=fe.prototype.yc,fe.prototype.R=function(e){var t=this;return this.stop(),this.a=new de((function(){t.b()})).R(e),this},fe.prototype.tickAfter=fe.prototype.R,fe.prototype.Na=function(e){var t=this;return this.stop(),this.a=new de((function(){t.a.R(e),t.b()})).R(e),this},fe.prototype.tickEvery=fe.prototype.Na,fe.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)},fe.prototype.stop=fe.prototype.stop,G("shaka.util.Error",me),me.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},me.Severity={RECOVERABLE:1,CRITICAL:2},me.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9},me.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013},ge.prototype.resolve=function(){},ge.prototype.reject=function(){},G("shaka.util.AbortableOperation",ye),ye.failed=ve,ye.aborted=be,ye.completed=_e,ye.notAbortable=Ae,ye.prototype.abort=function(){return this.a=!0,this.Zd()},ye.prototype.abort=ye.prototype.abort,ye.all=Ee,ye.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},ye.prototype.finally=ye.prototype.finally,ye.prototype.U=function(e,t){function r(){return i.reject(new me(2,7,7001)),n.abort()}var n=this,i=new ge;return this.promise.then((function(t){n.a?i.reject(new me(2,7,7001)):e?r=Te(e,t,i):i.resolve(t)}),(function(e){t?r=Te(t,e,i):i.reject(e)})),new ye(i,(function(){return r()}))},ye.prototype.chain=ye.prototype.U,Se.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},Se.prototype.stopImmediatePropagation=function(){this.a=!0},Se.prototype.stopPropagation=function(){},(n=we.prototype).push=function(e,t){this.a.hasOwnProperty(e)?this.a[e].push(t):this.a[e]=[t]},n.get=function(e){return(e=this.a[e])?e.slice():null},n.getAll=function(){var e,t=[];for(e in this.a)t.push.apply(t,this.a[e]);return t},n.remove=function(e,t){var r=this.a[e];if(r)for(var n=0;n<r.length;++n)r[n]==t&&(r.splice(n,1),--n)},n.forEach=function(e){for(var t in this.a)e(t,this.a[t])},ke.prototype.addEventListener=function(e,t){this.Jc.push(e,t)},ke.prototype.removeEventListener=function(e,t){this.Jc.remove(e,t)},ke.prototype.dispatchEvent=function(e){for(var t=this.Jc.get(e.type)||[],r=0;r<t.length;++r){e.target=this.$b,e.currentTarget=this.$b;var n=t[r];try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.a)break}return e.defaultPrevented},Le.prototype.destroy=function(){var e=[];return this.a.forEach((function(t){t.promise.catch((function(){})),e.push(t.abort())})),this.a=[],Promise.all(e)},V(Pe,ke),G("shaka.net.NetworkingEngine",Pe),Pe.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4},Pe.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var Oe={};function De(e,t,r){r=r||3;var n=Oe[e];(!n||r>=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)}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 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),Ie(this.g,i),i},Pe.prototype.request=Pe.prototype.request,Pe.NumBytesRemainingClass=Ne,_(Ue,ye),Pe.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;i++)r[i]=n.getUint16(2*i,t);return dt(r)}function lt(e){var t=new Uint8Array(e);if(239==t[0]&&187==t[1]&&191==t[2])return at(t);if(254==t[0]&&255==t[1])return st(t.subarray(2),!1);if(255==t[0]&&254==t[1])return st(t.subarray(2),!0);var r=function(e,t){return e.byteLength<=t||32<=e[t]&&126>=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;r<e.length;++r)t[r]=e.charCodeAt(r);return t.buffer}function ct(e,t){for(var r=new Uint8Array(2*e.length),n=new DataView(r.buffer),i=0;i<e.length;++i)n.setUint16(2*i,e.charCodeAt(i),t);return r.buffer}function dt(e){if(!ft)for(var t=function(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(e){return!1}},r={size:65536};0<r.size;(r={size:r.size}).size/=2)if(t(r.size)){ft=function(e){return function(t){for(var r="",n=0;n<t.length;n+=e.size)r+=String.fromCharCode.apply(null,t.subarray(n,n+e.size));return r}}(r);break}return ft(e)}G("shaka.util.StringUtils.fromUTF8",at),G("shaka.util.StringUtils.fromUTF16",st),G("shaka.util.StringUtils.fromBytesAutoDetect",lt),G("shaka.util.StringUtils.toUTF8",ut),G("shaka.util.StringUtils.toUTF16",ct);var ft=null;G("shaka.util.StringUtils.resetFromCharCode",(function(){ft=null}));var ht={zc:function(t,r){var n=dt(t);return r=null==r||r,n=e.btoa(n).replace(/\+/g,"-").replace(/\//g,"_"),r?n:n.replace(/=*$/,"")}};function pt(e){var t=this;this.B=e,this.u=new Set,this.h=this.l=null,this.S=!1,this.K=0,this.a=null,this.i=new Be,this.b=new Map,this.s=[],this.m=new ge,this.f=null,this.g=function(r){t.m.reject(r),e.onError(r)},this.pa=new Map,this.W=new Map,this.O=new fe((function(){return function(e){var t=e.pa,r=e.W;r.clear(),t.forEach((function(e,t){return r.set(t,e)})),(t=Array.from(r.values())).length&&t.every((function(e){return"expired"==e}))&&e.g(new me(2,6,6014)),e.B.qc($e(r))}(t)})),this.c=!1,this.na=new ge,this.D=!1,this.F=[],this.oa=!1,this.$=new fe((function(){!function(e){e.b.forEach((function(t,r){var n=t.hd,i=r.expiration;isNaN(i)&&(i=1/0),i!=n&&(e.B.onExpirationUpdated(r.sessionId,i),t.hd=i)}))}(t)})).Na(1),this.m.catch((function(){}))}function mt(e,t,r){return e.s=r,e.D=0<r.length,gt(e,t)}function gt(t,r){var n=function(t){if(0==(t=We(t.f.clearKeys)).size)return null;var r=[],n=[];t.forEach((function(e,t){var i=ht.Qc(t),o=ht.Qc(e);i={kty:"oct",kid:ht.zc(i,!1),k:ht.zc(o,!1)},r.push(i),n.push(i.kid)})),t=JSON.stringify({keys:r});var i=JSON.stringify({kids:n});return i=[{initData:new Uint8Array(ut(i)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:i,keyIds:[]}}(t);if(n)for(var i=f(r),o=i.next();!o.done;o=i.next())o.value.drmInfos=[n];for((n=r.some((function(e){return 0<e.drmInfos.length})))||function(e,t){var r=[];t.forEach((function(e,t){r.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})}));for(var n=f(e),i=n.next();!i.done;i=n.next())i.value.drmInfos=r}(r,o=We(t.f.servers)),o=(i=f(r)).next();!o.done;o=i.next())for(var a=(o=f(o.value.drmInfos)).next();!a.done;a=o.next())Pt(a.value,We(t.f.servers),We(t.f.advanced||{}));return(o=function(e,t){for(var r=new Set,n=f(t),i=n.next();!i.done;i=n.next()){var o=f(i.value.drmInfos);for(i=o.next();!i.done;i=o.next())r.add(i.value)}for(n=f(r),i=n.next();!i.done;i=n.next())Pt(i.value,We(e.f.servers),We(e.f.advanced||{}));o=e.D?"required":"optional";var a=e.D?["persistent-license"]:["temporary"];for(n=new Map,r=f(r),i=r.next();!i.done;i=r.next())i=i.value,n.set(i.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:o,sessionTypes:a,label:i.keySystem,drmInfos:[]});for(r=f(t),i=r.next();!i.done;i=r.next()){i=i.value,o=i.audio,a=i.video;var s=o?qe(o.mimeType,o.codecs):"",l=a?qe(a.mimeType,a.codecs):"",u=f(i.drmInfos);for(i=u.next();!i.done;i=u.next()){i=i.value;var c=n.get(i.keySystem);c.drmInfos.push(i),i.distinctiveIdentifierRequired&&(c.distinctiveIdentifier="required"),i.persistentStateRequired&&(c.persistentState="required"),o&&c.audioCapabilities.push({robustness:i.audioRobustness||"",contentType:s}),a&&c.videoCapabilities.push({robustness:i.videoRobustness||"",contentType:l})}}return n}(t,r)).size?(o=Tt(t,o),n?o:o.catch((function(){}))):(t.S=!0,Promise.resolve())}function yt(e){return p((function t(){var r;return M(t,(function(t){switch(t.j){case 1:if(!(e.l&&e.a&&e.a.serverCertificate&&e.a.serverCertificate.length)){t.A(0);break}return k(t,3),S(t,e.l.setServerCertificate(e.a.serverCertificate),5);case 5:C(t,0);break;case 3:return r=R(t),t.return(Promise.reject(new me(2,6,6004,r.message)))}}))}))}function vt(e){var t=e.a?e.a.initData:[];return t.forEach((function(t){return wt(e,t.initDataType,t.initData)})),e.s.forEach((function(t){return St(e,t)})),t.length||e.s.length||e.m.resolve(),e.m}function bt(e,t,r){for(var n=e.b.values(),i=(n=f(n)).next();!i.done;i=n.next())if(ht.za(r,i.value.initData)&&!rt("Tizen 2"))return;wt(e,t,r)}function _t(e){return e?e.keySystem:""}function At(e,t){return!!rt("Edge/")||e.u.has(t)}function Et(e){return e=Ye(e=e.b.keys(),(function(e){return e.sessionId})),Array.from(e)}function Tt(e,t){if(1==t.size&&t.has(""))return Promise.reject(new me(2,6,6e3));for(var r=f(t.values()),n=r.next();!n.done;n=r.next())0==(n=n.value).audioCapabilities.length&&delete n.audioCapabilities,0==n.videoCapabilities.length&&delete n.videoCapabilities;var i=r=new ge;return[!0,!1].forEach(function(e){var r=this;t.forEach((function(t,n){t.drmInfos.some((function(e){return!!e.licenseServerUri}))==e&&(i=i.catch(function(){if(!this.c)return navigator.requestMediaKeySystemAccess(n,[t])}.bind(r)))}))}.bind(e)),i=(i=i.catch((function(){return Promise.reject(new me(2,6,6001))}))).then(function(e){if(this.c)return Promise.reject();this.u.clear();var r=e.getConfiguration(),n=r.videoCapabilities||[],i=f(r.audioCapabilities||[]);for(r=i.next();!r.done;r=i.next())this.u.add(r.value.contentType);for(r=(n=f(n)).next();!r.done;r=n.next())this.u.add(r.value.contentType);n=e.keySystem,i=[];var o=[],a=[],s=[];return function(e,t,r,n,i){e.forEach((function(e){if(t.includes(e.licenseServerUri)||t.push(e.licenseServerUri),e.serverCertificate&&(r.some((function(t){return ht.za(t,e.serverCertificate)}))||r.push(e.serverCertificate)),e.initData&&e.initData.forEach((function(e){n.some((function(t){return!(!t.keyId||t.keyId!=e.keyId)||t.initDataType==e.initDataType&&ht.za(t.initData,e.initData)}))||n.push(e)})),e.keyIds)for(var o=0;o<e.keyIds.length;++o)i.includes(e.keyIds[o])||i.push(e.keyIds[o])}))}((r=t.get(e.keySystem)).drmInfos,i,o,a,s),this.a={keySystem:n,licenseServerUri:i[0],distinctiveIdentifierRequired:"required"==r.distinctiveIdentifier,persistentStateRequired:"required"==r.persistentState,audioRobustness:(r.audioCapabilities?r.audioCapabilities[0].robustness:"")||"",videoRobustness:(r.videoCapabilities?r.videoCapabilities[0].robustness:"")||"",serverCertificate:o[0],initData:a,keyIds:s},this.a.licenseServerUri?e.createMediaKeys():Promise.reject(new me(2,6,6012,this.a.keySystem))}.bind(e)).then(function(e){if(this.c)return Promise.reject();this.l=e,this.S=!0}.bind(e)).catch(function(e){if(!this.c)return this.a=null,this.u.clear(),e instanceof me?Promise.reject(e):Promise.reject(new me(2,6,6002,e.message))}.bind(e)),r.reject(),i}function St(e,t){try{var r=e.l.createSession("persistent-license")}catch(t){var n=new me(2,6,6005,t.message);return e.g(n),Promise.reject(n)}e.i.w(r,"message",e.fe.bind(e)),e.i.w(r,"keystatuseschange",e.de.bind(e));var i={initData:null,loaded:!1,hd:1/0,ya:null};return e.b.set(r,i),r.load(t).then(function(e){return this.c?Promise.reject():e?(i.loaded=!0,It(this)&&this.m.resolve(),r):(this.b.delete(r),void this.g(new me(2,6,6013)))}.bind(e),function(e){this.c||(this.b.delete(r),this.g(new me(2,6,6005,e.message)))}.bind(e))}function wt(e,t,r){try{var n=e.D?e.l.createSession("persistent-license"):e.l.createSession()}catch(t){return void e.g(new me(2,6,6005,t.message))}e.i.w(n,"message",e.fe.bind(e)),e.i.w(n,"keystatuseschange",e.de.bind(e)),e.b.set(n,{initData:r,loaded:!1,hd:1/0,ya:null});try{r=e.f.initDataTransform(r,e.a)}catch(r){return t=r,r instanceof me||(t=new me(2,6,6016,r)),void e.g(t)}n.generateRequest(t,r.buffer).catch((function(t){if(!e.c){if(e.b.delete(n),t.errorCode&&t.errorCode.systemCode){var r=t.errorCode.systemCode;0>r&&(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<r.length;++n)e.headers[r[n].querySelector("name").textContent]=r[n].querySelector("value").textContent;e.body=ht.Ba(t.querySelector("Challenge").textContent).buffer}else e.headers["Content-Type"]="text/xml; charset=utf-8"}(i),e.a.keySystem.startsWith("com.apple.fps")&&e.f.fairPlayTransform&&function(e){var t=new Uint8Array(e.body);t="spc="+ht.zc(t),e.headers["Content-Type"]="application/x-www-form-urlencoded",e.body=ut(t)}(i);var a=Date.now();e.B.ub.request(2,i).promise.then(function(e){return this.c?Promise.reject():(this.a.keySystem.startsWith("com.apple.fps")&&this.f.fairPlayTransform&&function(e){try{var t=at(e.data)}catch(e){return}"<ckc>"===(t=t.trim()).substr(0,5)&&"</ckc>"===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 $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 jt(e,t){if(!e.length)return t;if(!t.length)return e;for(var r=[],n=0;n<e.length;n++)for(var i=0;i<t.length;i++)if(e[n].keySystem==t[i].keySystem){var o=e[n];i=t[i];var a=[];a=(a=a.concat(o.initData||[])).concat(i.initData||[]);var s=[];s=(s=s.concat(o.keyIds)).concat(i.keyIds),r.push({keySystem:o.keySystem,licenseServerUri:o.licenseServerUri||i.licenseServerUri,distinctiveIdentifierRequired:o.distinctiveIdentifierRequired||i.distinctiveIdentifierRequired,persistentStateRequired:o.persistentStateRequired||i.persistentStateRequired,videoRobustness:o.videoRobustness||i.videoRobustness,audioRobustness:o.audioRobustness||i.audioRobustness,serverCertificate:o.serverCertificate||i.serverCertificate,initData:a,keyIds:s});break}return r}function Lt(e){return p((function t(){var r;return M(t,(function(t){switch(t.j){case 1:return r=Array.from(e.b.keys()),e.b.clear(),S(t,Promise.all(r.map((function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return k(t,2),S(t,Promise.all([e.close(),e.closed]),4);case 4:C(t,0);break;case 2:R(t),w(t)}}))}))}))),0)}}))}))}function It(e){return ze(e=e.b.values(),(function(e){return e.loaded}))}function Pt(t,r,n){!t.keySystem||"org.w3.clearkey"==t.keySystem&&t.licenseServerUri||(r.size&&(r=r.get(t.keySystem)||"",t.licenseServerUri=r),t.keyIds||(t.keyIds=[]),(n=n.get(t.keySystem))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=n.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=n.persistentStateRequired),t.videoRobustness||(t.videoRobustness=n.videoRobustness),t.audioRobustness||(t.audioRobustness=n.audioRobustness),t.serverCertificate||(t.serverCertificate=n.serverCertificate)),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==t.keySystem&&(t.keySystem="com.chromecast.playready"))}G("shaka.util.Uint8ArrayUtils.toBase64",ht.zc),ht.Ba=function(t){t=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));for(var r=new Uint8Array(t.length),n=0;n<t.length;++n)r[n]=t.charCodeAt(n);return r},G("shaka.util.Uint8ArrayUtils.fromBase64",ht.Ba),ht.Qc=function(t){for(var r=new Uint8Array(t.length/2),n=0;n<t.length;n+=2)r[n/2]=e.parseInt(t.substr(n,2),16);return r},G("shaka.util.Uint8ArrayUtils.fromHex",ht.Qc),ht.Ac=function(e){for(var t="",r=0;r<e.length;++r){var n=e[r].toString(16);1==n.length&&(n="0"+n),t+=n}return t},G("shaka.util.Uint8ArrayUtils.toHex",ht.Ac),ht.za=function(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!=t.length)return!1;for(var r=0;r<e.length;++r)if(e[r]!=t[r])return!1;return!0},G("shaka.util.Uint8ArrayUtils.equal",ht.za),ht.concat=function(e){for(var t=[],r=0;r<arguments.length;++r)t[r]=arguments[r];for(var n=r=0;n<t.length;++n)r+=t[n].length;r=new Uint8Array(r);for(var i=n=0;i<t.length;++i)r.set(t[i],n),n+=t[i].length;return r},G("shaka.util.Uint8ArrayUtils.concat",ht.concat),(n=pt.prototype).destroy=function(){var e=this;return p((function t(){return M(t,(function(t){switch(t.j){case 1:return e.c?S(t,e.na,0):(e.c=!0,S(t,function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return e.i.release(),e.i=null,e.m.reject(),e.$.stop(),e.$=null,e.O.stop(),e.O=null,S(t,Lt(e),2);case 2:if(!e.h){t.A(3);break}return k(t,4),S(t,e.h.setMediaKeys(null),6);case 6:C(t,5);break;case 4:R(t);case 5:e.h=null;case 3:e.a=null,e.u.clear(),e.l=null,e.s=[],e.f=null,e.g=null,e.B=null,w(t)}}))}))}(e),4));case 4:e.na.resolve(),t.A(0)}}))}))},n.configure=function(e){this.f=e},n.Hb=function(e){var t=this;if(!this.l)return this.i.da(e,"encrypted",(function(){t.g(new me(2,6,6010))})),Promise.resolve();this.h=e,this.i.da(this.h,"play",(function(){for(var e=0;e<t.F.length;e++)xt(t,t.F[e]);t.oa=!0,t.F=[]})),"webkitCurrentPlaybackTargetIsWireless"in this.h&&this.i.w(this.h,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return Lt(t)})),e=(e=this.h.setMediaKeys(this.l)).catch((function(e){return Promise.reject(new me(2,6,6003,e.message))}));var r=yt(this);return Promise.all([e,r]).then((function(){if(t.c)return Promise.reject();vt(t),t.a.initData.length||t.s.length||t.i.w(t.h,"encrypted",(function(e){return bt(t,e.initDataType,new Uint8Array(e.initData))}))})).catch((function(e){if(!t.c)return Promise.reject(e)}))},n.Lb=function(){for(var e=1/0,t=this.b.keys(),r=(t=f(t)).next();!r.done;r=t.next())r=r.value,isNaN(r.expiration)||(e=Math.min(e,r.expiration));return e},n.fe=function(e){this.h&&this.f.delayLicenseRequestUntilPlayed&&this.h.paused&&!this.oa?this.F.push(e):xt(this,e)},n.de=function(e){e=e.target;var t=this.b.get(e),r=!1;e.keyStatuses.forEach(function(e,n){if("string"==typeof n){var i=n;n=e,e=i}if("com.microsoft.playready"==this.a.keySystem&&16==n.byteLength&&!rt("Tizen")&&!rt("VITIS")){var o=(i=new DataView(n)).getUint32(0,!0),a=i.getUint16(4,!0),s=i.getUint16(6,!0);i.setUint32(0,o,!1),i.setUint16(4,a,!1),i.setUint16(6,s,!1)}"com.microsoft.playready"==this.a.keySystem&&"status-pending"==e&&(e="usable"),"status-pending"!=e&&(t.loaded=!0),"expired"==e&&(r=!0),i=ht.Ac(new Uint8Array(n)),this.pa.set(i,e)}.bind(this));var n=e.expiration-Date.now();(0>n||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 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<e.length;r++)t.push({start:e.start(r),end:e.end(r)});return t}Mt.prototype.init=function(e){var t=muxjs.mp4.probe;e=new Uint8Array(e),this.g=t.videoTrackIds(e),this.f=t.timescale(e),this.a.init()},Mt.prototype.b=function(e,t){var r=new Uint8Array(e);(r=this.a.parse(r,this.g,this.f))&&r.captions&&t(r.captions),this.a.clearParsedCaptions()},Mt.prototype.c=function(){this.a.resetCaptionStream()},Nt.prototype.init=function(){},Nt.prototype.b=function(){},Nt.prototype.c=function(){};var Gt={Ke:function(e,t){return e.reduce(function(e,t,r){return t.catch(e.bind(null,r))}.bind(null,t),Promise.reject())},Gc:function(e,t){return e.concat(t)},oc:function(){},Ia:function(e){return null!=e}};function Vt(e,t){if(0==t.length)return e;var r=t.map((function(e){return new Z(e)}));return e.map((function(e){return new Z(e)})).map((function(e){return r.map(e.resolve.bind(e))})).reduce(Gt.Gc,[]).map((function(e){return e.toString()}))}function Ht(e,t){return{keySystem:e,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:t||[],keyIds:[]}}var Yt={Pa:"video",Eb:"audio",ra:"text",Cg:"image",Ag:"application"};function zt(){this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.b=null,this.g=[],this.c=[],this.f=!1,this.a.on("data",this.i.bind(this)),this.a.on("done",this.h.bind(this))}function Wt(t,r){return!(!e.muxjs||"mp2t"!=t.toLowerCase().split(";")[0].split("/")[1])&&(r?MediaSource.isTypeSupported($t(r,t)):MediaSource.isTypeSupported($t("audio",t))||MediaSource.isTypeSupported($t("video",t)))}function $t(e,t){var r=t.replace(/mp2t/i,"mp4");"audio"==e&&(r=r.replace("video","audio"));var n=/avc1\.(66|77|100)\.(\d+)/.exec(r);if(n){var i="avc1.",o=n[1],a=Number(n[2]);i=("66"==o?i+"4200":"77"==o?i+"4d00":i+"6400")+(a>>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<e.h&&(l=new qt(l.startTime,l.endTime,l.text),a.get(s).get(o).push(l),s==e.l&&e.c.append([l]))}for(o=(i=f(a.keys())).next();!o.done;o=i.next())for(o=o.value,e.i.has(o)||e.i.set(o,new Map),s=(t=f(a.get(o).keys())).next();!s.done;s=t.next())s=s.value,l=a.get(o).get(s),e.i.get(o).set(s,l);e.a=null==e.a?Math.max(r,e.f):Math.min(e.a,Math.max(r,e.f)),e.b=Math.max(e.b,Math.min(n,e.h))}function yr(e,t,r){this.f=e,this.g=r,this.b={},this.a=null,this.c={},this.i=new Be,this.u=!1,this.l={},this.m=t,e=this.s=new ge,t=new MediaSource,this.i.da(t,"sourceopen",e.resolve),this.f.src=vr(t),this.h=t}G("shaka.text.TextEngine.registerParser",(function(e,t){hr[e]=t})),G("shaka.text.TextEngine.unregisterParser",(function(e){delete hr[e]})),fr.prototype.destroy=function(){return this.c=this.g=null,this.i.clear(),Promise.resolve()},fr.prototype.kc=function(e){try{return this.g.parseMedia(new Uint8Array(e),{periodStart:0,segmentStart:null,segmentEnd:0})[0].startTime}catch(e){throw new me(2,2,2009,e)}},fr.prototype.remove=function(e,t){return Promise.resolve().then(function(){!this.c||!this.c.remove(e,t)||null==this.a||t<=this.a||e>=this.b||(e<=this.a&&t>=this.b?this.a=this.b=null:e<=this.a&&t<this.b?this.a=t:e>this.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.startTime<this.h}.bind(this)),this.c.append(e),null==this.a&&(this.a=Math.max(r,this.f)),this.b=Math.min(n,this.h)}}.bind(e))}(t.a,n,i,o):t.l[r]?function(e,t){e.f=!0,e.b=new ge,e.g=[],e.c=[];var r=new Uint8Array(t);return e.a.push(r),e.a.flush(),e.f&&e.b.reject(new me(2,3,3018)),e.b}(t.l[r],n).then(function(e){return this.a||_r(this,"text/vtt"),e.captions&&e.captions.length&&gr(this.a,e.captions,i,o,this.b.video.timestampOffset),Cr(this,r,this.re.bind(this,r,e.data.buffer))}.bind(t)):(a&&e.muxjs&&(t.a||_r(t,"text/vtt"),null==i&&null==o?t.m.init(n):t.m.b(n,(function(e){e.length&&gr(t.a,e,i,o,t.b.video.timestampOffset)}))),Cr(t,r,t.re.bind(t,r,n)))}function kr(e,t){var r=Tr(e,"video")||0;!function(e,t,r){if(e.l=t,t=e.i.get(t))for(var n=f(t.keys()),i=n.next();!i.done;i=n.next())(i=t.get(i.value).filter((function(e){return e.endTime<=r})))&&e.c.append(i)}(e.a,t,r)}function xr(e,t){return"text"==t?e.a?(e.m.c(),e.a.remove(0,1/0)):Promise.resolve():Cr(e,t,e.se.bind(e,t,0,e.h.duration))}function Cr(e,t,r){if(e.u)return Promise.reject();if(r={start:r,p:new ge},e.c[t].push(r),1==e.c[t].length)try{r.start()}catch(n){"QuotaExceededError"==n.name?r.p.reject(new me(2,3,3017,t)):r.p.reject(new me(2,3,3015,n)),jr(e,t)}return r.p}function Rr(e,t){if(e.u)return Promise.reject();var r,n=[];for(r in e.b){var i=new ge,o={start:function(e){e.resolve()}.bind(null,i),p:i};e.c[r].push(o),n.push(i),1==e.c[r].length&&o.start()}return Promise.all(n).then(function(){try{t()}catch(t){var e=Promise.reject(new me(2,3,3015,t))}for(var r in this.b)jr(this,r);return e}.bind(e),function(e){throw e}.bind(e))}function jr(e,t){e.c[t].shift();var r=e.c[t][0];if(r)try{r.start()}catch(n){r.p.reject(new me(2,3,3015,n)),jr(e,t)}}function Lr(e,t){return e=Pr(e),t=Pr(t),e.split("-")[0]==t.split("-")[0]}function Ir(e,t){e=Pr(e),t=Pr(t);var r=e.split("-"),n=t.split("-");return r[0]==n[0]&&1==r.length&&2==n.length}function Pr(e){var t=e.split("-");return e=t[0]||"",t=t[1]||"",e=e.toLowerCase(),e=Mr.get(e)||e,(t=t.toUpperCase())?e+"-"+t:e}function Or(e){return e.language?Pr(e.language):e.audio&&e.audio.language?Pr(e.audio.language):e.video&&e.video.language?Pr(e.video.language):"und"}function Dr(e,t){for(var r=Pr(e),n=new Set,i=f(t),o=i.next();!o.done;o=i.next())n.add(Pr(o.value));for(o=(i=f(n)).next();!o.done;o=i.next())if((o=o.value)==r)return o;for(o=(i=f(n)).next();!o.done;o=i.next())if(Ir(o=o.value,r))return o;for(o=(i=f(n)).next();!o.done;o=i.next()){var a=o=o.value,s=r;if(a=Pr(a),s=Pr(s),a=a.split("-"),s=s.split("-"),2==a.length&&2==s.length&&a[0]==s[0])return o}for(o=(n=f(n)).next();!o.done;o=n.next())if(Ir(r,i=o.value))return i;return null}(n=yr.prototype).destroy=function(){var e=this;this.u=!0;var t,r=[];for(t in this.c){var n=this.c[t],i=n[0];for(this.c[t]=n.slice(0,1),i&&r.push(i.p.catch(Gt.oc)),i=1;i<n.length;++i)n[i].p.reject()}for(var o in this.a&&r.push(this.a.destroy()),this.g&&r.push(this.g.destroy()),this.l)r.push(this.l[o].destroy());return Promise.all(r).then((function(){e.i&&(e.i.release(),e.i=null),e.f&&(e.f.removeAttribute("src"),e.f.load(),e.f=null),e.h=null,e.a=null,e.g=null,e.b={},e.l={},e.m=null,e.c={}}))},n.init=function(e,t){var r=this;return p((function n(){var i;return M(n,(function(n){switch(n.j){case 1:return i=Yt,S(n,r.s,2);case 2:e.forEach((function(e,n){var o=qe(e.mimeType,e.codecs);n==i.ra?_r(r,o):(!t&&MediaSource.isTypeSupported(o)||!Wt(o,n)||(r.l[n]=new zt,o=$t(n,o)),o=r.h.addSourceBuffer(o),r.i.w(o,"error",r.lg.bind(r,n)),r.i.w(o,"updateend",r.xb.bind(r,n)),r.b[n]=o,r.c[n]=[])})),w(n)}}))}))},n.Sc=function(e){if(e.total=Kt(this.f.buffered),e.audio=Kt(Sr(this,"audio")),e.video=Kt(Sr(this,"video")),e.text=[],this.a){var t=this.a.a,r=this.a.b;null!=t&&null!=r&&e.text.push({start:t,end:r})}},n.remove=function(e,t,r){return"text"==e?this.a.remove(t,r):Cr(this,e,this.se.bind(this,e,t,r))},n.flush=function(e){return"text"==e?Promise.resolve():Cr(this,e,this.Pe.bind(this,e))},n.endOfStream=function(e){return Rr(this,function(){Ar(this)||(e?this.h.endOfStream(e):this.h.endOfStream())}.bind(this))},n.xa=function(e){return Rr(this,function(){this.h.duration=e}.bind(this))},n.Y=function(){return this.h.duration},n.re=function(e,t){this.b[e].appendBuffer(t)},n.se=function(e,t,r){r<=t?this.xb(e):this.b[e].remove(t,r)},n.Be=function(e){var t=this.b[e].appendWindowStart,r=this.b[e].appendWindowEnd;this.b[e].abort(),this.b[e].appendWindowStart=t,this.b[e].appendWindowEnd=r,this.xb(e)},n.Pe=function(e){this.f.currentTime-=.001,this.xb(e)},n.kg=function(e,t){0>t&&(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<r.length;n++)if(r[n].audio==e&&r[n].video==t)return r[n];return null},tf:function(e){return"audio"==e.type},wf:function(e){return"video"==e.type},nf:function(e){var t=[];return e.audio&&t.push(e.audio),e.video&&t.push(e.video),t},Gg:function(e){return Nr.tf(e)?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:Nr.wf(e)?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}};function Ur(){this.h=null,this.f=!1,this.b=new W,this.c=[],this.i=!1,this.a=this.g=null}function Fr(e,t){return e&&(t=t.filter((function(t){return Nr.bd(t,e,{width:1/0,height:1/0})}))),t.sort((function(e,t){return e.bandwidth-t.bandwidth}))}function Br(e,t){this.a=e,this.b=t}function Kr(e,t){var r=new Br(2,6),n=Hr,i=n.a,o=r.b-i.b;(0<(r.a-i.a||o)?n.c:n.b)(n.a,r,e,t)}function Gr(e,t,r,n){q([r,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",n].join(" "))}function Vr(e,t,r,n){$([r,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",n].join(""))}G("shaka.abr.SimpleAbrManager",Ur),Ur.prototype.stop=function(){this.h=null,this.f=!1,this.c=[],this.g=null},Ur.prototype.stop=Ur.prototype.stop,Ur.prototype.init=function(e){this.h=e},Ur.prototype.init=Ur.prototype.init,Ur.prototype.chooseVariant=function(){var e=Fr(this.a.restrictions,this.c),t=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!e.length&&(e=[(e=Fr(null,this.c))[0]]);for(var r=e[0]||null,n=0;n<e.length;++n){var i=e[n],o=(e[n+1]||{bandwidth:1/0}).bandwidth/this.a.bandwidthUpgradeTarget;t>=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;r<t.length;++r)n.start.push(t.start(r)),n.end.push(t.end(r));else n=t instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-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<arguments.length;++i)n[i-2]=arguments[i];hn({type:"call",targetName:e,methodName:t,args:n})},n.Wf=function(e,t,r){for(var n=[],i=2;i<arguments.length;++i)n[i-2]=arguments[i];i=new ge;var o=this.u.toString();return this.u++,this.c[o]=i,hn({type:"asyncCall",targetName:e,methodName:t,args:n,id:o}),i},n.ce=function(){var e=!!sn&&"connected"==sn.status;if(this.b&&!e){for(var t in this.K(),this.a)this.a[t]={};fn(this)}this.D=(this.b=e)?sn.receiver.friendlyName:"",this.f.yc()},n.Ff=function(e,t){var r=nn(t);switch(r.type){case"event":var n=r.event;this.F(r.targetName,new Se(n.type,n));break;case"update":for(var i in n=r.update)for(var o in r=this.a[i]||{},n[i])r[o]=n[i][o];this.l&&(this.S(),this.l=!1);break;case"asyncComplete":if(i=r.id,r=r.error,o=this.c[i],delete this.c[i],o)if(r){for(n in i=new me(r.severity,r.category,r.code),r)i[n]=r[n];o.reject(i)}else o.resolve()}};var pn=new Set;function mn(e,t,r){var n=this;ke.call(this),this.c=e,this.b=t,this.i=this.g=this.f=this.l=this.h=null,this.s=r,this.m=new Map,this.a=new on(r,(function(){return vn(n)}),(function(){return bn(n)}),(function(e,t){return An(n,e,t)}),(function(){return _n(n)}),(function(){return yn(n)})),function(e){for(var t in e.a.init(),e.i=new Be,Yr.forEach(function(e){this.i.w(this.c,e,this.D.bind(this))}.bind(e)),qr.forEach(function(e){this.i.w(this.b,e,this.u.bind(this))}.bind(e)),e.h={},e.c)Object.defineProperty(e.h,t,{configurable:!1,enumerable:!0,get:e.B.bind(e,t),set:e.F.bind(e,t)});e.l={},gn(e,(function(t){Object.defineProperty(e.l,t,{configurable:!1,enumerable:!0,get:function(){return function e(t,r){if(t.m.has(r)&&(r=t.m.get(r)),"addEventListener"==r)return t.g.addEventListener.bind(t.g);if("removeEventListener"==r)return t.g.removeEventListener.bind(t.g);if("getMediaElement"==r)return function(){return this.h}.bind(t);if("getSharedConfiguration"==r)return t.a.get("player","getConfiguration");if("getNetworkingEngine"==r)return t.b.Mb.bind(t.b);if(t.a.ga()){if("getManifest"==r||"drmInfo"==r)return function(){return q(r+"() does not work while casting!"),null};if("getManifestUri"==r)return Kr("getManifestUri",'Please use "getAssetUri" instead.'),e(t,"getAssetUri");if("attach"==r||"detach"==r)return function(){return q(r+"() does not work while casting!"),Promise.resolve()}}return t.a.ga()&&0==Object.keys(t.a.a.video).length&&Xr[r]||!t.a.ga()?t.b[r].bind(t.b):t.a.get("player",r)}(e,t)}})})),function(e){var t=new Map;gn(e,(function(r,n){if(t.has(n)){var i=t.get(n);r.length<i.length?e.m.set(r,i):e.m.set(i,r)}else t.set(n,r)}))}(e),e.f=new ke,e.f.$b=e.h,e.g=new ke,e.g.$b=e.l}(this)}function gn(e,t){function r(e){return"constructor"!=e&&"function"==typeof n[e]&&!i.has(e)}var n=e.b,i=new Set;for(o in n)r(o)&&(i.add(o),t(o,n[o]));for(var o=Object.getPrototypeOf(n),a=Object.getPrototypeOf({});o&&o!=a;){for(var s=f(Object.getOwnPropertyNames(o)),l=s.next();!l.done;l=s.next())r(l=l.value)&&(i.add(l),t(l,n[l]));o=Object.getPrototypeOf(o)}}function yn(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.b.hc(),startTime:null};return e.c.pause(),Wr.forEach(function(e){t.video[e]=this.c[e]}.bind(e)),e.c.ended||(t.startTime=e.c.currentTime),Zr.forEach(function(e){var r=e[1];e=this.b[e[0]](),t.player[r]=e}.bind(e)),Qr.forEach(function(e){var r=e[1];e=this.b[e[0]](),t.playerAfterLoad[r]=e}.bind(e)),t}function vn(e){e.dispatchEvent(new Se("caststatuschanged"))}function bn(e){e.f.dispatchEvent(new Se(e.h.paused?"pause":"play"))}function _n(e){Zr.forEach(function(e){var t=e[1];e=this.a.get("player",e[0])(),this.b[t](e)}.bind(e));var t=e.a.get("player","getAssetUri")(),r=e.a.get("video","ended"),n=Promise.resolve(),i=e.c.autoplay,o=null;r||(o=e.a.get("video","currentTime")),t&&(e.c.autoplay=!1,n=e.b.load(t,o));var a={};Wr.forEach(function(e){a[e]=this.a.get("video",e)}.bind(e)),n.then((function(){e.c&&(Wr.forEach(function(e){this.c[e]=a[e]}.bind(e)),Qr.forEach(function(e){var t=e[1];e=this.a.get("player",e[0])(),this.b[t](e)}.bind(e)),e.c.autoplay=i,t&&e.c.play())}),(function(t){e.b.dispatchEvent(new Se("error",{detail:t}))}))}function An(e,t,r){e.a.ga()&&("video"==t?e.f.dispatchEvent(r):"player"==t&&e.g.dispatchEvent(r))}function En(e,t,r,n){var i=this;ke.call(this),this.a=e,this.b=t,this.c=new Be,this.D={video:e,player:t},this.s=r||function(){},this.F=n||function(e){return e},this.u=!1,this.h=!0,this.g=0,this.m=!1,this.l=!0,this.i=this.f=null,this.B=new fe((function(){Sn(i)})),function(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=e.ee.bind(e),t.onSenderDisconnected=e.ee.bind(e),t.onSystemVolumeChanged=e.Oe.bind(e),e.i=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.i.onMessage=e.Af.bind(e),e.f=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.f.onMessage=e.Kf.bind(e),t.start(),Yr.forEach(function(e){this.c.w(this.a,e,this.je.bind(this,"video"))}.bind(e)),qr.forEach(function(e){this.c.w(this.b,e,this.je.bind(this,"player"))}.bind(e)),cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?e.b.vd(3840,2160):e.b.vd(1920,1080),e.c.w(e.a,"loadeddata",function(){this.m=!0}.bind(e)),e.c.w(e.b,"loading",function(){this.h=!1,Tn(this)}.bind(e)),e.c.w(e.a,"playing",function(){this.h=!1,Tn(this)}.bind(e)),e.c.w(e.a,"pause",function(){Tn(this)}.bind(e)),e.c.w(e.b,"unloading",function(){this.h=!0,Tn(this)}.bind(e)),e.c.w(e.a,"ended",function(){var e=this;new fe((function(){e.a&&e.a.ended&&(e.h=!0,Tn(e))})).R(5)}.bind(e))}(this)}function Tn(e){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new Se("caststatuschanged")),wn(this)||Cn(this,0))}.bind(e))}function Sn(e){e.B.R(.5);var t={video:{},player:{}};if(zr.forEach(function(e){t.video[e]=this.a[e]}.bind(e)),e.b.V())for(var r in Jr)0==e.g%Jr[r]&&(t.player[r]=e.b[r]());for(var n in Xr)0==e.g%Xr[n]&&(t.player[n]=e.b[n]());(r=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=r.level,t.video.muted=r.muted),e.m&&(e.g+=1),xn(e,{type:"update",update:t},e.f),wn(e)}function wn(e){return!(!e.l||!e.a.duration&&!e.b.V()||(kn(e),e.l=!1,0))}function kn(e){var t={contentId:e.b.hc(),streamType:e.b.V()?"LIVE":"BUFFERED",duration:e.a.duration,contentType:""};Cn(e,0,t)}function xn(e,t,r,n){e.u&&(e=rn(t),n?r.getCastChannel(n).send(e):r.broadcast(e))}function Cn(e,t,r){var n=e.a.playbackRate,i=Rn;n={mediaSessionId:0,playbackRate:n,playerState:i=e.h?i.IDLE:e.b.Xc()?i.we:e.a.paused?i.ye:i.ze,currentTime:e.a.currentTime,supportedMediaCommands:15,volume:{level:e.a.volume,muted:e.a.muted}},r&&(n.media=r),xn(e,{requestId:t,type:"MEDIA_STATUS",status:[n]},e.i)}e.__onGCastApiAvailable=function(e){if(e)for(var t=(e=f(pn)).next();!t.done;t=e.next())t.value.init()},V(mn,ke),G("shaka.cast.CastProxy",mn),mn.prototype.destroy=function(e){return e&&this.a.Kb(),this.i&&(this.i.release(),this.i=null),e=[],this.b&&(e.push(this.b.destroy()),this.b=null),this.a&&(e.push(this.a.destroy()),this.a=null),this.l=this.h=this.c=null,Promise.all(e)},mn.prototype.destroy=mn.prototype.destroy,mn.prototype.pf=function(){return this.h},mn.prototype.getVideo=mn.prototype.pf,mn.prototype.ff=function(){return this.l},mn.prototype.getPlayer=mn.prototype.ff,mn.prototype.Ee=function(){return this.a.h&&an},mn.prototype.canCast=mn.prototype.Ee,mn.prototype.ga=function(){return this.a.ga()},mn.prototype.isCasting=mn.prototype.ga,mn.prototype.nd=function(){return this.a.nd()},mn.prototype.receiverName=mn.prototype.nd,mn.prototype.cast=function(){var e=yn(this);return this.a.cast(e).then(function(){if(this.b)return this.b.Cd()}.bind(this))},mn.prototype.cast=mn.prototype.cast,mn.prototype.ud=function(e){this.a.ud(e)},mn.prototype.setAppData=mn.prototype.ud,mn.prototype.sg=function(){var e=this.a;if(e.b){var t=e.B();chrome.cast.requestSession(e.kd.bind(e,t),e.be.bind(e))}},mn.prototype.suggestDisconnect=mn.prototype.sg,mn.prototype.He=function(e){var t=this;return p((function r(){return M(r,(function(r){switch(r.j){case 1:return e==t.s?r.return():(t.s=e,t.a.Kb(),S(r,t.a.destroy(),2));case 2:t.a=null,t.a=new on(e,(function(){return vn(t)}),(function(){return bn(t)}),(function(e,r){return An(t,e,r)}),(function(){return _n(t)}),(function(){return yn(t)})),t.a.init(),w(r)}}))}))},mn.prototype.changeReceiverId=mn.prototype.He,mn.prototype.Kb=function(){this.a.Kb()},mn.prototype.forceDisconnect=mn.prototype.Kb,mn.prototype.B=function(e){if("addEventListener"==e)return this.f.addEventListener.bind(this.f);if("removeEventListener"==e)return this.f.removeEventListener.bind(this.f);if(this.a.ga()&&0==Object.keys(this.a.a.video).length){var t=this.c[e];if("function"!=typeof t)return t}return this.a.ga()?this.a.get("video",e):("function"==typeof(e=this.c[e])&&(e=e.bind(this.c)),e)},mn.prototype.F=function(e,t){this.a.ga()?this.a.set("video",e,t):this.c[e]=t},mn.prototype.D=function(e){this.a.ga()||this.f.dispatchEvent(new Se(e.type,e))},mn.prototype.u=function(e){this.a.ga()||this.g.dispatchEvent(e)},V(En,ke),G("shaka.cast.CastReceiver",En),En.prototype.isConnected=function(){return this.u},En.prototype.isConnected=En.prototype.isConnected,En.prototype.vf=function(){return this.h},En.prototype.isIdle=En.prototype.vf,En.prototype.destroy=function(){var e=this;return p((function t(){var r;return M(t,(function(t){switch(t.j){case 1:return e.c&&(e.c.release(),e.c=null),r=[],e.b&&(r.push(e.b.destroy()),e.b=null),e.B&&(e.B.stop(),e.B=null),e.a=null,e.D=null,e.s=null,e.u=!1,e.h=!0,e.f=null,e.i=null,S(t,Promise.all(r),2);case 2:cast.receiver.CastReceiverManager.getInstance().stop(),w(t)}}))}))},En.prototype.destroy=En.prototype.destroy,(n=En.prototype).ee=function(){this.g=0,this.l=!0,this.u=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,Tn(this)},n.je=function(e,t){this.b&&(Sn(this),xn(this,{type:"event",targetName:e,event:t},this.f))},n.Oe=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&xn(this,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},this.f),xn(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.f)},n.Kf=function(e){var t=nn(e.data);switch(t.type){case"init":this.g=0,this.m=!1,this.l=!0,function(e,t,r){for(var n in t.player)e.b[n](t.player[n]);e.s(r),r=Promise.resolve();var i=e.a.autoplay;t.manifest&&(e.a.autoplay=!1,r=e.b.load(t.manifest,t.startTime)),r.then((function(){if(e.b){for(var r in t.video)e.a[r]=t.video[r];for(var n in t.playerAfterLoad)e.b[n](t.playerAfterLoad[n]);e.a.autoplay=i,t.manifest&&(e.a.play(),Cn(e,0))}}),(function(t){e.b.dispatchEvent(new Se("error",{detail:t}))}))}(this,t.initState,t.appData),Sn(this);break;case"appData":this.s(t.appData);break;case"set":var r=t.targetName,n=t.property;if(t=t.value,"video"==r){var i=cast.receiver.CastReceiverManager.getInstance();if("volume"==n){i.setSystemVolumeLevel(t);break}if("muted"==n){i.setSystemVolumeMuted(t);break}}this.D[r][n]=t;break;case"call":(r=this.D[t.targetName])[t.methodName].apply(r,t.args);break;case"asyncCall":r=t.targetName,n=t.methodName,"player"==r&&"load"==n&&(this.g=0,this.m=!1),i=t.id,e=e.senderId;var o=this.D[r];t=o[n].apply(o,t.args),"player"==r&&"load"==n&&(t=t.then(function(){this.l=!0}.bind(this))),t.then(this.oe.bind(this,e,i,null),this.oe.bind(this,e,i))}},n.Af=function(e){var t=nn(e.data);switch(t.type){case"PLAY":this.a.play(),Cn(this,0);break;case"PAUSE":this.a.pause(),Cn(this,0);break;case"SEEK":e=t.currentTime;var r=t.resumeState;null!=e&&(this.a.currentTime=Number(e)),r&&"PLAYBACK_START"==r?(this.a.play(),Cn(this,0)):r&&"PLAYBACK_PAUSE"==r&&(this.a.pause(),Cn(this,0));break;case"STOP":this.b.Cd().then(function(){this.b&&Cn(this,0)}.bind(this));break;case"GET_STATUS":Cn(this,Number(t.requestId));break;case"VOLUME":e=(r=t.volume).level,r=r.muted;var n=this.a.volume,i=this.a.muted;null!=e&&(this.a.volume=Number(e)),null!=r&&(this.a.muted=r),n==this.a.volume&&i==this.a.muted||Cn(this,0);break;case"LOAD":this.g=0,this.l=this.m=!1,e=t.media,r=t.currentTime,n=this.F(e.contentId),i=t.autoplay||!0,this.s(e.customData),i&&(this.a.autoplay=!0),this.b.load(n,r).then(function(){this.b&&kn(this)}.bind(this)).catch(function(e){var r="LOAD_FAILED";7==e.category&&7e3==e.code&&(r="LOAD_CANCELLED"),xn(this,{requestId:Number(t.requestId),type:r},this.i)}.bind(this));break;default:xn(this,{requestId:Number(t.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.i)}},n.oe=function(e,t,r){this.b&&xn(this,{type:"asyncComplete",id:t,error:r},this.f,e)};var Rn={IDLE:"IDLE",ze:"PLAYING",we:"BUFFERING",ye:"PAUSED"};function jn(e,t){this.J=e,this.b=t==Ln,this.a=0}G("shaka.util.DataViewReader",jn);var Ln=1;function In(){throw new me(2,3,3e3)}function Pn(){this.c=[],this.b=[],this.a=!1}function On(e){for(var t=null!=e.flags?12:8;e.reader.ua()&&!e.parser.a;)e.parser.sc(e.start+t,e.reader,e.partialOkay)}function Dn(e){for(var t=null!=e.flags?12:8,r=e.reader.G();0<r&&!e.parser.a;--r)e.parser.sc(e.start+t,e.reader,e.partialOkay)}function Mn(e){return function(t){e(t.reader.Za(t.reader.J.byteLength-t.reader.ca()))}}function Nn(e){for(var t=0,r=0;r<e.length;r++)t=t<<8|e.charCodeAt(r);return t}function Un(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function Fn(e){var t=this;this.a=[],this.b=[],this.data=[],(new Pn).H("moov",On).fa("pssh",(function(e){if(!(1<e.version)){var r=e.reader.J;if(r=new Uint8Array(r.buffer,r.byteOffset-12,e.size),t.data.push(r),t.a.push(ht.Ac(e.reader.Za(16))),0<e.version){r=e.reader.G();for(var n=0;n<r;++n){var i=ht.Ac(e.reader.Za(16));t.b.push(i)}}}})).parse(e)}jn.Endianness={Bg:0,Dg:Ln},jn.prototype.ua=function(){return this.a<this.J.byteLength},jn.prototype.hasMoreData=jn.prototype.ua,jn.prototype.ca=function(){return this.a},jn.prototype.getPosition=jn.prototype.ca,jn.prototype.Ve=function(){return this.J.byteLength},jn.prototype.getLength=jn.prototype.Ve,jn.prototype.la=function(){try{var e=this.J.getUint8(this.a);return this.a+=1,e}catch(e){In()}},jn.prototype.readUint8=jn.prototype.la,jn.prototype.Tb=function(){try{var e=this.J.getUint16(this.a,this.b);return this.a+=2,e}catch(e){In()}},jn.prototype.readUint16=jn.prototype.Tb,jn.prototype.G=function(){try{var e=this.J.getUint32(this.a,this.b);return this.a+=4,e}catch(e){In()}},jn.prototype.readUint32=jn.prototype.G,jn.prototype.ke=function(){try{var e=this.J.getInt32(this.a,this.b);return this.a+=4,e}catch(e){In()}},jn.prototype.readInt32=jn.prototype.ke,jn.prototype.Bb=function(){try{if(this.b)var e=this.J.getUint32(this.a,!0),t=this.J.getUint32(this.a+4,!0);else t=this.J.getUint32(this.a,!1),e=this.J.getUint32(this.a+4,!1)}catch(e){In()}if(2097151<t)throw new me(2,3,3001);return this.a+=8,t*Math.pow(2,32)+e},jn.prototype.readUint64=jn.prototype.Bb,jn.prototype.Za=function(e){this.a+e>this.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.a<e&&In(),this.a-=e},jn.prototype.rewind=jn.prototype.me,jn.prototype.seek=function(e){(0>e||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<o?t.Za(o):new Uint8Array(0),a({parser:this,partialOkay:r||!1,version:s,flags:l,reader:t=new jn(new DataView(t.buffer,t.byteOffset,t.byteLength),0),size:i,start:n+e})}else t.M(Math.min(n+i-t.ca(),t.J.byteLength-t.ca()))},Pn.prototype.parseNext=Pn.prototype.sc,Pn.children=On,Pn.sampleDescription=Dn,Pn.allData=Mn,Pn.typeToString=Un;var Bn={gc:function(e,t){var r=Bn.P(e,t);return 1!=r.length?null:r[0]},Oc:function(e,t,r){return 1!=(e=Bn.Od(e,t,r)).length?null:e[0]},P:function(e,t){return Array.prototype.filter.call(e.childNodes,(function(e){return e instanceof Element&&e.tagName==t}))},Od:function(e,t,r){return Array.prototype.filter.call(e.childNodes,(function(e){return e instanceof Element&&e.localName==r&&e.namespaceURI==t}))},getAttributeNS:function(e,t,r){return e.hasAttributeNS(t,r)?e.getAttributeNS(t,r):null},ic:function(e){return Array.prototype.every.call(e.childNodes,(function(e){return e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE}))?e.textContent.trim():null},I:function(e,t,r,n){n=void 0===n?null:n;var i=null;return null!=(e=e.getAttribute(t))&&(i=r(e)),null==i?n:i},Of:function(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:Math.floor(e/1e3)):null},Ea:function(e){return e&&(e=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(e))?(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null):null},uc:function(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t?(e=Number(t[1]),isFinite(e)?(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null):null):null},parseInt:function(e){return 0==(e=Number(e))%1?e:null},tc:function(e){return 0==(e=Number(e))%1&&0<e?e:null},yb:function(e){return 0==(e=Number(e))%1&&0<=e?e:null},parseFloat:function(e){return e=Number(e),isNaN(e)?null:e},Me:function(e){var t;return e=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e),isNaN(e)?null:e},he:function(e,t){var r=new DOMParser;try{var n=r.parseFromString(e,"text/xml")}catch(e){}if(n&&n.documentElement.tagName==t)var i=n.documentElement;return i&&0<i.getElementsByTagName("parsererror").length?null:i},ge:function(e,t){try{var r=at(e);return Bn.he(r,t)}catch(e){}}},Kn=(new Map).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime");function Gn(e,t,r){var n=function(e){for(var t=[],r=(e=f(e)).next();!r.done;r=e.next())(r=Yn(r.value))&&t.push(r);return t}(e),i=null;e=[];var o=[],a=new Set(n.map((function(e){return e.keyId})));if(a.delete(null),1<a.size)throw new me(2,4,4010);if(r||(o=n.filter((function(e){return"urn:mpeg:dash:mp4protection:2011"!=e.ne||(i=e.init||i,!1)}))).length&&0==(e=function(e,t,r){for(var n=[],i=(r=f(r)).next();!i.done;i=r.next()){i=i.value;var o=Kn.get(i.ne);if(o){var a;if(a=Bn.Oc(i.node,"urn:microsoft:playready","pro")){a=ht.Ba(a.textContent);var s=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),l=a.length,u=s.length+16+l,c=new ArrayBuffer(u),d=new Uint8Array(c);c=new DataView(c);var h=0;c.setUint32(h,u),h+=4,c.setUint32(h,1886614376),h+=4,c.setUint32(h,0),h+=4,d.set(s,h),h+=s.length,c.setUint32(h,l),h+=4,d.set(a,h),a=[{initData:d,initDataType:"cenc",keyId:i.keyId}]}else a=null;a=Ht(o,i.init||e||a),(o=Hn.get(o))&&(a.licenseServerUri=o(i)),n.push(a)}else for(i=f(i=t(i.node)||[]),o=i.next();!o.done;o=i.next())n.push(o.value)}return n}(i,t,o)).length&&(e=[Ht("",i)]),n.length&&(r||!o.length))for(e=[],r=(t=f(Kn.values())).next();!r.done;r=t.next())"org.w3.clearkey"!=(r=r.value)&&e.push(Ht(r,i));if(a=Array.from(a)[0]||null)for(r=(t=f(e)).next();!r.done;r=t.next())for(n=(r=f(r.value.initData)).next();!n.done;n=r.next())n.value.keyId=a;return{Kd:a,Fg:i,drmInfos:e,Pd:!0}}var Vn,Hn=(new Map).set("com.widevine.alpha",(function(e){return(e=Bn.Oc(e.node,"urn:microsoft","laurl"))&&e.getAttribute("licenseUrl")||""})).set("com.microsoft.playready",(function(e){return(e=Bn.Oc(e.node,"urn:microsoft:playready","pro"))&&(e=function(e){var t=0,r=new DataView(e).getUint32(t,!0);if(r!==e.byteLength)return[];t+=6,r=[];for(var n=new DataView(e);t<e.byteLength-1;){var i=n.getUint16(t,!0);t+=2;var o=n.getUint16(t,!0);t+=2;var a=new Uint8Array(e,t,o);r.push({type:i,value:a}),t+=o}return r}((e=ht.Ba(e.textContent)).buffer).filter((function(e){return 1===e.type}))[0])?(e=st(e.value,!0),(e=Bn.he(e,"WRMHEADER"))?function(e){return(e=e.querySelector("DATA > 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<i.length?i:null}}function zn(t,r,n,i,o){var a={RepresentationID:r,Number:n,Bandwidth:i,Time:o};return t.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,(function(t,r,n,i){if("$$"==t)return"$";var o=a[r];if(null==o)return t;switch("RepresentationID"==r&&n&&(n=void 0),"Time"==r&&(o=Math.round(o)),i){case void 0:case"d":case"i":case"u":t=o.toString();break;case"o":t=o.toString(8);break;case"x":t=o.toString(16);break;case"X":t=o.toString(16).toUpperCase();break;default:t=o.toString()}return n=e.parseInt(n,10)||1,Array(Math.max(0,n-t.length)+1).join("0")+t}))}function Wn(e,t){var r=$n(e,t,"timescale"),n=1;r&&(n=Bn.tc(r)||1),r=$n(e,t,"duration"),(r=Bn.tc(r||""))&&(r/=n);var i=$n(e,t,"startNumber"),o=Number($n(e,t,"presentationTimeOffset"))||0,a=Bn.yb(i||"");null!=i&&null!=a||(a=1);var s=qn(e,t,"SegmentTimeline");if(i=null,s){i=n;var l=e.T.duration||1/0;s=Bn.P(s,"S");for(var u=[],c=0,d=0;d<s.length;++d){var f=s[d],h=Bn.I(f,"t",Bn.yb),p=Bn.I(f,"d",Bn.yb);if(f=Bn.I(f,"r",Bn.parseInt),null!=h&&(h-=o),!p)break;if(h=null!=h?h:c,0>(f=f||0))if(d+1<s.length){if(null==(f=Bn.I(s[d+1],"t",Bn.yb)))break;if(h>=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<u.length&&h!=c&&(u[u.length-1].end=h/i);for(var m=0;m<=f;++m)c=h+p,u.push({start:h/i,end:c/i,xg:h}),h=c}i=u}return{timescale:n,Z:r,ab:a,ma:o/n||0,Dd:o,N:i}}function $n(e,t,r){return[t(e.C),t(e.aa),t(e.ka)].filter(Gt.Ia).map((function(e){return e.getAttribute(r)})).reduce((function(e,t){return e||t}))}function qn(e,t,r){return[t(e.C),t(e.aa),t(e.ka)].filter(Gt.Ia).map((function(e){return Bn.gc(e,r)})).reduce((function(e,t){return e||t}))}function Xn(e,t,r,n,i,o){if(o=void 0===o?0:o,Bn.getAttributeNS(e,"http://www.w3.org/1999/xlink","href")){var a=function(e,t,r,n,i,o){for(var a=Bn.getAttributeNS(e,"http://www.w3.org/1999/xlink","href"),s=Bn.getAttributeNS(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=0;l<e.attributes.length;l++){var u=e.attributes[l];"http://www.w3.org/1999/xlink"==u.namespaceURI&&(e.removeAttributeNS(u.namespaceURI,u.localName),--l)}if(5<=o)return ve(new me(2,4,4028));if("onLoad"!=s)return ve(new me(2,4,4027));var c=Vt([n],[a]);return i.request(0,Me(c,t)).U((function(n){if(!(n=Bn.ge(n.data,e.tagName)))return ve(new me(2,4,4001,a));for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);for(;n.childNodes.length;){var s=n.childNodes[0];n.removeChild(s),e.appendChild(s)}for(s=0;s<n.attributes.length;s++){var l=n.attributes[s].nodeName,u=n.getAttribute(l);e.setAttribute(l,u)}return Xn(e,t,r,c[0],i,o+1)}))}(e,t,r,n,i,o);return r&&(a=a.U(void 0,(function(){return Xn(e,t,r,n,i,o)}))),a}a=[];for(var s=0;s<e.childNodes.length;s++){var l=e.childNodes[s];l instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Bn.getAttributeNS(l,"http://www.w3.org/1999/xlink","href")?(e.removeChild(l),--s):"SegmentTimeline"!=l.tagName&&a.push(Xn(l,t,r,n,i,o)))}return Ee(a).U((function(){return e}))}function Jn(e,t,r){this.c=e,this.b=t,this.a=r}function Zn(e,t,r,n,i,o){this.position=e,this.startTime=t,this.endTime=r,this.c=n,this.b=i,this.a=o}function Qn(e,t,r,n){var i,o=(new Pn).fa("sidx",(function(e){i=function(e,t,r,n){var i=[];n.reader.M(4);var o=n.reader.G();if(0==o)throw new me(2,3,3005);if(0==n.version)var a=n.reader.G(),s=n.reader.G();else a=n.reader.Bb(),s=n.reader.Bb();n.reader.M(2);var l=n.reader.Tb();for(e=e+n.size+s,s=0;s<l;s++){var u=n.reader.G(),c=(2147483648&u)>>>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.length)throw new me(2,3,3002);for(var r=0,n=0;n<t.length;n++)r=256*r+t[n];t=r,r=ii(e);e:{n=ht.za;for(var i=0;i<Vn.length;i++)if(n(r,Vn[i])){n=!0;break e}n=!1}if(n)r=e.b.byteLength-e.a.ca();else{if(8==r.length&&224&r[1])throw new me(2,3,3001);for(n=r[0]&(1<<8-r.length)-1,i=1;i<r.length;i++)n=256*n+r[i];r=n}return r=e.a.ca()+r<=e.b.byteLength?r:e.b.byteLength-e.a.ca(),n=new DataView(e.b.buffer,e.b.byteOffset+e.a.ca(),r),e.a.M(r),new oi(t,n)}function ii(e){var t,r=e.a.la();for(t=1;8>=t&&!(r&1<<8-t);t++);if(8<t)throw new me(2,3,3002);var n=new Uint8Array(t);for(n[0]=r,r=1;r<t;r++)n[r]=e.a.la();return n}function oi(e,t){this.id=e,this.a=t}function ai(e){if(8<e.a.byteLength)throw new me(2,3,3002);if(8==e.a.byteLength&&224&e.a.getUint8(0))throw new me(2,3,3001);for(var t=0,r=0;r<e.a.byteLength;r++)t=256*t+e.a.getUint8(r);return t}function si(){}function li(e){var t=new ri(e.a);if(179!=(e=ni(t)).id)throw new me(2,3,3013);if(e=ai(e),183!=(t=ni(t)).id)throw new me(2,3,3012);t=new ri(t.a);for(var r=0;t.ua();){var n=ni(t);if(241==n.id){r=ai(n);break}}return{yg:e,Vf:r}}function ui(e,t){var r=qn(e,t,"Initialization");if(!r)return null;var n=e.C.qa,i=r.getAttribute("sourceURL");i&&(n=Vt(e.C.qa,[i])),i=0;var o=null;return(r=Bn.I(r,"range",Bn.uc))&&(i=r.start,o=r.end),new Jn((function(){return n}),i,o)}function ci(e,t,r,n,i,o,a,s){var l=e.presentationTimeline,u=!e.mb||!e.T.Zc,c=e.T.start,d=e.T.duration,f=t,h=null;return{createSegmentIndex:function(){var e=[f(n,i,o),"webm"==a?f(r.c(),r.b,r.a):null];return f=null,Promise.all(e).then((function(e){var t=e[0];e=e[1]||null,t="mp4"==a?Qn(t,i,n,s):(new si).parse(t,e,n,s),l.vb(t,c),h=new ei(t),u&&ti(h,d)}))},findSegmentPosition:function(e){return h.find(e)},getSegmentReference:function(e){return h.get(e)}}}function di(e){return e.Ub}function fi(e,t){var r=ui(e,hi),n=function(e){return[e.C.La,e.aa.La,e.ka.La].filter(Gt.Ia).map((function(e){return Bn.P(e,"SegmentURL")})).reduce((function(e,t){return 0<e.length?e:t})).map((function(t){return t.getAttribute("indexRange")&&!e.Vd&&(e.Vd=!0),{xf:t.getAttribute("media"),start:(t=Bn.I(t,"mediaRange",Bn.uc,{start:0,end:null})).start,end:t.end}}))}(e),i=Wn(e,hi),o=i.ab;0==o&&(o=1);var a=0;if(i.Z?a=i.Z*(o-1):i.N&&0<i.N.length&&(a=i.N[0].start),!(n={Z:i.Z,startTime:a,ab:o,ma:i.ma,N:i.N,tb:n}).Z&&!n.N&&1<n.tb.length)throw new me(2,4,4002);if(!n.Z&&!e.T.duration&&!n.N&&1==n.tb.length)throw new me(2,4,4002);if(n.N&&0==n.N.length)throw new me(2,4,4002);return o=i=null,e.ka.id&&e.C.id&&(i=t[o=e.ka.id+","+e.C.id]),a=function(e,t,r,n){var i=n.tb.length;n.N&&n.N.length!=n.tb.length&&(i=Math.min(n.N.length,n.tb.length));for(var o=[],a=n.startTime,s=0;s<i;s++){var l,u=n.tb[s],c=Vt(r,[u.xf]);l=null!=n.Z?a+n.Z:n.N?n.N[s].end:a+e,o.push(new Zn(s+t,a,l,function(e){return e}.bind(null,c),u.start,u.end)),a=l}return o}(e.T.duration,n.ab,e.C.qa,n),i?(i.cd(a),o=e.presentationTimeline.Ob(),i.Lc(o-e.T.start)):(e.presentationTimeline.vb(a,e.T.start),i=new ei(a),o&&e.mb&&(t[o]=i)),e.mb&&e.T.Zc||ti(i,e.T.duration),{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:i.find.bind(i),getSegmentReference:i.get.bind(i),initSegmentReference:r,ma:n.ma}}function hi(e){return e.La}function pi(e,t,r,n){var i=function(e){var t=$n(e,mi,"initialization");if(!t)return null;var r=e.C.id,n=e.bandwidth||null,i=e.C.qa;return new Jn((function(){var e=zn(t,r,null,n,null);return Vt(i,[e])}),0,null)}(e),o=Wn(e,mi),a=$n(e,mi,"media"),s=$n(e,mi,"index");if(a=(o={Z:o.Z,timescale:o.timescale,ab:o.ab,ma:o.ma,Dd:o.Dd,N:o.N,ad:a,Qb:s}).Qb?1:0,a+=o.N?1:0,0==(a+=o.Z?1:0))throw new me(2,4,4002);if(1!=a&&(o.Qb&&(o.N=null),o.Z=null),!o.Qb&&!o.ad)throw new me(2,4,4002);if(o.Qb){if("mp4"!=(r=e.C.mimeType.split("/")[1])&&"webm"!=r)throw new me(2,4,4006);if("webm"==r&&!i)throw new me(2,4,4005);n=zn(o.Qb,e.C.id,null,e.bandwidth||null,null),e=ci(e,t,i,n=Vt(e.C.qa,[n]),0,null,r,o.ma)}else o.Z?(n||(e.presentationTimeline.ed(o.Z),e.presentationTimeline.fd(e.T.start)),e=function(e,t){var r=e.T.duration,n=t.Z,i=t.ab,o=t.timescale,a=t.ad,s=e.bandwidth||null,l=e.C.id,u=e.C.qa;return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(e){return 0>e||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<t.N.length;n++){var i=n+t.ab;r.push(new Zn(i,t.N[n].start,t.N[n].end,function(e,t,r,n,i,o){return Vt(n,[e=zn(e,t,i,r,o)]).map((function(e){return e.toString()}))}.bind(null,t.ad,e.C.id,e.bandwidth||null,e.C.qa,i,t.N[n].xg+t.Dd),0,null))}return r}(e,o),n=!e.mb||!e.T.Zc,t?(n&&ti(new ei(s),e.T.duration),t.cd(s),r=e.presentationTimeline.Ob(),t.Lc(r-e.T.start)):(e.presentationTimeline.vb(s,e.T.start),t=new ei(s),a&&e.mb&&(r[a]=t)),n&&ti(t,e.T.duration),e={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:t.find.bind(t),getSegmentReference:t.get.bind(t)});return{createSegmentIndex:e.createSegmentIndex,findSegmentPosition:e.findSegmentPosition,getSegmentReference:e.getSegmentReference,initSegmentReference:i,ma:o.ma}}function mi(e){return e.Wb}G("shaka.media.InitSegmentReference",Jn),Jn.prototype.Ic=function(){return this.c()},Jn.prototype.createUris=Jn.prototype.Ic,Jn.prototype.Uc=function(){return this.b},Jn.prototype.getStartByte=Jn.prototype.Uc,Jn.prototype.Tc=function(){return this.a},Jn.prototype.getEndByte=Jn.prototype.Tc,G("shaka.media.SegmentReference",Zn),Zn.prototype.ca=function(){return this.position},Zn.prototype.getPosition=Zn.prototype.ca,Zn.prototype.kc=function(){return this.startTime},Zn.prototype.getStartTime=Zn.prototype.kc,Zn.prototype.Te=function(){return this.endTime},Zn.prototype.getEndTime=Zn.prototype.Te,Zn.prototype.Ic=function(){return this.c()},Zn.prototype.createUris=Zn.prototype.Ic,Zn.prototype.Uc=function(){return this.b},Zn.prototype.getStartByte=Zn.prototype.Uc,Zn.prototype.Tc=function(){return this.a},Zn.prototype.getEndByte=Zn.prototype.Tc,G("shaka.media.SegmentIndex",ei),ei.prototype.destroy=function(){return this.a=null,Promise.resolve()},ei.prototype.destroy=ei.prototype.destroy,ei.prototype.find=function(e){for(var t=this.a.length-1;0<=t;--t){var r=this.a[t];if(e>=r.startTime&&e<r.endTime)return r.position}return this.a.length&&e<this.a[0].startTime?this.a[0].position:null},ei.prototype.find=ei.prototype.find,ei.prototype.get=function(e){return 0==this.a.length||0>(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;t<this.a.length;++t)this.a[t].startTime+=e,this.a[t].endTime+=e},ei.prototype.offset=ei.prototype.offset,ei.prototype.cd=function(e){for(var t=[],r=0,n=0;r<this.a.length&&n<e.length;){var i=this.a[r],o=e[n];i.startTime<o.startTime?(t.push(i),r++):(i.startTime>o.startTime?0==r&&t.push(o):(.1<Math.abs(i.endTime-o.endTime)?t.push(new Zn(i.position,o.startTime,o.endTime,o.c,o.b,o.a)):t.push(i),r++),n++)}for(;r<this.a.length;)t.push(this.a[r++]);if(t.length)for(r=t[t.length-1].position+1;n<e.length;)i=new Zn(r++,(i=e[n++]).startTime,i.endTime,i.c,i.b,i.a),t.push(i);else t=e;this.a=t},ei.prototype.merge=ei.prototype.cd,ei.prototype.Lc=function(e){for(var t=0;t<this.a.length;++t)if(this.a[t].endTime>e)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;M<D.length;M++){var N=D[M];O=Bn.I(N,"start",Bn.Ea,O);var U=Bn.I(N,"duration",Bn.Ea),F=null;if(M!=D.length-1){var B=Bn.I(D[M+1],"start",Bn.Ea);null!=B&&(F=B-O)}else null!=I&&(F=I-O);if(null==F&&(F=U),N=Ai(e,j,L,{start:O,duration:F,node:N,Zc:null==F||M==D.length-1}),P.push(N),U=j.ka.id,e.l.includes(U)||(e.l.push(U),e.c&&(e.b.filterNewPeriod(N),e.c.periods.push(N))),null==F){O=null;break}O+=F}if(null==e.c&&e.b.filterAllPeriods(P),null!=I?(i=P,o=I,a=!1):(i=P,o=O,a=!0),k=o,x=i,E.Xb("static"==b),"static"!=b&&a||E.xa(k||1/0),E.V()&&!isNaN(e.a.availabilityWindowOverride)&&(y=e.a.availabilityWindowOverride),null==y&&(y=1/0),E.xd(y),E.ed(v||1),e.c){n.A(0);break}if(e.c={presentationTimeline:E,periods:x,offlineSessionIds:[],minBufferTime:m||0},!E.ue()){n.A(0);break}return C=l.P(t,"UTCTiming"),S(n,function(e,t,r){r=r.map((function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}}));var n=e.a.dash.clockSyncUri;return!r.length&&n&&r.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:n}),Gt.Ke(r,function(e){var r=e.scheme;switch(e=e.value,r){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return ki(this,t,e,"HEAD");case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return ki(this,t,e,"GET");case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return r=Date.parse(e),isNaN(r)?0:r-Date.now();case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":return q("NTP UTCTiming scheme is not supported"),Promise.reject();default:return q("Unrecognized scheme in UTCTiming element",r),Promise.reject()}}.bind(e)).catch((function(){return q("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),0}))}(e,h,C),4);case 4:if(R=n.o,!e.b)return n.return();E.pe(R),w(n)}}))}))}(e,t,r)}))}(e,t.data,t.uri)})).then((function(){var r=(Date.now()-t)/1e3;return Y(e.u,1,r),r}))}function Ai(e,t,r,n){if(t.ka=wi(n.node,null,r),t.T=n,t.ka.id||(t.ka.id="__shaka_period_"+n.start),Bn.P(n.node,"EventStream").forEach(e.Pf.bind(e,n.start,n.duration)),r=Bn.P(n.node,"AdaptationSet").map(e.Nf.bind(e,t)).filter(Gt.Ia),t.mb){t=[];for(var i=f(r),o=i.next();!o.done;o=i.next())for(var a=(o=f(o.value.Yf)).next();!a.done;a=o.next())t.push(a.value);if(t.length!=new Set(t).size)throw new me(2,4,4018)}var s=r.filter((function(e){return!e.Bd}));if(r.filter((function(e){return e.Bd})).forEach((function(e){var t=e.streams[0],r=e.Bd;s.forEach((function(e){e.id==r&&e.streams.forEach((function(e){e.trickModeVideo=t}))}))})),t=Ei(s,"video"),i=Ei(s,"audio"),!t.length&&!i.length)throw new me(2,4,4004);for(r=e.a.disableAudio,i.length&&!r||(i=[null]),r=e.a.disableVideo,t.length&&!r||(t=[null]),r=[],o=0;o<i.length;o++)for(a=0;a<t.length;a++)Ti(e,i[o],t[a],r);if(t=[],!e.a.disableText)for(e=Ei(s,"text"),i=0;i<e.length;i++)t.push.apply(t,e[i].streams);return{startTime:n.start,textStreams:t,variants:r}}function Ei(e,t){return e.filter((function(e){return e.contentType==t}))}function Ti(e,t,r,n){if(t||r)if(t&&r){var i=t.drmInfos,o=r.drmInfos;if(!i.length||!o.length||0<jt(i,o).length){o=jt(t.drmInfos,r.drmInfos);for(var a=0;a<t.streams.length;a++)for(var s=0;s<r.streams.length;s++)i=(r.streams[s].bandwidth||0)+(t.streams[a].bandwidth||0),i={id:e.h++,language:t.language,primary:t.$c||r.$c,audio:t.streams[a],video:r.streams[s],bandwidth:i,drmInfos:o,allowedByApplication:!0,allowedByKeySystem:!0},n.push(i)}}else for(o=t||r,a=0;a<o.streams.length;a++)i=o.streams[a].bandwidth||0,i={id:e.h++,language:o.language||"und",primary:o.$c,audio:t?o.streams[a]:null,video:r?o.streams[a]:null,bandwidth:i,drmInfos:o.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},n.push(i)}function Si(e,t){0>e.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<e.length;++t){var r=e[t],n=r.getAttribute("schemeIdUri");if(n&&(r=r.getAttribute("value")))switch(n){case"urn:mpeg:dash:outputChannelPositionList:2012":return r.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(n=parseInt(r,10)))continue;return n;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(n=parseInt(r,16)){for(e=0;n;)1&n&&++e,n>>=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<n.length;s++){var l=n[s].getAttribute("schemeIdUri");if(null==l||"urn:mpeg:dash:role:2011"==l)switch(l=n[s].getAttribute("value"),l){case"main":r=!0;break;case"caption":case"subtitle":o=l}}var u=null,c=!1;Bn.P(t,"EssentialProperty").forEach((function(e){"http://dashif.org/guidelines/trickmode"==e.getAttribute("schemeIdUri")?u=e.getAttribute("value"):c=!0})),s=Bn.P(t,"Accessibility");var d=new Map;for(n={},l=(s=f(s)).next();!l.done;n={Ib:n.Ib},l=s.next()){var h=l.value;l=h.getAttribute("schemeIdUri"),h=h.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==l||"urn:scte:dash:cc:cea-708:2015"==l?(n.Ib=1,null!=h?h.split(";").forEach(function(e){return function(t){if(t.includes("=")){var r=(t=t.split("="))[0].startsWith("CC")?t[0]:"CC"+t[0];t=t[1].split(",")[0].split(":").pop()}else r="CC"+e.Ib,e.Ib+=2;d.set(r,Pr(t))}}(n)):d.set("CC1","und")):"urn:mpeg:dash:role:2011"==l&&null!=h&&(i.push(h),"captions"==h&&(o="caption"))}if(c)return null;var p=Gn(n=Bn.P(t,"ContentProtection"),this.a.dash.customScheme,this.a.dash.ignoreDrmInfo);if(n=Pr(t.getAttribute("lang")||"und"),s=t.getAttribute("label"),(l=Bn.P(t,"Label"))&&l.length&&(l=l[0]).textContent&&(s=l.textContent),0==(i=(l=Bn.P(t,"Representation")).map(this.Qf.bind(this,e,p,o,n,s,r,i,d)).filter((function(e){return!!e}))).length){if(this.a.dash.ignoreEmptyAdaptationSet||a)return null;throw new me(2,4,4003)}return e.aa.contentType&&"application"!=e.aa.contentType||(e.aa.contentType=xi(i[0].mimeType,i[0].codecs),i.forEach((function(t){t.type=e.aa.contentType}))),i.forEach((function(e){p.drmInfos.forEach((function(t){e.keyId&&t.keyIds.push(e.keyId)}))})),a=l.map((function(e){return e.getAttribute("id")})).filter(Gt.Ia),{id:e.aa.id||"__fake__"+this.h++,contentType:e.aa.contentType,language:n,$c:r,streams:i,drmInfos:p.drmInfos,Bd:u,Yf:a}},n.Qf=function(e,t,r,n,i,o,a,s,l){if(e.C=wi(l,e.aa,null),!function(e){var t=e.Ub?1:0;return t+=e.La?1:0,0==(t+=e.Wb?1:0)?"text"==e.contentType||"application"==e.contentType:(1!=t&&(e.Ub&&(e.La=null),e.Wb=null),!0)}(e.C))return null;e.bandwidth=Bn.I(l,"bandwidth",Bn.tc)||0;var u=e.C.contentType;u="text"==u||"application"==u;try{var c=this.Zf.bind(this);if(e.C.Ub)var d=function(e,t){var r=Number($n(e,di,"presentationTimeOffset"))||0,n=$n(e,di,"timescale"),i=1;n&&(i=Bn.tc(n)||1),r=r/i||0,n=ui(e,di);var o=e.C.contentType;if(i=e.C.mimeType.split("/")[1],"text"!=o&&"mp4"!=i&&"webm"!=i)throw new me(2,4,4006);if("webm"==i&&!n)throw new me(2,4,4005);o=qn(e,di,"RepresentationIndex");var a=$n(e,di,"indexRange"),s=e.C.qa;if(a=Bn.uc(a||""),o){var l=o.getAttribute("sourceURL");l&&(s=Vt(e.C.qa,[l])),a=Bn.I(o,"range",Bn.uc,a)}if(!a)throw new me(2,4,4002);return{createSegmentIndex:(i=ci(e,t,n,s,a.start,a.end,i,r)).createSegmentIndex,findSegmentPosition:i.findSegmentPosition,getSegmentReference:i.getSegmentReference,initSegmentReference:n,ma:r}}(e,c);else if(e.C.La)d=fi(e,this.m);else if(e.C.Wb)d=pi(e,c,this.m,!!this.c);else{var f=e.C.qa,h=e.T.duration||0;d={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(e){return 0<=e&&e<h?1:null},getSegmentReference:function(e){return 1!=e?null:new Zn(1,0,h,(function(){return f}),0,null)},initSegmentReference:null,ma:0}}}catch(e){if(u&&4002==e.code)return null;throw e}return l=function(e,t,r,n){var i=Gn(e,t,n);if(r.Pd)e=1==r.drmInfos.length&&!r.drmInfos[0].keySystem,t=0==i.drmInfos.length,(0==r.drmInfos.length||e&&!t)&&(r.drmInfos=i.drmInfos),r.Pd=!1;else if(0<i.drmInfos.length&&(r.drmInfos=r.drmInfos.filter((function(e){return i.drmInfos.some((function(t){return t.keySystem==e.keySystem}))})),0==r.drmInfos.length))throw new me(2,4,4008);return i.Kd||r.Kd}(l=Bn.P(l,"ContentProtection"),this.a.dash.customScheme,t,this.a.dash.ignoreDrmInfo),{id:this.h++,originalId:e.C.id,createSegmentIndex:d.createSegmentIndex,findSegmentPosition:d.findSegmentPosition,getSegmentReference:d.getSegmentReference,initSegmentReference:d.initSegmentReference,presentationTimeOffset:d.ma,mimeType:e.C.mimeType,codecs:e.C.codecs,frameRate:e.C.frameRate,pixelAspectRatio:e.C.pixelAspectRatio,bandwidth:e.bandwidth,width:e.C.width,height:e.C.height,kind:r,encrypted:0<t.drmInfos.length,keyId:l,language:n,label:i,type:e.aa.contentType,primary:o,trickModeVideo:null,emsgSchemeIdUris:e.C.emsgSchemeIdUris,roles:a,channelsCount:e.C.gd,audioSamplingRate:e.C.audioSamplingRate,closedCaptions:s}},n.Pf=function(e,t,r){var n=Bn.yb,i=r.getAttribute("schemeIdUri")||"",o=r.getAttribute("value")||"",a=Bn.I(r,"timescale",n)||1;Bn.P(r,"Event").forEach(function(r){var s=Bn.I(r,"presentationTime",n)||0,l=Bn.I(r,"duration",n)||0;l=(s=s/a+e)+l/a,null!=t&&(s=Math.min(s,e+t),l=Math.min(l,e+t)),r={schemeIdUri:i,value:o,startTime:s,endTime:l,id:r.getAttribute("id")||"",eventElement:r},this.b.onTimelineRegionAdded(r)}.bind(this))},n.Zf=function(e,t,r){return e=vi(e,t,r,this.a.retryParameters),e=this.b.networkingEngine.request(1,e),Ie(this.g,e),e.promise.then((function(e){return e.data}))},gi.pd("mpd",bi),gi.Cb("application/dash+xml",bi),gi.Cb("video/vnd.mpeg.dash.mpd",bi),Ri.prototype.toString=function(){var e="#"+this.name,t=this.a?this.a.map((function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)})):[];return this.value&&t.unshift(this.value),0<t.length&&(e+=":"+t.join(",")),e},Ri.prototype.getAttribute=function(e){var t=this.a.filter((function(t){return t.name==e}));return t.length?t[0]:null};var Pi={nb:function(e,t){return e.filter((function(e){return e.name==t}))},Ta:function(e,t){var r=Pi.nb(e,t);return r.length?r[0]:null},Pc:function(e,t,r){return e.filter((function(e){var n=e.getAttribute("TYPE");return e=e.getAttribute("GROUP-ID"),n.value==t&&e.value==r}))},Hc:function(e,t){return Vt([e],[t])[0]},Yc:function(e){return/^#(?!EXT)/m.test(e)}};function Oi(e){this.b=e,this.a=0}function Di(e){Mi(e,/[ \t]+/gm)}function Mi(e,t){t.lastIndex=e.a;var r=t.exec(e.b);return r=null==r?null:{position:r.index,length:r[0].length,ag:r},e.a==e.b.length||null==r||r.position!=e.a?null:(e.a+=r.length,r.ag)}function Ni(e){return e.a==e.b.length?null:(e=Mi(e,/[^ \t\n]*/gm))?e[0]:null}function Ui(){this.a=0}function Fi(e,t,r){var n=(t=(t=at(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(n[0]))throw new me(2,4,4015);t=0;for(var i=1;i<n.length;i++)if(!Pi.Yc(n[i])){var o=Ki(e,n[i]);if(--e.a,Gi.includes(o.name)){t=1;break}"EXT-X-STREAM-INF"==o.name&&(i+=1)}for(i=[],o=1;o<n.length;)if(Pi.Yc(n[o]))o+=1;else{var a=Ki(e,n[o]);if(Vi.includes(a.name)){if(1!=t)throw new me(2,4,4017);return new Ci(r,t,i,e=Bi(e,r,n=n.splice(o,n.length-o),i))}i.push(a),o+=1,"EXT-X-STREAM-INF"==a.name&&(a.a.push(new ji("URI",n[o])),o+=1)}return new Ci(r,t,i)}function Bi(e,t,r,n){var i=[],o=[];return r.forEach((function(r){if(/^(#EXT)/.test(r))r=Ki(e,r),Gi.includes(r.name)?n.push(r):o.push(r);else{if(Pi.Yc(r))return[];r=Pi.Hc(t,r.trim()),i.push(new Ii(r,o)),o=[]}})),i}function Ki(e,t){var r=e.a++,n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new me(2,4,4016,t);var i,o=n[1],a=n[2];if(n=[],a){var s;(s=Mi(a=new Oi(a),/^([^,=]+)(?:,|$)/g))&&(i=s[1]);for(var l=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;s=Mi(a,l);)n.push(new ji(s[1],s[2]||s[3]))}return new Ri(r,o,n,i)}var Gi="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),Vi="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function Hi(e){try{var t=Hi.parse(e);return _e({uri:e,ld:e,data:t.data,headers:{"content-type":t.contentType}})}catch(e){return ve(e)}}function Yi(){var e=this;this.a=this.f=null,this.$=1,this.D=new Map,this.S=new Set,this.b=new Map,this.c=null,this.u="",this.s=new Ui,this.O=0,this.h=new fe((function(){!function(e){p((function t(){var r,n;return M(t,(function(t){switch(t.j){case 1:return e.f?(k(t,2),S(t,e.update(),4)):t.return();case 4:r=e.O,e.h.R(r),C(t,0);break;case 2:if(n=R(t),!e.f)return t.return();n.severity=1,e.f.onError(n),e.h.R(.1),w(t)}}))}))}(e)})),this.g=fo,this.m=null,this.B=0,this.F=1/0,this.i=new Le,this.K=[],this.l=new Map,this.W=!1}function zi(e,t){return p((function r(){var n,i,o,a,s,l,u,c,d,f;return M(r,(function(r){switch(r.j){case 1:return n=Pi,i=ho,o=t.Ce,S(r,uo(e,Me([o],e.a.retryParameters),0),2);case 2:if(a=r.o,1!=(s=Fi(e.s,a.data,a.uri)).type)throw new me(2,4,4017);return u=(l=n.Ta(s.a,"EXT-X-MEDIA-SEQUENCE"))?Number(l.value):0,c=t.stream,S(r,eo(e,t.Bc,s,u,c.mimeType,c.codecs),3);case 3:d=r.o,t.Vb.a=d,f=d[d.length-1],n.Ta(s.a,"EXT-X-ENDLIST")&&(lo(e,i.Qa),e.c.xa(f.endTime)),w(r)}}))}))}function Wi(e){e.forEach((function(e){if(e){var t=e.stream.codecs.split(",");t=t.filter((function(e){return"mp4a.40.34"!=e})),e.stream.codecs=t.join(",")}}))}function $i(e,t,r,n,i){return{id:e.$++,language:t?t.language:"und",primary:!!t&&t.primary||!!r&&r.primary,audio:t,video:r,bandwidth:n,drmInfos:i,allowedByApplication:!0,allowedByKeySystem:!0}}function qi(e,t,r){return p((function n(){var i,o,a,s,l,u,c,d,f;return M(n,(function(n){switch(n.j){case 1:if(i=no(t,"URI"),e.b.has(i))return n.return(e.b.get(i));if(o=no(t,"TYPE").toLowerCase(),a=Yt,"subtitles"==o&&(o=a.ra),s=Pr(Li(t,"LANGUAGE","und")),l=Li(t,"NAME"),u=t.getAttribute("DEFAULT"),c=t.getAttribute("AUTOSELECT"),d=Li(t,"CHANNELS"),"audio"==o)if(d){var h=d.split("/")[0];h=parseInt(h,10)}else h=null;else h=null;return S(n,Xi(e,i,r,o,s,!!u||!!c,l,h,null),2);case 2:return f=n.o,e.b.has(i)?n.return(e.b.get(i)):null==f?n.return(null):(e.D.set(t.id,f),e.b.set(i,f),n.return(f))}}))}))}function Xi(e,t,r,n,i,o,a,s,l){return p((function u(){var c,d,h,m,g,y,v,b,_,A,E,T,w,x,j,L,I,P,O,D,N,U,F,B,K,G;return M(u,(function(u){switch(u.j){case 1:return d=(c=Pi).Hc(e.u,t),S(u,uo(e,Me([d],e.a.retryParameters),0),2);case 2:if(h=u.o,d=h.uri,1!=(m=Fi(e.s,h.data,d)).type)throw new me(2,4,4017);g=[],m.segments.forEach((function(e){e=c.nb(e.b,"EXT-X-KEY"),g.push.apply(g,e)})),y=!1,v=[],b=null;for(var V=f(g),H=V.next();!H.done;H=V.next())if(_=H.value,"NONE"!=(A=no(_,"METHOD"))){if(y=!0,"AES-128"==A)return e.W=!0,u.return(null);E=no(_,"KEYFORMAT"),(w=(T=co[E])?T(_):null)&&(w.keyIds.length&&(b=w.keyIds[0]),v.push(w))}if(y&&!v.length)throw new me(2,4,4026);return function(e,t){var r=ho,n=Pi.Ta(t.a,"EXT-X-PLAYLIST-TYPE"),i=Pi.Ta(t.a,"EXT-X-ENDLIST");i=n&&"VOD"==n.value||i,n=n&&"EVENT"==n.value&&!i,n=!i&&!n,i?lo(e,r.Qa):(lo(e,n?r.Fd:r.xe),r=io(t.a,"EXT-X-TARGETDURATION"),r=Number(r.value),e.B=Math.max(r,e.B),e.F=Math.min(r,e.F))}(e,m),x=function(e,t){if(1==t.length)return t[0];var r=ro(e,t);if(null!=r)return r;throw new me(2,4,4025,t)}(n,r),S(u,function(e,t,r,n){return p((function i(){var o,a,s,l,u,c,d,f,h;return M(i,(function(i){switch(i.j){case 1:return o=Yt,a=n.segments[0].a,s=new Z(a),l=s.ja.split(".").pop(),u=so[t],(c=u[l])?i.return(c):t==o.ra?r&&"vtt"!=r?i.return("application/mp4"):i.return("text/vtt"):((d=Me([a],e.a.retryParameters)).method="HEAD",S(i,uo(e,d,1),2));case 2:if(f=i.o,!(h=f.headers["content-type"]))throw new me(2,4,4021,l);return i.return(h.split(";")[0])}}))}))}(e,n,x,m),3);case 3:return j=u.o,ao.includes(j)&&(x=""),I=(L=c.Ta(m.a,"EXT-X-MEDIA-SEQUENCE"))?Number(L.value):0,k(u,4),S(u,eo(e,t,m,I,j,x),6);case 6:P=u.o,C(u,5);break;case 4:if(4035==(O=R(u)).code)return q("Skipping unsupported HLS stream",j,t),u.return(null);throw O;case 5:return D=P[0].startTime,N=P[P.length-1].endTime,U=N-D,F=new ei(P),B=Ji(m),K=void 0,"text"==n&&(K="subtitle"),G={id:e.$++,originalId:a,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:F.find.bind(F),getSegmentReference:F.get.bind(F),initSegmentReference:B,presentationTimeOffset:0,mimeType:j,codecs:x,kind:K,encrypted:y,keyId:b,language:i,label:a,type:n,primary:o,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:s,audioSamplingRate:null,closedCaptions:l},u.return({stream:G,Vb:F,drmInfos:v,Bc:t,Ce:d,dd:D,Hg:N,duration:U})}}))}))}function Ji(e){var t=Pi.nb(e.a,"EXT-X-MAP");if(!t.length)return null;if(1<t.length)throw new me(2,4,4020);var r=no(t=t[0],"URI"),n=Pi.Hc(e.b,r);return e=0,r=null,(t=Li(t,"BYTERANGE"))&&(e=t.split("@"),t=Number(e[0]),r=(e=Number(e[1]))+t-1),new Jn((function(){return[n]}),e,r)}function Zi(e,t,r,n){var i=t.b,o=t.a;t=io(i,"EXTINF").value.split(","),t=n+Number(t[0]);var a=0,s=null;return(i=Pi.Ta(i,"EXT-X-BYTERANGE"))&&(a=i.value.split("@"),i=Number(a[0]),s=(a=a[1]?Number(a[1]):e.a+1)+i-1),new Zn(r,n,t,(function(){return[o]}),a,s)}function Qi(e){e.c&&(e.K.forEach((function(t){e.c.vb(t,0)})),e.K=[])}function eo(e,t,r,n,i,o){return p((function a(){var s,l,u,c,d,f,h,m,g,y;return M(a,(function(a){switch(a.j){case 1:return s=r.segments,l=[],u=s[0].a,c=Zi(null,s[0],n,0),d=Ji(r),S(a,function(e,t,r,n,i,o){return p((function a(){var s,l,u,c,d,f,h,p,m;return M(a,(function(a){switch(a.j){case 1:if(e.m&&(s=e.b.get(t),l=s.Vb,u=l.get(n.position)))return a.return(u.startTime);if(i=i.toLowerCase(),ao.includes(i))throw q("Raw formats are not yet supported. Skipping "+i),new me(1,4,4035);if("video/webm"==i)throw q("WebM in HLS is not yet supported. Skipping."),new me(1,4,4035);if("video/mp4"!=i&&"audio/mp4"!=i){a.A(2);break}return c=[to(e,n)],r&&c.push(to(e,r)),S(a,Promise.all(c),3);case 3:return d=a.o,f=d[0],h=d[1]||d[0],a.return(function(e,t,r,n){var i=0;if((new Pn).H("moov",On).H("trak",On).H("mdia",On).fa("mdhd",(function(e){e.reader.M(0==e.version?8:16),i=e.reader.G(),e.parser.stop()})).parse(n,!0),!i)throw new me(2,4,4030,e,t);var o=0,a=!1;if((new Pn).H("moof",On).H("traf",On).fa("tfdt",(function(e){o=(0==e.version?e.reader.G():e.reader.Bb())/i,a=!0,e.parser.stop()})).parse(r,!0),!a)throw new me(2,4,4030,e,t);return o}(t,f.uri,f.data,h.data));case 2:if("video/mp2t"!=i){a.A(4);break}return S(a,to(e,n),5);case 5:return p=a.o,a.return(function(e,t,r){function n(){throw new me(2,4,4030,e,t)}r=new jn(new DataView(r),0);for(var i=0,o=0;;){if(i=r.ca(),71!=(o=r.la())&&n(),16384&r.Tb()||n(),0!=(o=(48&r.la())>>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;v<s.length;++v)h=s[v],m=l[l.length-1],g=0==v?f:m.endTime,y=Zi(m,h,n+v,g),l.push(y);return e.K.push(l),Qi(e),a.return(l)}}))}))}function to(e,t){return p((function r(){var n,i,o,a,s,l;return M(r,(function(r){switch(r.j){case 1:return n=1,i=vi(t.c(),t.b,t.b+2048-1,e.a.retryParameters),o=vi(t.c(),t.b,t.a,e.a.retryParameters),k(r,2),S(r,uo(e,i,n),4);case 4:return a=r.o,r.return(a);case 2:if(7001==(s=R(r)).code)throw s;return q("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",i.uris[0]),S(r,uo(e,o,n),5);case 5:return l=r.o,r.return(l)}}))}))}function ro(e,t){for(var r=oo[e],n=0;n<r.length;n++)for(var i=0;i<t.length;i++)if(r[n].test(t[i].trim()))return t[i].trim();return"text"==e?"":null}function no(e,t){var r=e.getAttribute(t);if(!r)throw new me(2,4,4023,t);return r.value}function io(e,t){var r=Pi.Ta(e,t);if(!r)throw new me(2,4,4024,t);return r}G("shaka.net.DataUriPlugin",Hi),Hi.parse=function(t){var r=t.split(":");if(2>r.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=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&&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<jt(p,m).length))continue;g=jt(p,m)}else c?g=p:h&&(g=m);e.S.has(d)||(c=$i(e,c,h,n,g),s.push(c),e.S.add(d))}}return s}(e,w,k,h,u,c,d))}}))}))}(this,e,t)}.bind(e)),S(r,Promise.all(h),3);case 3:return m=r.o,g=(g=m.reduce(i.Gc,[])).filter((function(e){return null!=e})),r.return({startTime:0,variants:g,textStreams:c.filter((function(e){return null!=e}))})}}))}))}(e,n),2);case 2:if(i=r.o,!e.f)throw new me(2,7,7001);if(e.W&&0==i.variants.length)throw new me(2,4,4034);e.f.filterAllPeriods([i]),o=1/0,a=0,s=1/0;for(var g=f(e.b.values()),y=g.next();!y.done;y=g.next())l=y.value,o=Math.min(o,l.dd),a=Math.max(a,l.dd),"text"!=l.stream.type&&(s=Math.min(s,l.duration));if(e.g!=ho.Qa?(e.c=new yi(0,3*e.B),e.c.Xb(!1)):(e.c=new yi(null,0),e.c.Xb(!0)),Qi(e),e.g!=ho.Qa){for(e.O=e.F,u=ho,e.g==u.Fd&&(c=e.c.vc,isNaN(e.a.availabilityWindowOverride)||(c=e.a.availabilityWindowOverride),e.c.xd(c)),d=0;95443.7176888889<=a;)d+=95443.7176888889,a-=95443.7176888889;if(d)for(y=(g=f(e.b.values())).next();!y.done;y=g.next())95443.7176888889>(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;i<r.length;i++)if(r[i]!=n[i])return!1;return!0}function Ao(e,t){var r=new Set(e),n=new Set(t);if(r.delete("main"),n.delete("main"),r.size!=n.size)return!1;for(var i=(r=f(r)).next();!i.done;i=r.next())if(!n.has(i.value))return!1;return!0}function Eo(e){this.a=e,this.b=new To(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,"")}function To(e,t,r,n,i){this.f=e,this.c=t,this.a=r,this.b=void 0===n?"":n,this.g=void 0===i?"":i}function So(){this.a=xo,this.b=(new Map).set(xo,2).set(ko,1)}function wo(e,t,r){e.b.set(xo,r).set(ko,t)}gi.pd("m3u8",Yi),gi.Cb("application/x-mpegurl",Yi),gi.Cb("application/vnd.apple.mpegurl",Yi),vo.prototype.add=function(e){return!!bo(this.a,e)&&(this.b.add(e),!0)},vo.prototype.values=function(){return this.b.values()},Eo.prototype.create=function(e){var t=this,r=e.filter((function(e){return bo(t.a,e)}));return r.length?new vo(r[0],r):this.b.create(e)},To.prototype.create=function(e){var t=[];t=function(e,t){var r=Dr(Pr(t),e.map((function(e){return Or(e)})));return r?e.filter((function(e){return r==Or(e)})):[]}(e,this.f);var r=e.filter((function(e){return e.primary}));for(t=t.length?t:r.length?r:e,this.c&&(e=function(e,t,r){return e.filter((function(e){if(r){var n=e[r];return n&&n.roles.includes(t)}return n=e.audio,e=e.video,n&&0<=n.roles.indexOf(t)||e&&0<=e.roles.indexOf(t)}))}(t,this.c,this.g)).length&&(t=e),this.a&&(e=Nr.Nd(t,this.a)).length&&(t=e),this.b&&(e=function(e,t){return e.filter((function(e){return!!e.audio&&e.audio.label.toLowerCase()==t.toLowerCase()}))}(t,this.b)).length&&(t=e),e=new vo(t[0]),r=(t=f(t)).next();!r.done;r=t.next())r=r.value,bo(e.a,r)&&e.add(r);return e};var ko=0,xo=1;function Co(e,t){this.g=e,this.h=jo(e),this.a=e.a.currentTime,this.f=Date.now()/1e3,this.b=!1,this.i=t,this.c=function(){}}function Ro(e){this.a=e}function jo(e){if(e.a.paused||0==e.a.playbackRate||null==e.a.buffered)var t=!1;else e:{t=e.a.buffered,e=e.a.currentTime;for(var r=0;r<t.length;r++){var n=t.start(r),i=t.end(r);if(!(e<n||e>i-.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;o<n.length;o++)if(n.start(o)>r&&(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 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),0<e.readyState?Vo(this,r):Go(this,r)}function Ko(e){return e.h?e.a.currentTime:e.g}function Go(e,t){e.g=t,e.b.ea(e.a,"loadedmetadata"),e.b.da(e.a,"loadedmetadata",(function(){Vo(e,t)}))}function Vo(e,t){.001>Math.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 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),.001<Math.abs(e-t)&&(t=(new Date).getTime()/1e3,!a.l||a.l<t-1)?(a.l=t,0<(t=a.c).a.readyState?zo(t.c,e):Go(t,e),e=void 0):(a.u(),e=void 0),e}),function(e,t){return null==t?t=1/0>e.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<t&&(e=Xo(a,e),a.b.currentTime=e)}})).Na(.25)}function qo(e,t){var r=e.a.Y();return t>=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<o?r(u)?u:n:t>=l||r(t)?t:n}function Jo(e,t){var r=e.a.ob();return t<r||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},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;0<t.a.readyState?zo(t.c,e):Go(t,e)},$o.prototype.h=function(){var e=Ko(this.c);return 0<this.b.readyState&&!this.b.paused?Jo(this,e):e},$o.prototype.s=function(){this.f.jd()},Zo.prototype.release=function(){this.b=function(){},this.a.clear()},Qo.prototype.release=function(){this.h=null,this.f.clear(),this.a=function(){},this.b=function(){},this.c=function(){}},Qo.prototype.g=function(e,t){for(var r=f(this.h.a),n=r.next();!n.done;n=r.next()){n=n.value;var i=this.f.get(n),o=e<n.startTime?ea:e>n.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/o<i-n-Math.max(e.c.minBufferTime||0,e.g.rebufferingGoal)||t.Rb.b.a>r)}(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<r?0:e.b-Math.max(r,e.a):Bt(e=Sr(e,t),r)}(e.a.L,t.type,r),s=Math.max(e.c.minBufferTime||0,e.g.rebufferingGoal,e.g.bufferingGoal)*e.l;if(n>=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<t.stream.closedCaptions.size)}.bind(e)).catch((function(e){return t.nc=!0,Promise.reject(e)})),Promise.all([r,e])):r):Promise.resolve()}(e,t,n,Math.max(0,o.startTime-.1),l?l.startTime+.01:s),t.Ja=!0,t.nc=!1,s=Sa(e,t,i),Promise.all([n,s]).then(function(e){if(!this.f&&!this.m)return function(e,t,r,n,i,o,a){var s=i.closedCaptions&&0<i.closedCaptions.size;return null!=i.emsgSchemeIdUris&&0<i.emsgSchemeIdUris.length&&(new Pn).fa("emsg",e.K.bind(e,n,o,i.emsgSchemeIdUris)).parse(a),function(e,t,r){var n=Math.max(e.g.bufferBehind,e.c.presentationTimeline.a),i=Er(e.a.L,t.type);return null==i||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;r<e.c.periods.length;++r)pa(e,r).catch(Gt.oc);e.a.Lf&&e.a.Lf()}}}(this,a))}.bind(e)).catch(function(e){this.f||this.m||(t.Ja=!1,"text"==t.type&&this.g.ignoreTextStreamFailures?this.b.delete("text"):7001==e.code?(t.Ja=!1,t.Ga=null,ka(this,t,0)):3017==e.code?function(e,t,r){if(!Array.from(e.b.values()).some((function(e){return e!=t&&e.od}))){var n=Math.round(100*e.l);if(20<n)e.l-=.2;else{if(!(4<n))return t.Pb=!0,e.m=!0,void e.a.onError(r);e.l-=.04}t.od=!0}ka(e,t,4)}(this,t,e):(t.Pb=!0,e.severity=2,Ca(this,e)))}.bind(e))}(e,t,r,i,o),null)}(e,t);null!=r&&(ka(e,t,r),t.Pb=!1)}catch(t){return void Ca(e,t)}r=Array.from(e.b.values()),function(e,t){var r=Ta(e,t.stream);if(t.ia!=r){var n=t.ia,i=Array.from(e.b.values());i.every((function(e){return e.ia==n||_a(e)}))&&i.every(Aa)&&pa(e,n).then(function(){if(!this.f&&i.every(function(e){var t=Aa(e),r=Ta(this,e.stream);return!!_a(e)||t&&e.ia==n&&r!=n}.bind(this))){var e=this.c.periods[n],t=this.a.ae(e),r=new Map;t.variant&&t.variant.video&&r.set("video",t.variant.video),t.variant&&t.variant.audio&&r.set("audio",t.variant.audio),t.text&&r.set("text",t.text);for(var o=(t=f(this.b.keys())).next();!o.done;o=t.next())if(o=o.value,!r.has(o)&&"text"!=o)return void this.a.onError(new me(2,5,5005));for(o=(t=f(Array.from(r.keys()))).next();!o.done;o=t.next())if(o=o.value,!this.b.has(o)){if("text"!=o)return void this.a.onError(new me(2,5,5005));fa(this,null,null,r.get("text"),e.startTime),r.delete(o)}for(o=(t=f(Array.from(this.b.keys()))).next();!o.done;o=t.next()){o=o.value;var a=this.b.get(o),s=r.get(o);if(s){var l=_a(a);l&&(a.ia=n,a.rd=e.startTime),ca(this,s,!1,0,!1),l&&_a(a)||ka(this,this.b.get(o),0)}else this.b.delete(o)}this.a.$d()}}.bind(e)).catch(Gt.oc)}}(e,t),e.s&&r.every((function(e){return e.endOfStream}))&&e.a.L.endOfStream().then(function(){if(!this.f){var e=this.a.L.Y();0!=e&&e<this.c.presentationTimeline.Y()&&this.c.presentationTimeline.xa(e)}}.bind(e))}}function ya(e,t,r){return t.sb&&t.Da?(r=Ta(e,t.sb),e.c.periods[r].startTime+t.Da.endTime):Math.max(r,t.rd)}function va(e,t,r,n,i){if(t.Da&&t.stream==t.sb)return ba(e,t,i,t.Da.position+1);if(t.Da?(r=Ta(e,t.sb),r=t.stream.findSegmentPosition(Math.max(0,e.c.periods[r].startTime+t.Da.endTime-e.c.periods[i].startTime))):r=t.stream.findSegmentPosition(Math.max(0,(n||r)-e.c.periods[i].startTime)),null==r)return null;var o=null;return null==n&&(o=ba(e,t,i,Math.max(0,r-1))),o||ba(e,t,i,r)}function ba(e,t,r,n){return r=e.c.periods[r],(t=t.stream.getSegmentReference(n))?(e=(n=e.c.presentationTimeline).Ob(),n=n.pb(),r.startTime+t.endTime<e||r.startTime+t.startTime>n?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.length;n++){for(var i=r[n],o=new Set,a=f(i.variants),s=a.next();!s.done;s=a.next())(s=s.value).audio&&o.add(s.audio),s.video&&o.add(s.video),s.video&&s.video.trickModeVideo&&o.add(s.video.trickModeVideo);for(a=(i=f(i.textStreams)).next();!a.done;a=i.next())o.add(a.value);if(o.has(t))return n}return-1}function Sa(e,t,r){return r=vi(r.c(),r.b,r.a,e.g.retryParameters),e=e.a.ub.request(1,r),t.Rb=e,e.promise.then((function(e){return t.Rb=null,e.data}))}function wa(e,t,r,n){return p((function i(){var o,a,s;return M(i,(function(i){switch(i.j){case 1:return t.Oa=!1,t.Cc=!1,t.dc=0,t.Ra=!0,n?(a=e.a.Ua(),s=e.a.L.Y(),o=e.a.L.remove(t.type,a+n,s)):o=xr(e.a.L,t.type).then(function(){if(!this.f&&r)return this.a.L.flush(t.type)}.bind(e)),S(i,o,2);case 2:if(e.f)return i.return();t.sb=null,t.Da=null,t.Ra=!1,t.endOfStream=!1,ka(e,t,0),w(i)}}))}))}function ka(e,t,r){t.Ga=new de((function(){return p((function r(){var n;return M(r,(function(r){switch(r.j){case 1:return k(r,2),S(r,ga(e,t),4);case 4:C(r,0);break;case 2:n=R(r),e.a&&e.a.onError(n),w(r)}}))}))})).R(r)}function xa(e){null!=e.Ga&&(e.Ga.stop(),e.Ga=null)}function Ca(e,t){pe(e.F).then(function(){this.f||(this.a.onError(t),t.handled||this.g.failureCallback(t))}.bind(e))}function Ra(e,t,r,n,i,o){if(200<=r&&299>=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;We(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<t-o||e.lengthComputable&&e.loaded==e.total)&&(n(t-o,e.loaded-a,e.total-e.loaded),a=e.loaded,o=t)},t.headers)i.setRequestHeader(u.toLowerCase(),t.headers[u]);i.send(t.body)})),(function(){return i.abort(),Promise.resolve()}))}function Ia(){this.a=this.f=this.b=0,this.c=new Map,this.g=0}function Pa(e,t,r){this.h=e,this.b=new Map,this.c=!1,this.g=t,this.f=r,this.a=new Ia}function Oa(e,t,r,n,i,o){var a=function(e,t){e.b+=t;var r=e.g;return e.g++,e.c.set(r,t),r}(e.a,n);n=e.b.get(t)||Promise.resolve(),e.b.set(t,n.then((function(){return p((function t(){var n,s,l,u,c,d;return M(t,(function(t){switch(t.j){case 1:return S(t,function(e,t){return p((function r(){var n;return M(r,(function(r){switch(r.j){case 1:return S(r,e.h.request(1,t).promise,2);case 2:return n=r.o,r.return(n.data)}}))}))}(e,r),2);case 2:if(n=t.o,e.c)throw new me(2,9,7001);if(i)for(var f in s=new Uint8Array(n),(l=new Fn(s)).data)u=Number(f),c=l.data[u],d=l.a[u],e.f(c,d);return e.a.close(a,n.byteLength),f=e.a,e.g(0==f.b?0:f.f/f.b,e.a.a),t.return(o(n))}}))}))})))}function Da(e,t){var r=this;this.c=e,this.b=e.objectStore(t),this.a=new ge,e.onabort=function(e){e.preventDefault(),r.a.reject()},e.onerror=function(e){e.preventDefault(),r.a.reject()},e.oncomplete=function(){r.a.resolve()}}function Ma(e,t){return new Promise((function(r,n){var i=e.b.openCursor();i.onerror=n,i.onsuccess=function(e){if(!(e=e.target.result))return r();t(e.key,e.value,e),e.continue()}}))}function Na(e){this.b=e,this.a=[]}function Ua(e,t){return Fa(e,t,"readwrite")}function Fa(e,t,r){var n=new Da(r=e.b.transaction([t],r),t);return e.a.push(n),n.promise().then((function(){Re(e.a,n)}),(function(){Re(e.a,n)})),n}function Ba(e,t,r){this.b=new Na(e),this.c=t,this.a=r}function Ka(e){return Promise.reject(new me(2,9,9011,"Cannot add new value to "+e))}function Ga(e,t,r,n){t=(e=Ua(e.b,t)).store();for(var i={},o=(r=f(r)).next();!o.done;i={key:i.key},o=r.next())i.key=o.value,t.delete(i.key).onsuccess=function(e){return function(){return n(e.key)}}(i);return e.promise()}function Va(e,t,r){return p((function n(){var i,o,a,s,l,u,c;return M(n,(function(n){switch(n.j){case 1:for(i=Fa(e.b,t,"readonly"),o=i.store(),a={},s=[],l={},u=f(r),c=u.next();!c.done;l={request:l.request,key:l.key},c=u.next())l.key=c.value,l.request=o.get(l.key),l.request.onsuccess=function(e){return function(){null==e.request.result&&s.push(e.key),a[e.key]=e.request.result}}(l);return S(n,i.promise(),2);case 2:if(s.length)throw new me(2,9,9012,"Could not find values for "+s);return n.return(r.map((function(e){return a[e]})))}}))}))}function Ha(e){this.a=new Na(e)}function Ya(){this.a=new Map}function za(e,t,r){if(!(e=e.a.get(t)))throw new me(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(r)))throw new me(2,9,9013,"Could not find cell with name "+r);return t}function Wa(e,t){$a.set(e,t)}na.prototype.destroy=function(){for(var e=f(this.b.values()),t=e.next();!t.done;t=e.next())xa(t.value);return this.b.clear(),this.i.clear(),this.g=this.h=this.u=this.c=this.a=null,this.f=!0,Promise.resolve()},na.prototype.configure=function(e){this.g=e,this.F=new he({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0},!0)},na.prototype.start=function(){var e=this;return p((function t(){var r,n,i;return M(t,(function(t){switch(t.j){case 1:return r=e.a.Ua(),n=Ea(e,r),(i=e.a.ae(e.c.periods[n])).variant||i.text?S(t,fa(e,i.variant?i.variant.audio:null,i.variant?i.variant.video:null,i.text,r),2):t.return(new me(2,5,5005));case 2:if(e.f)return t.return();e.a&&e.a.Cf&&e.a.Cf(),w(t)}}))}))},na.prototype.K=function(e,t,r,n){var i=n.reader.md(),o=n.reader.md(),a=n.reader.G(),s=n.reader.G(),l=n.reader.G(),u=n.reader.G();n=n.reader.Za(n.reader.J.byteLength-n.reader.ca()),e=e.startTime+t.startTime+s/a,r.includes(i)&&("urn:mpeg:dash:event:2012"==i?this.a.Df():this.a.onEvent(new Se("emsg",{detail:{startTime:e,endTime:e+l/a,schemeIdUri:i,value:o,timescale:a,presentationTimeDelta:s,eventDuration:l,id:u,messageData:n}})))},G("shaka.net.HttpFetchPlugin",ja),ja.l=function(e,t,r,n,i){return p((function o(){var a,s,l,u,c,d,f,h,m,g,y,v;return M(o,(function(o){switch(o.j){case 1:return a=ja.g,s=ja.c,d=c=0,f=Date.now(),k(o,2),S(o,a(e,r),4);case 4:return l=o.o,h=l.clone().body.getReader(),g=(m=l.headers.get("Content-Length"))?parseInt(m,10):0,new s({start:function(e){!function t(){return p((function r(){var n,o;return M(r,(function(r){switch(r.j){case 1:return k(r,2),S(r,h.read(),4);case 4:n=r.o,C(r,3);break;case 2:return R(r),r.return();case 3:n.done||(c+=n.value.byteLength),(100<(o=Date.now())-f||n.done)&&(i(o-f,c-d,g-c),d=c,f=o),n.done?e.close():(e.enqueue(n.value),t()),w(r)}}))}))}()}}),S(o,l.arrayBuffer(),5);case 5:u=o.o,C(o,3);break;case 2:if(y=R(o),n.Id)throw new me(1,1,7001,e,t);if(n.te)throw new me(1,1,1003,e,t);throw new me(1,1,1002,e,y,t);case 3:return v={},l.headers.forEach((function(e,t){v[t.trim()]=e})),o.return(Ra(v,u,l.status,e,l.url,t))}}))}))},ja.isSupported=function(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!(!e.fetch||!e.AbortController)},ja.isSupported=ja.isSupported,ja.g=e.fetch,ja.a=e.AbortController,ja.c=e.ReadableStream,ja.b=e.Headers,ja.isSupported()&&(De("http",ja,2),De("https",ja,2)),G("shaka.net.HttpXHRPlugin",La),La.f=e.XMLHttpRequest,De("http",La,1),De("https",La,1),Ia.prototype.close=function(e,t){if(this.c.has(e)){var r=this.c.get(e);this.c.delete(e),this.f+=r,this.a+=t}},Pa.prototype.destroy=function(){return this.c=!0,Promise.all(this.b.values()).then((function(){}),(function(){}))},Da.prototype.abort=function(){try{this.c.abort()}catch(e){}return this.a.catch((function(){}))},Da.prototype.store=function(){return this.b},Da.prototype.promise=function(){return this.a},Na.prototype.destroy=function(){return Promise.all(this.a.map((function(e){return e.abort()})))},(n=Ba.prototype).destroy=function(){return this.b.destroy()},n.hasFixedKeySpace=function(){return!0},n.addSegments=function(){return Ka(this.c)},n.removeSegments=function(e,t){return Ga(this,this.c,e,t)},n.getSegments=function(e){var t=this;return p((function r(){var n;return M(r,(function(r){switch(r.j){case 1:return S(r,Va(t,t.c,e),2);case 2:return n=r.o,r.return(n.map((function(e){return t.Jd(e)})))}}))}))},n.addManifests=function(){return Ka(this.a)},n.updateManifestExpiration=function(e,t){var r=Ua(this.b,this.a),n=r.store();return n.get(e).onsuccess=function(r){(r=r.target.result)&&(r.expiration=t,n.put(r,e))},r.promise()},n.removeManifests=function(e,t){return Ga(this,this.a,e,t)},n.getManifests=function(e){var t=this;return p((function r(){var n;return M(r,(function(r){switch(r.j){case 1:return S(r,Va(t,t.a,e),2);case 2:return n=r.o,r.return(n.map((function(e){return t.ec(e)})))}}))}))},n.getAllManifests=function(){var e=this;return p((function t(){var r,n;return M(t,(function(t){switch(t.j){case 1:return r=Fa(e.b,e.a,"readonly"),n=new Map,S(t,Ma(r,(function(t,r){n.set(t,e.ec(r))})),2);case 2:return S(t,r.promise(),3);case 3:return t.return(n)}}))}))},n.Jd=function(e){return e},n.ec=function(e){return e},n.add=function(e,t){var r=this;return p((function n(){var i,o,a,s;return M(n,(function(n){switch(n.j){case 1:i=Ua(r.b,e),o=i.store(),a=[];for(var l=f(t),u=l.next();!u.done;u=l.next())s=u.value,o.add(s).onsuccess=function(e){a.push(e.target.result)};return S(n,i.promise(),2);case 2:return n.return(a)}}))}))},Ha.prototype.destroy=function(){return this.a.destroy()},Ha.prototype.getAll=function(){var e=this;return p((function t(){var r,n;return M(t,(function(t){switch(t.j){case 1:return r=Fa(e.a,"session-ids","readonly"),n=[],S(t,Ma(r,(function(e,t){n.push(t)})),2);case 2:return S(t,r.promise(),3);case 3:return t.return(n)}}))}))},Ha.prototype.add=function(e){for(var t=Ua(this.a,"session-ids"),r=t.store(),n=(e=f(e)).next();!n.done;n=e.next())r.add(n.value);return t.promise()},Ha.prototype.remove=function(e){var t=this;return p((function r(){var n;return M(r,(function(r){switch(r.j){case 1:return S(r,Ma(n=Ua(t.a,"session-ids"),(function(t,r,n){0<=e.indexOf(r.sessionId)&&n.delete()})),2);case 2:return S(r,n.promise(),0)}}))}))},Ya.prototype.destroy=function(){for(var e=[],t=f(this.a.values()),r=t.next();!r.done;r=t.next())e.push(r.value.destroy());return this.a.clear(),Promise.all(e)},Ya.prototype.init=function(){var e=this;$a.forEach((function(t,r){var n=t();n&&e.a.set(r,n)}));for(var t=[],r=f(this.a.values()),n=r.next();!n.done;n=r.next())t.push(n.value.init());return Promise.all(t)},Ya.prototype.erase=function(){var e=this;return p((function t(){var r,n;return M(t,(function(t){switch(t.j){case 1:return r=Array.from(e.a.values()),(n=0<r.length)||$a.forEach((function(e){(e=e())&&r.push(e)})),S(t,Promise.all(r.map((function(e){return e.erase()}))),2);case 2:if(!n)return S(t,Promise.all(r.map((function(e){return e.destroy()}))),0);t.A(0)}}))}))},G("shaka.offline.StorageMuxer.register",Wa),G("shaka.offline.StorageMuxer.unregister",(function(e){$a.delete(e)}));var $a=new Map;function qa(e){Ba.apply(this,arguments)}function Xa(e){return function(e){var t=e.streams.filter((function(e){return"audio"==e.contentType})),r=e.streams.filter((function(e){return"video"==e.contentType}));if(!t.every((function(e){return e.variantIds}))||!r.every((function(e){return e.variantIds}))){t.forEach((function(e){e.variantIds=[]})),r.forEach((function(e){e.variantIds=[]}));var n=0;if(r.length&&!t.length){var i=n++;r.forEach((function(e){e.variantIds.push(i)}))}if(!r.length&&t.length){var o=n++;t.forEach((function(e){e.variantIds.push(o)}))}r.length&&t.length&&t.forEach((function(e){r.forEach((function(t){var r=n++;e.variantIds.push(r),t.variantIds.push(r)}))}))}}(e),e.streams.forEach((function(){})),{startTime:e.startTime,streams:e.streams.map(Ja)}}function Ja(e){var t=e.initSegmentUri?Qa(e.initSegmentUri):null;return{id:e.id,originalId:null,primary:e.primary,presentationTimeOffset:e.presentationTimeOffset,contentType:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,kind:e.kind,language:e.language,label:e.label,width:e.width,height:e.height,initSegmentKey:t,encrypted:e.encrypted,keyId:e.keyId,segments:e.segments.map(Za),variantIds:e.variantIds}}function Za(e){var t=Qa(e.uri);return{startTime:e.startTime,endTime:e.endTime,dataKey:t}}function Qa(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new me(2,9,9004,"Could not parse uri "+e)}function es(e,t,r,n){Ba.call(this,e,t,r),this.f=n}function ts(){this.g=this.c=this.b=this.a=this.f=null}function rs(e,t,r,n){this.a=e,this.g=t,this.f=r,this.c=n,this.b=["offline:",e,"/",t,"/",r,"/",n].join("")}function ns(e){if(null==(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e)))return null;var t=e[1];if("manifest"!=t&&"segment"!=t)return null;var r=e[2];if(!r)return null;var n=e[3];return n&&null!=t?new rs(t,r,n,Number(e[4])):null}function is(e,t){this.b=e,this.a=t}function os(e,t,r){var n=t.streams.filter((function(e){return"audio"==e.contentType})),i=t.streams.filter((function(e){return"video"==e.contentType}));return n=function(e,t,r){for(var n=new Set,i=f(t),o=i.next();!o.done;o=i.next()){var a=f(o.value.variantIds);for(o=a.next();!o.done;o=a.next())n.add(o.value)}for(i=f(r),o=i.next();!o.done;o=i.next())for(a=f(o.value.variantIds),o=a.next();!o.done;o=a.next())n.add(o.value);for(i=new Map,n=f(n),o=n.next();!o.done;o=n.next())o=o.value,i.set(o,{id:o,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});for(t=f(t),n=t.next();!n.done;n=t.next())for(n=n.value,o=as(e,n),a=f(n.variantIds),n=a.next();!n.done;n=a.next())(n=i.get(n.value)).language=o.language,n.primary=n.primary||o.primary,n.audio=o;for(r=f(r),t=r.next();!t.done;t=r.next())for(n=t.value,t=as(e,n),o=f(n.variantIds),n=o.next();!n.done;n=o.next())(n=i.get(n.value)).primary=n.primary||t.primary,n.video=t;return i}(e,n,i),i=t.streams.filter((function(e){return"text"==e.contentType})).map((function(t){return as(e,t)})),t.streams.forEach((function(n){n=n.segments.map((function(t,r){return ss(e,r,t)})),r.vb(n,t.startTime)})),{startTime:t.startTime,variants:Array.from(n.values()),textStreams:i}}function as(e,t){var r=t.segments.map((function(t,r){return ss(e,r,t)})),n=new ei(r);return r={id:t.id,originalId:t.originalId,createSegmentIndex:function(){return Promise.resolve()},findSegmentPosition:function(e){return n.find(e)},getSegmentReference:function(e){return n.get(e)},initSegmentReference:null,presentationTimeOffset:t.presentationTimeOffset,mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate||void 0,pixelAspectRatio:t.pixelAspectRatio||void 0,kind:t.kind,encrypted:t.encrypted,keyId:t.keyId,language:t.language,label:t.label||null,type:t.contentType,primary:t.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},null!=t.initSegmentKey&&(r.initSegmentReference=function(e,t){var r=new rs("segment",e.b,e.a,t);return new Jn((function(){return[r.toString()]}),0,null)}(e,t.initSegmentKey)),r}function ss(e,t,r){var n=new rs("segment",e.b,e.a,r.dataKey);return new Zn(t,r.startTime,r.endTime,(function(){return[n.toString()]}),0,null)}function ls(){this.a=null}function us(e){var t=ns(e);return t&&"manifest"==t.a?us.h(e):t&&"segment"==t.a?us.i(t.key(),t):ve(new me(2,1,9004,e))}function cs(e,t,r){return p((function n(){var i,o,a,s,l,u;return M(n,(function(n){switch(n.j){case 1:i=[];for(var c=[],d=f(r),h=d.next();!h.done;h=d.next()){h=h.value;for(var m=!1,g=f(c),y=g.next();!y.done;y=g.next())if(ds((y=y.value).info,h)){y.sessionIds.push(h.sessionId),m=!0;break}m||c.push({info:h,sessionIds:[h.sessionId]})}o=f(c),a=o.next();case 2:if(a.done){n.A(4);break}return s=a.value,l=function(e,t,r){return p((function n(){var i,o;return M(n,(function(n){switch(n.j){case 1:return i=new pt({ub:t,onError:function(){},qc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),k(n,2),i.configure(e),S(n,function(e,t,r,n,i,o){var a=new Map;return a.set(t,{audioCapabilities:i,videoCapabilities:o,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t,drmInfos:[{keySystem:t,licenseServerUri:r,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:n,initData:null,keyIds:null}]}),Tt(e,a)}(i,r.info.keySystem,r.info.licenseUri,r.info.serverCertificate,r.info.audioCapabilities,r.info.videoCapabilities),4);case 4:C(n,3);break;case 2:return R(n),S(n,i.destroy(),5);case 5:return n.return([]);case 3:return k(n,6),S(n,yt(i),8);case 8:C(n,7);break;case 6:return R(n),S(n,i.destroy(),9);case 9:return n.return([]);case 7:return o=[],S(n,Promise.all(r.sessionIds.map((function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return k(t,2),S(t,function(e,t){return p((function r(){var n,i,o;return M(r,(function(r){switch(r.j){case 1:return S(r,St(e,t),2);case 2:return(n=r.o)?(i=[],(o=e.b.get(n))&&(o.ya=new ge,i.push(o.ya)),i.push(n.remove()),S(r,Promise.all(i),0)):r.return()}}))}))}(i,e),4);case 4:o.push(e),C(t,0);break;case 2:R(t),w(t)}}))}))}))),10);case 10:return S(n,i.destroy(),11);case 11:return n.return(o)}}))}))}(e,t,s),S(n,l,5);case 5:u=n.o,i=i.concat(u),a=o.next(),n.A(2);break;case 4:return n.return(i)}}))}))}function ds(e,t){function r(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&je(e.audioCapabilities,t.audioCapabilities,r)&&je(e.videoCapabilities,t.videoCapabilities,r)}function fs(e,t){var r={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},n=this;this.g=t,this.c=e,this.i=r,this.h=null,this.f=[],this.b=this.a=null,this.l=!0,this.m=Promise.resolve().then((function(){return function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:if(e.l){if(0==e.f.length||e.a&&!e.a.Va)var r=!1;else{e.a&&(e.a.va.Ya(),e.a=null);var n=(r=e.f.shift()).create(e.i);n?(r.va.wb(),e.a={node:n.node,payload:n.payload,Va:n.Va,va:r.va}):r.va.rc(),r=!0}return r?r=Promise.resolve():e.a?r=function(e){return p((function t(){var r,n;return M(t,(function(t){switch(t.j){case 1:return e.c=e.g.cf(e.c,e.i,e.a.node,e.a.payload),k(t,2),e.b=e.g.Le(e.c,e.i,e.a.payload),S(t,e.b.promise,4);case 4:e.b=null,e.c==e.a.node&&(e.a.va.pc(),e.a=null),C(t,0);break;case 2:return 7001==(r=R(t)).code?e.a.va.Ya():e.a.va.onError(r),e.a=null,e.b=null,n=e,S(t,e.g.handleError(e.i,r),5);case 5:n.c=t.o,w(t)}}))}))}(e):(e.g.Bf(e.c),e.h=new ge,r=e.h),S(t,r,1)}t.A(0)}}))}))}(n)}))}function hs(e,t){var r={wb:function(){},pc:function(){},Ya:function(){},onError:function(){},rc:function(){},Jg:function(){}};return e.f.push({create:t,va:r}),e.b&&e.b.abort(),ps(e),r}function ps(e){e.h&&(e.h.resolve(),e.h=null)}function ms(e){this.a=null;for(var t=0;t<e.textTracks.length;++t){var r=e.textTracks[t];r.mode="disabled","Shaka Player TextTrack"==r.label&&(this.a=r)}this.a||(this.a=e.addTextTrack("subtitles","Shaka Player TextTrack")),this.a.mode="hidden"}function gs(e){if(e.startTime>=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 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=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 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 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.length;r++){for(var n=t[r],i=new Map,o=f(n.variants),a=o.next();!a.done;a=o.next())if((a=a.value).video&&a.video.closedCaptions)for(var s=f((a=a.video).closedCaptions.keys()),l=s.next();!l.done;l=s.next())if(l=l.value,!i.has(l)){var u={id:e.Xd++,originalId:l,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"application/cea-608",codecs:"",kind:"caption",encrypted:!1,keyId:null,language:a.closedCaptions.get(l),label:null,type:"text",primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:a.roles,channelsCount:null,audioSamplingRate:null,closedCaptions:null};i.set(l,u)}for(i=f(i.values()),o=i.next();!o.done;o=i.next())n.textStreams.push(o.value)}}(e,e.b.periods),e.Gb=new To(e.c.preferredAudioLanguage,e.c.preferredVariantRole,e.c.preferredAudioChannelCount),e.na=e.c.preferredTextLanguage,function(e,t,r){0<t&&(e.V()||e.qe(t)),r<e.Y()&&(e.V()||e.xa(r))}(e.b.presentationTimeline,e.c.playRangeStart,e.c.playRangeEnd),S(n,e.h.Hb(i),2);case 2:return e.l.init((function(t,r,n){r=void 0!==r&&r,n=void 0===n?0:n;e:{for(var i=f(e.b.periods),o=i.next();!o.done;o=i.next())if((o=o.value).variants.includes(t)){i=o;break e}i=null}Ms(e,i,t,!0),e.f&&ua(e.f,t,r,n)&&Ws(e)})),e.m=function(e,t){return new $o(e.a,e.b,e.c.streaming,t,(function(){e.ib&&Oo(e.ib,!0),e.f&&function(e){function t(t){var i=e.a.L;return t="text"==t?null!=(t=i.a).a&&null!=t.b&&r>=t.a&&r<t.b:Ft(t=Sr(i,t),r,n)}var r=e.a.Ua(),n=e.g.smallGapLimit,i=Ea(e,r);if(ze(e.b.values(),(function(e){return e.ia==i})))for(var o=f(e.b.keys()),a=o.next();!a.done;a=o.next())t(a=a.value)||da(e,e.b.get(a));else ze(e.b.keys(),t)||e.b.forEach((function(t){da(e,t)}))}(e.f),e.B&&Os(e)}),(function(t){return e.dispatchEvent(t)}))}(e,t.startTime),e.ib=function(e){var t=new No(e.b);!function(e,t){e.b=t}(t,(function(){$s(e)}));var r=new Qo(e.Yb);!function(e,t,r,n){e.a=t,e.b=r,e.c=n}(r,(function(t){Qs(e,"timelineregionenter",t)}),(function(t){Qs(e,"timelineregionexit",t)}),(function(t,r){r||(Qs(e,"timelineregionenter",t),Qs(e,"timelineregionexit",t))}));var n=new Po(e.a);return n.a.add(t),n.a.add(r),n}(e),e.W=new Uo({jc:function(){return t.v.playbackRate},wd:function(e){t.v.playbackRate=e},Yd:function(e){t.v.currentTime+=e}}),u=Math.max(e.b.minBufferTime,e.c.streaming.rebufferingGoal),Ps(e,u),e.f=function(e){return new na(e.b,{Ua:function(){return e.m.h()},getBandwidthEstimate:function(){return e.l.getBandwidthEstimate()},L:e.D,ub:e.K,ae:e.zf.bind(e),$d:e.Fe.bind(e),onError:e.Ma.bind(e),onEvent:function(t){return e.dispatchEvent(t)},Df:e.Ef.bind(e),jd:e.Jf.bind(e)})}(e),e.f.configure(e.c.streaming),function(e){function t(e){var t="";e.video&&(t=Xe(e.video.codecs)[0]);var r="";return e.audio&&(r=Xe(e.audio.codecs)[0]),t+"-"+r}var r=e.b.periods.reduce((function(e,t){return e.concat(t.variants)}),[]);r=Nr.Nd(r,e.c.preferredAudioChannelCount);var n=new we;r.forEach((function(e){var r=t(e);n.push(r,e)}));var i=null,o=1/0;n.forEach((function(e,t){var r=0,n=0;t.forEach((function(e){r+=e.bandwidth||0,++n}));var a=r/n;a<o&&(i=e,o=a)})),e.b.periods.forEach((function(e){e.variants=e.variants.filter((function(e){return t(e)==i}))}))}(e),e.i=ml,e.dispatchEvent(new Se("streaming")),S(n,e.f.start(),3);case 3:e.c.streaming.startAtSegmentBoundary&&(c=e.m.h(),d=function(e,t){function r(e,t){if(!e)return null;var r=e.findSegmentPosition(t-o.startTime);return null==r?null:(r=e.getSegmentReference(r))?r.startTime+o.startTime:null}var n=ia(e.f),i=oa(e.f),o=ll(e);return n=r(n,t),null!=(i=r(i,t))&&null!=n?Math.max(i,n):null!=i?i:null!=n?n:t}(e,c),e.m.m(d)),e.b.periods.forEach(e.Nc.bind(e)),$s(e),Ws(e),(h=ll(e)||e.b.periods[0]).variants.some((function(e){return e.primary})),Hs(e,h.variants),e.g.da(i,"loadeddata",(function(){e.u.b=Date.now()/1e3-r.zd})),w(n)}}))}))}(n,e,t))})),i.set(this.Rc,(function(e){return Ae(e=function(e,t){return p((function r(){var n,i;return M(r,(function(r){switch(r.j){case 1:return n=Yt,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),i={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"video/mp4",codecs:"",encrypted:!0,keyId:null,language:"und",label:null,type:n.Pa,primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},S(r,mt(e.h,[i],[]),2);case 2:return S(r,e.h.Hb(t.v),0)}}))}))}(n,e))})),i.set(this.jb,(function(e,t){return function(e,t,r){function n(){return Vs(e)}if(t.uri=r.uri,t.startTime=r.startTime,e.Fb=t.uri,e.u=new xs,e.m=new Wo(t.v),null!=t.startTime&&e.m.m(t.startTime),e.W=new Uo({jc:function(){return t.v.playbackRate},wd:function(e){t.v.playbackRate=e},Yd:function(e){t.v.currentTime+=e}}),Ps(e,e.c.streaming.rebufferingGoal),e.g.w(t.v,"playing",n),e.g.w(t.v,"pause",n),e.g.w(t.v,"ended",n),e.g.da(t.v,"loadeddata",(function(){e.u.b=Date.now()/1e3-r.zd})),e.a.audioTracks&&(e.g.w(e.a.audioTracks,"addtrack",(function(){return $s(e)})),e.g.w(e.a.audioTracks,"removetrack",(function(){return $s(e)})),e.g.w(e.a.audioTracks,"change",(function(){return $s(e)}))),e.a.textTracks){var i=e.a.textTracks;e.g.w(i,"addtrack",(function(){return $s(e)})),e.g.w(i,"removetrack",(function(){return $s(e)})),e.g.w(i,"change",(function(){return $s(e)}))}t.v.src=t.uri,e.i=gl,e.dispatchEvent(new Se("streaming"));var o=new ge;return e.a.readyState>=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=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 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.startTime<t&&r.endTime>e})),!0)},ms.prototype.remove=ms.prototype.remove,ms.prototype.append=function(e){for(var t=gs,r=[],n=0;n<e.length;n++){var i=t(e[n]);i&&r.push(i)}r.slice().sort((function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:r.indexOf(t)-r.indexOf(e)})).forEach(function(e){this.a.addCue(e)}.bind(this))},ms.prototype.append=ms.prototype.append,ms.prototype.destroy=function(){return this.a&&ys(this.a,(function(){return!0})),this.a=null,Promise.resolve()},ms.prototype.destroy=ms.prototype.destroy,ms.prototype.isTextVisible=function(){return"showing"==this.a.mode},ms.prototype.isTextVisible=ms.prototype.isTextVisible,ms.prototype.setTextVisibility=function(e){this.a.mode=e?"showing":"hidden"},ms.prototype.setTextVisibility=ms.prototype.setTextVisibility,G("shaka.util.ConfigUtils.mergeConfigObjects",vs),G("shaka.util.ConfigUtils.convertToConfigObject",bs),G("shaka.util.PlayerConfiguration",_s),_s.mergeConfigObjects=Es,V(Cs,ke),G("shaka.Player",Cs),Cs.prototype.destroy=function(){var e=this;return p((function t(){var r;return M(t,(function(t){switch(t.j){case 1:return e.i==hl?t.return():(e.i=hl,r=hs(e.lb,(function(){return{node:e.F,payload:{Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},Va:!1}})),S(t,new Promise((function(t){r.wb=function(){},r.pc=function(){t(),e.dispatchEvent(new Se("loaded"))},r.Ya=function(){t()},r.onError=function(){t()},r.rc=function(){t()}})),2));case 2:return S(t,e.lb.destroy(),3);case 3:if(e.g&&(e.g.release(),e.g=null),e.Dc=null,e.l=null,e.c=null,!e.K){t.A(0);break}return S(t,e.K.destroy(),5);case 5:e.K=null,w(t)}}))}))},Cs.prototype.destroy=Cs.prototype.destroy,Cs.version="v2.5.10";var Rs=["2","5"];Hr=new function(e){this.a=e,this.c=Gr,this.b=Vr}(new Br(Number(Rs[0]),Number(Rs[1])));var js=["output-restricted","internal-error"],Ls={};function Is(e,t){return p((function r(){return M(r,(function(r){switch(r.j){case 1:if(e.i!=hl&&(e.i=pl),e.dispatchEvent(new Se("unloading")),t.Aa=null,t.mimeType=null,t.startTime=null,t.uri=null,t.v&&(e.g.ea(t.v,"loadeddata"),e.g.ea(t.v,"playing"),e.g.ea(t.v,"pause"),e.g.ea(t.v,"ended"),e.g.ea(t.v,"ratechange")),e.ib&&(e.ib.release(),e.ib=null),e.Zb&&(e.Zb.stop(),e.Zb=null),!e.s){r.A(2);break}return S(r,e.s.stop(),3);case 3:e.s=null;case 2:if(!e.l){r.A(4);break}return S(r,e.l.stop(),4);case 4:if(!e.f){r.A(6);break}return S(r,e.f.destroy(),7);case 7:e.f=null;case 6:if(e.m&&(e.m.release(),e.m=null),!e.D){r.A(8);break}return S(r,e.D.destroy(),9);case 9:e.D=null;case 8:if(!t.v||!t.v.src){r.A(10);break}return S(r,new Promise((function(e){return new fe(e).R(.1)})),11);case 11:t.v.removeAttribute("src"),t.v.load();case 10:if(!e.h){r.A(12);break}return S(r,e.h.destroy(),13);case 13:e.h=null;case 12:e.$.a.clear(),e.Fb=null,e.B=null,e.ac.clear(),e.b=null,e.u=null,e.Fc=null,e.kb=!0,Gs(e),w(r)}}))}))}function Ps(e,t){e.B=new So,e.B.a=ko,wo(e.B,t,Math.min(.5,t/2)),Gs(e),e.Zb=new fe((function(){Os(e)})).Na(.25)}function Os(e){switch(e.i){case gl:var t=!!e.a.ended||Ut(e.a.buffered)>=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(r<t.length)throw new me(2,4,4011);t.forEach(function(e){Nr.Gd(e.variants,this.c.restrictions,this.bc)&&this.f&&ll(this)==e&&$s(this),nl(this,e.variants)}.bind(e))}function Bs(e,t,r,n){return r=void 0!==r&&r,n=void 0===n?0:n,e.kb?(e.pa=t,e.Ud=r,e.Rd=n,!0):((t=ua(e.f,t,r,n))&&qs(e),t)}function Ks(e,t){if(e.kb)return e.oa=t,!0;var r=ca(e.f,t,!0,0,!1);return r&&Xs(e),r}function Gs(e){var t=e.Xc();if(e.u&&e.B&&e.m){var r=e.W;r.f=t,Fo(r),Vs(e)}e.dispatchEvent(new Se("buffering",{buffering:t}))}function Vs(e){if(e.u&&e.B){var t=e.u.a;e.B.a==ko?Ss(t,"buffering"):e.a.paused?Ss(t,"paused"):e.a.ended?Ss(t,"ended"):Ss(t,"playing")}}function Hs(e,t){try{nl(e,t)}catch(t){return e.Ma(t),null}var r=t.filter((function(e){return Nr.rb(e)}));return r=e.Gb.create(r),e.l.setVariants(Array.from(r.values())),e.l.chooseVariant()}function Ys(e,t){var r=zs(e,t,!1),n=Nr.Jb(t.textStreams,e.na,e.fb)[0]||null,i=!1;n&&(e.c.streaming.alwaysStreamText||e.mc())&&(Ns(e,t,n,!0),i=Ks(e,n)),(r||i)&&Ws(e)}function zs(e,t,r){r=void 0===r||r;var n=Hs(e,t.variants),i=!1;return n&&(Ms(e,t,n,!0),i=Bs(e,n,!0)),r&&i&&Ws(e),i}function Ws(e){il(e,new Se("adaptation"))}function $s(e){il(e,new Se("trackschanged"))}function qs(e){il(e,new Se("variantchanged"))}function Xs(e){il(e,new Se("textchanged"))}function Js(e){il(e,new Se("texttrackvisibility"))}function Zs(e){il(e,new Se("abrstatuschanged",{Ig:e.c.abr.enabled}))}function Qs(e,t,r){e.dispatchEvent(new Se(t,{detail:{schemeIdUri:r.schemeIdUri,value:r.value,startTime:r.startTime,endTime:r.endTime,id:r.id,eventElement:r.eventElement}}))}function el(e){if(!e.a.error)return null;var t=e.a.error.code;if(1==t)return null;var r=e.a.error.msExtendedCode;return r&&(0>r&&(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&&($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?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)||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},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,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<Math.abs(e)))},Cs.prototype.trickPlay=Cs.prototype.ug,Cs.prototype.Ge=function(){this.i==gl&&this.W.set(1),this.i==ml&&(this.W.set(1),la(this.f,!1))},Cs.prototype.cancelTrickPlay=Cs.prototype.Ge,Cs.prototype.Vc=function(){if(this.b&&this.m){for(var e=ul(this),t=[],r=f(sl(this)),n=r.next();!n.done;n=r.next()){n=n.value;var i=Nr.Ed(n);i.active=n==e,t.push(i)}return t}return this.a&&this.a.audioTracks?Array.from(this.a.audioTracks).map((function(e){return Nr.rf(e)})):[]},Cs.prototype.getVariantTracks=Cs.prototype.Vc,Cs.prototype.qb=function(){if(this.b&&this.m){for(var e=function(e){var t=ll(e);if(null==t)return null;if(!go(e.$,t).text){var r=Nr.Jb(t.textStreams,e.na,e.fb);r.length&&mo(e.$,t,r[0])}return go(e.$,t).text}(this),t=[],r=f(function(e){var t=ll(e);return null==t?[]:t.textStreams.filter((function(t){return!e.ac.has(t)}))}(this)),n=r.next();!n.done;n=r.next()){n=n.value;var i=Nr.xc(n);i.active=n==e,t.push(i)}return t}return this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).map((function(e){return Nr.sf(e)})):[]},Cs.prototype.getTextTracks=Cs.prototype.qb,Cs.prototype.td=function(e){if(this.b&&this.f){var t=ll(this),r=t.textStreams.find((function(t){return t.id==e.id}));r&&(Ns(this,t,r,!1),Ks(this,r),this.na=r.language)}else if(this.a&&this.a.src&&this.a.textTracks){for(r=(t=f(t=Array.from(this.a.textTracks))).next();!r.done;r=t.next())r=r.value,Nr.Wc(r)==e.id?r.mode=this.gb?"showing":"hidden":r.mode="disabled";Xs(this)}},Cs.prototype.selectTextTrack=Cs.prototype.td,Cs.prototype.dg=function(){Kr("selectEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack.");var e=this.qb().filter((function(e){return"application/cea-608"==e.mimeType}));0<e.length&&this.td(e[0])},Cs.prototype.selectEmbeddedTextTrack=Cs.prototype.dg,Cs.prototype.zg=function(){Kr("usingEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text.");var e=this.qb().filter((function(e){return e.active}))[0];return!!e&&"application/cea-608"==e.mimeType},Cs.prototype.usingEmbeddedTextTrack=Cs.prototype.zg,Cs.prototype.fg=function(e,t,r){if(r=void 0===r?0:r,this.b&&this.f){var n=ll(this);this.c.abr.enabled&&q("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var i=n.variants.find((function(t){return t.id==e.id}));i&&Nr.rb(i)&&(Ms(this,n,i,!1),Bs(this,i,t,r),this.Gb=new Eo(i),Hs(this,n.variants))}else if(this.a&&this.a.audioTracks){for(r=(t=f(t=Array.from(this.a.audioTracks))).next();!r.done;r=t.next())r=r.value,Nr.Wc(r)==e.id&&(r.enabled=!0);qs(this)}},Cs.prototype.selectVariantTrack=Cs.prototype.fg,Cs.prototype.Re=function(){return al(this.Vc())},Cs.prototype.getAudioLanguagesAndRoles=Cs.prototype.Re,Cs.prototype.mf=function(){return al(this.qb())},Cs.prototype.getTextLanguagesAndRoles=Cs.prototype.mf,Cs.prototype.Qe=function(){return Array.from(ol(this.Vc()))},Cs.prototype.getAudioLanguages=Cs.prototype.Qe,Cs.prototype.lf=function(){return Array.from(ol(this.qb()))},Cs.prototype.getTextLanguages=Cs.prototype.lf,Cs.prototype.cg=function(e,t){if(this.b&&this.m){var r=ll(this);this.Gb=new To(e,t||"",0,"","audio"),zs(this,r)}else if(this.a&&this.a.audioTracks){for(var n=(r=f(r=Array.from(this.a.audioTracks))).next();!n.done;n=r.next())(n=n.value).language==e&&(n.enabled=!0);qs(this)}},Cs.prototype.selectAudioLanguage=Cs.prototype.cg,Cs.prototype.eg=function(e,t){if(this.b&&this.m){var r=ll(this);this.na=e,this.fb=t||"";var n=Nr.Jb(r.textStreams,this.na,this.fb)[0]||null;n&&(Ns(this,r,n,!1),(this.c.streaming.alwaysStreamText||this.mc())&&Ks(this,n))}else(r=this.qb().filter((function(t){return t.language==e}))[0])&&this.td(r)},Cs.prototype.selectTextLanguage=Cs.prototype.eg,Cs.prototype.gg=function(e){if(this.b&&this.m){for(var t=ll(this),r=null,n=f(sl(this)),i=n.next();!i.done;i=n.next())if((i=i.value).audio.label==e){r=i;break}null!=r&&(this.Gb=new To(r.language,"",0,e),zs(this,t))}},Cs.prototype.selectVariantsByLabel=Cs.prototype.gg,Cs.prototype.mc=function(){var e=this.gb;return this.D?this.D.g.isTextVisible():this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).some((function(e){return"showing"==e.mode})):e},Cs.prototype.isTextTrackVisible=Cs.prototype.mc,Cs.prototype.jg=function(e){var t=this;return p((function r(){var n,i,o,a;return M(r,(function(r){switch(r.j){case 1:if(t.gb==(n=!!e))return r.return();if(t.gb=n,t.i!=ml){if(t.a&&t.a.src&&t.a.textTracks)for(var s=f(Array.from(t.a.textTracks)),l=s.next();!l.done;l=s.next())"disabled"!=(i=l.value).mode&&(i.mode=n?"showing":"hidden");r.A(2);break}if(t.D.g.setTextVisibility(n),t.c.streaming.alwaysStreamText){r.A(2);break}if(!n){(s=t.f).D=!0,(l=s.b.get("text"))&&(xa(l),s.b.delete("text")),r.A(2);break}if(o=ll(t),!(0<(a=Nr.Jb(o.textStreams,t.na,t.fb)).length)){r.A(2);break}return S(r,sa(t.f,a[0]),2);case 2:Js(t),w(r)}}))}))},Cs.prototype.setTextTrackVisibility=Cs.prototype.jg,Cs.prototype.gf=function(){if(!this.V())return null;if(this.b)return new Date(1e3*(this.b.presentationTimeline.f+this.a.currentTime));if(this.a&&this.a.getStartDate){var e=this.a.getStartDate();return isNaN(e.getTime())?null:new Date(e.getTime()+1e3*this.a.currentTime)}return null},Cs.prototype.getPlayheadTimeAsDate=Cs.prototype.gf,Cs.prototype.jf=function(){if(!this.V())return null;if(this.b)return new Date(1e3*this.b.presentationTimeline.f);if(this.a&&this.a.getStartDate){var e=this.a.getStartDate();return isNaN(e.getTime())?null:e}return null},Cs.prototype.getPresentationStartTimeAsDate=Cs.prototype.jf,Cs.prototype.Sc=function(){var e={total:[],audio:[],video:[],text:[]};return this.i==gl&&(e.total=Kt(this.a.buffered)),this.i==ml&&this.D.Sc(e),e},Cs.prototype.getBufferedInfo=Cs.prototype.Sc,Cs.prototype.getStats=function(){if(this.i!=ml&&this.i!=gl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,switchHistory:[],stateHistory:[]};Vs(this);var e=this.a;if(e.getVideoPlaybackQuality){e=e.getVideoPlaybackQuality();var t=this.u,r=Number(e.totalVideoFrames);t.m=Number(e.droppedVideoFrames),t.l=r,this.u.i=Number(e.corruptedVideoFrames)}e=this.h&&(e=this.h).K?e.K:NaN,this.u.h=e,this.i==ml&&((e=ul(this))&&(this.u.s=e.bandwidth),e&&e.video&&(t=this.u,r=e.video.height||NaN,t.u=e.video.width||NaN,t.g=r),e=this.l.getBandwidthEstimate(),this.u.f=e);var n=this.u;e=n.u,t=n.g,r=n.s;for(var i=n.l,o=n.m,a=n.i,s=n.f,l=n.b,u=ws(n.a,"playing"),c=ws(n.a,"paused"),d=ws(n.a,"buffering"),h=n.h,p=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var r=[],n=f(e.b),i=n.next();!i.done;i=n.next())r.push(t(i.value));return e.a&&r.push(t(e.a)),r}(n.a),m=[],g=(n=f(n.c.a)).next();!g.done;g=n.next())g=g.value,m.push({timestamp:g.timestamp,id:g.id,type:g.type,fromAdaptation:g.fromAdaptation,bandwidth:g.bandwidth});return{width:e,height:t,streamBandwidth:r,decodedFrames:i,droppedFrames:o,corruptedFrames:a,estimatedBandwidth:s,loadLatency:l,playTime:u,pauseTime:c,bufferingTime:d,licenseTime:h,stateHistory:p,switchHistory:m}},Cs.prototype.getStats=Cs.prototype.getStats,Cs.prototype.addTextTrack=function(e,t,r,n,i,o){var a=this;return p((function s(){var l,u,c,d,f,h,p,m,g;return M(s,(function(s){switch(s.j){case 1:if(a.i==gl)throw Error("State error!");if(a.i!=ml)throw Error("State error!");if(l=ll(a),u=Yt,c=a.b.periods.indexOf(l),f=(d=c+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=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($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 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=Ul.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 Ul=(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<Kl.length;++e)try{Kl[e].De()}catch(e){q("Error installing polyfill!",e)}}));var Fl,Bl,Kl=[];function Gl(e,t){for(var r={priority:t=t||0,De:e},n=0;n<Kl.length;n++)if(Kl[n].priority<t)return void Kl.splice(n,0,r);Kl.push(r)}function Vl(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"==typeof Event)var r=new Event(t,e);else(r=document.createEvent("Event")).initEvent(t,e.bubbles,e.cancelable);e.target.dispatchEvent(r)}function Hl(e,t,r){if("input"==e)switch(this.type){case"range":e="change"}HTMLInputElement.prototype.originalAddEventListener.call(this,e,t,r)}function Yl(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(t){for(var r=[],n=0;n<arguments.length;++n)r[n]=arguments[n];return(r=e.apply(this,r)).abort=function(){},r}}function zl(e,t){try{var r=new Wl(e,t);return Promise.resolve(r)}catch(e){return Promise.reject(e)}}function Wl(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(var r=f(t),n=r.next();!n.done;n=r.next()){var i=n.value;if("required"==i.persistentState)n=null;else{n={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label};var o=!1,a=!1;if(i.audioCapabilities)for(var s=f(i.audioCapabilities),l=s.next();!l.done;l=s.next())if((l=l.value).contentType){o=!0;var u=l.contentType.split(";")[0];WebKitMediaKeys.isTypeSupported(this.keySystem,u)&&(n.audioCapabilities.push(l),a=!0)}if(i.videoCapabilities)for(l=(i=f(i.videoCapabilities)).next();!l.done;l=i.next())(s=l.value).contentType&&(o=!0,l=s.contentType.split(";")[0],WebKitMediaKeys.isTypeSupported(this.keySystem,l)&&(n.videoCapabilities.push(s),a=!0));o||(a=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),n=a?n:null}if(n)return void(this.a=n)}throw(r=Error("Unsupported keySystem")).name="NotSupportedError",r.code=DOMException.NOT_SUPPORTED_ERR,r}function $l(e){var t=this.mediaKeys;return t&&t!=e&&Xl(t,null),delete this.mediaKeys,(this.mediaKeys=e)?Xl(e,this):Promise.resolve()}function ql(e){this.b=new WebKitMediaKeys(e),this.a=new Be}function Xl(e,t){if(e.a.$a(),!t)return Promise.resolve();e.a.w(t,"webkitneedkey",Zl);try{return 1<=t.readyState?t.webkitSetMediaKeys(e.b):e.a.da(t,"loadedmetadata",(function(){t.webkitSetMediaKeys(e.b)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function Jl(e){ke.call(this),this.b=null,this.g=e,this.c=this.a=null,this.f=new Be,this.sessionId="",this.expiration=NaN,this.closed=new ge,this.keyStatuses=new eu}function Zl(e){var t=new Event("encrypted");t.initDataType="cenc",t.initData=e.initData,this.dispatchEvent(t)}function Ql(e,t){var r=e.keyStatuses;r.size=null==t?0:1,r.a=t,e.dispatchEvent(new Se("keystatuseschange"))}function eu(){this.size=0,this.a=void 0}function tu(e,t){try{var r=new ru(e,t);return Promise.resolve(r)}catch(e){return Promise.reject(e)}}function ru(e,t){this.keySystem=e;for(var r=!1,n=0;n<t.length;++n){var i=t[n],o={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label},a=!1;if(i.audioCapabilities)for(var s=0;s<i.audioCapabilities.length;++s){var l=i.audioCapabilities[s];if(l.contentType){a=!0;var u=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,u)&&(o.audioCapabilities.push(l),r=!0)}}if(i.videoCapabilities)for(s=0;s<i.videoCapabilities.length;++s)(l=i.videoCapabilities[s]).contentType&&(a=!0,u=l.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,u)&&(o.videoCapabilities.push(l),r=!0));if(a||(r=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),"required"==i.persistentState&&(r=!1),r)return void(this.a=o)}throw(r=Error("Unsupported keySystem")).name="NotSupportedError",r.code=DOMException.NOT_SUPPORTED_ERR,r}function nu(e){var t=this.mediaKeys;return t&&t!=e&&ou(t,null),delete this.mediaKeys,(this.mediaKeys=e)?ou(e,this):Promise.resolve()}function iu(e){this.a=new MSMediaKeys(e),this.b=new Be}function ou(e,t){if(e.b.$a(),!t)return Promise.resolve();e.b.w(t,"msneedkey",su);var r=e;try{return 1<=t.readyState?t.msSetMediaKeys(e.a):t.addEventListener("loadedmetadata",(function e(){t.msSetMediaKeys(r.a),t.removeEventListener("loadedmetadata",e)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function au(e){ke.call(this),this.c=null,this.g=e,this.b=this.a=null,this.f=new Be,this.sessionId="",this.expiration=NaN,this.closed=new ge,this.keyStatuses=new uu}function su(e){if(e.initData){var t=document.createEvent("CustomEvent");t.initCustomEvent("encrypted",!1,!1,null),t.initDataType="cenc",t.initData=function(e){if(!e)return e;var t=new Fn(e);if(1>=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<n.length;++a){var s=n[a].split("="),l=s[0];s=s[1].replace(/"(.*)"/,"$1"),o[l]=s}if(!(n=o.codecs))return e(r);var u=!1,c=!1;for(var d in r=n.split(",").filter((function(e){return t.test(e)&&(c=!0),/^(hev|hvc)1\.2/.test(e)&&(u=!0),!0})),c&&(u=!1),o.codecs=r.join(","),u&&(o.eotf="smpte2084"),o)i+="; "+d+'="'+o[d]+'"';return cast.__platform__.canDisplayType(i)}}():t?(function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"mp2t"!=t.split(/ *; */)[0].split("/")[1].toLowerCase()&&e(t)}}(),12>=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<t.length;++o){var a=t[o],s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:a.initDataTypes,sessionTypes:["temporary"],label:a.label},l=!1;if(a.audioCapabilities)for(var u=0;u<a.audioCapabilities.length;++u){var c=a.audioCapabilities[u];if(c.contentType){l=!0;var d=c.contentType.split(";")[0];i.canPlayType(d,this.a)&&(s.audioCapabilities.push(c),n=!0)}}if(a.videoCapabilities)for(u=0;u<a.videoCapabilities.length;++u)(c=a.videoCapabilities[u]).contentType&&(l=!0,i.canPlayType(c.contentType,this.a)&&(s.videoCapabilities.push(c),n=!0));if(l||(n=i.canPlayType("video/mp4",this.a)||i.canPlayType("video/webm",this.a)),"required"==a.persistentState&&(r?(s.persistentState="required",s.sessionTypes=["persistent-license"]):n=!1),n)return void(this.b=s)}throw r="Unsupported keySystem","org.w3.clearkey"!=e&&"com.widevine.alpha"!=e||(r="None of the requested configurations were supported."),(r=Error(r)).name="NotSupportedError",r.code=DOMException.NOT_SUPPORTED_ERR,r}function _u(e){this.g=e,this.b=null,this.a=new Be,this.c=[],this.f={}}function Au(e,t){e.b=t,e.a.$a();var r=mu;t&&(e.a.w(t,r+"needkey",e.Mf.bind(e)),e.a.w(t,r+"keymessage",e.rg.bind(e)),e.a.w(t,r+"keyadded",e.pg.bind(e)),e.a.w(t,r+"keyerror",e.qg.bind(e)))}function Eu(e,t){var r=e.f[t];return r||((r=e.c.shift())?(r.sessionId=t,e.f[t]=r):null)}function Tu(e,t,r){ke.call(this),this.f=e,this.h=!1,this.a=this.b=null,this.c=t,this.g=r,this.sessionId="",this.expiration=NaN,this.closed=new ge,this.keyStatuses=new ku}function Su(e,t,r){if(e.h)return Promise.reject(Error("The session is already initialized."));e.h=!0;try{if("persistent-license"==e.g)if(r)var n=new Uint8Array(ut("LOAD_SESSION|"+r));else{var i=ut("PERSISTENT|"),o=new Uint8Array(i.byteLength+t.byteLength);o.set(new Uint8Array(i),0),o.set(new Uint8Array(t),i.byteLength),n=o}else n=new Uint8Array(t)}catch(e){return Promise.reject(e)}e.b=new ge;var a=gu("generateKeyRequest");try{e.f[a](e.c,n)}catch(t){if("InvalidStateError"!=t.name)return e.b=null,Promise.reject(t);new fe((function(){try{e.f[a](e.c,n)}catch(t){e.b.reject(t),e.b=null}})).R(.01)}return e.b}function wu(e,t){var r=e.keyStatuses;r.size=null==t?0:1,r.a=t,e.dispatchEvent(new Se("keystatuseschange"))}function ku(){this.size=0,this.a=void 0}function xu(e){if("picture-in-picture"==(e=e.target).webkitPresentationMode){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function Cu(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Ru(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function ju(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function Lu(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function Iu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function Pu(t,r,n){return new e.TextTrackCue(t,r,n)}function Ou(t,r,n){return new e.TextTrackCue(t+"-"+r+"-"+n,t,r,n)}function Du(){}bu.prototype.createMediaKeys=function(){var e=new _u(this.a);return Promise.resolve(e)},bu.prototype.getConfiguration=function(){return this.b},(n=_u.prototype).createSession=function(e){if("temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.b||document.createElement("video");return t.src||(t.src="about:blank"),e=new Tu(t,this.g,e),this.c.push(e),e},n.setServerCertificate=function(){return Promise.resolve(!1)},n.Mf=function(e){var t=document.createEvent("CustomEvent");t.initCustomEvent("encrypted",!1,!1,null),t.initDataType="webm",t.initData=e.initData,this.b.dispatchEvent(t)},n.rg=function(e){var t=Eu(this,e.sessionId);t&&(e=new Se("message",{messageType:null==t.keyStatuses.a?"licenserequest":"licenserenewal",message:e.message}),t.b&&(t.b.resolve(),t.b=null),t.dispatchEvent(e))},n.pg=function(e){(e=Eu(this,e.sessionId))&&(wu(e,"usable"),e.a&&e.a.resolve(),e.a=null)},n.qg=function(e){var t=Eu(this,e.sessionId);t&&t.handleError(e)},V(Tu,ke),(n=Tu.prototype).handleError=function(e){var t=Error("EME v0.1b key error");t.errorCode=e.errorCode,t.errorCode.systemCode=e.systemCode,!e.sessionId&&this.b?(t.method="generateRequest",45==e.systemCode&&(t.message="Unsupported session type."),this.b.reject(t),this.b=null):e.sessionId&&this.a?(t.method="update",this.a.reject(t),this.a=null):(t=e.systemCode,e.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?wu(this,"output-restricted"):wu(this,1==t?"expired":"internal-error"))},n.yd=function(e,t){if(this.a)this.a.then(this.yd.bind(this,e,t)).catch(this.yd.bind(this,e,t));else{if(this.a=e,"webkit-org.w3.clearkey"==this.c){var r=at(t),n=JSON.parse(r);"oct"!=n.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null),r=ht.Ba(n.keys[0].k),n=ht.Ba(n.keys[0].kid)}else r=new Uint8Array(t),n=null;var i=gu("addKey");try{this.f[i](this.c,r,n,this.sessionId)}catch(e){this.a.reject(e),this.a=null}}},n.generateRequest=function(e,t){return Su(this,t,null)},n.load=function(e){return"persistent-license"==this.g?Su(this,null,e):Promise.reject(Error("Not a persistent session."))},n.update=function(e){var t=new ge;return this.yd(t,e),t},n.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=gu("cancelKeyRequest");try{this.f[e](this.c,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},n.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()},(n=ku.prototype).forEach=function(e){this.a&&e(this.a,pu)},n.get=function(e){if(this.has(e))return this.a},n.has=function(e){var t=pu;return!(!this.a||!ht.za(new Uint8Array(e),new Uint8Array(t)))},n.entries=function(){},n.keys=function(){},n.values=function(){},Gl((function(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)mu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;pu=new Uint8Array([0]).buffer,navigator.requestMediaKeySystemAccess=yu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=vu,e.MediaKeys=_u,e.MediaKeySystemAccess=bu}})),Gl((function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=Cu,Object.defineProperty(t,"disablePictureInPicture",{get:ju,set:Lu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Ru,document.addEventListener("webkitpresentationmodechanged",xu,!0))}})),Gl((function(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch((function(){})),e}}})),Gl((function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in t&&(t.getVideoPlaybackQuality=Iu)}})),Gl((function(){if(!e.VTTCue&&e.TextTrackCue){var t=TextTrackCue.length;if(3==t)e.VTTCue=Pu;else if(6==t)e.VTTCue=Ou;else{try{var r=!!Pu(1,2,"")}catch(e){r=!1}r&&(e.VTTCue=Pu)}}})),G("shaka.text.TtmlTextParser",Du),Du.prototype.parseInit=function(){},Du.prototype.parseInit=Du.prototype.parseInit,Du.prototype.parseMedia=function(e,t){var r=at(e),n=[],i=new DOMParser,o=null;if(""==r)return n;try{o=i.parseFromString(r,"text/xml")}catch(e){throw new me(2,2,2005,"Failed to parse TTML.")}if(o){if(r=o.getElementsByTagName("parsererror")[0])throw new me(2,2,2005,r.textContent);if(!(i=o.getElementsByTagName("tt")[0]))throw new me(2,2,2005,"TTML does not contain <tt> 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;d<u.length;d++){var h,p,m=u[d],g=l,y=r,v=new ur,b=m.getAttribute("xml:id");b?(v.id=b,b=null,y&&(b=Uu.exec(y)||Bu.exec(y)),y=b?Number(b[1]):null,b=b?Number(b[2]):null,(h=Qu(m,g,"extent"))&&null!=(h=(p=Uu.exec(h))||Bu.exec(h))&&(v.width=null!=y?100*Number(h[1])/y:Number(h[1]),v.height=null!=b?100*Number(h[2])/b:Number(h[2]),v.widthUnits=p||null!=y?cr:0,v.heightUnits=p||null!=b?cr:0),(m=Qu(m,g,"origin"))&&null!=(h=(p=Uu.exec(m))||Bu.exec(m))&&(v.viewportAnchorX=null!=b?100*Number(h[1])/b:Number(h[1]),v.viewportAnchorY=null!=y?100*Number(h[2])/y:Number(h[2]),v.viewportAnchorUnits=p||null!=y?cr:0)):v=null,v&&c.push(v)}for(r=(r=i.getElementsByTagName("body")[0])?Array.from(r.querySelectorAll("[begin]")):[],i=(r=f(r)).next();!i.done;i=r.next())(i=Xu(i.value,t.periodStart,a,s,l,u,c,o,!1))&&n.push(i)}return n},Du.prototype.parseMedia=Du.prototype.parseMedia;var Mu,Nu,Uu=/^(\d{1,2}(?:\.\d+)?|100)% (\d{1,2}(?:\.\d+)?|100)%$/,Fu=/^(\d+px|\d+em)$/,Bu=/^(\d+)px (\d+)px$/,Ku=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Gu=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Vu=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Hu=/^(\d*(?:\.\d*)?)f$/,Yu=/^(\d*(?:\.\d*)?)t$/,zu=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Wu={left:ir,center:"center",right:"end",start:ir,end:"end"},$u={left:"line-left",center:"center",right:"line-right"};function qu(e){var t=[];if(!e)return t;for(var r=f(e.childNodes),n=r.next();!n.done;n=r.next())(n=n.value).nodeType==Node.ELEMENT_NODE&&"br"!==n.nodeName&&(n=qu(n),t=t.concat(n));return t.length||t.push(e),t}function Xu(e,t,r,n,i,o,a,s,l){if(l&&"br"==e.nodeName)return(e=new qt(0,0,"")).spacer=!0,e;var u=/^[\s\n]*$/.test(e.textContent),c=e.nodeType==Node.ELEMENT_NODE&&!e.hasAttribute("begin")&&!e.hasAttribute("end");if(e.nodeType!=Node.ELEMENT_NODE||c&&u||c&&!l)return null;u=rc(e.getAttribute("begin"),r),c=rc(e.getAttribute("end"),r);var d=rc(e.getAttribute("dur"),r);if(null==c&&null!=d&&(c=u+d),!l&&(null==u||null==c))throw new me(2,2,2001);if(u+=t,c+=t,d="",l=[],Array.from(e.childNodes).find((function(e){return e.nodeType===Node.TEXT_NODE&&/\w+/.test(e.textContent)})))d=function e(t,r){for(var n="",i=f(t.childNodes),o=i.next();!o.done;o=i.next())"br"==(o=o.value).nodeName&&t.childNodes[0]!==o?n+="\n":o.childNodes&&0<o.childNodes.length?n+=e(o,r):n+=r?o=(o=o.textContent.trim()).replace(/\s+/g," "):o.textContent;return n}(e,s);else for(var h=f(e.childNodes),p=h.next();!p.done;p=h.next())(p=Xu(p.value,t,r,n,i,o,a,s,!0))&&l.push(p);if((t=new qt(u,c,d)).nestedCues=l,(o=tc(e,"region",o,"")[0])&&o.getAttribute("xml:id")){var m=o.getAttribute("xml:id");t.region=a.filter((function(e){return e.id==m}))[0]}return function(e,t,r,n,i){"rtl"==Zu(t,r,i,"direction")&&(e.direction="rtl");var o=Zu(t,r,i,"writingMode");if("tb"==o||"tblr"==o?e.writingMode="vertical-lr":"tbrl"==o?e.writingMode="vertical-rl":"rltb"==o||"rl"==o?e.direction="rtl":o&&(e.direction=tr),(o=Zu(t,r,i,"textAlign"))?(e.positionAlign=$u[o],e.lineAlign=Wu[o],e.textAlign=Zt[o.toUpperCase()]):e.textAlign="start",(o=Zu(t,r,i,"displayAlign"))&&(e.displayAlign=er[o.toUpperCase()]),(o=Zu(t,r,i,"color"))&&(e.color=o),(o=Zu(t,r,i,"backgroundColor"))&&(e.backgroundColor=o),(o=Zu(t,r,i,"fontFamily"))&&(e.fontFamily=o),(o=Zu(t,r,i,"fontWeight"))&&"bold"==o&&(e.fontWeight=700),(o=Zu(t,r,i,"wrapOption"))&&"noWrap"==o&&(e.wrapLine=!1),(o=Zu(t,r,i,"lineHeight"))&&o.match(Fu)&&(e.lineHeight=o),(o=Zu(t,r,i,"fontSize"))&&o.match(Fu)&&(e.fontSize=o),(o=Zu(t,r,i,"fontStyle"))&&(e.fontStyle=lr[o.toUpperCase()]),n){o=n.getAttribute("imagetype");var a=n.getAttribute("encoding");n=n.textContent.trim(),"PNG"==o&&"Base64"==a&&n&&(e.backgroundImage="data:image/png;base64,"+n)}(r=Qu(r,i,"textDecoration"))&&Ju(e,r),(t=ec(t,i,"textDecoration"))&&Ju(e,t)}(t,e,o,n=tc(e,"smpte:backgroundImage",n,"#")[0],i),t}function Ju(e,t){for(var r=t.split(" "),n=0;n<r.length;n++)switch(r[n]){case"underline":e.textDecoration.includes("underline")||e.textDecoration.push("underline");break;case"noUnderline":e.textDecoration.includes("underline")&&Re(e.textDecoration,"underline");break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&Re(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&Re(e.textDecoration,"overline")}}function Zu(e,t,r,n){return(e=ec(e,r,n))?e:Qu(t,r,n)}function Qu(e,t,r){for(var n=qu(e),i=0;i<n.length;i++){var o=Bn.getAttributeNS(n[i],"http://www.w3.org/ns/ttml#styling",r);if(o)return o}return(e=tc(e,"style",t,"")[0])?Bn.getAttributeNS(e,"http://www.w3.org/ns/ttml#styling",r):null}function ec(e,t,r){var n=Bn.getAttributeNS(e,"http://www.w3.org/ns/ttml#styling",r);if(n)return n;for(e=tc(e,"style",t,""),t=null,n=0;n<e.length;n++){var i=Bn.getAttributeNS(e[n],"http://www.w3.org/ns/ttml#styling",r);i&&(t=i)}return t}function tc(e,t,r,n){var i=[];if(!e||1>r.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<t||59<r?null:Number(e[4])/1e3+r+60*t+3600*(Number(e[1])||0)}function uc(){this.a=null}function cc(e,t,r){var n,i,o;return(new Pn).H("payl",Mn((function(e){n=at(e)}))).H("iden",Mn((function(e){i=at(e)}))).H("sttg",Mn((function(e){o=at(e)}))).parse(e),n?function(e,t,r,n,i){if(e=new qt(n,i,e),t&&(e.id=t),r)for(t=new Oi(r),r=Ni(t);r;)sc(e,r,[]),Di(t),r=Ni(t);return e}(n,i,o,t,r):null} -/* - @license - EME Encryption Scheme Polyfill - Copyright 2019 Google LLC - SPDX-License-Identifier: Apache-2.0 -*/ -function dc(){}function fc(){Mu?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Mu=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=hc):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function hc(e,t){var r=this;return p((function n(){var i;return M(n,(function(n){switch(n.j){case 1:return console.assert(r==navigator,'bad "this" for requestMediaKeySystemAccess'),S(n,Mu.call(r,e,t),2);case 2:return Ec(i=n.o)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Mu,n.return(i)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=pc,n.return(pc.call(r,e,t)))}}))}))}function pc(e,t){var r=this;return p((function n(){var i,o,a,s,l,u,c,d;return M(n,(function(n){switch(n.j){case 1:console.assert(r==navigator,'bad "this" for requestMediaKeySystemAccess'),i=Ac(e),o=[];for(var h=f(t),p=h.next();!p.done;p=h.next())a=p.value,s=mc(a.videoCapabilities,i),l=mc(a.audioCapabilities,i),a.videoCapabilities&&a.videoCapabilities.length&&!s.length||a.audioCapabilities&&a.audioCapabilities.length&&!l.length||((u=Object.assign({},a)).videoCapabilities=s,u.audioCapabilities=l,o.push(u));if(!o.length)throw(c=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",c.code=DOMException.NOT_SUPPORTED_ERR,c;return S(n,Mu.call(r,e,o),2);case 2:return d=n.o,n.return(new _c(d,i))}}))}))}function mc(e,t){return e?e.filter((function(e){return!e.encryptionScheme||e.encryptionScheme==t})):e}function gc(){}function yc(){navigator.mediaCapabilities?(Nu=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=vc):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function vc(e){var t=this;return p((function r(){var n;return M(r,(function(r){switch(r.j){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),S(r,Nu.call(t,e),2);case 2:return n=r.o,e.keySystemConfiguration?Ec(n.keySystemAccess)?(console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Nu,r.return(n)):(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=bc,r.return(bc.call(t,e))):r.return(n)}}))}))}function bc(e){var t=this;return p((function r(){var n,i,o,a,s,l,u;return M(r,(function(r){switch(r.j){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),n=null,e.keySystemConfiguration&&(i=e.keySystemConfiguration,o=i.keySystem,a=i.audio&&i.audio.encryptionScheme,s=i.video&&i.video.encryptionScheme,n=Ac(o),l={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},a&&a!=n||s&&s!=n)?r.return(l):S(r,Nu.call(t,e),2);case 2:return(u=r.o).keySystemAccess&&(u.keySystemAccess=new _c(u.keySystemAccess,n)),r.return(u)}}))}))}function _c(e,t){this.b=e,this.a=t,this.keySystem=e.keySystem}function Ac(e){return e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.adobe")||e.startsWith("org.w3")?"cenc":e.startsWith("com.apple")?"cbcs-1-9":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function Ec(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!(!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)||void 0===e.encryptionScheme)}function Tc(){}function Sc(){fc(),yc()}hr["application/ttml+xml"]=Du,G("shaka.text.Mp4TtmlParser",oc),oc.prototype.parseInit=function(e){var t=!1;if((new Pn).H("moov",On).H("trak",On).H("mdia",On).H("minf",On).H("stbl",On).fa("stsd",Dn).H("stpp",(function(e){t=!0,e.parser.stop()})).parse(e),!t)throw new me(2,2,2007)},oc.prototype.parseInit=oc.prototype.parseInit,oc.prototype.parseMedia=function(e,t){var r=!1,n=[];if((new Pn).H("mdat",Mn(function(e){r=!0,n=n.concat(this.a.parseMedia(e,t))}.bind(this))).parse(e),!r)throw new me(2,2,2007);return n},oc.prototype.parseMedia=oc.prototype.parseMedia,hr['application/mp4; codecs="stpp"']=oc,hr['application/mp4; codecs="stpp.ttml.im1t"']=oc,hr['application/mp4; codecs="stpp.TTML.im1t"']=oc,G("shaka.text.VttTextParser",ac),ac.prototype.parseInit=function(){},ac.prototype.parseInit=ac.prototype.parseInit,ac.prototype.parseMedia=function(e,t){var r=at(e);if(r=(r=r.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m),!/^WEBVTT($|[ \t\n])/m.test(r[0]))throw new me(2,2,2e3);var n=t.segmentStart;if(null==n&&(n=0,r[0].includes("X-TIMESTAMP-MAP"))){var i=r[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),o=r[0].match(/MPEGTS:(\d+)/m);if(i&&o){if(null==(n=lc(new Oi(i[1]))))throw new me(2,2,2e3);n=t.periodStart+(Number(o[1])/9e4-n)}}o=[];var a=r[0].split("\n");for(i=1;i<a.length;i++)if(/^Region:/.test(a[i])){var s=new Oi(a[i]),l=new ur;Ni(s),Di(s);for(var u=Ni(s);u;){var c=l,d=u;(u=/^id=(.*)$/.exec(d))?c.id=u[1]:(u=/^width=(\d{1,2}|100)%$/.exec(d))?c.width=Number(u[1]):(u=/^lines=(\d+)$/.exec(d))?(c.height=Number(u[1]),c.heightUnits=2):(u=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))?(c.regionAnchorX=Number(u[1]),c.regionAnchorY=Number(u[2])):(u=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))?(c.viewportAnchorX=Number(u[1]),c.viewportAnchorY=Number(u[2])):/^scroll=up$/.exec(d)&&(c.scroll="up"),Di(s),u=Ni(s)}o.push(l)}for(i=[],s=1;s<r.length;s++){if(u=a=r[s].split("\n"),d=n,a=o,1==u.length&&!u[0]||/^NOTE($|[ \t])/.test(u[0])||"STYLE"==u[0])a=null;else{l=null,u[0].includes("--\x3e")||(l=u[0],u.splice(0,1));var f=lc(c=new Oi(u[0])),h=Mi(c,/[ \t]+--\x3e[ \t]+/g),p=lc(c);if(null==f||null==h||null==p)throw new me(2,2,2001);for(u=new qt(f+d,p+d,u.slice(1).join("\n").trim()),Di(c),d=Ni(c);d;)sc(u,d,a),Di(c),d=Ni(c);null!=l&&(u.id=l),a=u}a&&i.push(a)}return i},ac.prototype.parseMedia=ac.prototype.parseMedia,hr["text/vtt"]=ac,hr['text/vtt; codecs="vtt"']=ac,G("shaka.text.Mp4VttParser",uc),uc.prototype.parseInit=function(e){var t=!1;if((new Pn).H("moov",On).H("trak",On).H("mdia",On).fa("mdhd",function(e){0==e.version?(e.reader.M(4),e.reader.M(4),this.a=e.reader.G(),e.reader.M(4)):(e.reader.M(8),e.reader.M(8),this.a=e.reader.G(),e.reader.M(8)),e.reader.M(4)}.bind(this)).H("minf",On).H("stbl",On).fa("stsd",Dn).H("wvtt",(function(){t=!0})).parse(e),!this.a)throw new me(2,2,2008);if(!t)throw new me(2,2,2008)},uc.prototype.parseInit=uc.prototype.parseInit,uc.prototype.parseMedia=function(e,t){var r=this;if(!this.a)throw new me(2,2,2008);var n,i=0,o=[],a=[],s=!1,l=!1,u=!1,c=null;if((new Pn).H("moof",On).H("traf",On).fa("tfdt",(function(e){s=!0,i=0==e.version?e.reader.G():e.reader.Bb()})).fa("tfhd",(function(e){var t=e.flags;(e=e.reader).M(4),1&t&&e.M(8),2&t&&e.M(4),c=8&t?e.G():null})).fa("trun",(function(e){l=!0;var t=e.version,r=e.flags,n=(e=e.reader).G();1&r&&e.M(4),4&r&&e.M(4);for(var i=[],a=0;a<n;a++){var s={duration:null,sampleSize:null,Ad:null};256&r&&(s.duration=e.G()),512&r&&(s.sampleSize=e.G()),1024&r&&e.M(4),2048&r&&(s.Ad=0==t?e.G():e.ke()),i.push(s)}o=i})).H("mdat",Mn((function(e){u=!0,n=e}))).parse(e),!u&&!s&&!l)throw new me(2,2,2008);var d=i,f=new jn(new DataView(n.buffer,n.byteOffset,n.byteLength),0);return o.forEach((function(e){var n=e.duration||c,o=e.Ad?i+e.Ad:d;d=o+(n||0);var s=0;do{var l=f.G();s+=l;var u=null;"vttc"==Un(f.G())?8<l&&(u=f.Za(l-8)):f.M(l-8),n&&u&&a.push(cc(u,t.periodStart+o/r.a,t.periodStart+d/r.a))}while(e.sampleSize&&s<e.sampleSize)})),a.filter(Gt.Ia)},uc.prototype.parseMedia=uc.prototype.parseMedia,hr['application/mp4; codecs="wvtt"']=uc,G("shaka.util.Dom.createHTMLElement",(function(e){return document.createElement(e)})),G("shaka.util.Dom.createVideoElement",(function(){var e=document.createElement("video");return e.muted=!0,e.width=600,e.height=400,e})),G("shaka.util.Dom.asHTMLElement",(function(e){return e})),G("shaka.util.Dom.asHTMLMediaElement",(function(e){return e})),G("shaka.util.Dom.removeAllChildren",(function(e){for(;e.firstChild;)e.removeChild(e.firstChild)})),G("EmeEncryptionSchemePolyfill",dc),dc.install=fc,G("McEncryptionSchemePolyfill",gc),gc.install=yc,_c.prototype.getConfiguration=function(){var e=this.b.getConfiguration();if(e.videoCapabilities)for(var t=f(e.videoCapabilities),r=t.next();!r.done;r=t.next())r.value.encryptionScheme=this.a;if(e.audioCapabilities)for(r=(t=f(e.audioCapabilities)).next();!r.done;r=t.next())r.value.encryptionScheme=this.a;return e},_c.prototype.createMediaKeys=function(){return this.b.createMediaKeys()},G("EncryptionSchemePolyfills",Tc),Tc.install=Sc,r.Ne&&(r.Ne=Tc)}.call(i,n,n),i.shaka)t[o]=i.shaka[o]}()}).call(this,r(/*! ./../../webpack/buildin/global.js */"./node_modules/webpack/buildin/global.js"),r(/*! ./../../webpack/buildin/module.js */"./node_modules/webpack/buildin/module.js")(e))},"./node_modules/webpack/buildin/global.js": -/*!***********************************!*\ - !*** (webpack)/buildin/global.js ***! - \***********************************/ -/*! no static exports found */function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},"./node_modules/webpack/buildin/module.js": -/*!***********************************!*\ - !*** (webpack)/buildin/module.js ***! - \***********************************/ -/*! no static exports found */function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"./src/clappr-dash-shaka-playback.js": -/*!*******************************************!*\ - !*** ./src/clappr-dash-shaka-playback.js ***! - \*******************************************/ -/*! 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<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=r(/*! clappr */"clappr"),s=r(/*! shaka-player */"./node_modules/shaka-player/dist/shaka-player.compiled.js"),l=(n=s)&&n.__esModule?n:{default:n};function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){function t(){var e;u(this,t);for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];var o=c(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(n)));return o._levels=[],o._pendingAdaptationEvent=!1,o._isShakaReadyState=!1,o._minDvrSize=void 0===o.options.shakaMinimumDvrSize?60:o.options.shakaMinimumDvrSize,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"getDuration",value:function(){return this._duration}},{key:"getCurrentTime",value:function(){return this.shakaPlayerInstance.getMediaElement().currentTime-this.seekRange.start}},{key:"name",get:function(){return"dash_shaka_playback"}},{key:"shakaVersion",get:function(){return l.default.player.Player.version}},{key:"shakaPlayerInstance",get:function(){return this._player}},{key:"levels",get:function(){return this._levels}},{key:"seekRange",get:function(){return this.shakaPlayerInstance.seekRange()}},{key:"currentLevel",set:function(e){var t=this;this._currentLevelId=e;var r=-1===this._currentLevelId;this.trigger(a.Events.PLAYBACK_LEVEL_SWITCH_START),r?(this._player.configure({abr:{enabled:!0}}),this.trigger(a.Events.PLAYBACK_LEVEL_SWITCH_END)):(this._player.configure({abr:{enabled:!1}}),this._pendingAdaptationEvent=!0,this.selectTrack(this.videoTracks.filter((function(e){return e.id===t._currentLevelId}))[0]))},get:function(){return this._currentLevelId||-1}},{key:"dvrEnabled",get:function(){return this._duration>=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(e<this._duration-3),e+=this._startTime,i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seek",this).call(this,e)}},{key:"pause",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"pause",this).call(this),this.dvrEnabled&&this._updateDvr(!0)}},{key:"play",value:function(){this._player||this._setup(),this.isReady?(this._stopped=!1,this._src=this.el.src,i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"play",this).call(this),this._startTimeUpdateTimer()):this.once(t.Events.SHAKA_READY,this.play)}},{key:"_startTimeUpdateTimer",value:function(){var e=this;this._stopTimeUpdateTimer(),this._timeUpdateTimer=setInterval((function(){e._onTimeUpdate()}),100)}},{key:"_stopTimeUpdateTimer",value:function(){this._timeUpdateTimer&&clearInterval(this._timeUpdateTimer)}},{key:"_setupSrc",value:function(){}},{key:"_ready",value:function(){}},{key:"_onShakaReady",value:function(){this._isShakaReadyState=!0,this.trigger(t.Events.SHAKA_READY),this.trigger(a.Events.PLAYBACK_READY,this.name)}},{key:"error",value:function(e){a.Log.error("an error was raised by the video tag",e,this.el.error)}},{key:"isHighDefinitionInUse",value:function(){return!1}},{key:"stop",value:function(){var e=this;this._stopTimeUpdateTimer(),clearInterval(this.sendStatsId),this._stopped=!0,this._player?(this._sendStats(),this._player.unload().then((function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"stop",e).call(e),e._player=null,e._isShakaReadyState=!1})).catch((function(){a.Log.error("shaka could not be unloaded")}))):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"stop",this).call(this)}},{key:"getPlaybackType",value:function(){return(this.isReady&&this._player.isLive()?"live":"vod")||""}},{key:"selectAudioLanguage",value:function(e){var t=arguments.length>1&&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: -/*!******************************************************************************************!*\ - !*** 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("<script>document.F=Object<\/script>"),e.close(),l=e.F;n--;)delete l.prototype[o[n]];return l()};e.exports=Object.create||function(e,t){var r;return null!==e?(s.prototype=n(e),r=new s,s.prototype=null,r[a]=e):r=l(),void 0===t?r:i(r,t)}},function(e,t,r){var n=r(34),i=r(23);e.exports=Object.keys||function(e){return n(e,i)}},function(e,t,r){var n=r(22)("keys"),i=r(14);e.exports=function(e){return n[e]||(n[e]=i(e))}},function(e,t,r){var n=r(1),i=r(0),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:r(13)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){var n=r(2).f,i=r(4),o=r(8)("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},function(e,t,r){t.f=r(8)},function(e,t,r){var n=r(0),i=r(1),o=r(13),a=r(25),s=r(2).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,r){var n=r(48);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,r){e.exports=!r(3)&&!r(11)((function(){return 7!=Object.defineProperty(r(30)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(6),i=r(0).document,o=n(i)&&n(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,r){"use strict";t.__esModule=!0;var n=a(r(50)),i=a(r(66)),o="function"==typeof i.default&&"symbol"==typeof n.default?function(e){return typeof e}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};function a(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof i.default&&"symbol"===o(n.default)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":o(e)}},function(e,t,r){"use strict";var n=r(13),i=r(9),o=r(33),a=r(5),s=r(18),l=r(54),u=r(24),c=r(61),d=r(8)("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,r,p,m,g,y){l(r,t,p);var v,b,_,A=function(e){if(!f&&e in w)return w[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},E=t+" Iterator",T="values"==m,S=!1,w=e.prototype,k=w[d]||w["@@iterator"]||m&&w[m],x=k||A(m),C=m?T?A("entries"):x:void 0,R="Array"==t&&w.entries||k;if(R&&(_=c(R.call(new e)))!==Object.prototype&&_.next&&(u(_,E,!0),n||"function"==typeof _[d]||a(_,d,h)),T&&k&&"values"!==k.name&&(S=!0,x=function(){return k.call(this)}),n&&!y||!f&&!S&&w[d]||a(w,d,x),s[t]=x,s[E]=h,m)if(v={values:T?x:A("values"),keys:g?x:A("keys"),entries:C},y)for(b in v)b in w||o(w,b,v[b]);else i(i.P+i.F*(f||S),t,v);return v}},function(e,t,r){e.exports=r(5)},function(e,t,r){var n=r(4),i=r(7),o=r(57)(!1),a=r(21)("IE_PROTO");e.exports=function(e,t){var r,s=i(e),l=0,u=[];for(r in s)r!=a&&n(s,r)&&u.push(r);for(;t.length>l;)n(s,r=t[l++])&&(~o(u,r)||u.push(r));return u}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t,r){var n=r(17);e.exports=function(e){return Object(n(e))}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,r){var n=r(34),i=r(23).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},function(e,t,r){var n=r(27),i=r(12),o=r(7),a=r(15),s=r(4),l=r(29),u=Object.getOwnPropertyDescriptor;t.f=r(3)?u:function(e,t){if(e=o(e),t=a(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return i(!n.f.call(e,t),e[t])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(41),o=(n=i)&&n.__esModule?n:{default:n};t.default=o.default,e.exports=t.default},function(e,t,r){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0});var i=d(r(43)),o=d(r(44)),a=d(r(49)),s=d(r(76)),l=r(84),u=d(r(85)),c=d(r(86));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(){return(0,i.default)(this,t),(0,a.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t.prototype.bindEvents=function(){this.listenTo(this.core,l.Events.CORE_READY,this.bindPlaybackEvents),l.Events.CORE_ACTIVE_CONTAINER_CHANGED?this.listenTo(this.core,l.Events.CORE_ACTIVE_CONTAINER_CHANGED,this.reload):this.listenTo(this.core.mediaControl,l.Events.MEDIACONTROL_CONTAINERCHANGED,this.reload),this.listenTo(this.core.mediaControl,l.Events.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.core.mediaControl,l.Events.MEDIACONTROL_HIDE,this.hideSelectLevelMenu)},t.prototype.bindPlaybackEvents=function(){this.playback&&(this.listenTo(this.playback,l.Events.PLAYBACK_LEVELS_AVAILABLE,this.fillLevels),this.listenTo(this.playback,l.Events.PLAYBACK_LEVEL_SWITCH_START,this.startLevelSwitch),this.listenTo(this.playback,l.Events.PLAYBACK_LEVEL_SWITCH_END,this.stopLevelSwitch),this.listenTo(this.playback,l.Events.PLAYBACK_BITRATE,this.updateCurrentLevel),this.playback.levels&&this.playback.levels.length>0&&this.fillLevels(this.playback.levels))},t.prototype.reload=function(){var e=this;this.stopListening(),n.nextTick((function(){e.bindEvents(),e.bindPlaybackEvents()}))},t.prototype.shouldRender=function(){if(!this.container||!this.playback)return!1;var e=void 0!==this.playback.currentLevel,t=!!(this.levels&&this.levels.length>1);return e&&t},t.prototype.render=function(){if(this.shouldRender()){var e=l.Styler.getStyleFor(c.default,{baseUrl:this.core.options.baseUrl});this.$el.html(this.template({levels:this.levels,title:this.getTitle()})),this.$el.append(e),this.core.mediaControl.$(".media-control-right-panel").append(this.el),this.$(".level_selector ul").css("max-height",.8*this.core.el.offsetHeight),this.highlightCurrentLevel()}return this},t.prototype.fillLevels=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;void 0===this.selectedLevelId&&(this.selectedLevelId=t);var r=this.core.options&&this.core.options.levelSelectorConfig&&this.core.options.levelSelectorConfig.onLevelsAvailable;if(r){if("function"!=typeof r)throw new TypeError("onLevelsAvailable must be a function");e=r(e.slice())}this.levels=e,this.configureLevelsLabels(),this.render()},t.prototype.configureLevelsLabels=function(){if(void 0!==this.core.options.levelSelectorConfig){var e=this.core.options.levelSelectorConfig.labelCallback;if(e&&"function"!=typeof e)throw new TypeError("labelCallback must be a function");var t=this.core.options.levelSelectorConfig.labels,r=t?this.core.options.levelSelectorConfig.labels:{};if(e||t){var n=void 0,i=void 0;for(var o in this.levels)i=r[(n=this.levels[o]).id],e?n.label=e(n,i):i&&(n.label=i)}}},t.prototype.findLevelBy=function(e){var t=void 0;return this.levels.forEach((function(r){r.id===e&&(t=r)})),t},t.prototype.onLevelSelect=function(e){return this.selectedLevelId=parseInt(e.target.dataset.levelSelectorSelect,10),this.playback.currentLevel==this.selectedLevelId||(this.playback.currentLevel=this.selectedLevelId,this.toggleContextMenu(),e.stopPropagation()),!1},t.prototype.onShowLevelSelectMenu=function(){this.toggleContextMenu()},t.prototype.hideSelectLevelMenu=function(){this.$(".level_selector ul").hide()},t.prototype.toggleContextMenu=function(){this.$(".level_selector ul").toggle()},t.prototype.buttonElement=function(){return this.$(".level_selector button")},t.prototype.levelElement=function(e){return this.$(".level_selector ul a"+(isNaN(e)?"":'[data-level-selector-select="'+e+'"]')).parent()},t.prototype.getTitle=function(){return(this.core.options.levelSelectorConfig||{}).title},t.prototype.startLevelSwitch=function(){this.buttonElement().addClass("changing")},t.prototype.stopLevelSwitch=function(){this.buttonElement().removeClass("changing")},t.prototype.updateText=function(e){-1===e?this.buttonElement().text(this.currentLevel?"AUTO ("+this.currentLevel.label+")":"AUTO"):this.buttonElement().text(this.findLevelBy(e).label)},t.prototype.updateCurrentLevel=function(e){var t=this.findLevelBy(e.level);this.currentLevel=t||null,this.highlightCurrentLevel()},t.prototype.highlightCurrentLevel=function(){var e=this;this.levelElement().removeClass("current"),this.currentLevel&&this.levelElement(this.currentLevel.id).addClass("current"),this.updateText(this.selectedLevelId);var t=this.currentLevel&&this.currentLevel.language;t&&(this.levelElement().removeClass("hidden"),this.levels.forEach((function(r){r.language!=t&&e.levelElement(r.id).addClass("hidden")})))},(0,o.default)(t,[{key:"name",get:function(){return"level_selector"}},{key:"template",get:function(){return(0,l.template)(u.default)}},{key:"attributes",get:function(){return{class:this.name,"data-level-selector":""}}},{key:"events",get:function(){return{"click [data-level-selector-select]":"onLevelSelect","click [data-level-selector-button]":"onShowLevelSelectMenu"}}},{key:"container",get:function(){return this.core.activeContainer?this.core.activeContainer:this.core.mediaControl.container}},{key:"playback",get:function(){return this.core.activePlayback?this.core.activePlayback:this.core.getCurrentPlayback()}}],[{key:"version",get:function(){return VERSION}}]),t}(l.UICorePlugin);t.default=f,e.exports=t.default}).call(t,r(42))},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l,u=[],c=!1,d=-1;function f(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&h())}function h(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new p(e,t)),1!==u.length||c||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,r){"use strict";t.__esModule=!0;var n,i=r(45),o=(n=i)&&n.__esModule?n:{default:n};t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,o.default)(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()},function(e,t,r){e.exports={default:r(46),__esModule:!0}},function(e,t,r){r(47);var n=r(1).Object;e.exports=function(e,t,r){return n.defineProperty(e,t,r)}},function(e,t,r){var n=r(9);n(n.S+n.F*!r(3),"Object",{defineProperty:r(2).f})},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,r){"use strict";t.__esModule=!0;var n,i=r(31),o=(n=i)&&n.__esModule?n:{default:n};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,o.default)(t))&&"function"!=typeof t?e:t}},function(e,t,r){e.exports={default:r(51),__esModule:!0}},function(e,t,r){r(52),r(62),e.exports=r(25).f("iterator")},function(e,t,r){"use strict";var n=r(53)(!0);r(32)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})}))},function(e,t,r){var n=r(16),i=r(17);e.exports=function(e){return function(t,r){var o,a,s=String(i(t)),l=n(r),u=s.length;return l<0||l>=u?e?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):o:e?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}}},function(e,t,r){"use strict";var n=r(19),i=r(12),o=r(24),a={};r(5)(a,r(8)("iterator"),(function(){return this})),e.exports=function(e,t,r){e.prototype=n(a,{next:i(1,r)}),o(e,t+" Iterator")}},function(e,t,r){var n=r(2),i=r(10),o=r(20);e.exports=r(3)?Object.defineProperties:function(e,t){i(e);for(var r,a=o(t),s=a.length,l=0;s>l;)n.f(e,r=a[l++],t[r]);return e}},function(e,t,r){var n=r(35);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,r){var n=r(7),i=r(58),o=r(59);e.exports=function(e){return function(t,r,a){var s,l=n(t),u=i(l.length),c=o(a,u);if(e&&r!=r){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===r)return e||c||0;return!e&&-1}}},function(e,t,r){var n=r(16),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t,r){var n=r(16),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=n(e))<0?i(e+t,0):o(e,t)}},function(e,t,r){var n=r(0).document;e.exports=n&&n.documentElement},function(e,t,r){var n=r(4),i=r(36),o=r(21)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),n(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,r){r(63);for(var n=r(0),i=r(5),o=r(18),a=r(8)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<s.length;l++){var u=s[l],c=n[u],d=c&&c.prototype;d&&!d[a]&&i(d,a,u),o[u]=o.Array}},function(e,t,r){"use strict";var n=r(64),i=r(65),o=r(18),a=r(7);e.exports=r(32)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])}),"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){e.exports={default:r(67),__esModule:!0}},function(e,t,r){r(68),r(73),r(74),r(75),e.exports=r(1).Symbol},function(e,t,r){"use strict";var n=r(0),i=r(4),o=r(3),a=r(9),s=r(33),l=r(69).KEY,u=r(11),c=r(22),d=r(24),f=r(14),h=r(8),p=r(25),m=r(26),g=r(70),y=r(71),v=r(10),b=r(6),_=r(36),A=r(7),E=r(15),T=r(12),S=r(19),w=r(72),k=r(39),x=r(37),C=r(2),R=r(20),j=k.f,L=C.f,I=w.f,P=n.Symbol,O=n.JSON,D=O&&O.stringify,M=h("_hidden"),N=h("toPrimitive"),U={}.propertyIsEnumerable,F=c("symbol-registry"),B=c("symbols"),K=c("op-symbols"),G=Object.prototype,V="function"==typeof P&&!!x.f,H=n.QObject,Y=!H||!H.prototype||!H.prototype.findChild,z=o&&u((function(){return 7!=S(L({},"a",{get:function(){return L(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=j(G,t);n&&delete G[t],L(e,t,r),n&&e!==G&&L(G,t,n)}:L,W=function(e){var t=B[e]=S(P.prototype);return t._k=e,t},$=V&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},q=function(e,t,r){return e===G&&q(K,t,r),v(e),t=E(t,!0),v(r),i(B,t)?(r.enumerable?(i(e,M)&&e[M][t]&&(e[M][t]=!1),r=S(r,{enumerable:T(0,!1)})):(i(e,M)||L(e,M,T(1,{})),e[M][t]=!0),z(e,t,r)):L(e,t,r)},X=function(e,t){v(e);for(var r,n=g(t=A(t)),i=0,o=n.length;o>i;)q(e,r=n[i++],t[r]);return e},J=function(e){var t=U.call(this,e=E(e,!0));return!(this===G&&i(B,e)&&!i(K,e))&&(!(t||!i(this,e)||!i(B,e)||i(this,M)&&this[M][e])||t)},Z=function(e,t){if(e=A(e),t=E(t,!0),e!==G||!i(B,t)||i(K,t)){var r=j(e,t);return!r||!i(B,t)||i(e,M)&&e[M][t]||(r.enumerable=!0),r}},Q=function(e){for(var t,r=I(A(e)),n=[],o=0;r.length>o;)i(B,t=r[o++])||t==M||t==l||n.push(t);return n},ee=function(e){for(var t,r=e===G,n=I(r?K:A(e)),o=[],a=0;n.length>a;)!i(B,t=n[a++])||r&&!i(G,t)||o.push(B[t]);return o};V||(s((P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(r){this===G&&t.call(K,r),i(this,M)&&i(this[M],e)&&(this[M][e]=!1),z(this,e,T(1,r))};return o&&Y&&z(G,e,{configurable:!0,set:t}),W(e)}).prototype,"toString",(function(){return this._k})),k.f=Z,C.f=q,r(38).f=w.f=Q,r(27).f=J,x.f=ee,o&&!r(13)&&s(G,"propertyIsEnumerable",J,!0),p.f=function(e){return W(h(e))}),a(a.G+a.W+a.F*!V,{Symbol:P});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),re=0;te.length>re;)h(te[re++]);for(var ne=R(h.store),ie=0;ne.length>ie;)m(ne[ie++]);a(a.S+a.F*!V,"Symbol",{for:function(e){return i(F,e+="")?F[e]:F[e]=P(e)},keyFor:function(e){if(!$(e))throw TypeError(e+" is not a symbol!");for(var t in F)if(F[t]===e)return t},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),a(a.S+a.F*!V,"Object",{create:function(e,t){return void 0===t?S(e):X(S(e),t)},defineProperty:q,defineProperties:X,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:ee});var oe=u((function(){x.f(1)}));a(a.S+a.F*oe,"Object",{getOwnPropertySymbols:function(e){return x.f(_(e))}}),O&&a(a.S+a.F*(!V||u((function(){var e=P();return"[null]"!=D([e])||"{}"!=D({a:e})||"{}"!=D(Object(e))}))),"JSON",{stringify:function(e){for(var t,r,n=[e],i=1;arguments.length>i;)n.push(arguments[i++]);if(r=t=n[1],(b(t)||void 0!==e)&&!$(e))return y(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!$(t))return t}),n[1]=t,D.apply(O,n)}}),P.prototype[N]||r(5)(P.prototype,N,P.prototype.valueOf),d(P,"Symbol"),d(Math,"Math",!0),d(n.JSON,"JSON",!0)},function(e,t,r){var n=r(14)("meta"),i=r(6),o=r(4),a=r(2).f,s=0,l=Object.isExtensible||function(){return!0},u=!r(11)((function(){return l(Object.preventExtensions({}))})),c=function(e){a(e,n,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:n,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,n)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[n].i},getWeak:function(e,t){if(!o(e,n)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[n].w},onFreeze:function(e){return u&&d.NEED&&l(e)&&!o(e,n)&&c(e),e}}},function(e,t,r){var n=r(20),i=r(37),o=r(27);e.exports=function(e){var t=n(e),r=i.f;if(r)for(var a,s=r(e),l=o.f,u=0;s.length>u;)l.call(e,a=s[u++])&&t.push(a);return t}},function(e,t,r){var n=r(35);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,r){var n=r(7),i=r(38).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(n(e))}},function(e,t){},function(e,t,r){r(26)("asyncIterator")},function(e,t,r){r(26)("observable")},function(e,t,r){"use strict";t.__esModule=!0;var n=a(r(77)),i=a(r(81)),o=a(r(31));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,o.default)(t)));e.prototype=(0,i.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(n.default?(0,n.default)(e,t):e.__proto__=t)}},function(e,t,r){e.exports={default:r(78),__esModule:!0}},function(e,t,r){r(79),e.exports=r(1).Object.setPrototypeOf},function(e,t,r){var n=r(9);n(n.S,"Object",{setPrototypeOf:r(80).set})},function(e,t,r){var n=r(6),i=r(10),o=function(e,t){if(i(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=r(28)(Function.call,r(39).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,r){return o(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:o}},function(e,t,r){e.exports={default:r(82),__esModule:!0}},function(e,t,r){r(83);var n=r(1).Object;e.exports=function(e,t){return n.create(e,t)}},function(e,t,r){var n=r(9);n(n.S,"Object",{create:r(19)})},function(t,r){t.exports=e},function(e,t){e.exports='<button data-level-selector-button>\n Auto\n</button>\n<ul>\n <% if (title) { %>\n <li data-title><%= title %></li>\n <% }; %>\n <li><a href="#" data-level-selector-select="-1">AUTO</a></li>\n <% for (var i = 0; i < levels.length; i++) { %>\n <li><a href="#" data-level-selector-select="<%= levels[i].id %>"><%= levels[i].label %></a></li>\n <% }; %>\n</ul>\n'},function(e,t,r){var n=r(87);"string"==typeof n&&(n=[[e.i,n,""]]),r(89)(n,{singleton:!0}),n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(88)(!1)).push([e.i,'.level_selector[data-level-selector] {\n float: right;\n position: relative;\n height: 100%; }\n .level_selector[data-level-selector] button {\n background-color: transparent;\n color: #fff;\n font-family: Roboto,"Open Sans",Arial,sans-serif;\n -webkit-font-smoothing: antialiased;\n border: none;\n font-size: 12px;\n height: 100%; }\n .level_selector[data-level-selector] button:hover {\n color: #c9c9c9; }\n .level_selector[data-level-selector] button.changing {\n -webkit-animation: pulse 0.5s infinite alternate; }\n .level_selector[data-level-selector] > ul {\n overflow-x: hidden;\n overflow-y: auto;\n list-style-type: none;\n position: absolute;\n bottom: 100%;\n display: none;\n background-color: rgba(28, 28, 28, 0.9);\n white-space: nowrap; }\n .level_selector[data-level-selector] li {\n font-size: 12px;\n color: #eee; }\n .level_selector[data-level-selector] li[data-title] {\n background-color: #333;\n padding: 8px 25px; }\n .level_selector[data-level-selector] li a {\n color: #eee;\n padding: 5px 18px;\n display: block;\n text-decoration: none; }\n .level_selector[data-level-selector] li a:hover {\n background-color: rgba(255, 255, 255, 0.1);\n color: #fff; }\n .level_selector[data-level-selector] li a:hover a {\n color: #fff;\n text-decoration: none; }\n .level_selector[data-level-selector] li.current a {\n color: #2ecc71; }\n .level_selector[data-level-selector] li.hidden {\n display: none; }\n',""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r,n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var o=(r=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),a=i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}));return[n].concat(a).concat([o]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r})).join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(n[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&n[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),t.push(a))}},t}},function(e,t){var r={},n=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}},i=n((function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())})),o=n((function(){return document.head||document.getElementsByTagName("head")[0]})),a=null,s=0;function l(e,t){for(var n=0;n<e.length;n++){var i=e[n],o=r[i.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](i.parts[a]);for(;a<i.parts.length;a++)o.parts.push(d(i.parts[a],t))}else{var s=[];for(a=0;a<i.parts.length;a++)s.push(d(i.parts[a],t));r[i.id]={id:i.id,refs:1,parts:s}}}}function u(e){for(var t=[],r={},n=0;n<e.length;n++){var i=e[n],o=i[0],a={css:i[1],media:i[2],sourceMap:i[3]};r[o]?r[o].parts.push(a):t.push(r[o]={id:o,parts:[a]})}return t}function c(){var e=document.createElement("style"),t=o();return e.type="text/css",t.appendChild(e),e}function d(e,t){var r,n,i,l,u;if(t.singleton){var d=s++;r=a||(a=c()),n=p.bind(null,r,d,!1),i=p.bind(null,r,d,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(l=document.createElement("link"),u=o(),l.rel="stylesheet",u.appendChild(l),r=l,n=g.bind(null,r),i=function(){r.parentNode.removeChild(r),r.href&&URL.revokeObjectURL(r.href)}):(r=c(),n=m.bind(null,r),i=function(){r.parentNode.removeChild(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");void 0===(t=t||{}).singleton&&(t.singleton=i());var n=u(e);return l(n,t),function(e){for(var i=[],o=0;o<n.length;o++){var a=n[o];(s=r[a.id]).refs--,i.push(s)}for(e&&l(u(e),t),o=0;o<i.length;o++){var s;if(0===(s=i[o]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete r[s.id]}}}};var f,h=(f=[],function(e,t){return f[e]=t,f.filter(Boolean).join("\n")});function p(e,t,r,n){var i=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=h(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function m(e,t){var r=t.css,n=t.media;if(t.sourceMap,n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}function g(e,t){var r=t.css,n=(t.media,t.sourceMap);n&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var i=new Blob([r],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(i),o&&URL.revokeObjectURL(o)}}])},e.exports=n(r(0))},function(module,exports,__webpack_require__){var factory;window,factory=function(__WEBPACK_EXTERNAL_MODULE_clappr__){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="./src/main.js")}({"./node_modules/css-loader/dist/runtime/api.js": -/*!*****************************************************!*\ - !*** ./node_modules/css-loader/dist/runtime/api.js ***! - \*****************************************************/ -/*! no static exports found */function(module,exports,__webpack_require__){"use strict";eval('/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/ // css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports=function(useSourceMap){var list=[];// return the list of modules as css string\nlist.toString=function toString(){return this.map(function(item){var content=cssWithMappingToString(item,useSourceMap);if(item[2]){return"@media ".concat(item[2]," {").concat(content,"}");}return content;}).join(\'\');};// import a list of modules into the list\n// eslint-disable-next-line func-names\nlist.i=function(modules,mediaQuery,dedupe){if(typeof modules===\'string\'){// eslint-disable-next-line no-param-reassign\nmodules=[[null,modules,\'\']];}var alreadyImportedModules={};if(dedupe){for(var i=0;i<this.length;i++){// eslint-disable-next-line prefer-destructuring\nvar id=this[i][0];if(id!=null){alreadyImportedModules[id]=true;}}}for(var _i=0;_i<modules.length;_i++){var item=[].concat(modules[_i]);if(dedupe&&alreadyImportedModules[item[0]]){// eslint-disable-next-line no-continue\ncontinue;}if(mediaQuery){if(!item[2]){item[2]=mediaQuery;}else{item[2]="".concat(mediaQuery," and ").concat(item[2]);}}list.push(item);}};return list;};function cssWithMappingToString(item,useSourceMap){var content=item[1]||\'\';// eslint-disable-next-line prefer-destructuring\nvar cssMapping=item[3];if(!cssMapping){return content;}if(useSourceMap&&typeof btoa===\'function\'){var sourceMapping=toComment(cssMapping);var sourceURLs=cssMapping.sources.map(function(source){return"/*# sourceURL=".concat(cssMapping.sourceRoot||\'\').concat(source," */");});return[content].concat(sourceURLs).concat([sourceMapping]).join(\'\\n\');}return[content].join(\'\\n\');}// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap){// eslint-disable-next-line no-undef\nvar base64=btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));var data="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);return"/*# ".concat(data," */");}\n\n//# sourceURL=webpack://AudioTrackSelector/./node_modules/css-loader/dist/runtime/api.js?')},"./src/main.js": -/*!*********************!*\ - !*** ./src/main.js ***! - \*********************/ -/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return AudioTrackSelector; });\n/* harmony import */ var clappr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! clappr */ \"clappr\");\n/* harmony import */ var clappr__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(clappr__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _public_audio_track_selector_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./public/audio-track-selector.html */ \"./src/public/audio-track-selector.html\");\n/* harmony import */ var _public_audio_track_selector_html__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_public_audio_track_selector_html__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _public_style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./public/style.scss */ \"./src/public/style.scss\");\n/* harmony import */ var _public_style_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_public_style_scss__WEBPACK_IMPORTED_MODULE_2__);\nclass AudioTrackSelector extends clappr__WEBPACK_IMPORTED_MODULE_0__[\"UICorePlugin\"]{static get version(){return VERSION;}get name(){return'audio_track_selector';}get template(){return Object(clappr__WEBPACK_IMPORTED_MODULE_0__[\"template\"])(_public_audio_track_selector_html__WEBPACK_IMPORTED_MODULE_1___default.a);}get attributes(){return{'class':this.name,'data-audio-track-selector':''};}get events(){return{'click [data-audio-track-selector-lang]':'handleLanguageSelect','click [data-audio-track-selector-button]':'handleAudioTrackSelectorClick'};}get container(){return this.core.activeContainer?this.core.activeContainer:this.core.mediaControl.container;}get playback(){return this.core.activePlayback?this.core.activePlayback:this.core.getCurrentPlayback();}bindEvents(){if(clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].CORE_ACTIVE_CONTAINER_CHANGED)this.listenTo(this.core,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].CORE_ACTIVE_CONTAINER_CHANGED,this.reload);else this.listenTo(this.core.mediaControl,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].MEDIACONTROL_CONTAINERCHANGED,this.reload);this.listenTo(this.core,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].CORE_READY,this.bindPlaybackEvents);this.listenTo(this.core.mediaControl,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].MEDIACONTROL_RENDERED,this.render);this.listenTo(this.core.mediaControl,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].MEDIACONTROL_HIDE,this._hideContextMenu);}bindPlaybackEvents(){this.listenTo(this.playback,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].PLAYBACK_LEVELS_AVAILABLE,this._handleLevels);this.listenTo(this.playback,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].PLAYBACK_BITRATE,this._handleAdaptation);this.listenTo(this.playback,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].PLAYBACK_PLAY,this._handlePlay);}reload(){this.stopListening();this.bindEvents();this.bindPlaybackEvents();}shouldRender(){if(!this.container)return false;if(!this.playback)return false;// Only care if we have at least 2 languages to choose from\nvar hasChoice=!!(this.languages&&this.languages.size>1);return hasChoice;}render(){if(this.shouldRender()){var style=clappr__WEBPACK_IMPORTED_MODULE_0__[\"Styler\"].getStyleFor(_public_style_scss__WEBPACK_IMPORTED_MODULE_2___default.a,{baseUrl:this.core.options.baseUrl});this.$el.html(this.template({'title':this._getTitle(),'languages':this.languages}));this.$el.append(style);this.core.mediaControl.$('.media-control-right-panel').append(this.el);this._highlightCurrentElement();}return this;}_setLanguage(language){console.log(\"setLanguage\",language);// custom voc dash-shaka-playback\nif(this.playback.selectAudioLanguage){this.nextLanguage=language;this._startTrackSwitch();this.playback.selectAudioLanguage(language);// hlsjs playback\n}else if(this.playback._hls){// hlsjs may have multiple audiotracks with the same language\n// this will just switch to the first one\nconst track=this.playback._hls.audioTracks.find(track=>track.lang==language);if(!track)return;this.playback._hls.audioTrack=track.id;this.activeLanguage=language;this._highlightCurrentElement();}}_fillLanguages(){// custom voc dash-shaka-playback\nif(this.playback.audioLanguages){this.languages=new Set(this.playback.audioLanguages);// hlsjs playback\n}else if(this.playback._hls){const audioTracks=this.playback._hls.audioTracks;const trackId=this.playback._hls.audioTrack;const current=audioTracks.find(track=>track.id==trackId);this.languages=new Set(audioTracks.map(track=>track.lang));if(current){this.activeLanguage=current.lang;}}this.render();}handleLanguageSelect(event){event.preventDefault();event.stopPropagation();const selected=event.target.dataset.audioTrackSelectorLang;if(this.activeLanguage==selected)return false;this._setLanguage(selected);this._toggleContextMenu();return false;}// Handles adaptation event, currently only from shaka-playback\n_handleAdaptation(variant){if(variant.language){this.activeLanguage=variant.language;this._highlightCurrentElement();if(variant.language==this.nextLanguage){this._stopTrackSwitch();}}}// shaka-playback knows languages on level event\n_handleLevels(){this._fillLanguages();}// hlsjs-playback only knows languages on play\n_handlePlay(){if(this.playback._hls){this._fillLanguages();}}handleAudioTrackSelectorClick(event){this._toggleContextMenu();}_toggleContextMenu(){this.$('.audio_track_selector ul').toggle();}_hideContextMenu(){this.$('.audio_track_selector ul').hide();}_getLanguageElement(language=null){if(language)return this.$('.audio_track_selector a[data-audio-track-selector-lang=\"'+language+'\"]').parent();else return this.$('.audio_track_selector a').parent();}_getButtonElement(){return this.$('.audio_track_selector button');}_getTitle(){return(this.core.options.audioTrackSelectorConfig||{}).title;}_startTrackSwitch(){this._getButtonElement().addClass('changing');}_stopTrackSwitch(){this._getButtonElement().removeClass('changing');}_highlightCurrentElement(){if(!this.activeLanguage)return;this._getLanguageElement().removeClass('current');this._getLanguageElement(this.activeLanguage).addClass('current');this._getButtonElement().text(this.activeLanguage);}}\n\n//# sourceURL=webpack://AudioTrackSelector/./src/main.js?")},"./src/public/audio-track-selector.html": -/*!**********************************************!*\ - !*** ./src/public/audio-track-selector.html ***! - \**********************************************/ -/*! no static exports found */function(module,exports){eval('// Module\nvar code = "<button data-audio-track-selector-button>\\n Language\\n</button>\\n<ul>\\n <% if (title) { %>\\n <li data-title><%= title %></li>\\n <% }; %>\\n <% languages.forEach((language) => { %>\\n <li><a href=\\"#\\" data-audio-track-selector-lang=\\"<%= language %>\\"><%= language %></a></li>\\n <% }); %>\\n</ul>\\n";\n// Exports\nmodule.exports = code;\n\n//# sourceURL=webpack://AudioTrackSelector/./src/public/audio-track-selector.html?')},"./src/public/style.scss": -/*!*******************************!*\ - !*** ./src/public/style.scss ***! - \*******************************/ -/*! no static exports found */function(module,exports,__webpack_require__){eval('// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, ".audio_track_selector[data-audio-track-selector] {\\n float: right;\\n height: 100%;\\n position: relative; }\\n .audio_track_selector[data-audio-track-selector] button {\\n background-color: transparent;\\n color: #fff;\\n font-family: Roboto,\\"Open Sans\\",Arial,sans-serif;\\n -webkit-font-smoothing: antialiased;\\n border: none;\\n font-size: 12px;\\n height: 100%; }\\n .audio_track_selector[data-audio-track-selector] button:hover {\\n color: #c9c9c9; }\\n .audio_track_selector[data-audio-track-selector] button.changing {\\n -webkit-animation: pulse 0.5s infinite alternate; }\\n .audio_track_selector[data-audio-track-selector] > ul {\\n overflow-x: hidden;\\n overflow-y: auto;\\n list-style-type: none;\\n position: absolute;\\n bottom: 100%;\\n display: none;\\n background-color: rgba(28, 28, 28, 0.9);\\n white-space: nowrap; }\\n .audio_track_selector[data-audio-track-selector] li {\\n font-size: 12px;\\n color: #eee; }\\n .audio_track_selector[data-audio-track-selector] li[data-title] {\\n background-color: #333;\\n padding: 8px 25px; }\\n .audio_track_selector[data-audio-track-selector] li a {\\n color: #eee;\\n padding: 5px 18px;\\n display: block;\\n text-decoration: none; }\\n .audio_track_selector[data-audio-track-selector] li a:hover {\\n background-color: rgba(255, 255, 255, 0.1);\\n color: #fff; }\\n .audio_track_selector[data-audio-track-selector] li a:hover a {\\n color: #fff;\\n text-decoration: none; }\\n .audio_track_selector[data-audio-track-selector] li.current a {\\n color: #2ecc71; }\\n\\n@-webkit-keyframes pulse {\\n 0% {\\n color: #fff; }\\n 50% {\\n color: #ff0101; }\\n 100% {\\n color: #B80000; } }\\n", ""]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack://AudioTrackSelector/./src/public/style.scss?')},clappr: -/*!******************************************************************************************!*\ - !*** external {"amd":"clappr","commonjs":"clappr","commonjs2":"clappr","root":"Clappr"} ***! - \******************************************************************************************/ -/*! no static exports found */function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_clappr__;\n\n//# sourceURL=webpack://AudioTrackSelector/external_%7B%22amd%22:%22clappr%22,%22commonjs%22:%22clappr%22,%22commonjs2%22:%22clappr%22,%22root%22:%22Clappr%22%7D?")}}).default},module.exports=factory(__webpack_require__(0))},function(e,t,r){var n=r(5),i=r(6);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var o={insert:"head",singleton:!1},a=(n(i,o),i.locals?i.locals:{});e.exports=a},function(e,t,r){"use strict";var n,i=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},o=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),a=[];function s(e){for(var t=-1,r=0;r<a.length;r++)if(a[r].identifier===e){t=r;break}return t}function l(e,t){for(var r={},n=[],i=0;i<e.length;i++){var o=e[i],l=t.base?o[0]+t.base:o[0],u=r[l]||0,c="".concat(l," ").concat(u);r[l]=u+1;var d=s(c),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:c,updater:g(f,t),references:1}),n.push(c)}return n}function u(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var i=r.nc;i&&(n.nonce=i)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var c,d=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function f(e,t,r,n){var i=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=d(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function h(e,t,r){var n=r.css,i=r.media,o=r.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var p=null,m=0;function g(e,t){var r,n,i;if(t.singleton){var o=m++;r=p||(p=u(t)),n=f.bind(null,r,o,!1),i=f.bind(null,r,o,!0)}else r=u(t),n=h.bind(null,r,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var r=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<r.length;n++){var i=s(r[n]);a[i].references--}for(var o=l(e,t),u=0;u<r.length;u++){var c=s(r[u]);0===a[c].references&&(a[c].updater(),a.splice(c,1))}r=o}}}},function(e,t,r){(t=r(7)(!1)).push([e.i,"button.media-control-button[data-hd-indicator]{display:none !important}\n",""]),e.exports=t},function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var i=(a=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),o=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(o).concat([i]).join("\n")}var a,s,l;return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(n)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);n&&i[l[0]]||(r&&(l[2]?l[2]="".concat(r," and ").concat(l[2]):l[2]=r),t.push(l))}},t}},function(e,t,r){"use strict";var n=r(9),i=r(12);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=b(e));return e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),d=["%","/","?",";","#"].concat(c),f=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=r(13);function b(e,t,r){if(e&&i.isObject(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o<e.indexOf("#")?"?":"#",u=e.split(s);u[0]=u[0].replace(/\\/g,"/");var b=e=u.join(s);if(b=b.trim(),!r&&1===e.split("#").length){var _=l.exec(b);if(_)return this.path=b,this.href=b,this.pathname=_[1],_[2]?(this.search=_[2],this.query=t?v.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var A=a.exec(b);if(A){var E=(A=A[0]).toLowerCase();this.protocol=E,b=b.substr(A.length)}if(r||A||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var T="//"===b.substr(0,2);!T||A&&g[A]||(b=b.substr(2),this.slashes=!0)}if(!g[A]&&(T||A&&!y[A])){for(var S,w,k=-1,x=0;x<f.length;x++){-1!==(C=b.indexOf(f[x]))&&(-1===k||C<k)&&(k=C)}-1!==(w=-1===k?b.lastIndexOf("@"):b.lastIndexOf("@",k))&&(S=b.slice(0,w),b=b.slice(w+1),this.auth=decodeURIComponent(S)),k=-1;for(x=0;x<d.length;x++){var C;-1!==(C=b.indexOf(d[x]))&&(-1===k||C<k)&&(k=C)}-1===k&&(k=b.length),this.host=b.slice(0,k),b=b.slice(k),this.parseHost(),this.hostname=this.hostname||"";var R="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!R)for(var j=this.hostname.split(/\./),L=(x=0,j.length);x<L;x++){var I=j[x];if(I&&!I.match(h)){for(var P="",O=0,D=I.length;O<D;O++)I.charCodeAt(O)>127?P+="x":P+=I[O];if(!P.match(h)){var M=j.slice(0,x),N=j.slice(x+1),U=I.match(p);U&&(M.push(U[1]),N.unshift(U[2])),N.length&&(b="/"+N.join(".")+b),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=n.toASCII(this.hostname));var F=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+F,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[E])for(x=0,L=c.length;x<L;x++){var K=c[x];if(-1!==b.indexOf(K)){var G=encodeURIComponent(K);G===K&&(G=escape(K)),b=b.split(K).join(G)}}var V=b.indexOf("#");-1!==V&&(this.hash=b.substr(V),b=b.slice(0,V));var H=b.indexOf("?");if(-1!==H?(this.search=b.substr(H),this.query=b.substr(H+1),t&&(this.query=v.parse(this.query)),b=b.slice(0,H)):t&&(this.search="",this.query={}),b&&(this.pathname=b),y[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var Y=this.search||"";this.path=F+Y}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,a="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=v.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+n},o.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var r=new o,n=Object.keys(this),a=0;a<n.length;a++){var s=n[a];r[s]=this[s]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),u=0;u<l.length;u++){var c=l[u];"protocol"!==c&&(r[c]=e[c])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!y[e.protocol]){for(var d=Object.keys(e),f=0;f<d.length;f++){var h=d[f];r[h]=e[h]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var m=r.pathname||"",v=r.search||"";r.path=m+v}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),_=e.host||e.pathname&&"/"===e.pathname.charAt(0),A=_||b||r.host&&e.pathname,E=A,T=r.pathname&&r.pathname.split("/")||[],S=(p=e.pathname&&e.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(S&&(r.hostname="",r.port=null,r.host&&(""===T[0]?T[0]=r.host:T.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),A=A&&(""===p[0]||""===T[0])),_)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,T=p;else if(p.length)T||(T=[]),T.pop(),T=T.concat(p),r.search=e.search,r.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(S)r.hostname=r.host=T.shift(),(R=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=R.shift(),r.host=r.hostname=R.shift());return r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!T.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var w=T.slice(-1)[0],k=(r.host||e.host||T.length>1)&&("."===w||".."===w)||""===w,x=0,C=T.length;C>=0;C--)"."===(w=T[C])?T.splice(C,1):".."===w?(T.splice(C,1),x++):x&&(T.splice(C,1),x--);if(!A&&!E)for(;x--;x)T.unshift("..");!A||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),k&&"/"!==T.join("/").substr(-1)&&T.push("");var R,j=""===T[0]||T[0]&&"/"===T[0].charAt(0);S&&(r.hostname=r.host=j?"":T.length?T.shift():"",(R=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=R.shift(),r.host=r.hostname=R.shift()));return(A=A||r.host&&T.length)&&!j&&T.unshift(""),T.length?r.pathname=T.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){(function(e,n){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof n&&n;a.global!==a&&a.window!==a&&a.self;var s,l=2147483647,u=/^xn--/,c=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,p=String.fromCharCode;function m(e){throw new RangeError(f[e])}function g(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function y(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+g((e=e.replace(d,".")).split("."),t).join(".")}function v(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function b(e){return g(e,(function(e){var t="";return e>65535&&(t+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=p(e)})).join("")}function _(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function A(e,t,r){var n=0;for(e=r?h(e/700):e>>1,e+=h(e/t);e>455;n+=36)e=h(e/35);return h(n+36*e/(e+38))}function E(e){var t,r,n,i,o,a,s,u,c,d,f,p=[],g=e.length,y=0,v=128,_=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&m("not-basic"),p.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<g;){for(o=y,a=1,s=36;i>=g&&m("invalid-input"),((u=(f=e.charCodeAt(i++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||u>h((l-y)/a))&&m("overflow"),y+=u*a,!(u<(c=s<=_?1:s>=_+26?26:s-_));s+=36)a>h(l/(d=36-c))&&m("overflow"),a*=d;_=A(y-o,t=p.length+1,0==o),h(y/t)>l-v&&m("overflow"),v+=h(y/t),y%=t,p.splice(y++,0,v)}return b(p)}function T(e){var t,r,n,i,o,a,s,u,c,d,f,g,y,b,E,T=[];for(g=(e=v(e)).length,t=128,r=0,o=72,a=0;a<g;++a)(f=e[a])<128&&T.push(p(f));for(n=i=T.length,i&&T.push("-");n<g;){for(s=l,a=0;a<g;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>h((l-r)/(y=n+1))&&m("overflow"),r+=(s-t)*y,t=s,a=0;a<g;++a)if((f=e[a])<t&&++r>l&&m("overflow"),f==t){for(u=r,c=36;!(u<(d=c<=o?1:c>=o+26?26:c-o));c+=36)E=u-d,b=36-d,T.push(p(_(d+E%b,0))),u=h(E/b);T.push(p(_(u,0))),o=A(r,y,n==i),r=0,++n}++r,++t}return T.join("")}s={version:"1.4.1",ucs2:{decode:v,encode:b},decode:E,encode:T,toASCII:function(e){return y(e,(function(e){return c.test(e)?"xn--"+T(e):e}))},toUnicode:function(e){return y(e,(function(e){return u.test(e)?E(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return s}.call(t,r,t,e))||(e.exports=i)}()}).call(this,r(10)(e),r(11))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,r){"use strict";t.decode=t.parse=r(14),t.encode=t.stringify=r(15)},function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,o){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var u=e.length;l>0&&u>l&&(u=l);for(var c=0;c<u;++c){var d,f,h,p,m=e[c].replace(s,"%20"),g=m.indexOf(r);g>=0?(d=m.substr(0,g),f=m.substr(g+1)):(d=m,f=""),h=decodeURIComponent(d),p=decodeURIComponent(f),n(a,h)?i(a[h])?a[h].push(p):a[h]=[a[h],p]:a[h]=p}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?o(a(e),(function(a){var s=encodeURIComponent(n(a))+r;return i(e[a])?o(e[a],(function(e){return s+encodeURIComponent(n(e))})).join(t):s+encodeURIComponent(n(e[a]))})).join(t):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var a=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return k}));r(4),r(8);var n=r(0),i=r.n(n),o=r(1),a=r.n(o),s=r(2),l=r.n(s),u=r(3),c=r.n(u);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),e}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(n,e);var t,r=(t=n,function(){var e,r=v(t);if(y()){var n=v(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return g(this,e)});function n(){var e;f(this,n);for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return(e=r.call.apply(r,[this].concat(i))).timeout=1,e.max_timeout=10,e}return p(n,[{key:"name",get:function(){return"error_plugin"}},{key:"background",get:function(){return"data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22100%22%20height%3D%22100%22%20viewBox%3D%220%200%2026.458318%2026.458333%22%3E%3Cpath%20d%3D%22M13.23.302C6.07.302.264%206.107.264%2013.267a12.965%2012.965%200%200%200%20.847%204.595c.19-.497.408-.982.682-1.438.14-.232.294-.457.396-.707.103-.25.15-.533.072-.792a1.362%201.362%200%200%200-.22-.404c-.092-.123-.192-.24-.275-.37a1.662%201.662%200%200%201-.255-1.12%201.5%201.5%200%200%201%20.58-.987c.28-.208.635-.3.985-.288a1.757%201.757%200%200%201%20.346.048c.452.11.852.393%201.148.75.368.447.584%201.01.637%201.586a3.574%203.574%200%200%201-.275%201.693c-.4.955-1.15%201.725-1.565%202.673-.338.775-.435%201.638-.39%202.483.007.077.018.155.025.234a12.965%2012.965%200%200%200%203.62%203.18%2017.63%2017.63%200%200%201-.13-2.11c.002-.56.03-1.12.085-1.675-.34-.236-.65-.51-.87-.86-.392-.62-.466-1.408-.305-2.124.16-.717.54-1.37.997-1.945a7.833%207.833%200%200%201%202.835-2.223%2010.305%2010.305%200%200%201-.09-.126%204.854%204.854%200%200%201-.702-2.176c-.06-.777.064-1.554.115-2.33.037-.543.04-1.085.07-1.627.038-.627.114-1.255.29-1.858a2.36%202.36%200%200%201%20.266-.63%201.4%201.4%200%200%201%20.594-.514c.274-.108.51-.132.776-.087.22.046.425.156.604.294.18.138.335.304.48.477a7.298%207.298%200%200%201%201.04%201.617%203.57%203.57%200%200%201%201.09%200%207.287%207.287%200%200%201%201.04-1.616%203.21%203.21%200%200%201%20.48-.476c.18-.14.383-.248.604-.295a1.268%201.268%200%200%201%20.78.086%201.402%201.402%200%200%201%20.595.517c.124.19.202.408.266.626.175.602.252%201.23.29%201.856.03.543.033%201.087.07%201.628.05.777.175%201.554.116%202.33a4.855%204.855%200%200%201-.705%202.178c-.03.05-.07.096-.103.145.247.278.598.513.898.614a1.956%201.956%200%200%200%201.05.044%201.65%201.65%200%200%200%20.533-.226%201.253%201.253%200%200%200%20.397-.418c.118-.21.166-.45.192-.687.067-.61%200-1.224-.05-1.835-.034-.396-.062-.8.027-1.187.06-.26.177-.518.373-.7a1.106%201.106%200%200%201%20.465-.255%201.312%201.312%200%200%201%20.53-.03c.38.057.736.274.948.594.12.18.194.39.238.604.044.213.06.43.072.648.04.76.04%201.522.018%202.284-.018.665-.055%201.348-.32%201.957-.343.782-1.032%201.366-1.775%201.786a7.052%207.052%200%200%201-1.588.647c.482%201.54.733%203.24.733%204.968a17.6%2017.6%200%200%201-.135%202.125%2012.964%2012.964%200%200%200%206.384-11.152c0-7.16-5.806-12.965-12.965-12.965zM9.602%2016.284v1.483a1.88%201.88%200%200%201%201.083.362%201.738%201.738%200%200%201%20.556.68c.122.27.166.576.116.868a1.493%201.493%200%200%201-.332.708%201.647%201.647%200%200%201-.635.458%201.738%201.738%200%200%201-.787.122v3.73l7.762-4.208-7.762-4.204z%22%20fill%3D%22%23999%22%2F%3E%3C%2Fsvg%3E"}}]),p(n,[{key:"bindEvents",value:function(){this.listenTo(this.container,i.a.Events.CONTAINER_ERROR,this.onError)}},{key:"hide",value:function(){this._err&&this._err.remove()}},{key:"show",value:function(){var e=i.a.$;this.hide();var t="A fatal error occured.";this.options.errorPlugin&&this.options.errorPlugin.text&&(t=this.options.errorPlugin.text),this._err=e("<div>").css({position:"absolute","z-index":"999",width:"100%",height:"100%","background-image":"url("+this.background+")","background-size":"18%","background-repeat":"no-repeat","background-color":"black","background-position":"center","text-align":"center","font-weight":"bold",color:"#eee"});var r=e("<div>").css({position:"absolute",width:"100%","padding-bottom":"5%",bottom:0}).append(e("<h2>").text(t).css({"font-size":"200%"})).append(e("<p>").text("We will be right back").css({"font-size":"120%",margin:"15px"}));this._err.append(r),this.container&&this.container.$el.prepend(this._err)}},{key:"onError",value:function(e){var t=this;this.container&&(this.show(),this.container.getPlugin("click_to_pause").disable(),this.options.errorPlugin&&this.options.errorPlugin.onError&&this.options.errorPlugin.onError(e,(function(){t.hide(),t.container.getPlugin("click_to_pause").enable()})))}}]),n}(i.a.ContainerPlugin);function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e,t){return!t||"object"!==_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(u,e);var t,r,i,o,s=(t=u,function(){var e,r=w(t);if(S()){var n=w(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return T(this,e)});function u(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=s.call(this)).timeout=5,t.maxTimeout=10;var r,i,o=t._options=t._buildConfig(e),a=t._player=new n.Player(o);if(t._addEventListeners(),e.vocStream){var l=t._streamSource=(r=e.vocStream,(i="MediaSource"in window)&&MediaSource.isTypeSupported('video/webm; codecs="vp9,vorbis"')?{source:"//cdn.c3voc.de/dash/".concat(r,"/manifest.mpd")}:i||""!=document.createElement("video").canPlayType("application/vnd.apple.mpegURL")?{source:"//cdn.c3voc.de/hls/".concat(r,"_native_hd.m3u8")}:{source:"//cdn.c3voc.de/".concat(r,"_native_hd.webm")});a.load(l)}return t}return r=u,(i=[{key:"_buildConfig",value:function(e){var t=[c.a,l.a,a.a,b];return e.plugins&&e.plugins.length&&(t=t.concat(e.plugins)),Object.assign({},e,{disableErrorScreen:!0,width:"100%",height:"100%",plugins:t,shakaConfiguration:{abr:{defaultBandwidthEstimate:1e6},streaming:{jumpLargeGaps:!0},manifest:{dash:{defaultPresentationDelay:3,ignoreSuggestedPresentationDelay:!0}}},audioTrackSelectorConfig:{title:"Language"},levelSelectorConfig:{labelCallback:function(e,t){var r=e.videoBandwidth||e.level.bitrate;return r<=1e5?"Slides":r<=8e5?"SD":"HD"},title:"Quality"},errorPlugin:{text:"Stream offline",onError:this._handleError.bind(this)}})}},{key:"_containerChanged",value:function(){this.stopListening(),this._addEventListeners()}},{key:"_addEventListeners",value:function(){var e=this._player.core;e.isReady?this._handleContainer():this.listenToOnce(e,n.Events.CORE_READY,this._handleContainer),this.listenTo(this._player,n.Events.PLAYER_PLAY,this._handlePlay),this.listenTo(this._player,n.Events.PLAYER_STOP,this._handleStop),this.listenTo(e,n.Events.CORE_ACTIVE_CONTAINER_CHANGED,this._containerChanged)}},{key:"_handleContainer",value:function(){this._container=this._player.core.activeContainer}},{key:"_handleError",value:function(e,t){if(this._recovery){if("waiting"==this._recovery.state)return;clearTimeout(this._recovery.timeout)}console.log("got error",e.code,"retry in ~".concat(this.timeout,"s"));var r=.6*this.timeout+.4*this.timeout*Math.random();this._recovery={clearOverlay:t,state:"waiting",timeout:setTimeout(this._handleRetry.bind(this),1e3*r)},this.timeout=Math.min(2*this.timeout,this.max_timeout)}},{key:"_handleRetry",value:function(){this._recovery?this._container?(console.log("soft restarting"),this._recovery.timeout=setTimeout(this.reset.bind(this),3e3),this._recovery.state="restarting",this._container.playback.stop()):this.reset():console.log("already recovered o/")}},{key:"_handlePlay",value:function(){this._recovery&&(console.log("soft recovery: play"),this._recovery.clearOverlay(),clearTimeout(this._recovery.timeout),this._recovery=null),this.timeout=5}},{key:"_handleStop",value:function(e){this._recovery&&(console.log("soft recovery: stop"),this._container.playback.play.bind(this._container.playback))}},{key:"reset",value:function(){console.log("performing hard reset"),this._recovery=null;var e=0==this._player.getVolume();e||this._player.mute(),this._player.configure(this._streamSource?{source:this._streamSource,autoPlay:!0}:this._player.options.sources),e||this._player.unmute()}}])&&A(r.prototype,i),o&&A(r,o),u}(n.BaseObject)}])})); -//# sourceMappingURL=player.js.map
\ No newline at end of file |