diff options
author | Anton Schubert | 2021-04-03 23:28:32 +0200 |
---|---|---|
committer | Anton Schubert | 2021-04-03 23:28:32 +0200 |
commit | 449fe43f66e61d84c91829e467bc0d0ecbbfd46c (patch) | |
tree | a8dc1cc556d5962d1f18f4f5c3ad66a6989c0119 /assets/voc-player/player.js | |
parent | 99dcee2b9afe133f844cd33de522b435cfa46bcc (diff) |
add h264-only feature and HQ stream for revision
Diffstat (limited to 'assets/voc-player/player.js')
-rw-r--r-- | assets/voc-player/player.js | 911 |
1 files changed, 302 insertions, 609 deletions
diff --git a/assets/voc-player/player.js b/assets/voc-player/player.js index 1489cd9..3431d2c 100644 --- a/assets/voc-player/player.js +++ b/assets/voc-player/player.js @@ -1,124 +1,124 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VOCPlayer=t():e.VOCPlayer=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8)}([function(e,t,r){var n;window,n=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="dist/",r(r.s="./src/main.js")}({"./node_modules/babel-runtime/core-js/array/from.js": +!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 n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}([function(e,t,n){var r;window,r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="dist/",n(n.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": +/*! no static exports found */function(e,t,n){e.exports={default:n(/*! 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": +/*! no static exports found */function(e,t,n){e.exports={default:n(/*! 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": +/*! no static exports found */function(e,t,n){e.exports={default:n(/*! 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": +/*! no static exports found */function(e,t,n){e.exports={default:n(/*! 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": +/*! no static exports found */function(e,t,n){e.exports={default:n(/*! 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": +/*! no static exports found */function(e,t,n){e.exports={default:n(/*! 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": +/*! no static exports found */function(e,t,n){e.exports={default:n(/*! 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": +/*! no static exports found */function(e,t,n){e.exports={default:n(/*! 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": +/*! no static exports found */function(e,t,n){e.exports={default:n(/*! 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": +/*! no static exports found */function(e,t,n){e.exports={default:n(/*! 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": +/*! no static exports found */function(e,t,n){e.exports={default:n(/*! 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": +/*! no static exports found */function(e,t,n){"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": +/*! no static exports found */function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(/*! ../core-js/object/define-property */"./node_modules/babel-runtime/core-js/object/define-property.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,a.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),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": +/*! no static exports found */function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(/*! ../core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}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": +/*! no static exports found */function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(/*! ../core-js/object/set-prototype-of */"./node_modules/babel-runtime/core-js/object/set-prototype-of.js")),i=o(n(/*! ../core-js/object/create */"./node_modules/babel-runtime/core-js/object/create.js")),a=o(n(/*! ../helpers/typeof */"./node_modules/babel-runtime/helpers/typeof.js"));function o(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,a.default)(t)));e.prototype=(0,i.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.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": +/*! no static exports found */function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(/*! ../helpers/typeof */"./node_modules/babel-runtime/helpers/typeof.js"),a=(r=i)&&r.__esModule?r:{default:r};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,a.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": +/*! no static exports found */function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(/*! ../core-js/array/from */"./node_modules/babel-runtime/core-js/array/from.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return(0,a.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": +/*! no static exports found */function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(/*! ../core-js/symbol/iterator */"./node_modules/babel-runtime/core-js/symbol/iterator.js")),i=o(n(/*! ../core-js/symbol */"./node_modules/babel-runtime/core-js/symbol.js")),a="function"==typeof i.default&&"symbol"==typeof r.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 o(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof i.default&&"symbol"===a(r.default)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":a(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={},C=u.createElement("div"),x={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},R=Array.isArray||function(e){return e instanceof Array};function L(e){return null==e?String(e):S[w.call(e)]||"object"}function j(e){return"function"==L(e)}function P(e){return null!=e&&e==e.window}function I(e){return null!=e&&e.nodeType==e.DOCUMENT_NODE}function O(e){return"object"==L(e)}function D(e){return O(e)&&!P(e)&&Object.getPrototypeOf(e)==Object.prototype}function M(e){var r=!!e&&"length"in e&&e.length,n=t.type(e);return"function"!=n&&!P(e)&&("array"==n||0===r||"number"==typeof r&&r>0&&r-1 in e)}function N(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function F(e){return e in d?d[e]:d[e]=new RegExp("(^|\\s)"+e+"(\\s|$)")}function U(e,t){return"number"!=typeof t||f[N(e)]?t:t+"px"}function B(e){return"children"in e?l.call(e.children):t.map(e.childNodes,(function(e){if(1==e.nodeType)return e}))}function K(e,t){var r,n=e?e.length:0;for(r=0;r<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 j(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=C).appendChild(e),n=~k.qsa(i,t).indexOf(e),o&&C.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(j(e))return t(u).ready(e);if(k.isZ(e))return e;if(R(e))i=e,n=s.call(i,(function(e){return null!=e}));else if(O(e))n=[e],e=null;else if(h.test(e))n=k.fragment(e.trim(),RegExp.$1,r),e=null;else{if(void 0!==r)return t(r).find(e);n=k.qsa(u,e)}}return k.Z(n,e)},(t=function(e,t){return k.init(e,t)}).extend=function(e){var t,r=l.call(arguments,1);return"boolean"==typeof e&&(t=e,e=r.shift()),r.forEach((function(r){G(e,r,t)})),e},k.qsa=function(e,t){var r,n="#"==t[0],i=!n&&"."==t[0],o=n||i?t.slice(1):t,a=T.test(o);return e.getElementById&&a&&n?(r=e.getElementById(o))?[r]:[]:1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType?[]:l.call(a&&!n&&e.getElementsByClassName?i?e.getElementsByClassName(o):e.getElementsByTagName(t):e.querySelectorAll(t))},t.contains=u.documentElement.contains?function(e,t){return e!==t&&e.contains(t)}:function(e,t){for(;t&&(t=t.parentNode);)if(t===e)return!0;return!1},t.type=L,t.isFunction=j,t.isWindow=P,t.isArray=R,t.isPlainObject=D,t.isEmptyObject=function(e){var t;for(t in e)return!1;return!0},t.isNumeric=function(e){var t=Number(e),r=typeof e;return null!=e&&"boolean"!=r&&("string"!=r||e.length)&&!isNaN(t)&&isFinite(t)||!1},t.inArray=function(e,t,r){return o.indexOf.call(t,e,r)},t.camelCase=n,t.trim=function(e){return null==e?"":String.prototype.trim.call(e)},t.uuid=0,t.support={},t.expr={},t.noop=function(){},t.map=function(e,r){var n,i,o,a,s=[];if(M(e))for(i=0;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 j(e)?this.not(this.not(e)):t(s.call(this,(function(t){return k.matches(t,e)})))},add:function(e,r){return t(i(this.concat(t(e,r))))},is:function(e){return this.length>0&&k.matches(this[0],e)},not:function(e){var r=[];if(j(e)&&void 0!==e.call)this.each((function(t){e.call(this,t)||r.push(this)}));else{var n="string"==typeof e?this.filter(e):M(e)&&j(e.item)?l.call(e):t(e);this.forEach((function(e){n.indexOf(e)<0&&r.push(e)}))}return t(r)},has:function(e){return this.filter((function(){return O(e)?t.contains(this,e):t(this).find(e).size()}))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){var e=this[0];return e&&!O(e)?e:t(e)},last:function(){var e=this[this.length-1];return e&&!O(e)?e:t(e)},find:function(e){var r=this;return e?"object"==typeof e?t(e).filter((function(){var e=this;return o.some.call(r,(function(r){return t.contains(r,e)}))})):1==this.length?t(k.qsa(this[0],e)):this.map((function(){return k.qsa(this,e)})):t()},closest:function(e,r){var n=[],i="object"==typeof e&&t(e);return this.each((function(t,o){for(;o&&!(i?i.indexOf(o)>=0:k.matches(o,e));)o=o!==r&&!I(o)&&o.parentNode;o&&n.indexOf(o)<0&&n.push(o)})),t(n)},parents:function(e){for(var r=[],n=this;n.length>0;)n=t.map(n,(function(e){if((e=e.parentNode)&&!I(e)&&r.indexOf(e)<0)return r.push(e),e}));return V(r,e)},parent:function(e){return V(i(this.pluck("parentNode")),e)},children:function(e){return V(this.map((function(){return B(this)})),e)},contents:function(){return this.map((function(){return this.contentDocument||l.call(this.childNodes)}))},siblings:function(e){return V(this.map((function(e,t){return s.call(B(t.parentNode),(function(e){return e!==t}))})),e)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(e){return t.map(this,(function(t){return t[e]}))},show:function(){return this.each((function(){var e,t,r;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(e=this.nodeName,c[e]||(t=u.createElement(e),u.body.appendChild(t),r=getComputedStyle(t,"").getPropertyValue("display"),t.parentNode.removeChild(t),"none"==r&&(r="block"),c[e]=r),c[e]))}))},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){var r=j(e);if(this[0]&&!r)var n=t(e).get(0),i=n.parentNode||this.length>1;return this.each((function(o){t(this).wrapAll(r?e.call(this,o):i?n.cloneNode(!0):n)}))},wrapAll:function(e){if(this[0]){var r;for(t(this[0]).before(e=t(e));(r=e.children()).length;)e=r.first();t(e).append(this)}return this},wrapInner:function(e){var r=j(e);return this.each((function(n){var i=t(this),o=i.contents(),a=r?e.call(this,n):e;o.length?o.wrapAll(a):i.append(a)}))},unwrap:function(){return this.parent().each((function(){t(this).replaceWith(t(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(e){return this.each((function(){var r=t(this);(void 0===e?"none"==r.css("display"):e)?r.show():r.hide()}))},prev:function(e){return t(this.pluck("previousElementSibling")).filter(e||"*")},next:function(e){return t(this.pluck("nextElementSibling")).filter(e||"*")},html:function(e){return 0 in arguments?this.each((function(r){var n=this.innerHTML;t(this).empty().append(H(this,e,r,n))})):0 in this?this[0].innerHTML:null},text:function(e){return 0 in arguments?this.each((function(t){var r=H(this,e,t,this.textContent);this.textContent=null==r?"":""+r})):0 in this?this.pluck("textContent").join(""):null},attr:function(t,r){var n;return"string"!=typeof t||1 in arguments?this.each((function(n){if(1===this.nodeType)if(O(t))for(e in t)Y(this,e,t[e]);else Y(this,t,H(this,r,n,this.getAttribute(t)))})):0 in this&&1==this[0].nodeType&&null!=(n=this[0].getAttribute(t))?n:void 0},removeAttr:function(e){return this.each((function(){1===this.nodeType&&e.split(" ").forEach((function(e){Y(this,e)}),this)}))},prop:function(e,t){return e=x[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=x[e]||e,this.each((function(){delete this[e]}))},data:function(e,t){var r="data-"+e.replace(y,"-$1").toLowerCase(),n=1 in arguments?this.attr(r,t):this.attr(r);return null!==n?W(n):void 0},val:function(e){return 0 in arguments?(null==e&&(e=""),this.each((function(t){this.value=H(this,e,t,this.value)}))):this[0]&&(this[0].multiple?t(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each((function(r){var n=t(this),i=H(this,e,r,n.offset()),o=n.offsetParent().offset(),a={top:i.top-o.top,left:i.left-o.left};"static"==n.css("position")&&(a.position="relative"),n.css(a)}));if(!this.length)return null;if(u.documentElement!==this[0]&&!t.contains(u.documentElement,this[0]))return{top:0,left:0};var r=this[0].getBoundingClientRect();return{left:r.left+window.pageXOffset,top:r.top+window.pageYOffset,width:Math.round(r.width),height:Math.round(r.height)}},css:function(r,i){if(arguments.length<2){var o=this[0];if("string"==typeof r){if(!o)return;return o.style[n(r)]||getComputedStyle(o,"").getPropertyValue(r)}if(R(r)){if(!o)return;var a={},s=getComputedStyle(o,"");return t.each(r,(function(e,t){a[t]=o.style[n(t)]||s.getPropertyValue(t)})),a}}var l="";if("string"==L(r))i||0===i?l=N(r)+":"+U(r,i):this.each((function(){this.style.removeProperty(N(r))}));else for(e in r)r[e]||0===r[e]?l+=N(e)+":"+U(e,r[e])+";":this.each((function(){this.style.removeProperty(N(e))}));return this.each((function(){this.style.cssText+=";"+l}))},index:function(e){return e?this.indexOf(t(e)[0]):this.parent().children().indexOf(this[0])},hasClass:function(e){return!!e&&o.some.call(this,(function(e){return this.test(z(e))}),F(e))},addClass:function(e){return e?this.each((function(n){if("className"in this){r=[];var i=z(this);H(this,e,n,i).split(/\s+/g).forEach((function(e){t(this).hasClass(e)||r.push(e)}),this),r.length&&z(this,i+(i?" ":"")+r.join(" "))}})):this},removeClass:function(e){return this.each((function(t){if("className"in this){if(void 0===e)return z(this,"");r=z(this),H(this,e,t,r).split(/\s+/g).forEach((function(e){r=r.replace(F(e)," ")})),z(this,r.trim())}}))},toggleClass:function(e,r){return e?this.each((function(n){var i=t(this);H(this,e,n,z(this)).split(/\s+/g).forEach((function(e){(void 0===r?!i.hasClass(e):r)?i.addClass(e):i.removeClass(e)}))})):this},scrollTop:function(e){if(this.length){var t="scrollTop"in this[0];return void 0===e?t?this[0].scrollTop:this[0].pageYOffset:this.each(t?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var t="scrollLeft"in this[0];return void 0===e?t?this[0].scrollLeft:this[0].pageXOffset:this.each(t?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var e=this[0],r=this.offsetParent(),n=this.offset(),i=g.test(r[0].nodeName)?{top:0,left:0}:r.offset();return n.top-=parseFloat(t(e).css("margin-top"))||0,n.left-=parseFloat(t(e).css("margin-left"))||0,i.top+=parseFloat(t(r[0]).css("border-top-width"))||0,i.left+=parseFloat(t(r[0]).css("border-left-width"))||0,{top:n.top-i.top,left:n.left-i.left}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent||u.body;e&&!g.test(e.nodeName)&&"static"==t(e).css("position");)e=e.offsetParent;return e}))}},t.fn.detach=t.fn.remove,["width","height"].forEach((function(e){var r=e.replace(/./,(function(e){return e[0].toUpperCase()}));t.fn[e]=function(n){var i,o=this[0];return void 0===n?P(o)?o["inner"+r]:I(o)?o.documentElement["scroll"+r]:(i=this.offset())&&i[e]:this.each((function(r){(o=t(this)).css(e,H(this,n,r,o[e]()))}))}})),["after","prepend","before","append"].forEach((function(e,r){var n=r%2;t.fn[e]=function(){var e,i,o=t.map(arguments,(function(r){var n=[];return"array"==(e=L(r))?(r.forEach((function(e){return void 0!==e.nodeType?n.push(e):t.zepto.isZ(e)?n=n.concat(e.get()):void(n=n.concat(k.fragment(e)))})),n):"object"==e||null==r?r:k.fragment(r)})),a=this.length>1;return o.length<1?this:this.each((function(e,s){i=n?s:s.parentNode,s=0==r?s.nextSibling:1==r?s.firstChild:2==r?s:null;var l=t.contains(u.documentElement,i);o.forEach((function(e){if(a)e=e.cloneNode(!0);else if(!i)return t(e).remove();i.insertBefore(e,s),l&&$(e,(function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var t=e.ownerDocument?e.ownerDocument.defaultView:window;t.eval.call(t,e.innerHTML)}}))}))}))},t.fn[n?e+"To":"insert"+(r?"Before":"After")]=function(r){return t(r)[e](this),this}})),k.Z.prototype=K.prototype=t.fn,k.uniq=i,k.deserializeValue=W,t.zepto=k,t}();window.Zepto=n,void 0===window.$&&(window.$=n),function(e){var t,r,n=+new Date,i=window.document,o=/<script\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(),C=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 x=!("async"in y)||y.async;if(k.open(y.type,y.url,x,y.username,y.password),y.xhrFields)for(r in y.xhrFields)k[r]=y.xhrFields[r];for(r in T)C.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": +/*! no static exports found */function(e,t){var n,r=function(){var e,t,n,r,i,a=[],o=a.concat,s=a.filter,l=a.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,v=/([A-Z])/g,y=["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-]*$/,w={},S=w.toString,k={},C=u.createElement("div"),x={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},R=Array.isArray||function(e){return e instanceof Array};function L(e){return null==e?String(e):w[S.call(e)]||"object"}function I(e){return"function"==L(e)}function P(e){return null!=e&&e==e.window}function j(e){return null!=e&&e.nodeType==e.DOCUMENT_NODE}function O(e){return"object"==L(e)}function D(e){return O(e)&&!P(e)&&Object.getPrototypeOf(e)==Object.prototype}function M(e){var n=!!e&&"length"in e&&e.length,r=t.type(e);return"function"!=r&&!P(e)&&("array"==r||0===n||"number"==typeof n&&n>0&&n-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 n,r=e?e.length:0;for(n=0;n<r;n++)this[n]=e[n];this.length=r,this.selector=t||""}function V(t,n,r){for(e in n)r&&(D(n[e])||R(n[e]))?(D(n[e])&&!D(t[e])&&(t[e]={}),R(n[e])&&!R(t[e])&&(t[e]=[]),V(t[e],n[e],r)):void 0!==n[e]&&(t[e]=n[e])}function G(e,n){return null==n?t(e):t(e).filter(n)}function H(e,t,n,r){return I(t)?t.call(e,n,r):t}function Y(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)}function z(e,t){var n=e.className||"",r=n&&void 0!==n.baseVal;if(void 0===t)return r?n.baseVal:n;r?n.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 n=0,r=e.childNodes.length;n<r;n++)$(e.childNodes[n],t)}return k.matches=function(e,t){if(!t||!e||1!==e.nodeType)return!1;var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.matchesSelector;if(n)return n.call(e,t);var r,i=e.parentNode,a=!i;return a&&(i=C).appendChild(e),r=~k.qsa(i,t).indexOf(e),a&&C.removeChild(e),r},r=function(e){return e.replace(/-+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))},i=function(e){return s.call(e,(function(t,n){return e.indexOf(t)==n}))},k.fragment=function(e,n,r){var i,a,o;return p.test(e)&&(i=t(u.createElement(RegExp.$1))),i||(e.replace&&(e=e.replace(m,"<$1></$2>")),void 0===n&&(n=h.test(e)&&RegExp.$1),n in A||(n="*"),(o=A[n]).innerHTML=""+e,i=t.each(l.call(o.childNodes),(function(){o.removeChild(this)}))),D(r)&&(a=t(i),t.each(r,(function(e,t){y.indexOf(e)>-1?a[e](t):a.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,n){var r,i;if(!e)return k.Z();if("string"==typeof e)if("<"==(e=e.trim())[0]&&h.test(e))r=k.fragment(e,RegExp.$1,n),e=null;else{if(void 0!==n)return t(n).find(e);r=k.qsa(u,e)}else{if(I(e))return t(u).ready(e);if(k.isZ(e))return e;if(R(e))i=e,r=s.call(i,(function(e){return null!=e}));else if(O(e))r=[e],e=null;else if(h.test(e))r=k.fragment(e.trim(),RegExp.$1,n),e=null;else{if(void 0!==n)return t(n).find(e);r=k.qsa(u,e)}}return k.Z(r,e)},(t=function(e,t){return k.init(e,t)}).extend=function(e){var t,n=l.call(arguments,1);return"boolean"==typeof e&&(t=e,e=n.shift()),n.forEach((function(n){V(e,n,t)})),e},k.qsa=function(e,t){var n,r="#"==t[0],i=!r&&"."==t[0],a=r||i?t.slice(1):t,o=T.test(a);return e.getElementById&&o&&r?(n=e.getElementById(a))?[n]:[]:1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType?[]:l.call(o&&!r&&e.getElementsByClassName?i?e.getElementsByClassName(a):e.getElementsByTagName(t):e.querySelectorAll(t))},t.contains=u.documentElement.contains?function(e,t){return e!==t&&e.contains(t)}:function(e,t){for(;t&&(t=t.parentNode);)if(t===e)return!0;return!1},t.type=L,t.isFunction=I,t.isWindow=P,t.isArray=R,t.isPlainObject=D,t.isEmptyObject=function(e){var t;for(t in e)return!1;return!0},t.isNumeric=function(e){var t=Number(e),n=typeof e;return null!=e&&"boolean"!=n&&("string"!=n||e.length)&&!isNaN(t)&&isFinite(t)||!1},t.inArray=function(e,t,n){return a.indexOf.call(t,e,n)},t.camelCase=r,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,n){var r,i,a,o,s=[];if(M(e))for(i=0;i<e.length;i++)null!=(r=n(e[i],i))&&s.push(r);else for(a in e)null!=(r=n(e[a],a))&&s.push(r);return(o=s).length>0?t.fn.concat.apply([],o):o},t.each=function(e,t){var n,r;if(M(e)){for(n=0;n<e.length;n++)if(!1===t.call(e[n],n,e[n]))return e}else for(r in e)if(!1===t.call(e[r],r,e[r]))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){w["[object "+t+"]"]=t.toLowerCase()})),t.fn={constructor:k.Z,length:0,forEach:a.forEach,reduce:a.reduce,push:a.push,sort:a.sort,splice:a.splice,indexOf:a.indexOf,concat:function(){var e,t,n=[];for(e=0;e<arguments.length;e++)t=arguments[e],n[e]=k.isZ(t)?t.toArray():t;return o.apply(k.isZ(this)?this.toArray():this,n)},map:function(e){return t(t.map(this,(function(t,n){return e.call(t,n,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 a.every.call(this,(function(t,n){return!1!==e.call(t,n,t)})),this},filter:function(e){return I(e)?this.not(this.not(e)):t(s.call(this,(function(t){return k.matches(t,e)})))},add:function(e,n){return t(i(this.concat(t(e,n))))},is:function(e){return this.length>0&&k.matches(this[0],e)},not:function(e){var n=[];if(I(e)&&void 0!==e.call)this.each((function(t){e.call(this,t)||n.push(this)}));else{var r="string"==typeof e?this.filter(e):M(e)&&I(e.item)?l.call(e):t(e);this.forEach((function(e){r.indexOf(e)<0&&n.push(e)}))}return t(n)},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 n=this;return e?"object"==typeof e?t(e).filter((function(){var e=this;return a.some.call(n,(function(n){return t.contains(n,e)}))})):1==this.length?t(k.qsa(this[0],e)):this.map((function(){return k.qsa(this,e)})):t()},closest:function(e,n){var r=[],i="object"==typeof e&&t(e);return this.each((function(t,a){for(;a&&!(i?i.indexOf(a)>=0:k.matches(a,e));)a=a!==n&&!j(a)&&a.parentNode;a&&r.indexOf(a)<0&&r.push(a)})),t(r)},parents:function(e){for(var n=[],r=this;r.length>0;)r=t.map(r,(function(e){if((e=e.parentNode)&&!j(e)&&n.indexOf(e)<0)return n.push(e),e}));return G(n,e)},parent:function(e){return G(i(this.pluck("parentNode")),e)},children:function(e){return G(this.map((function(){return B(this)})),e)},contents:function(){return this.map((function(){return this.contentDocument||l.call(this.childNodes)}))},siblings:function(e){return G(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,n;"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),n=getComputedStyle(t,"").getPropertyValue("display"),t.parentNode.removeChild(t),"none"==n&&(n="block"),c[e]=n),c[e]))}))},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){var n=I(e);if(this[0]&&!n)var r=t(e).get(0),i=r.parentNode||this.length>1;return this.each((function(a){t(this).wrapAll(n?e.call(this,a):i?r.cloneNode(!0):r)}))},wrapAll:function(e){if(this[0]){var n;for(t(this[0]).before(e=t(e));(n=e.children()).length;)e=n.first();t(e).append(this)}return this},wrapInner:function(e){var n=I(e);return this.each((function(r){var i=t(this),a=i.contents(),o=n?e.call(this,r):e;a.length?a.wrapAll(o):i.append(o)}))},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 n=t(this);(void 0===e?"none"==n.css("display"):e)?n.show():n.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(n){var r=this.innerHTML;t(this).empty().append(H(this,e,n,r))})):0 in this?this[0].innerHTML:null},text:function(e){return 0 in arguments?this.each((function(t){var n=H(this,e,t,this.textContent);this.textContent=null==n?"":""+n})):0 in this?this.pluck("textContent").join(""):null},attr:function(t,n){var r;return"string"!=typeof t||1 in arguments?this.each((function(r){if(1===this.nodeType)if(O(t))for(e in t)Y(this,e,t[e]);else Y(this,t,H(this,n,r,this.getAttribute(t)))})):0 in this&&1==this[0].nodeType&&null!=(r=this[0].getAttribute(t))?r: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=x[e]||e,1 in arguments?this.each((function(n){this[e]=H(this,t,n,this[e])})):this[0]&&this[0][e]},removeProp:function(e){return e=x[e]||e,this.each((function(){delete this[e]}))},data:function(e,t){var n="data-"+e.replace(v,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,t):this.attr(n);return null!==r?W(r):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(n){var r=t(this),i=H(this,e,n,r.offset()),a=r.offsetParent().offset(),o={top:i.top-a.top,left:i.left-a.left};"static"==r.css("position")&&(o.position="relative"),r.css(o)}));if(!this.length)return null;if(u.documentElement!==this[0]&&!t.contains(u.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+window.pageXOffset,top:n.top+window.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(n,i){if(arguments.length<2){var a=this[0];if("string"==typeof n){if(!a)return;return a.style[r(n)]||getComputedStyle(a,"").getPropertyValue(n)}if(R(n)){if(!a)return;var o={},s=getComputedStyle(a,"");return t.each(n,(function(e,t){o[t]=a.style[r(t)]||s.getPropertyValue(t)})),o}}var l="";if("string"==L(n))i||0===i?l=N(n)+":"+F(n,i):this.each((function(){this.style.removeProperty(N(n))}));else for(e in n)n[e]||0===n[e]?l+=N(e)+":"+F(e,n[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&&a.some.call(this,(function(e){return this.test(z(e))}),U(e))},addClass:function(e){return e?this.each((function(r){if("className"in this){n=[];var i=z(this);H(this,e,r,i).split(/\s+/g).forEach((function(e){t(this).hasClass(e)||n.push(e)}),this),n.length&&z(this,i+(i?" ":"")+n.join(" "))}})):this},removeClass:function(e){return this.each((function(t){if("className"in this){if(void 0===e)return z(this,"");n=z(this),H(this,e,t,n).split(/\s+/g).forEach((function(e){n=n.replace(U(e)," ")})),z(this,n.trim())}}))},toggleClass:function(e,n){return e?this.each((function(r){var i=t(this);H(this,e,r,z(this)).split(/\s+/g).forEach((function(e){(void 0===n?!i.hasClass(e):n)?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],n=this.offsetParent(),r=this.offset(),i=g.test(n[0].nodeName)?{top:0,left:0}:n.offset();return r.top-=parseFloat(t(e).css("margin-top"))||0,r.left-=parseFloat(t(e).css("margin-left"))||0,i.top+=parseFloat(t(n[0]).css("border-top-width"))||0,i.left+=parseFloat(t(n[0]).css("border-left-width"))||0,{top:r.top-i.top,left:r.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 n=e.replace(/./,(function(e){return e[0].toUpperCase()}));t.fn[e]=function(r){var i,a=this[0];return void 0===r?P(a)?a["inner"+n]:j(a)?a.documentElement["scroll"+n]:(i=this.offset())&&i[e]:this.each((function(n){(a=t(this)).css(e,H(this,r,n,a[e]()))}))}})),["after","prepend","before","append"].forEach((function(e,n){var r=n%2;t.fn[e]=function(){var e,i,a=t.map(arguments,(function(n){var r=[];return"array"==(e=L(n))?(n.forEach((function(e){return void 0!==e.nodeType?r.push(e):t.zepto.isZ(e)?r=r.concat(e.get()):void(r=r.concat(k.fragment(e)))})),r):"object"==e||null==n?n:k.fragment(n)})),o=this.length>1;return a.length<1?this:this.each((function(e,s){i=r?s:s.parentNode,s=0==n?s.nextSibling:1==n?s.firstChild:2==n?s:null;var l=t.contains(u.documentElement,i);a.forEach((function(e){if(o)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[r?e+"To":"insert"+(n?"Before":"After")]=function(n){return t(n)[e](this),this}})),k.Z.prototype=K.prototype=t.fn,k.uniq=i,k.deserializeValue=W,t.zepto=k,t}();window.Zepto=r,void 0===window.$&&(window.$=r),function(e){var t,n,r=+new Date,i=window.document,a=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,o=/^(?:text|application)\/javascript/i,s=/^(?:text|application)\/xml/i,l=/^\s*$/,u=i.createElement("a");function c(t,n,r,a){if(t.global)return function(t,n,r){var i=e.Event(n);return e(t).trigger(i,r),!i.isDefaultPrevented()}(n||i,r,a)}function d(e,t){var n=t.context;if(!1===t.beforeSend.call(n,e,t)||!1===c(t,n,"ajaxBeforeSend",[e,t]))return!1;c(t,n,"ajaxSend",[e,t])}function f(e,t,n,r){var i=n.context;n.success.call(i,e,"success",t),r&&r.resolveWith(i,[e,"success",t]),c(n,i,"ajaxSuccess",[t,n,e]),p("success",t,n)}function h(e,t,n,r,i){var a=r.context;r.error.call(a,n,t,e),i&&i.rejectWith(a,[n,t,e]),c(r,a,"ajaxError",[n,r,e||t]),p(t,n,r)}function p(t,n,r){var i=r.context;r.complete.call(i,n,t),c(r,i,"ajaxComplete",[n,r]),function(t){t.global&&!--e.active&&c(t,null,"ajaxStop")}(r)}function m(){}function g(e,t){return""==t?e:(e+"&"+t).replace(/[&?]{1,2}/,"?")}function v(t,n,r,i){return e.isFunction(n)&&(i=r,r=n,n=void 0),e.isFunction(r)||(i=r,r=void 0),{url:t,data:n,success:r,dataType:i}}u.href=window.location.href,e.active=0,e.ajaxJSONP=function(t,n){if(!("type"in t))return e.ajax(t);var a,o,s=t.jsonpCallback,l=(e.isFunction(s)?s():s)||"Zepto"+r++,u=i.createElement("script"),c=window[l],p=function(t){e(u).triggerHandler("error",t||"abort")},m={abort:p};return n&&n.promise(m),e(u).on("load error",(function(r,i){clearTimeout(o),e(u).off().remove(),"error"!=r.type&&a?f(a[0],m,t,n):h(null,i||"error",m,t,n),window[l]=c,a&&e.isFunction(c)&&c(a[0]),c=a=void 0})),!1===d(m,t)?(p("abort"),m):(window[l]=function(){a=arguments},u.src=t.url.replace(/\?(.+)=\?/,"?$1="+l),i.head.appendChild(u),t.timeout>0&&(o=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(r){var a,p,v=e.extend({},r||{}),y=e.Deferred&&e.Deferred();for(t in e.ajaxSettings)void 0===v[t]&&(v[t]=e.ajaxSettings[t]);!function(t){t.global&&0==e.active++&&c(t,null,"ajaxStart")}(v),v.crossDomain||((a=i.createElement("a")).href=v.url,a.href=a.href,v.crossDomain=u.protocol+"//"+u.host!=a.protocol+"//"+a.host),v.url||(v.url=window.location.toString()),(p=v.url.indexOf("#"))>-1&&(v.url=v.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)}(v);var b=v.dataType,_=/\?.+=\?/.test(v.url);if(_&&(b="jsonp"),!1!==v.cache&&(r&&!0===r.cache||"script"!=b&&"jsonp"!=b)||(v.url=g(v.url,"_="+Date.now())),"jsonp"==b)return _||(v.url=g(v.url,v.jsonp?v.jsonp+"=?":!1===v.jsonp?"":"callback=?")),e.ajaxJSONP(v,y);var A,E=v.accepts[b],T={},w=function(e,t){T[e.toLowerCase()]=[e,t]},S=/^([\w-]+:)\/\//.test(v.url)?RegExp.$1:window.location.protocol,k=v.xhr(),C=k.setRequestHeader;if(y&&y.promise(k),v.crossDomain||w("X-Requested-With","XMLHttpRequest"),w("Accept",E||"*/*"),(E=v.mimeType||E)&&(E.indexOf(",")>-1&&(E=E.split(",",2)[0]),k.overrideMimeType&&k.overrideMimeType(E)),(v.contentType||!1!==v.contentType&&v.data&&"GET"!=v.type.toUpperCase())&&w("Content-Type",v.contentType||"application/x-www-form-urlencoded"),v.headers)for(n in v.headers)w(n,v.headers[n]);if(k.setRequestHeader=w,k.onreadystatechange=function(){if(4==k.readyState){k.onreadystatechange=m,clearTimeout(A);var t,n=!1;if(k.status>=200&&k.status<300||304==k.status||0==k.status&&"file:"==S){if(b=b||function(e){return e&&(e=e.split(";",2)[0]),e&&("text/html"==e?"html":"application/json"==e?"json":o.test(e)?"script":s.test(e)&&"xml")||"text"}(v.mimeType||k.getResponseHeader("content-type")),"arraybuffer"==k.responseType||"blob"==k.responseType)t=k.response;else{t=k.responseText;try{t=function(e,t,n){if(n.dataFilter==m)return e;var r=n.context;return n.dataFilter.call(r,e,t)}(t,b,v),"script"==b?(0,eval)(t):"xml"==b?t=k.responseXML:"json"==b&&(t=l.test(t)?null:e.parseJSON(t))}catch(e){n=e}if(n)return h(n,"parsererror",k,v,y)}f(t,k,v,y)}else h(k.statusText||null,k.status?"error":"abort",k,v,y)}},!1===d(k,v))return k.abort(),h(null,"abort",k,v,y),k;var x=!("async"in v)||v.async;if(k.open(v.type,v.url,x,v.username,v.password),v.xhrFields)for(n in v.xhrFields)k[n]=v.xhrFields[n];for(n in T)C.apply(k,T[n]);return v.timeout>0&&(A=setTimeout((function(){k.onreadystatechange=m,k.abort(),h(null,"timeout",k,v,y)}),v.timeout)),k.send(v.data?v.data:null),k},e.get=function(){return e.ajax(v.apply(null,arguments))},e.post=function(){var t=v.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=v.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,n,r){if(!this.length)return this;var i,o=this,s=t.split(/\s/),l=v(t,n,r),u=l.success;return s.length>1&&(l.url=s[0],i=s[1]),l.success=function(t){o.html(i?e("<div>").html(t.replace(a,"")).find(i):t),u&&u.apply(o,arguments)},e.ajax(l),this};var y=encodeURIComponent;e.param=function(t,n){var r=[];return r.add=function(t,n){e.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(y(t)+"="+y(n))},function t(n,r,i,a){var o,s=e.isArray(r),l=e.isPlainObject(r);e.each(r,(function(r,u){o=e.type(u),a&&(r=i?a:a+"["+(l||"object"==o||"array"==o?r:"")+"]"),!a&&s?n.add(u.name,u.value):"array"==o||!i&&"object"==o?t(n,u,i,r):n.add(r,u)}))}(r,t,n),r.join("&").replace(/%20/g,"+")}}(r),(n=r).Callbacks=function(e){e=n.extend({},e);var t,r,i,a,o,s,l=[],u=!e.once&&[],c=function(n){for(t=e.memory&&n,r=!0,s=a||0,a=0,o=l.length,i=!0;l&&s<o;++s)if(!1===l[s].apply(n[0],n[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 r=l.length,s=function(t){n.each(t,(function(t,n){"function"==typeof n?e.unique&&d.has(n)||l.push(n):n&&n.length&&"string"!=typeof n&&s(n)}))};s(arguments),i?o=l.length:t&&(a=r,c(t))}return this},remove:function(){return l&&n.each(arguments,(function(e,t){for(var r;(r=n.inArray(t,l,r))>-1;)l.splice(r,1),i&&(r<=o&&--o,r<=s&&--s)})),this},has:function(e){return!(!l||!(e?n.inArray(e,l)>-1:l.length))},empty:function(){return o=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||r&&!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!!r}};return d},function(e){var t=Array.prototype.slice;function n(t){var r=[["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",a={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var t=arguments;return n((function(n){e.each(r,(function(r,i){var s=e.isFunction(t[r])&&t[r];o[i[1]]((function(){var t=s&&s.apply(this,arguments);if(t&&e.isFunction(t.promise))t.promise().done(n.resolve).fail(n.reject).progress(n.notify);else{var r=this===a?n.promise():this,o=s?[t]:arguments;n[i[0]+"With"](r,o)}}))})),t=null})).promise()},promise:function(t){return null!=t?e.extend(t,a):a}},o={};return e.each(r,(function(e,t){var n=t[2],s=t[3];a[t[1]]=n.add,s&&n.add((function(){i=s}),r[1^e][2].disable,r[2][2].lock),o[t[0]]=function(){return o[t[0]+"With"](this===o?a:this,arguments),this},o[t[0]+"With"]=n.fireWith})),a.promise(o),t&&t.call(o,o),o}e.when=function(r){var i,a,o,s=t.call(arguments),l=s.length,u=0,c=1!==l||r&&e.isFunction(r.promise)?l:0,d=1===c?r:n(),f=function(e,n,r){return function(a){n[e]=this,r[e]=arguments.length>1?t.call(arguments):a,r===i?d.notifyWith(n,r):--c||d.resolveWith(n,r)}};if(l>1)for(i=new Array(l),a=new Array(l),o=new Array(l);u<l;++u)s[u]&&e.isFunction(s[u].promise)?s[u].promise().done(f(u,o,s)).fail(d.reject).progress(f(u,a,i)):--c;return c||d.resolveWith(o,s),d.promise()},e.Deferred=n}(r),function(e){var t=1,n=Array.prototype.slice,r=e.isFunction,i=function(e){return"string"==typeof e},a={},o={},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,n,r){if((t=f(t)).ns)var i=(o=t.ns,new RegExp("(?:^| )"+o.replace(" "," .* ?")+"(?: |$)"));var o;return(a[c(e)]||[]).filter((function(e){return e&&(!t.e||e.e==t.e)&&(!t.ns||i.test(e.ns))&&(!n||c(e.fn)===c(n))&&(!r||e.sel==r)}))}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,n,r,i,o,s,l){var d=c(t),m=a[d]||(a[d]=[]);n.split(/\s/).forEach((function(n){if("ready"==n)return e(document).ready(r);var a=f(n);a.fn=r,a.sel=o,a.e in u&&(r=function(t){var n=t.relatedTarget;if(!n||n!==this&&!e.contains(this,n))return a.fn.apply(this,arguments)}),a.del=s;var c=s||r;a.proxy=function(e){if(!(e=A(e)).isImmediatePropagationStopped()){e.data=i;var n=c.apply(t,null==e._args?[e]:[e].concat(e._args));return!1===n&&(e.preventDefault(),e.stopPropagation()),n}},a.i=m.length,m.push(a),"addEventListener"in t&&t.addEventListener(p(a.e),a.proxy,h(a,l))}))}function g(e,t,n,r,i){var o=c(e);(t||"").split(/\s/).forEach((function(t){d(e,t,n,r).forEach((function(t){delete a[o][t.i],"removeEventListener"in e&&e.removeEventListener(p(t.e),t.proxy,h(t,i))}))}))}o.click=o.mousedown=o.mouseup=o.mousemove="MouseEvents",e.event={add:m,remove:g},e.proxy=function(t,a){var o=2 in arguments&&n.call(arguments,2);if(r(t)){var s=function(){return t.apply(a,o?o.concat(n.call(arguments)):arguments)};return s._zid=c(t),s}if(i(a))return o?(o.unshift(t[a],t),e.proxy.apply(null,o)):e.proxy(t[a],t);throw new TypeError("expected function")},e.fn.bind=function(e,t,n){return this.on(e,t,n)},e.fn.unbind=function(e,t){return this.off(e,t)},e.fn.one=function(e,t,n,r){return this.on(e,t,n,r,1)};var v=function(){return!0},y=function(){return!1},b=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,_={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function A(t,n){return!n&&t.isDefaultPrevented||(n||(n=t),e.each(_,(function(e,r){var i=n[e];t[e]=function(){return this[r]=v,i&&i.apply(n,arguments)},t[r]=y})),t.timeStamp||(t.timeStamp=Date.now()),(void 0!==n.defaultPrevented?n.defaultPrevented:"returnValue"in n?!1===n.returnValue:n.getPreventDefault&&n.getPreventDefault())&&(t.isDefaultPrevented=v)),t}function E(e){var t,n={originalEvent:e};for(t in e)b.test(t)||void 0===e[t]||(n[t]=e[t]);return A(n,e)}e.fn.delegate=function(e,t,n){return this.on(t,e,n)},e.fn.undelegate=function(e,t,n){return this.off(t,e,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,a,o,s,l){var u,c,d=this;return t&&!i(t)?(e.each(t,(function(e,t){d.on(e,a,o,t,l)})),d):(i(a)||r(s)||!1===s||(s=o,o=a,a=void 0),void 0!==s&&!1!==o||(s=o,o=void 0),!1===s&&(s=y),d.each((function(r,i){l&&(u=function(e){return g(i,e.type,s),s.apply(this,arguments)}),a&&(c=function(t){var r,o=e(t.target).closest(a,i).get(0);if(o&&o!==i)return r=e.extend(E(t),{currentTarget:o,liveFired:i}),(u||s).apply(o,[r].concat(n.call(arguments,1)))}),m(i,t,s,o,a,c||u)})))},e.fn.off=function(t,n,a){var o=this;return t&&!i(t)?(e.each(t,(function(e,t){o.off(e,n,t)})),o):(i(n)||r(a)||!1===a||(a=n,n=void 0),!1===a&&(a=y),o.each((function(){g(this,t,a,n)})))},e.fn.trigger=function(t,n){return(t=i(t)||e.isPlainObject(t)?e.Event(t):A(t))._args=n,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,n)}))},e.fn.triggerHandler=function(t,n){var r,a;return this.each((function(o,s){(r=E(i(t)?e.Event(t):t))._args=n,r.target=s,e.each(d(s,t.type||t),(function(e,t){if(a=t.proxy(r),r.isImmediatePropagationStopped())return!1}))})),a},"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 n=document.createEvent(o[e]||"Events"),r=!0;if(t)for(var a in t)"bubbles"==a?r=!!t[a]:n[a]=t[a];return n.initEvent(e,r,!0),A(n)}}(r),function(){try{getComputedStyle(void 0)}catch(t){var e=getComputedStyle;window.getComputedStyle=function(t,n){try{return e(t,n)}catch(e){return null}}}}(),function(e){var t=e.zepto,n=t.qsa,r=t.matches;function i(t){return!(!(t=e(t)).width()&&!t.height())&&"none"!==t.css("display")}var a=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,n){if(e===n)return this},contains:function(t,n,r){if(e(this).text().indexOf(r)>-1)return this},has:function(e,n,r){if(t.qsa(this,r).length)return this}},o=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),s=/^\s*>/,l="Zepto"+ +new Date;function u(e,t){e=e.replace(/=#\]/g,'="#"]');var n,r,i=o.exec(e);if(i&&i[2]in a&&(n=a[i[2]],r=i[3],e=i[1],r)){var s=Number(r);r=isNaN(s)?r.replace(/^["']|["']$/g,""):s}return t(e,n,r)}t.qsa=function(r,i){return u(i,(function(a,o,u){try{var c;!a&&o?a="*":s.test(a)&&(c=e(r).addClass(l),a="."+l+" "+a);var d=n(r,a)}catch(e){throw console.error("error performing selector: %o",i),e}finally{c&&c.removeClass(l)}return o?t.uniq(e.map(d,(function(e,t){return o.call(e,t,d,u)}))):d}))},t.matches=function(e,t){return u(t,(function(t,n,i){return(!t||r(e,t))&&(!n||n.call(e,null,i)===e)}))}}(r),e.exports=r},"./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": +/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.string.iterator */"./node_modules/core-js/library/modules/es6.string.iterator.js"),n(/*! ../../modules/es6.array.from */"./node_modules/core-js/library/modules/es6.array.from.js"),e.exports=n(/*! ../../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": +/*! no static exports found */function(e,t,n){n(/*! ../modules/web.dom.iterable */"./node_modules/core-js/library/modules/web.dom.iterable.js"),n(/*! ../modules/es6.string.iterator */"./node_modules/core-js/library/modules/es6.string.iterator.js"),e.exports=n(/*! ../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": +/*! no static exports found */function(e,t,n){var r=n(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js"),i=r.JSON||(r.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": +/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.object.assign */"./node_modules/core-js/library/modules/es6.object.assign.js"),e.exports=n(/*! ../../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": +/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.object.create */"./node_modules/core-js/library/modules/es6.object.create.js");var r=n(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Object;e.exports=function(e,t){return r.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": +/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.object.define-property */"./node_modules/core-js/library/modules/es6.object.define-property.js");var r=n(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},"./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": +/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.object.get-own-property-descriptor */"./node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js");var r=n(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Object;e.exports=function(e,t){return r.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": +/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.object.keys */"./node_modules/core-js/library/modules/es6.object.keys.js"),e.exports=n(/*! ../../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": +/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.object.set-prototype-of */"./node_modules/core-js/library/modules/es6.object.set-prototype-of.js"),e.exports=n(/*! ../../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": +/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.symbol */"./node_modules/core-js/library/modules/es6.symbol.js"),n(/*! ../../modules/es6.object.to-string */"./node_modules/core-js/library/modules/es6.object.to-string.js"),n(/*! ../../modules/es7.symbol.async-iterator */"./node_modules/core-js/library/modules/es7.symbol.async-iterator.js"),n(/*! ../../modules/es7.symbol.observable */"./node_modules/core-js/library/modules/es7.symbol.observable.js"),e.exports=n(/*! ../../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": +/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.string.iterator */"./node_modules/core-js/library/modules/es6.string.iterator.js"),n(/*! ../../modules/web.dom.iterable */"./node_modules/core-js/library/modules/web.dom.iterable.js"),e.exports=n(/*! ../../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 ***! \*************************************************************/ @@ -130,31 +130,31 @@ /*!************************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js");e.exports=function(e){if(!r(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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),i=n(/*! ./_to-length */"./node_modules/core-js/library/modules/_to-length.js"),a=n(/*! ./_to-index */"./node_modules/core-js/library/modules/_to-index.js");e.exports=function(e){return function(t,n,o){var s,l=r(t),u=i(l.length),c=a(o,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_cof */"./node_modules/core-js/library/modules/_cof.js"),i=n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?r(t):"Object"==(o=r(t))&&"function"==typeof t.callee?"Arguments":o}},"./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": +/*! no static exports found */function(e,t){var n={}.toString;e.exports=function(e){return n.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": +/*! no static exports found */function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},"./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": +/*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js"),i=n(/*! ./_property-desc */"./node_modules/core-js/library/modules/_property-desc.js");e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},"./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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_a-function */"./node_modules/core-js/library/modules/_a-function.js");e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},"./node_modules/core-js/library/modules/_defined.js": /*!**********************************************************!*\ !*** ./node_modules/core-js/library/modules/_defined.js ***! \**********************************************************/ @@ -162,11 +162,11 @@ /*!**************************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){e.exports=!n(/*! ./_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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js"),i=n(/*! ./_global */"./node_modules/core-js/library/modules/_global.js").document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},"./node_modules/core-js/library/modules/_enum-bug-keys.js": /*!****************************************************************!*\ !*** ./node_modules/core-js/library/modules/_enum-bug-keys.js ***! \****************************************************************/ @@ -174,11 +174,11 @@ /*!************************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js"),i=n(/*! ./_object-gops */"./node_modules/core-js/library/modules/_object-gops.js"),a=n(/*! ./_object-pie */"./node_modules/core-js/library/modules/_object-pie.js");e.exports=function(e){var t=r(e),n=i.f;if(n)for(var o,s=n(e),l=a.f,u=0;s.length>u;)l.call(e,o=s[u++])&&t.push(o);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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),i=n(/*! ./_core */"./node_modules/core-js/library/modules/_core.js"),a=n(/*! ./_ctx */"./node_modules/core-js/library/modules/_ctx.js"),o=n(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js"),s=function(e,t,n){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,v=f?i:i[t]||(i[t]={}),y=v.prototype,b=f?r:h?r[t]:(r[t]||{}).prototype;for(l in f&&(n=t),n)(u=!d&&b&&void 0!==b[l])&&l in v||(c=u?b[l]:n[l],v[l]=f&&"function"!=typeof b[l]?n[l]:m&&u?a(c,r):g&&b[l]==c?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(c):p&&"function"==typeof c?a(Function.call,c):c,p&&((v.virtual||(v.virtual={}))[l]=c,e&s.R&&y&&!y[l]&&o(y,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 ***! \********************************************************/ @@ -186,35 +186,35 @@ /*!*********************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"./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": +/*! no static exports found */function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js"),i=n(/*! ./_property-desc */"./node_modules/core-js/library/modules/_property-desc.js");e.exports=n(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js")?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,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": +/*! no static exports found */function(e,t,n){e.exports=n(/*! ./_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": +/*! no static exports found */function(e,t,n){e.exports=!n(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js")&&!n(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js")((function(){return 7!=Object.defineProperty(n(/*! ./_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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_cof */"./node_modules/core-js/library/modules/_cof.js");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js"),i=n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_cof */"./node_modules/core-js/library/modules/_cof.js");e.exports=Array.isArray||function(e){return"Array"==r(e)}},"./node_modules/core-js/library/modules/_is-object.js": /*!************************************************************!*\ !*** ./node_modules/core-js/library/modules/_is-object.js ***! \************************************************************/ @@ -222,19 +222,19 @@ /*!************************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js");e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&r(a.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": +/*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./_object-create */"./node_modules/core-js/library/modules/_object-create.js"),i=n(/*! ./_property-desc */"./node_modules/core-js/library/modules/_property-desc.js"),a=n(/*! ./_set-to-string-tag */"./node_modules/core-js/library/modules/_set-to-string-tag.js"),o={};n(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js")(o,n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(o,{next:i(1,n)}),a(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,C=k[f]||k["@@iterator"]||g&&k[g],x=C||E(g),R=g?S?E("entries"):x:void 0,L="Array"==t&&k.entries||C;if(L&&(A=d(L.call(new e)))!==Object.prototype&&(c(A,T,!0),n||s(A,f)||a(A,f,p)),S&&C&&"values"!==C.name&&(w=!0,x=function(){return C.call(this)}),n&&!v||!h&&!w&&k[f]||a(k,f,x),l[t]=x,l[T]=p,g)if(b={values:S?x:E("values"),keys:y?x:E("keys"),entries:R},v)for(_ in b)_ in k||o(k,_,b[_]);else i(i.P+i.F*(h||w),t,b);return b}},"./node_modules/core-js/library/modules/_iter-detect.js": +/*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./_library */"./node_modules/core-js/library/modules/_library.js"),i=n(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),a=n(/*! ./_redefine */"./node_modules/core-js/library/modules/_redefine.js"),o=n(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js"),s=n(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),l=n(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js"),u=n(/*! ./_iter-create */"./node_modules/core-js/library/modules/_iter-create.js"),c=n(/*! ./_set-to-string-tag */"./node_modules/core-js/library/modules/_set-to-string-tag.js"),d=n(/*! ./_object-gpo */"./node_modules/core-js/library/modules/_object-gpo.js"),f=n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,n,m,g,v,y){u(n,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 n(this,e)}}return function(){return new n(this,e)}},T=t+" Iterator",w="values"==g,S=!1,k=e.prototype,C=k[f]||k["@@iterator"]||g&&k[g],x=C||E(g),R=g?w?E("entries"):x:void 0,L="Array"==t&&k.entries||C;if(L&&(A=d(L.call(new e)))!==Object.prototype&&(c(A,T,!0),r||s(A,f)||o(A,f,p)),w&&C&&"values"!==C.name&&(S=!0,x=function(){return C.call(this)}),r&&!y||!h&&!S&&k[f]||o(k,f,x),l[t]=x,l[T]=p,g)if(b={values:w?x:E("values"),keys:v?x:E("keys"),entries:R},y)for(_ in b)_ in k||a(k,_,b[_]);else i(i.P+i.F*(h||S),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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),i=!1;try{var a=[7][r]();a.return=function(){i=!0},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var a=[7],o=a[r]();o.next=function(){return{done:n=!0}},a[r]=function(){return o},e(a)}catch(e){}return n}},"./node_modules/core-js/library/modules/_iter-step.js": /*!************************************************************!*\ !*** ./node_modules/core-js/library/modules/_iter-step.js ***! \************************************************************/ @@ -246,7 +246,7 @@ /*!********************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js"),i=n(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js");e.exports=function(e,t){for(var n,a=i(e),o=r(a),s=o.length,l=0;s>l;)if(a[n=o[l++]]===t)return n}},"./node_modules/core-js/library/modules/_library.js": /*!**********************************************************!*\ !*** ./node_modules/core-js/library/modules/_library.js ***! \**********************************************************/ @@ -254,35 +254,35 @@ /*!*******************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_uid */"./node_modules/core-js/library/modules/_uid.js")("meta"),i=n(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js"),a=n(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),o=n(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js").f,s=0,l=Object.isExtensible||function(){return!0},u=!n(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js")((function(){return l(Object.preventExtensions({}))})),c=function(e){o(e,r,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!a(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return u&&d.NEED&&l(e)&&!a(e,r)&&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": +/*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js"),i=n(/*! ./_object-gops */"./node_modules/core-js/library/modules/_object-gops.js"),a=n(/*! ./_object-pie */"./node_modules/core-js/library/modules/_object-pie.js"),o=n(/*! ./_to-object */"./node_modules/core-js/library/modules/_to-object.js"),s=n(/*! ./_iobject */"./node_modules/core-js/library/modules/_iobject.js"),l=Object.assign;e.exports=!l||n(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js")((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=r}))?function(e,t){for(var n=o(e),l=arguments.length,u=1,c=i.f,d=a.f;l>u;)for(var f,h=s(arguments[u++]),p=c?r(h).concat(c(h)):r(h),m=p.length,g=0;m>g;)d.call(h,f=p[g++])&&(n[f]=h[f]);return n}: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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),i=n(/*! ./_object-dps */"./node_modules/core-js/library/modules/_object-dps.js"),a=n(/*! ./_enum-bug-keys */"./node_modules/core-js/library/modules/_enum-bug-keys.js"),o=n(/*! ./_shared-key */"./node_modules/core-js/library/modules/_shared-key.js")("IE_PROTO"),s=function(){},l=function(){var e,t=n(/*! ./_dom-create */"./node_modules/core-js/library/modules/_dom-create.js")("iframe"),r=a.length;for(t.style.display="none",n(/*! ./_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;r--;)delete l.prototype[a[r]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[o]=e):n=l(),void 0===t?n:i(n,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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),i=n(/*! ./_ie8-dom-define */"./node_modules/core-js/library/modules/_ie8-dom-define.js"),a=n(/*! ./_to-primitive */"./node_modules/core-js/library/modules/_to-primitive.js"),o=Object.defineProperty;t.f=n(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js")?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js"),i=n(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),a=n(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js");e.exports=n(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js")?Object.defineProperties:function(e,t){i(e);for(var n,o=a(t),s=o.length,l=0;s>l;)r.f(e,n=o[l++],t[n]);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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_object-pie */"./node_modules/core-js/library/modules/_object-pie.js"),i=n(/*! ./_property-desc */"./node_modules/core-js/library/modules/_property-desc.js"),a=n(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),o=n(/*! ./_to-primitive */"./node_modules/core-js/library/modules/_to-primitive.js"),s=n(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),l=n(/*! ./_ie8-dom-define */"./node_modules/core-js/library/modules/_ie8-dom-define.js"),u=Object.getOwnPropertyDescriptor;t.f=n(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js")?u:function(e,t){if(e=a(e),t=o(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return i(!r.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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),i=n(/*! ./_object-gopn */"./node_modules/core-js/library/modules/_object-gopn.js").f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?function(e){try{return i(e)}catch(e){return o.slice()}}(e):i(r(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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_object-keys-internal */"./node_modules/core-js/library/modules/_object-keys-internal.js"),i=n(/*! ./_enum-bug-keys */"./node_modules/core-js/library/modules/_enum-bug-keys.js").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},"./node_modules/core-js/library/modules/_object-gops.js": /*!**************************************************************!*\ !*** ./node_modules/core-js/library/modules/_object-gops.js ***! \**************************************************************/ @@ -290,15 +290,15 @@ /*!*************************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),i=n(/*! ./_to-object */"./node_modules/core-js/library/modules/_to-object.js"),a=n(/*! ./_shared-key */"./node_modules/core-js/library/modules/_shared-key.js")("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o: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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),i=n(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),a=n(/*! ./_array-includes */"./node_modules/core-js/library/modules/_array-includes.js")(!1),o=n(/*! ./_shared-key */"./node_modules/core-js/library/modules/_shared-key.js")("IE_PROTO");e.exports=function(e,t){var n,s=i(e),l=0,u=[];for(n in s)n!=o&&r(s,n)&&u.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~a(u,n)||u.push(n));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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_object-keys-internal */"./node_modules/core-js/library/modules/_object-keys-internal.js"),i=n(/*! ./_enum-bug-keys */"./node_modules/core-js/library/modules/_enum-bug-keys.js");e.exports=Object.keys||function(e){return r(e,i)}},"./node_modules/core-js/library/modules/_object-pie.js": /*!*************************************************************!*\ !*** ./node_modules/core-js/library/modules/_object-pie.js ***! \*************************************************************/ @@ -306,7 +306,7 @@ /*!*************************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),i=n(/*! ./_core */"./node_modules/core-js/library/modules/_core.js"),a=n(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js");e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],o={};o[e]=t(n),r(r.S+r.F*a((function(){n(1)})),"Object",o)}},"./node_modules/core-js/library/modules/_property-desc.js": /*!****************************************************************!*\ !*** ./node_modules/core-js/library/modules/_property-desc.js ***! \****************************************************************/ @@ -314,107 +314,107 @@ /*!***********************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){e.exports=n(/*! ./_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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js"),i=n(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),a=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(/*! ./_ctx */"./node_modules/core-js/library/modules/_ctx.js")(Function.call,n(/*! ./_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,n){return a(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:a}},"./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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js").f,i=n(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),a=n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_shared */"./node_modules/core-js/library/modules/_shared.js")("keys"),i=n(/*! ./_uid */"./node_modules/core-js/library/modules/_uid.js");e.exports=function(e){return r[e]||(r[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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),i=r["__core-js_shared__"]||(r["__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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_to-integer */"./node_modules/core-js/library/modules/_to-integer.js"),i=n(/*! ./_defined */"./node_modules/core-js/library/modules/_defined.js");e.exports=function(e){return function(t,n){var a,o,s=String(i(t)),l=r(n),u=s.length;return l<0||l>=u?e?"":void 0:(a=s.charCodeAt(l))<55296||a>56319||l+1===u||(o=s.charCodeAt(l+1))<56320||o>57343?e?s.charAt(l):a:e?s.slice(l,l+2):o-56320+(a-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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_to-integer */"./node_modules/core-js/library/modules/_to-integer.js"),i=Math.max,a=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):a(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": +/*! no static exports found */function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_iobject */"./node_modules/core-js/library/modules/_iobject.js"),i=n(/*! ./_defined */"./node_modules/core-js/library/modules/_defined.js");e.exports=function(e){return r(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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_to-integer */"./node_modules/core-js/library/modules/_to-integer.js"),i=Math.min;e.exports=function(e){return e>0?i(r(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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_defined */"./node_modules/core-js/library/modules/_defined.js");e.exports=function(e){return Object(r(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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js");e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.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": +/*! no static exports found */function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),i=n(/*! ./_core */"./node_modules/core-js/library/modules/_core.js"),a=n(/*! ./_library */"./node_modules/core-js/library/modules/_library.js"),o=n(/*! ./_wks-ext */"./node_modules/core-js/library/modules/_wks-ext.js"),s=n(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js").f;e.exports=function(e){var t=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:o.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": +/*! no static exports found */function(e,t,n){t.f=n(/*! ./_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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_shared */"./node_modules/core-js/library/modules/_shared.js")("wks"),i=n(/*! ./_uid */"./node_modules/core-js/library/modules/_uid.js"),a=n(/*! ./_global */"./node_modules/core-js/library/modules/_global.js").Symbol,o="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=r},"./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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_classof */"./node_modules/core-js/library/modules/_classof.js"),i=n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),a=n(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js");e.exports=n(/*! ./_core */"./node_modules/core-js/library/modules/_core.js").getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[r(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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),i=n(/*! ./core.get-iterator-method */"./node_modules/core-js/library/modules/core.get-iterator-method.js");e.exports=n(/*! ./_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 r(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": +/*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./_ctx */"./node_modules/core-js/library/modules/_ctx.js"),i=n(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),a=n(/*! ./_to-object */"./node_modules/core-js/library/modules/_to-object.js"),o=n(/*! ./_iter-call */"./node_modules/core-js/library/modules/_iter-call.js"),s=n(/*! ./_is-array-iter */"./node_modules/core-js/library/modules/_is-array-iter.js"),l=n(/*! ./_to-length */"./node_modules/core-js/library/modules/_to-length.js"),u=n(/*! ./_create-property */"./node_modules/core-js/library/modules/_create-property.js"),c=n(/*! ./core.get-iterator-method */"./node_modules/core-js/library/modules/core.get-iterator-method.js");i(i.S+i.F*!n(/*! ./_iter-detect */"./node_modules/core-js/library/modules/_iter-detect.js")((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,d,f=a(e),h="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,v=0,y=c(f);if(g&&(m=r(m,p>2?arguments[2]:void 0,2)),null==y||h==Array&&s(y))for(n=new h(t=l(f.length));t>v;v++)u(n,v,g?m(f[v],v):f[v]);else for(d=y.call(f),n=new h;!(i=d.next()).done;v++)u(n,v,g?o(d,m,[i.value,v],!0):i.value);return n.length=v,n}})},"./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": +/*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./_add-to-unscopables */"./node_modules/core-js/library/modules/_add-to-unscopables.js"),i=n(/*! ./_iter-step */"./node_modules/core-js/library/modules/_iter-step.js"),a=n(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js"),o=n(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js");e.exports=n(/*! ./_iter-define */"./node_modules/core-js/library/modules/_iter-define.js")(Array,"Array",(function(e,t){this._t=o(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_export */"./node_modules/core-js/library/modules/_export.js");r(r.S+r.F,"Object",{assign:n(/*! ./_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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_export */"./node_modules/core-js/library/modules/_export.js");r(r.S,"Object",{create:n(/*! ./_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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_export */"./node_modules/core-js/library/modules/_export.js");r(r.S+r.F*!n(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js"),"Object",{defineProperty:n(/*! ./_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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),i=n(/*! ./_object-gopd */"./node_modules/core-js/library/modules/_object-gopd.js").f;n(/*! ./_object-sap */"./node_modules/core-js/library/modules/_object-sap.js")("getOwnPropertyDescriptor",(function(){return function(e,t){return i(r(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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_to-object */"./node_modules/core-js/library/modules/_to-object.js"),i=n(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js");n(/*! ./_object-sap */"./node_modules/core-js/library/modules/_object-sap.js")("keys",(function(){return function(e){return i(r(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": +/*! no static exports found */function(e,t,n){var r=n(/*! ./_export */"./node_modules/core-js/library/modules/_export.js");r(r.S,"Object",{setPrototypeOf:n(/*! ./_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 ***! \**********************************************************************/ @@ -422,83 +422,83 @@ /*!*********************************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./_string-at */"./node_modules/core-js/library/modules/_string-at.js")(!0);n(/*! ./_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,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),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"),C=r(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js"),x=w.f,R=k.f,L=S.f,j=n.Symbol,P=n.JSON,I=P&&P.stringify,O=h("_hidden"),D=h("toPrimitive"),M={}.propertyIsEnumerable,N=c("symbol-registry"),F=c("symbols"),U=c("op-symbols"),B=Object.prototype,K="function"==typeof j,G=n.QObject,V=!G||!G.prototype||!G.prototype.findChild,H=o&&u((function(){return 7!=T(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=x(B,t);n&&delete B[t],R(e,t,r),n&&e!==B&&R(B,t,n)}:R,Y=function(e){var t=F[e]=T(j.prototype);return t._k=e,t},z=K&&"symbol"==typeof j.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof j},W=function(e,t,r){return e===B&&W(U,t,r),b(e),t=A(t,!0),b(r),i(F,t)?(r.enumerable?(i(e,O)&&e[O][t]&&(e[O][t]=!1),r=T(r,{enumerable:E(0,!1)})):(i(e,O)||R(e,O,E(1,{})),e[O][t]=!0),H(e,t,r)):R(e,t,r)},$=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(F,e)&&!i(U,e))&&(!(t||!i(this,e)||!i(F,e)||i(this,O)&&this[O][e])||t)},X=function(e,t){if(e=_(e),t=A(t,!0),e!==B||!i(F,t)||i(U,t)){var r=x(e,t);return!r||!i(F,t)||i(e,O)&&e[O][t]||(r.enumerable=!0),r}},J=function(e){for(var t,r=L(_(e)),n=[],o=0;r.length>o;)i(F,t=r[o++])||t==O||t==l||n.push(t);return n},Z=function(e){for(var t,r=e===B,n=L(r?U:_(e)),o=[],a=0;n.length>a;)!i(F,t=n[a++])||r&&!i(B,t)||o.push(F[t]);return o};K||(s((j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(r){this===B&&t.call(U,r),i(this,O)&&i(this[O],e)&&(this[O][e]=!1),H(this,e,E(1,r))};return o&&V&&H(B,e,{configurable:!0,set:t}),Y(e)}).prototype,"toString",(function(){return this._k})),w.f=X,k.f=W,r(/*! ./_object-gopn */"./node_modules/core-js/library/modules/_object-gopn.js").f=S.f=J,r(/*! ./_object-pie */"./node_modules/core-js/library/modules/_object-pie.js").f=q,r(/*! ./_object-gops */"./node_modules/core-js/library/modules/_object-gops.js").f=Z,o&&!r(/*! ./_library */"./node_modules/core-js/library/modules/_library.js")&&s(B,"propertyIsEnumerable",q,!0),p.f=function(e){return Y(h(e))}),a(a.G+a.W+a.F*!K,{Symbol:j});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Q.length>ee;)h(Q[ee++]);for(Q=C(h.store),ee=0;Q.length>ee;)m(Q[ee++]);a(a.S+a.F*!K,"Symbol",{for:function(e){return i(N,e+="")?N[e]:N[e]=j(e)},keyFor:function(e){if(z(e))return g(N,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){V=!0},useSimple:function(){V=!1}}),a(a.S+a.F*!K,"Object",{create:function(e,t){return void 0===t?T(e):$(T(e),t)},defineProperty:W,defineProperties:$,getOwnPropertyDescriptor:X,getOwnPropertyNames:J,getOwnPropertySymbols:Z}),P&&a(a.S+a.F*(!K||u((function(){var e=j();return"[null]"!=I([e])||"{}"!=I({a:e})||"{}"!=I(Object(e))}))),"JSON",{stringify:function(e){if(void 0!==e&&!z(e)){for(var t,r,n=[e],i=1;arguments.length>i;)n.push(arguments[i++]);return"function"==typeof(t=n[1])&&(r=t),!r&&v(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!z(t))return t}),n[1]=t,I.apply(P,n)}}}),j.prototype[D]||r(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js")(j.prototype,D,j.prototype.valueOf),d(j,"Symbol"),d(Math,"Math",!0),d(n.JSON,"JSON",!0)},"./node_modules/core-js/library/modules/es7.symbol.async-iterator.js": +/*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),i=n(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),a=n(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js"),o=n(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),s=n(/*! ./_redefine */"./node_modules/core-js/library/modules/_redefine.js"),l=n(/*! ./_meta */"./node_modules/core-js/library/modules/_meta.js").KEY,u=n(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js"),c=n(/*! ./_shared */"./node_modules/core-js/library/modules/_shared.js"),d=n(/*! ./_set-to-string-tag */"./node_modules/core-js/library/modules/_set-to-string-tag.js"),f=n(/*! ./_uid */"./node_modules/core-js/library/modules/_uid.js"),h=n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js"),p=n(/*! ./_wks-ext */"./node_modules/core-js/library/modules/_wks-ext.js"),m=n(/*! ./_wks-define */"./node_modules/core-js/library/modules/_wks-define.js"),g=n(/*! ./_keyof */"./node_modules/core-js/library/modules/_keyof.js"),v=n(/*! ./_enum-keys */"./node_modules/core-js/library/modules/_enum-keys.js"),y=n(/*! ./_is-array */"./node_modules/core-js/library/modules/_is-array.js"),b=n(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),_=n(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),A=n(/*! ./_to-primitive */"./node_modules/core-js/library/modules/_to-primitive.js"),E=n(/*! ./_property-desc */"./node_modules/core-js/library/modules/_property-desc.js"),T=n(/*! ./_object-create */"./node_modules/core-js/library/modules/_object-create.js"),w=n(/*! ./_object-gopn-ext */"./node_modules/core-js/library/modules/_object-gopn-ext.js"),S=n(/*! ./_object-gopd */"./node_modules/core-js/library/modules/_object-gopd.js"),k=n(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js"),C=n(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js"),x=S.f,R=k.f,L=w.f,I=r.Symbol,P=r.JSON,j=P&&P.stringify,O=h("_hidden"),D=h("toPrimitive"),M={}.propertyIsEnumerable,N=c("symbol-registry"),U=c("symbols"),F=c("op-symbols"),B=Object.prototype,K="function"==typeof I,V=r.QObject,G=!V||!V.prototype||!V.prototype.findChild,H=a&&u((function(){return 7!=T(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=x(B,t);r&&delete B[t],R(e,t,n),r&&e!==B&&R(B,t,r)}:R,Y=function(e){var t=U[e]=T(I.prototype);return t._k=e,t},z=K&&"symbol"==typeof I.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof I},W=function(e,t,n){return e===B&&W(F,t,n),b(e),t=A(t,!0),b(n),i(U,t)?(n.enumerable?(i(e,O)&&e[O][t]&&(e[O][t]=!1),n=T(n,{enumerable:E(0,!1)})):(i(e,O)||R(e,O,E(1,{})),e[O][t]=!0),H(e,t,n)):R(e,t,n)},$=function(e,t){b(e);for(var n,r=v(t=_(t)),i=0,a=r.length;a>i;)W(e,n=r[i++],t[n]);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 n=x(e,t);return!n||!i(U,t)||i(e,O)&&e[O][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=L(_(e)),r=[],a=0;n.length>a;)i(U,t=n[a++])||t==O||t==l||r.push(t);return r},Z=function(e){for(var t,n=e===B,r=L(n?F:_(e)),a=[],o=0;r.length>o;)!i(U,t=r[o++])||n&&!i(B,t)||a.push(U[t]);return a};K||(s((I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===B&&t.call(F,n),i(this,O)&&i(this[O],e)&&(this[O][e]=!1),H(this,e,E(1,n))};return a&&G&&H(B,e,{configurable:!0,set:t}),Y(e)}).prototype,"toString",(function(){return this._k})),S.f=X,k.f=W,n(/*! ./_object-gopn */"./node_modules/core-js/library/modules/_object-gopn.js").f=w.f=J,n(/*! ./_object-pie */"./node_modules/core-js/library/modules/_object-pie.js").f=q,n(/*! ./_object-gops */"./node_modules/core-js/library/modules/_object-gops.js").f=Z,a&&!n(/*! ./_library */"./node_modules/core-js/library/modules/_library.js")&&s(B,"propertyIsEnumerable",q,!0),p.f=function(e){return Y(h(e))}),o(o.G+o.W+o.F*!K,{Symbol:I});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=C(h.store),ee=0;Q.length>ee;)m(Q[ee++]);o(o.S+o.F*!K,"Symbol",{for:function(e){return i(N,e+="")?N[e]:N[e]=I(e)},keyFor:function(e){if(z(e))return g(N,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){G=!0},useSimple:function(){G=!1}}),o(o.S+o.F*!K,"Object",{create:function(e,t){return void 0===t?T(e):$(T(e),t)},defineProperty:W,defineProperties:$,getOwnPropertyDescriptor:X,getOwnPropertyNames:J,getOwnPropertySymbols:Z}),P&&o(o.S+o.F*(!K||u((function(){var e=I();return"[null]"!=j([e])||"{}"!=j({a:e})||"{}"!=j(Object(e))}))),"JSON",{stringify:function(e){if(void 0!==e&&!z(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return"function"==typeof(t=r[1])&&(n=t),!n&&y(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!z(t))return t}),r[1]=t,j.apply(P,r)}}}),I.prototype[D]||n(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js")(I.prototype,D,I.prototype.valueOf),d(I,"Symbol"),d(Math,"Math",!0),d(r.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": +/*! no static exports found */function(e,t,n){n(/*! ./_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": +/*! no static exports found */function(e,t,n){n(/*! ./_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": +/*! no static exports found */function(e,t,n){n(/*! ./es6.array.iterator */"./node_modules/core-js/library/modules/es6.array.iterator.js");for(var r=n(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),i=n(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js"),a=n(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js"),o=n(/*! ./_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=r[u],d=c&&c.prototype;d&&!d[o]&&i(d,o,u),a[u]=a.Array}},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/components/container/public/style.scss ***! + \*****************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../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/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/components/core/public/style.scss ***! + \************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../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/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/base_flash_playback/public/flash.scss ***! + \**************************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../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/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/html5_video/public/style.scss ***! + \******************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../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/joaopaulo/Workstation/JS/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/components/container/public/style.scss ***! + !*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/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,".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": +/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../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/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/no_op/public/style.scss ***! + \************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../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/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/closed_captions/public/closed_captions.scss ***! + \******************************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../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/joaopaulo/Workstation/JS/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/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/joaopaulo/Workstation/JS/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,".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": +/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../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/joaopaulo/Workstation/JS/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/media_control/public/media-control.scss ***! + !*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/error_screen/public/error_screen.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": +/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../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/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/media_control/public/media-control.scss ***! + \**************************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */function(e,t,n){var r=n(/*! ../../../../node_modules/css-loader/lib/url/escape.js */"./node_modules/css-loader/lib/url/escape.js");(e.exports=n(/*! ../../../../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("+r(n(/*! ./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("+r(n(/*! ./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/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/poster/public/poster.scss ***! + \************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../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/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/seek_time/public/seek_time.scss ***! + \******************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../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/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/spinner_three_bounce/public/spinner.scss ***! + \***************************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../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/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/watermark/public/watermark.scss ***! + \******************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../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": +/*! no static exports found */function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var a=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),o=i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}));return[r].concat(o).concat([a]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var a=this[i][0];"number"==typeof a&&(r[a]=!0)}for(i=0;i<e.length;i++){var o=e[i];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),t.push(o))}},t}},"./node_modules/css-loader/lib/url/escape.js": /*!***************************************************!*\ !*** ./node_modules/css-loader/lib/url/escape.js ***! \***************************************************/ @@ -506,513 +506,206 @@ /*!*****************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r;"undefined"!=typeof window&&(r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s="./src/hls.ts")}({"./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": +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function a(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,r,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,r||e,a),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 a:delete e._events[t]}function u(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(i=!1)),u.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},u.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,a=n.length,o=new Array(a);r<a;r++)o[r]=n[r].fn;return o},u.prototype.listenerCount=function(e){var t=i?i+e:e,n=this._events[t];return n?n.fn?1:n.length:0},u.prototype.emit=function(e,t,n,r,a,o){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,n),!0;case 4:return c.fn.call(c.context,t,n,r),!0;case 5:return c.fn.call(c.context,t,n,r,a),!0;case 6:return c.fn.call(c.context,t,n,r,a,o),!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,n);break;case 4:c[u].fn.call(c[u].context,t,n,r);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,n){return s(this,e,t,n,!1)},u.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},u.prototype.removeListener=function(e,t,n,r){var a=i?i+e:e;if(!this._events[a])return this;if(!t)return l(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||r&&!o.once||n&&o.context!==n||l(this,a);else{for(var s=0,u=[],c=o.length;s<c;s++)(o[s].fn!==t||r&&!o[s].once||n&&o[s].context!==n)&&u.push(o[s]);u.length?this._events[a]=1===u.length?u[0]:u:l(this,a)}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 a,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/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": +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,a,o,s;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,i=/^([^\/?#]*)(.*)$/,a=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):t;var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=i.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(u.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var c=o.path,d=c.substring(0,c.lastIndexOf("/")+1)+a.path;u.path=s.normalizePath(d)}else u.path=o.path,a.params||(u.params=o.params,a.query||(u.query=o.query));return null===u.path&&(u.path=n.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(u)},parseURL:function(e){var t=r.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(a,"");e.length!==(e=e.replace(o,"")).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,C=k.length,x=k[0].start,R=k[C-1].start+k[C-1].duration,L=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<x){if(!(m.end>x||m.nextStart))return;f.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=x+.05}if(n.initSegment&&!n.initSegment.data)L=n.initSegment;else if(_<=x){if(L=k[0],null!==this.videoTrackCC&&L.cc!==this.videoTrackCC&&(L=h.findFragWithCC(k,this.videoTrackCC)),n.live&&L.loadIdx&&L.loadIdx===this.fragLoadIdx){var j=m.nextStart?m.nextStart:x;return f.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(j+.05)),void(this.media.currentTime=j+.05)}}else{var P=void 0,I=s.maxFragLookUpTolerance,O=A?k[A.sn-k[0].sn+1]:void 0,D=function(e){var t=Math.min(I,e.duration);return e.start+e.duration-t<=_?1:e.start-t>_&&e.start?-1:0};_<R?(_>R-I&&(I=0),P=O&&!D(O)?O:o.default.search(k,D)):P=k[C-1],P&&(L=P,x=P.start,A&&L.level===A.level&&L.sn===A.sn&&(L.sn<n.endSN?(L=k[L.sn+1-n.startSN],f.logger.log("SN just loaded, load next one: "+L.sn)):L=null))}L&&(L.encrypted?(f.logger.log("Loading key for "+L.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+w),this.state=g.State.KEY_LOADING,i.trigger(l.default.KEY_LOADING,{frag:L})):(f.logger.log("Loading "+L.sn+", cc: "+L.cc+" of ["+n.startSN+" ,"+n.endSN+"],track "+w+", currentTime:"+t+",bufferEnd:"+_.toFixed(3)),this.fragCurrent=L,(S||this.fragmentTracker.getState(L)===p.FragmentState.NOT_LOADED)&&(this.startFragRequested=!0,e.isFinite(L.sn)&&(this.nextLoadPosition=L.start+L.duration),i.trigger(l.default.FRAG_LOADING,{frag:L}),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,F=(c=this.media)&&c.seeking;(!N||M>=N||F)&&(f.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=g.State.IDLE);break;case g.State.WAITING_INIT_PTS:var U=this.videoTrackCC;if(void 0===this.initPTS[U])break;var B=this.waitingFragment;if(B){var K=B.frag.cc;U!==K?(r=this.tracks[this.trackId]).details&&r.details.live&&(f.logger.warn("Waiting fragment CC ("+K+") does not match video track CC ("+U+")"),this.waitingFragment=null,this.state=g.State.IDLE):(this.state=g.State.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=g.State.IDLE;break;case g.State.STOPPED:case g.State.FRAG_LOADING:case g.State.PARSING:case g.State.PARSED:case g.State.ENDED:}},r.prototype.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended);var r=this.config;this.tracks&&r.autoStartLoad&&this.startLoad(r.startPosition)},r.prototype.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(f.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.stopLoad()},r.prototype.onAudioTracksUpdated=function(e){f.logger.log("audio tracks updated"),this.tracks=e.audioTracks},r.prototype.onAudioTrackSwitching=function(e){var t=!!e.url;this.trackId=e.id,this.fragCurrent=null,this.state=g.State.PAUSED,this.waitingFragment=null,t?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),t&&(this.audioSwitch=!0,this.state=g.State.IDLE),this.tick()},r.prototype.onAudioTrackLoaded=function(t){var r=t.details,n=t.id,i=this.tracks[n],o=r.totalduration,a=0;if(f.logger.log("track "+n+" loaded ["+r.startSN+","+r.endSN+"],duration:"+o),r.live){var s=i.details;s&&r.fragments.length>0?(u.mergeDetails(s,r),a=r.fragments[0].start,r.PTSKnown?f.logger.log("live audio playlist sliding:"+a.toFixed(3)):f.logger.log("live audio playlist - outdated PTS, unknown sliding")):(r.PTSKnown=!1,f.logger.log("live audio playlist - first load, unknown sliding"))}else r.PTSKnown=!1;if(i.details=r,!this.startFragRequested){if(-1===this.startPosition){var l=r.startTimeOffset;e.isFinite(l)?(f.logger.log("start time offset found in playlist, adjust startPosition to "+l),this.startPosition=l):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===g.State.WAITING_TRACK&&(this.state=g.State.IDLE),this.tick()},r.prototype.onKeyLoaded=function(){this.state===g.State.KEY_LOADING&&(this.state=g.State.IDLE,this.tick())},r.prototype.onFragLoaded=function(e){var t=this.fragCurrent,r=e.frag;if(this.state===g.State.FRAG_LOADING&&t&&"audio"===r.type&&r.level===t.level&&r.sn===t.sn){var n=this.tracks[this.trackId],i=n.details,o=i.totalduration,a=t.level,u=t.sn,c=t.cc,d=this.config.defaultAudioCodec||n.audioCodec||"mp4a.40.2",h=this.stats=e.stats;if("initSegment"===u)this.state=g.State.IDLE,h.tparsed=h.tbuffered=y.now(),i.initSegment.data=e.payload,this.hls.trigger(l.default.FRAG_BUFFERED,{stats:h,frag:t,id:"audio"}),this.tick();else{this.state=g.State.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new s.default(this.hls,"audio"));var p=this.initPTS[c],m=i.initSegment?i.initSegment.data:[];i.initSegment||void 0!==p?(this.pendingBuffering=!0,f.logger.log("Demuxing "+u+" of ["+i.startSN+" ,"+i.endSN+"],track "+a),this.demuxer.push(e.payload,m,d,null,t,o,!1,p)):(f.logger.log("unknown video PTS for continuity counter "+c+", waiting for video PTS before demuxing audio frag "+u+" of ["+i.startSN+" ,"+i.endSN+"],track "+a),this.waitingFragment=e,this.state=g.State.WAITING_INIT_PTS)}}this.fragLoadError=0},r.prototype.onFragParsingInitSegment=function(e){var t=this.fragCurrent,r=e.frag;if(t&&"audio"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===g.State.PARSING){var n=e.tracks,i=void 0;if(n.video&&delete n.video,i=n.audio){i.levelCodec=i.codec,i.id=e.id,this.hls.trigger(l.default.BUFFER_CODECS,n),f.logger.log("audio track:audio,container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var o=i.initSegment;if(o){var a={type:"audio",data:o,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[a]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,a))}this.tick()}}},r.prototype.onFragParsingData=function(t){var r=this,n=this.fragCurrent,i=t.frag;if(n&&"audio"===t.id&&"audio"===t.type&&i.sn===n.sn&&i.level===n.level&&this.state===g.State.PARSING){var o=this.trackId,a=this.tracks[o],s=this.hls;e.isFinite(t.endPTS)||(t.endPTS=t.startPTS+n.duration,t.endDTS=t.startDTS+n.duration),n.addElementaryStream(m.default.ElementaryStreamTypes.AUDIO),f.logger.log("parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb),u.updateFragPTSDTS(a.details,n,t.startPTS,t.endPTS);var c=this.audioSwitch,h=this.media,p=!1;if(c&&h)if(h.readyState){var y=h.currentTime;f.logger.log("switching audio track : currentTime:"+y),y>=t.startPTS&&(f.logger.log("switching audio track : flushing all audio"),this.state=g.State.BUFFER_FLUSHING,s.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:e.POSITIVE_INFINITY,type:"audio"}),p=!0,this.audioSwitch=!1,s.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:o}))}else this.audioSwitch=!1,s.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:o});var v=this.pendingData;if(!v)return f.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void s.trigger(l.default.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([t.data1,t.data2].forEach((function(e){e&&e.length&&v.push({type:t.type,data:e,parent:"audio",content:"data"})})),!p&&v.length&&(v.forEach((function(e){r.state===g.State.PARSING&&(r.pendingBuffering=!0,r.hls.trigger(l.default.BUFFER_APPENDING,e))})),this.pendingData=[],this.appended=!0)),this.tick()}},r.prototype.onFragParsed=function(e){var t=this.fragCurrent,r=e.frag;t&&"audio"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===g.State.PARSING&&(this.stats.tparsed=y.now(),this.state=g.State.PARSED,this._checkAppendedParsed())},r.prototype.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},r.prototype.onBufferCreated=function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},r.prototype.onBufferAppended=function(e){if("audio"===e.parent){var t=this.state;t!==g.State.PARSING&&t!==g.State.PARSED||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},r.prototype._checkAppendedParsed=function(){if(!(this.state!==g.State.PARSED||this.appended&&this.pendingBuffering)){var e=this.fragCurrent,t=this.stats,r=this.hls;if(e){this.fragPrevious=e,t.tbuffered=y.now(),r.trigger(l.default.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var n=this.mediaBuffer?this.mediaBuffer:this.media;f.logger.log("audio buffered : "+c.default.toString(n.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,r.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=g.State.IDLE}this.tick()}},r.prototype.onError=function(t){var r=t.frag;if(!r||"audio"===r.type)switch(t.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:var n=t.frag;if(n&&"audio"!==n.type)break;if(!t.fatal){var i=this.fragLoadError;if(i?i++:i=1,i<=(s=this.config).fragLoadingMaxRetry){this.fragLoadError=i;var o=Math.min(Math.pow(2,i-1)*s.fragLoadingRetryDelay,s.fragLoadingMaxRetryTimeout);f.logger.warn("AudioStreamController: frag loading failed, retry in "+o+" ms"),this.retryDate=y.now()+o,this.state=g.State.FRAG_LOADING_WAITING_RETRY}else f.logger.error("AudioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=g.State.ERROR}break;case d.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case d.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case d.ErrorDetails.KEY_LOAD_ERROR:case d.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==g.State.ERROR&&(this.state=t.fatal?g.State.ERROR:g.State.IDLE,f.logger.warn("AudioStreamController: "+t.details+" while loading frag, now switching to "+this.state+" state ..."));break;case d.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===t.parent&&(this.state===g.State.PARSING||this.state===g.State.PARSED)){var s,u=this.mediaBuffer,c=this.media.currentTime;u&&a.BufferHelper.isBuffered(u,c)&&a.BufferHelper.isBuffered(u,c+.5)?((s=this.config).maxMaxBufferLength>=s.maxBufferLength&&(s.maxMaxBufferLength/=2,f.logger.warn("AudioStreamController: reduce max buffer length to "+s.maxMaxBufferLength+"s")),this.state=g.State.IDLE):(f.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=g.State.BUFFER_FLUSHING,this.hls.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:e.POSITIVE_INFINITY,type:"audio"}))}}},r.prototype.onBufferFlushed=function(){var e=this,t=this.pendingData;t&&t.length?(f.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),t.forEach((function(t){e.hls.trigger(l.default.BUFFER_APPENDING,t)})),this.appended=!0,this.pendingData=[],this.state=g.State.PARSED):(this.state=g.State.IDLE,this.fragPrevious=null,this.tick())},r}(g.default);t.default=v}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/audio-track-controller.js": -/*!**************************************************!*\ - !*** ./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": +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){function r(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n.oe=function(e){throw console.error(e),e};var r=n(n.s=ENTRY_MODULE);return r.default||r}function i(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function a(e,t,r){var a={};a[r]=[];var o=t.toString(),s=o.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return a;for(var l,u=s[1],c=new RegExp("(\\\\n|\\W)"+i(u)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");l=c.exec(o);)"dll-reference"!==l[3]&&a[r].push(l[3]);for(c=new RegExp("\\("+i(u)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");l=c.exec(o);)e[l[2]]||(a[r].push(l[1]),e[l[2]]=n(l[1]).m),a[l[2]]=a[l[2]]||[],a[l[2]].push(l[4]);for(var d,f=Object.keys(a),h=0;h<f.length;h++)for(var p=0;p<a[f[h]].length;p++)d=a[f[h]][p],isNaN(1*d)||(a[f[h]][p]=1*a[f[h]][p]);return a}function o(e){return Object.keys(e).reduce((function(t,n){return t||e[n].length>0}),!1)}e.exports=function(e,t){t=t||{};var i={main:n.m},s=t.all?{main:Object.keys(i.main)}:function(e,t){for(var n={main:[t]},r={main:[]},i={main:{}};o(n);)for(var s=Object.keys(n),l=0;l<s.length;l++){var u=s[l],c=n[u].pop();if(i[u]=i[u]||{},!i[u][c]&&e[u][c]){i[u][c]=!0,r[u]=r[u]||[],r[u].push(c);for(var d=a(e,e[u][c],u),f=Object.keys(d),h=0;h<f.length;h++)n[f[h]]=n[f[h]]||[],n[f[h]]=n[f[h]].concat(d[f[h]])}}return r}(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+" = ("+r.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 (("+r.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/crypt/decrypter.js": /*!********************************************!*\ - !*** ./src/controller/fragment-tracker.js ***! + !*** ./src/crypt/decrypter.js + 3 modules ***! \********************************************/ -/*! 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],C=this.uint8ArrayToUint32Array_(r),x=C[0],R=C[1],L=C[2],j=C[3],P=new Int32Array(e),I=new Int32Array(P.length),O=this.networkToHostOrderSwap;t<P.length;){for(h=O(P[t]),p=O(P[t+1]),m=O(P[t+2]),g=O(P[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,I[t]=O(o^x),I[t+1]=O(l^R),I[t+2]=O(s^L),I[t+3]=O(a^j),x=h,R=p,L=m,j=g,t+=4}return i?n(I.buffer):I.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 C=S[w],x=C.demux.probe;if(x(e)){var R=this.remuxer=new C.remux(A,T,E,this.vendor);_=new C.demux(A,R,T,E),this.probe=x;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 L=this.remuxer;(p||m)&&(_.resetInitSegment(r,n,a,y),L.resetInitSegment()),p&&(_.resetTimeStamp(b),L.resetTimeStamp(b)),"function"==typeof _.setDecryptData&&_.setDecryptData(t),_.append(e,h,g,v)},e}();t.default=g},"./src/demux/demuxer-worker.js": +/*! exports provided: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/errors.ts because of ./src/hls.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/events.js because of ./src/hls.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/get-self-scope.js because of ./src/hls.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/logger.js because of ./src/hls.ts */function(e,t,n){"use strict";n.r(t);var r=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}(),i=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}(),a=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()}var t=e.prototype;return t.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),n=new Uint32Array(4),r=0;r<4;r++)n[r]=t.getUint32(4*r);return n},t.initTable=function(){var e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],a=n[2],o=n[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 v=f[h],y=f[v],b=f[y],_=257*f[g]^16843008*g;r[h]=_<<24|_>>>8,i[h]=_<<16|_>>>16,a[h]=_<<8|_>>>24,o[h]=_,_=16843009*b^65537*y^257*v^16843008*h,l[g]=_<<24|_>>>8,u[g]=_<<16|_>>>16,c[g]=_<<8|_>>>24,d[g]=_,h?(h=v^f[f[f[b^v]]],p^=f[f[p]]):h=p=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;r<t.length&&n;)n=t[r]===this.key[r],r++;if(!n){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 a,o,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],v=p[2],y=p[3];for(a=0;a<u;a++)a<i?s=c[a]=t[a]:(l=s,a%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[a/i|0]<<24):i>6&&a%i==4&&(l=f[l>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l]),c[a]=s=(c[a-i]^l)>>>0);for(o=0;o<u;o++)a=u-o,l=3&o?c[a]:c[a-4],d[o]=o<4||a<=4?l:m[f[l>>>24]]^g[f[l>>>16&255]]^v[f[l>>>8&255]]^y[f[255&l]],d[o]=d[o]>>>0}},t.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},t.decrypt=function(e,t,n,r){for(var i,a,o,s,l,u,c,d,f,h,p,m,g,v,y,b,_,A=this.keySize+6,E=this.invKeySchedule,T=this.invSBox,w=this.invSubMix,S=w[0],k=w[1],C=w[2],x=w[3],R=this.uint8ArrayToUint32Array_(n),L=R[0],I=R[1],P=R[2],j=R[3],O=new Int32Array(e),D=new Int32Array(O.length),M=this.networkToHostOrderSwap;t<O.length;){for(f=M(O[t]),h=M(O[t+1]),p=M(O[t+2]),m=M(O[t+3]),l=f^E[0],u=m^E[1],c=p^E[2],d=h^E[3],g=4,v=1;v<A;v++)i=S[l>>>24]^k[u>>16&255]^C[c>>8&255]^x[255&d]^E[g],a=S[u>>>24]^k[c>>16&255]^C[d>>8&255]^x[255&l]^E[g+1],o=S[c>>>24]^k[d>>16&255]^C[l>>8&255]^x[255&u]^E[g+2],s=S[d>>>24]^k[l>>16&255]^C[u>>8&255]^x[255&c]^E[g+3],l=i,u=a,c=o,d=s,g+=4;i=T[l>>>24]<<24^T[u>>16&255]<<16^T[c>>8&255]<<8^T[255&d]^E[g],a=T[u>>>24]<<24^T[c>>16&255]<<16^T[d>>8&255]<<8^T[255&l]^E[g+1],o=T[c>>>24]<<24^T[d>>16&255]<<16^T[l>>8&255]<<8^T[255&u]^E[g+2],s=T[d>>>24]<<24^T[l>>16&255]<<16^T[u>>8&255]<<8^T[255&c]^E[g+3],g+=3,D[t]=M(i^L),D[t+1]=M(s^I),D[t+2]=M(o^P),D[t+3]=M(a^j),L=f,I=h,P=p,j=m,t+=4}return r?(y=D.buffer,b=y.byteLength,(_=b&&new DataView(y).getUint8(b-1))?y.slice(0,b-_):y):D.buffer},t.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}(),o=n("./src/errors.ts"),s=n("./src/utils/logger.js"),l=n("./src/events.js"),u=n("./src/utils/get-self-scope.js"),c=Object(u.getSelfScope)(),d=function(){function e(e,t,n){var r=(void 0===n?{}:n).removePKCS7Padding,i=void 0===r||r;if(this.logEnabled=!0,this.observer=e,this.config=t,this.removePKCS7Padding=i,i)try{var a=c.crypto;a&&(this.subtle=a.subtle||a.webkitSubtle)}catch(e){}this.disableWebCrypto=!this.subtle}var t=e.prototype;return t.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},t.decrypt=function(e,t,n,o){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 a),u.expandKey(t),o(u.decrypt(e,0,n,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(c,t)),this.fastAesKey.expandKey().then((function(i){new r(c,n).decrypt(e,i).catch((function(r){l.onWebCryptoError(r,e,t,n,o)})).then((function(e){o(e)}))})).catch((function(r){l.onWebCryptoError(r,e,t,n,o)}))}},t.onWebCryptoError=function(e,t,n,r,i){this.config.enableSoftwareAES?(s.logger.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(t,n,r,i)):(s.logger.error("decrypting error : "+e.message),this.observer.trigger(l.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!0,reason:e.message}))},t.destroy=function(){var e=this.decryptor;e&&(e.destroy(),this.decryptor=void 0)},e}();t.default=d},"./src/demux/demuxer-inline.js": +/*!**************************************************!*\ + !*** ./src/demux/demuxer-inline.js + 12 modules ***! + \**************************************************/ +/*! exports provided: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/crypt/decrypter.js because of ./src/hls.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/id3.js because of ./src/hls.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/mp4demuxer.js because of ./src/hls.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/errors.ts because of ./src/hls.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/events.js because of ./src/hls.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/polyfills/number-isFinite.js because of ./src/hls.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/get-self-scope.js because of ./src/hls.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/logger.js because of ./src/hls.ts */function(e,t,n){"use strict";n.r(t);var r=n("./src/events.js"),i=n("./src/errors.ts"),a=n("./src/crypt/decrypter.js"),o=n("./src/polyfills/number-isFinite.js"),s=n("./src/utils/logger.js"),l=n("./src/utils/get-self-scope.js");function u(e,t){return 255===e[t]&&240==(246&e[t+1])}function c(e,t){return 1&e[t+1]?7:9}function d(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function f(e,t){return!!(t+1<e.length&&u(e,t))}function h(e,t){if(f(e,t)){var n=c(e,t);t+5<e.length&&(n=d(e,t));var r=t+n;if(r===e.length||r+1<e.length&&u(e,r))return!0}return!1}function p(e,t,n,a,o){if(!e.samplerate){var l=function(e,t,n,a){var o,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(o=1+((192&t[n+2])>>>6),!((l=(60&t[n+2])>>>2)>p.length-1))return c=(1&t[n+2])<<2,c|=(192&t[n+3])>>>6,s.logger.log("manifest codec:"+a+",ADTS data:type:"+o+",sampleingIndex:"+l+"["+p[l]+"Hz],channelConfig:"+c),/firefox/i.test(f)?l>=6?(o=5,d=new Array(4),u=l-3):(o=2,d=new Array(2),u=l):-1!==f.indexOf("android")?(o=2,d=new Array(2),u=l):(o=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)&&(o=2,d=new Array(2)),u=l)),d[0]=o<<3,d[0]|=(14&l)>>1,d[1]|=(1&l)<<7,d[1]|=c<<3,5===o&&(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."+o,manifestCodec:h};e.trigger(r.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+l})}(t,n,a,o);e.config=l.config,e.samplerate=l.samplerate,e.channelCount=l.channelCount,e.codec=l.codec,e.manifestCodec=l.manifestCodec,s.logger.log("parsed codec:"+e.codec+",rate:"+l.samplerate+",nb channel:"+l.channelCount)}}function m(e){return 9216e4/e}function g(e,t,n,r,i){var a=function(e,t,n,r,i){var a,o,s=e.length;if(a=c(e,t),o=d(e,t),(o-=a)>0&&t+a+o<=s)return{headerLength:a,frameLength:o,stamp:n+r*i}}(t,n,r,i,m(e.samplerate));if(a){var o=a.stamp,s=a.headerLength,l=a.frameLength,u={unit:t.subarray(n+s,n+s+l),pts:o,dts:o};return e.samples.push(u),{sample:u,length:l+s}}}var v=n("./src/demux/id3.js"),y=function(){function e(e,t,n){this.observer=e,this.config=n,this.remuxer=t}var t=e.prototype;return t.resetInitSegment=function(e,t,n,r){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:t,duration:r,inputTimeScale:9e4}},t.resetTimeStamp=function(){},e.probe=function(e){if(!e)return!1;for(var t=(v.default.getID3Data(e,0)||[]).length,n=e.length;t<n;t++)if(h(e,t))return s.logger.log("ADTS sync word found !"),!0;return!1},t.append=function(e,t,n,r){for(var i=this._audioTrack,a=v.default.getID3Data(e,0)||[],l=v.default.getTimeStamp(a),u=Object(o.isFiniteNumber)(l)?90*l:9e4*t,c=0,d=u,h=e.length,m=a.length,y=[{pts:d,dts:d,data:a}];m<h-1;)if(f(e,m)&&m+5<h){p(i,this.observer,e,m,i.manifestCodec);var b=g(i,e,m,u,c);if(!b){s.logger.log("Unable to parse AAC frame");break}m+=b.length,d=b.sample.pts,c++}else v.default.isHeader(e,m)?(a=v.default.getID3Data(e,m),y.push({pts:d,dts:d,data:a}),m+=a.length):m++;this.remuxer.remux(i,{samples:[]},{samples:y,inputTimeScale:9e4},{samples:[]},t,n,r)},t.destroy=function(){},e}(),b=n("./src/demux/mp4demuxer.js"),_={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,n,r,i){if(!(n+24>t.length)){var a=this.parseHeader(t,n);if(a&&n+a.frameLength<=t.length){var o=r+i*(9e4*a.samplesPerFrame/a.sampleRate),s={unit:t.subarray(n,n+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(s),{sample:s,length:a.frameLength}}}},parseHeader:function(e,t){var n=e[t+1]>>3&3,r=e[t+1]>>1&3,i=e[t+2]>>4&15,a=e[t+2]>>2&3,o=e[t+2]>>1&1;if(1!==n&&0!==i&&15!==i&&3!==a){var s=3===n?3-r:3===r?3:4,l=1e3*_.BitratesMap[14*s+i-1],u=3===n?0:2===n?1:2,c=_.SamplingRateMap[3*u+a],d=e[t+3]>>6==3?1:2,f=_.SamplesCoefficients[n][r],h=_.BytesInSlot[r],p=8*f*h;return{sampleRate:c,channelCount:d,frameLength:parseInt(f*l/c+o,10)*h,samplesPerFrame:p}}},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 n=this.parseHeader(e,t),r=4;n&&n.frameLength&&(r=n.frameLength);var i=t+r;if(i===e.length||i+1<e.length&&this.isHeaderPattern(e,i))return!0}return!1}},A=_,E=function(){function e(e){this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}var t=e.prototype;return t.loadWord=function(){var e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(0===i)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i},t.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)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&s.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?n<<t|this.readBits(t):n},t.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()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){var t,n=8,r=8;for(t=0;t<e;t++)0!==r&&(r=(n+this.readEG()+256)%256),n=0===r?n:r},t.readSPS=function(){var e,t,n,r,i,a,o,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),v=this.skipUEG.bind(this),y=this.skipScalingList.bind(this);if(d(),e=d(),f(5),m(3),d(),v(),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),v(),v(),m(1),p())for(a=3!==b?8:12,o=0;o<a;o++)p()&&y(o<6?16:64)}v();var _=h();if(0===_)h();else if(1===_)for(m(1),g(),g(),t=h(),o=0;o<t;o++)g();v(),m(1),n=h(),r=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*(n+1)-2*s-2*l),height:(2-i)*(r+1)*16-(i?2:4)*(u+c),pixelRatio:A}},t.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}(),T=function(){function e(e,t,n,r){this.decryptdata=n,this.discardEPB=r,this.decrypter=new a.default(e,t,{removePKCS7Padding:!1})}var t=e.prototype;return t.decryptBuffer=function(e,t){this.decrypter.decrypt(e,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,t)},t.decryptAacSample=function(e,t,n,r){var i=e[t].unit,a=i.subarray(16,i.length-i.length%16),o=a.buffer.slice(a.byteOffset,a.byteOffset+a.length),s=this;this.decryptBuffer(o,(function(a){a=new Uint8Array(a),i.set(a,16),r||s.decryptAacSamples(e,t+1,n)}))},t.decryptAacSamples=function(e,t,n){for(;;t++){if(t>=e.length)return void n();if(!(e[t].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(e,t,n,r),!r)return}}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n},t.getAvcDecryptedUnit=function(e,t){t=new Uint8Array(t);for(var n=0,r=32;r<=e.length-16;r+=160,n+=16)e.set(t.subarray(n,n+16),r);return e},t.decryptAvcSample=function(e,t,n,r,i,a){var o=this.discardEPB(i.data),s=this.getAvcEncryptedData(o),l=this;this.decryptBuffer(s.buffer,(function(s){i.data=l.getAvcDecryptedUnit(o,s),a||l.decryptAvcSamples(e,t,n+1,r)}))},t.decryptAvcSamples=function(e,t,n,r){for(;;t++,n=0){if(t>=e.length)return void r();for(var i=e[t].units;!(n>=i.length);n++){var a=i[n];if(!(a.length<=48||1!==a.type&&5!==a.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(e,t,n,r,a,o),!o)return}}}},e}(),w={video:1,audio:2,id3:3,text:4},S=function(){function e(e,t,n,r){this.observer=e,this.config=n,this.typeSupported=r,this.remuxer=t,this.sampleAes=null}var t=e.prototype;return t.setDecryptData=function(e){null!=e&&null!=e.key&&"SAMPLE-AES"===e.method?this.sampleAes=new T(this.observer,this.config,e,this.discardEPB):this.sampleAes=null},e.probe=function(t){var n=e._syncOffset(t);return!(n<0||(n&&s.logger.warn("MPEG2-TS detected but first sync word found @ offset "+n+", junk ahead ?"),0))},e._syncOffset=function(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(71===e[n]&&71===e[n+188]&&71===e[n+376])return n;n++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:w[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:"video"===e?0:void 0,isAAC:"audio"===e||void 0,duration:"audio"===e?t:void 0}},t.resetInitSegment=function(t,n,r,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=n,this.videoCodec=r,this._duration=i},t.resetTimeStamp=function(){},t.append=function(t,n,a,o){var l,u,c,d,f,h=t.length,p=!1;this.contiguous=a;var m=this.pmtParsed,g=this._avcTrack,v=this._audioTrack,y=this._id3Track,b=g.pid,_=v.pid,A=y.pid,E=this._pmtId,T=g.pesData,w=v.pesData,S=y.pesData,k=this._parsePAT,C=this._parsePMT,x=this._parsePES,R=this._parseAVCPES.bind(this),L=this._parseAACPES.bind(this),I=this._parseMPEGPES.bind(this),P=this._parseID3PES.bind(this),j=e._syncOffset(t);for(h-=(h+j)%188,l=j;l<h;l+=188)if(71===t[l]){if(u=!!(64&t[l+1]),c=((31&t[l+1])<<8)+t[l+2],(48&t[l+3])>>4>1){if((d=l+5+t[l+4])===l+188)continue}else d=l+4;switch(c){case b:u&&(T&&(f=x(T))&&R(f,!1),T={data:[],size:0}),T&&(T.data.push(t.subarray(d,l+188)),T.size+=l+188-d);break;case _:u&&(w&&(f=x(w))&&(v.isAAC?L(f):I(f)),w={data:[],size:0}),w&&(w.data.push(t.subarray(d,l+188)),w.size+=l+188-d);break;case A:u&&(S&&(f=x(S))&&P(f),S={data:[],size:0}),S&&(S.data.push(t.subarray(d,l+188)),S.size+=l+188-d);break;case 0:u&&(d+=t[d]+1),E=this._pmtId=k(t,d);break;case E:u&&(d+=t[d]+1);var O=C(t,d,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(b=O.avc)>0&&(g.pid=b),(_=O.audio)>0&&(v.pid=_,v.isAAC=O.isAAC),(A=O.id3)>0&&(y.pid=A),p&&!m&&(s.logger.log("reparse from beginning"),p=!1,l=j-188),m=this.pmtParsed=!0;break;case 17:case 8191:break;default:p=!0}}else this.observer.trigger(r.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});T&&(f=x(T))?(R(f,!0),g.pesData=null):g.pesData=T,w&&(f=x(w))?(v.isAAC?L(f):I(f),v.pesData=null):(w&&w.size&&s.logger.log("last AAC PES packet truncated,might overlap between fragments"),v.pesData=w),S&&(f=x(S))?(P(f),y.pesData=null):y.pesData=S,null==this.sampleAes?this.remuxer.remux(v,g,y,this._txtTrack,n,a,o):this.decryptAndRemux(v,g,y,this._txtTrack,n,a,o)},t.decryptAndRemux=function(e,t,n,r,i,a,o){if(e.samples&&e.isAAC){var s=this;this.sampleAes.decryptAacSamples(e.samples,0,(function(){s.decryptAndRemuxAvc(e,t,n,r,i,a,o)}))}else this.decryptAndRemuxAvc(e,t,n,r,i,a,o)},t.decryptAndRemuxAvc=function(e,t,n,r,i,a,o){if(t.samples){var s=this;this.sampleAes.decryptAvcSamples(t.samples,0,0,(function(){s.remuxer.remux(e,t,n,r,i,a,o)}))}else this.remuxer.remux(e,t,n,r,i,a,o)},t.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},t._parsePAT=function(e,t){return(31&e[t+10])<<8|e[t+11]},t._parsePMT=function(e,t,n,r){var i,a,o={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(a=(31&e[t+1])<<8|e[t+2],e[t]){case 207:if(!r){s.logger.log("unknown stream type:"+e[t]);break}case 15:-1===o.audio&&(o.audio=a);break;case 21:-1===o.id3&&(o.id3=a);break;case 219:if(!r){s.logger.log("unknown stream type:"+e[t]);break}case 27:-1===o.avc&&(o.avc=a);break;case 3:case 4:n?-1===o.audio&&(o.audio=a,o.isAAC=!1):s.logger.log("MPEG audio found, not supported in this browser for now");break;case 36:s.logger.warn("HEVC stream type found, not supported for now");break;default:s.logger.log("unknown stream type:"+e[t])}t+=5+((15&e[t+3])<<8|e[t+4])}return o},t._parsePES=function(e){var t,n,r,i,a,o,l,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((r=(t[4]<<8)+t[5])&&r>e.size-6)return null;if(192&(n=t[7])&&((o=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2)>4294967295&&(o-=8589934592),64&n?((l=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>4294967295&&(l-=8589934592),o-l>54e5&&(s.logger.warn(Math.round((o-l)/9e4)+"s delta between PTS and DTS, align them"),o=l)):l=o),u=(i=t[8])+9,e.size<=u)return null;e.size-=u,a=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}a.set(t,c),c+=m}return r&&(r-=i+3),{data:a,pts:o,dts:l,len:r}}return null},t.pushAccesUnit=function(e,t){if(e.units.length&&e.frame){var n=t.samples,r=n.length;if(isNaN(e.pts)){if(!r)return void t.dropped++;var i=n[r-1];e.pts=i.pts,e.dts=i.dts}!this.config.forceKeyFrameOnDiscontinuity||!0===e.key||t.sps&&(r||this.contiguous)?(e.id=r,n.push(e)):t.dropped++}e.debug.length&&s.logger.log(e.pts+"/"+e.dts+":"+e.debug)},t._parseAVCPES=function(e,t){var n,r,i,a=this,o=this._avcTrack,s=this._parseAVCNALu(e.data),l=this.avcSample,u=!1,c=this.pushAccesUnit.bind(this),d=function(e,t,n,r){return{key:e,pts:t,dts:n,units:[],debug:r}};e.data=null,l&&s.length&&!o.audFound&&(c(l,o),l=this.avcSample=d(!1,e.pts,e.dts,"")),s.forEach((function(t){switch(t.type){case 1:r=!0,l||(l=a.avcSample=d(!0,e.pts,e.dts,"")),l.frame=!0;var s=t.data;if(u&&s.length>4){var f=new E(s).readSliceType();2!==f&&4!==f&&7!==f&&9!==f||(l.key=!0)}break;case 5:r=!0,l||(l=a.avcSample=d(!0,e.pts,e.dts,"")),l.key=!0,l.frame=!0;break;case 6:r=!0,(n=new E(a.discardEPB(t.data))).readUByte();for(var h=0,p=0,m=!1,g=0;!m&&n.bytesAvailable>1;){h=0;do{h+=g=n.readUByte()}while(255===g);p=0;do{p+=g=n.readUByte()}while(255===g);if(4===h&&0!==n.bytesAvailable){if(m=!0,181===n.readUByte()&&49===n.readUShort()&&1195456820===n.readUInt()&&3===n.readUByte()){var y=n.readUByte(),b=31&y,_=[y,n.readUByte()];for(i=0;i<b;i++)_.push(n.readUByte()),_.push(n.readUByte()),_.push(n.readUByte());a._insertSampleInOrder(a._txtTrack.samples,{type:3,pts:e.pts,bytes:_})}}else if(5===h&&0!==n.bytesAvailable){if(m=!0,p>16){var A=[];for(i=0;i<16;i++)A.push(n.readUByte().toString(16)),3!==i&&5!==i&&7!==i&&9!==i||A.push("-");var T=p-16,w=new Uint8Array(T);for(i=0;i<T;i++)w[i]=n.readUByte();a._insertSampleInOrder(a._txtTrack.samples,{pts:e.pts,payloadType:h,uuid:A.join(""),userDataBytes:w,userData:Object(v.utf8ArrayToStr)(w.buffer)})}}else if(p<n.bytesAvailable)for(i=0;i<p;i++)n.readUByte()}break;case 7:if(r=!0,u=!0,!o.sps){var S=(n=new E(t.data)).readSPS();o.width=S.width,o.height=S.height,o.pixelRatio=S.pixelRatio,o.sps=[t.data],o.duration=a._duration;var k=t.data.subarray(1,4),C="avc1.";for(i=0;i<3;i++){var x=k[i].toString(16);x.length<2&&(x="0"+x),C+=x}o.codec=C}break;case 8:r=!0,o.pps||(o.pps=[t.data]);break;case 9:r=!1,o.audFound=!0,l&&c(l,o),l=a.avcSample=d(!1,e.pts,e.dts,"");break;case 12:r=!1;break;default:r=!1,l&&(l.debug+="unknown NAL "+t.type+" ")}l&&r&&l.units.push(t)})),t&&l&&(c(l,o),this.avcSample=null)},t._insertSampleInOrder=function(e,t){var n=e.length;if(n>0){if(t.pts>=e[n-1].pts)e.push(t);else for(var r=n-1;r>=0;r--)if(t.pts<e[r].pts){e.splice(r,0,t);break}}else e.push(t)},t._getLastNalUnit=function(){var e,t=this.avcSample;if(!t||0===t.units.length){var n=this._avcTrack.samples;t=n[n.length-1]}if(t){var r=t.units;e=r[r.length-1]}return e},t._parseAVCNALu=function(e){var t,n,r,i,a=0,o=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,a=1);a<o;)if(t=e[a++],l)if(1!==l)if(t)if(1===t){if(d>=0)r={data:e.subarray(d,a-l-1),type:i},c.push(r);else{var f=this._getLastNalUnit();if(f&&(u&&a<=4-u&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-u)),(n=a-l-1)>0)){var h=new Uint8Array(f.data.byteLength+n);h.set(f.data,0),h.set(e.subarray(0,n),f.data.byteLength),f.data=h}}a<o?(d=a,i=31&e[a],l=0):l=-1}else l=0;else l=3;else l=t?0:2;else l=t?0:1;if(d>=0&&l>=0&&(r={data:e.subarray(d,o),type:i,state:l},c.push(r)),0===c.length){var p=this._getLastNalUnit();if(p){var m=new Uint8Array(p.data.byteLength+e.byteLength);m.set(p.data,0),m.set(e,p.data.byteLength),p.data=m}}return s.naluState=l,c},t.discardEPB=function(e){for(var t,n,r=e.byteLength,i=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(i.push(a+2),a+=2):a++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===i[0]&&(o++,i.shift()),n[a]=e[o];return n},t._parseAACPES=function(e){var t,n,a,o,l,u,c,d=this._audioTrack,h=e.data,v=e.pts,y=this.aacOverFlow,b=this.aacLastPTS;if(y){var _=new Uint8Array(y.byteLength+h.byteLength);_.set(y,0),_.set(h,y.byteLength),h=_}for(a=0,l=h.length;a<l-1&&!f(h,a);a++);if(!a||(a<l-1?(u="AAC PES did not start with ADTS header,offset:"+a,c=!1):(u="no ADTS header found in AAC PES",c=!0),s.logger.warn("parsing error:"+u),this.observer.trigger(r.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:c,reason:u}),!c)){if(p(d,this.observer,h,a,this.audioCodec),n=0,t=m(d.samplerate),y&&b){var A=b+t;Math.abs(A-v)>1&&(s.logger.log("AAC: align PTS for overlapping frames by "+Math.round((A-v)/90)),v=A)}for(;a<l;){if(f(h,a)){if(a+5<l){var E=g(d,h,a,v,n);if(E){a+=E.length,o=E.sample.pts,n++;continue}}break}a++}y=a<l?h.subarray(a,l):null,this.aacOverFlow=y,this.aacLastPTS=o}},t._parseMPEGPES=function(e){for(var t=e.data,n=t.length,r=0,i=0,a=e.pts;i<n;)if(A.isHeader(t,i)){var o=A.appendFrame(this._audioTrack,t,i,a,r);if(!o)break;i+=o.length,r++}else i++},t._parseID3PES=function(e){this._id3Track.samples.push(e)},e}(),k=function(){function e(e,t,n){this.observer=e,this.config=n,this.remuxer=t}var t=e.prototype;return t.resetInitSegment=function(e,t,n,r){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:t,duration:r,inputTimeScale:9e4}},t.resetTimeStamp=function(){},e.probe=function(e){var t,n,r=v.default.getID3Data(e,0);if(r&&void 0!==v.default.getTimeStamp(r))for(t=r.length,n=Math.min(e.length-1,t+100);t<n;t++)if(A.probe(e,t))return s.logger.log("MPEG Audio sync word found !"),!0;return!1},t.append=function(e,t,n,r){for(var i=v.default.getID3Data(e,0),a=v.default.getTimeStamp(i),o=a?90*a:9e4*t,s=i.length,l=e.length,u=0,c=0,d=this._audioTrack,f=[{pts:o,dts:o,data:i}];s<l;)if(A.isHeader(e,s)){var h=A.appendFrame(d,e,s,o,u);if(!h)break;s+=h.length,c=h.sample.pts,u++}else v.default.isHeader(e,s)?(i=v.default.getID3Data(e,s),f.push({pts:c,dts:c,data:i}),s+=i.length):s++;this.remuxer.remux(d,{samples:[]},{samples:f,inputTimeScale:9e4},{samples:[]},t,n,r)},t.destroy=function(){},e}(),C=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}(),x=Math.pow(2,32)-1,R=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 n=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]),r=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:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,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 o=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,o,l,o,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,i))},e.box=function(e){for(var t,n=Array.prototype.slice.call(arguments,1),r=8,i=n.length,a=i;i--;)r+=n[i].byteLength;for((t=new Uint8Array(r))[0]=r>>24&255,t[1]=r>>16&255,t[2]=r>>8&255,t[3]=255&r,t.set(e,4),i=0,r=8;i<a;i++)t.set(n[i],r),r+=n[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,n){n*=t;var r=Math.floor(n/(x+1)),i=Math.floor(n%(x+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,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,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,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))},e.moov=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,n){n*=t;var r=Math.floor(n/(x+1)),i=Math.floor(n%(x+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,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,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 n,r,i=t.samples||[],a=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,a[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return e.box(e.types.sdtp,a)},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 n,r,i,a=[],o=[];for(n=0;n<t.sps.length;n++)i=(r=t.sps[n]).byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));for(n=0;n<t.pps.length;n++)i=(r=t.pps[n]).byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));var s=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(o))),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 n=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,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=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,n>>8&255,255&n,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 n=t.id,r=t.duration*t.timescale,i=t.width,a=t.height,o=Math.floor(r/(x+1)),s=Math.floor(r%(x+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,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s,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,i>>8&255,255&i,0,0,a>>8&255,255&a,0,0]))},e.traf=function(t,n){var r=e.sdtp(t),i=t.id,a=Math.floor(n/(x+1)),o=Math.floor(n%(x+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,o>>24,o>>16&255,o>>8&255,255&o])),e.trun(t,r.length+16+20+8+16+8+8),r)},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 n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var r,i,a,o,s,l,u=t.samples||[],c=u.length,d=12+16*c,f=new Uint8Array(d);for(n+=8+d,f.set([0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r<c;r++)a=(i=u[r]).duration,o=i.size,s=i.flags,l=i.cts,f.set([a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,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*r);return e.box(e.types.trun,f)},e.initSegment=function(t){e.types||e.init();var n,r=e.moov(t);return(n=new Uint8Array(e.FTYP.byteLength+r.byteLength)).set(e.FTYP),n.set(r,e.FTYP.byteLength),n},e}();function L(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=!1);var i=e*t*n;return r?Math.round(i):i}function I(e,t){return void 0===t&&(t=!1),L(e,1e3,1/9e4,t)}function P(e,t){return void 0===t&&(t=1),L(e,9e4,1/t)}var j,O=P(10),D=P(.2),M=function(){function e(e,t,n,r){this.observer=e,this.config=t,this.typeSupported=n;var i=navigator.userAgent;this.isSafari=r&&r.indexOf("Apple")>-1&&i&&!i.match("CriOS"),this.ISGenerated=!1}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this._initPTS=this._initDTS=e},t.resetInitSegment=function(){this.ISGenerated=!1},t.remux=function(e,t,n,i,a,o,l){if(this.ISGenerated||this.generateIS(e,t,a),this.ISGenerated){var u=e.samples.length,c=t.samples.length,d=a,f=a;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,a));var p,m=this.remuxAudio(e,d,o,l);c&&(m&&(p=m.endPTS-m.startPTS),t.timescale||(s.logger.warn("regenerate InitSegment as video detected"),this.generateIS(e,t,a)),this.remuxVideo(t,f,o,p,l))}else if(c){var g=this.remuxVideo(t,f,o,0,l);g&&e.codec&&this.remuxEmptyAudio(e,d,o,g)}}n.samples.length&&this.remuxID3(n,a),i.samples.length&&this.remuxText(i,a),this.observer.trigger(r.default.FRAG_PARSED)},t.generateIS=function(e,t,n){var a,o,l=this.observer,u=e.samples,c=t.samples,d=this.typeSupported,f="audio/mp4",h={},p={tracks:h},m=void 0===this._initPTS;if(m&&(a=o=1/0),e.config&&u.length&&(e.timescale=e.samplerate,s.logger.log("audio sampling rate : "+e.samplerate),e.isAAC||(d.mpeg?(f="audio/mpeg",e.codec=""):d.mp3&&(e.codec="mp3")),h.audio={container:f,codec:e.codec,initSegment:!e.isAAC&&d.mpeg?new Uint8Array:R.initSegment([e]),metadata:{channelCount:e.channelCount}},m&&(a=o=u[0].pts-e.inputTimeScale*n)),t.sps&&t.pps&&c.length){var g=t.inputTimeScale;t.timescale=g,h.video={container:"video/mp4",codec:t.codec,initSegment:R.initSegment([t]),metadata:{width:t.width,height:t.height}},m&&(a=Math.min(a,c[0].pts-g*n),o=Math.min(o,c[0].dts-g*n),this.observer.trigger(r.default.INIT_PTS_FOUND,{initPTS:a}))}Object.keys(h).length?(l.trigger(r.default.FRAG_PARSING_INIT_SEGMENT,p),this.ISGenerated=!0,m&&(this._initPTS=a,this._initDTS=o)):l.trigger(r.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},t.remuxVideo=function(e,t,n,a,o){var l,u,c,d,f,h,p,m=8,g=e.timescale,v=e.samples,y=[],b=v.length,_=this._PTSNormalize,A=this._initPTS,E=this.nextAvcDts,T=this.isSafari;if(0!==b){T&&(n|=v.length&&E&&(o&&Math.abs(t-E/g)<.1||Math.abs(v[0].pts-E-A)<g/5)),n||(E=t*g),v.forEach((function(e){e.pts=_(e.pts-A,E),e.dts=_(e.dts-A,E)})),v.sort((function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r||e.id-t.id}));var w=v.reduce((function(e,t){return Math.max(Math.min(e,t.pts-t.dts),-1*D)}),0);if(w<0){s.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+I(w,!0)+" ms to overcome this issue");for(var S=0;S<v.length;S++)v[S].dts+=w}var k=v[0];f=Math.max(k.dts,0),d=Math.max(k.pts,0);var C=f-E;n&&C&&(C>1?s.logger.log("AVC: "+I(C,!0)+" ms hole between fragments detected,filling it"):C<-1&&s.logger.log("AVC: "+I(-C,!0)+" ms overlapping between fragments detected"),f=E,v[0].dts=f,d=Math.max(d-C,E),v[0].pts=d,s.logger.log("Video: PTS/DTS adjusted: "+I(d,!0)+"/"+I(f,!0)+", delta: "+I(C,!0)+" ms")),k=v[v.length-1],p=Math.max(k.dts,0),h=Math.max(k.pts,0,p),T&&(l=Math.round((p-f)/(v.length-1)));for(var x=0,L=0,P=0;P<b;P++){for(var j=v[P],O=j.units,M=O.length,N=0,U=0;U<M;U++)N+=O[U].data.length;L+=N,x+=M,j.length=N,j.dts=T?f+P*l:Math.max(j.dts,f),j.pts=Math.max(j.pts,j.dts)}var F=L+4*x+8;try{u=new Uint8Array(F)}catch(e){return void this.observer.trigger(r.default.ERROR,{type:i.ErrorTypes.MUX_ERROR,details:i.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:F,reason:"fail allocating video mdat "+F})}var B=new DataView(u.buffer);B.setUint32(0,F),u.set(R.types.mdat,4);for(var K=0;K<b;K++){for(var V=v[K],G=V.units,H=0,Y=void 0,z=0,W=G.length;z<W;z++){var $=G[z],q=$.data,X=$.data.byteLength;B.setUint32(m,X),m+=4,u.set(q,m),m+=X,H+=4+X}if(T)Y=Math.max(0,l*Math.round((V.pts-V.dts)/l));else{if(K<b-1)l=v[K+1].dts-V.dts;else{var J=this.config,Z=V.dts-v[K>0?K-1:K].dts;if(J.stretchShortVideoTrack){var Q=J.maxBufferHole,ee=Math.floor(Q*g),te=(a?d+a*g:this.nextAudioPts)-V.pts;te>ee?((l=te-Z)<0&&(l=Z),s.logger.log("It is approximately "+I(te,!1)+" ms to the next segment; using duration "+I(l,!1)+" ms for the last video frame.")):l=Z}else l=Z}Y=Math.round(V.pts-V.dts)}y.push({size:H,duration:l,cts:Y,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:V.key?2:1,isNonSync:V.key?0:1}})}this.nextAvcDts=p+l;var ne=e.dropped;if(e.nbNalu=0,e.dropped=0,y.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var re=y[0].flags;re.dependsOn=2,re.isNonSync=0}e.samples=y,c=R.moof(e.sequenceNumber++,f,e),e.samples=[];var ie={data1:c,data2:u,startPTS:d/g,endPTS:(h+l)/g,startDTS:f/g,endDTS:this.nextAvcDts/g,type:"video",hasAudio:!1,hasVideo:!0,nb:y.length,dropped:ne};return this.observer.trigger(r.default.FRAG_PARSING_DATA,ie),ie}},t.remuxAudio=function(e,t,n,a){var o,l,u,c,d,f,h=e.inputTimeScale,p=e.timescale,m=h/p,g=(e.isAAC?1024:1152)*m,v=this._PTSNormalize,y=this._initPTS,b=!e.isAAC&&this.typeSupported.mpeg,_=b?0:8,A=e.samples,E=[],T=this.nextAudioPts;if(n|=A.length&&T&&(a&&Math.abs(t-T/h)<.1||Math.abs(A[0].pts-T-y)<20*g),A.forEach((function(e){e.pts=e.dts=v(e.pts-y,t*h)})),0!==(A=A.filter((function(e){return e.pts>=0}))).length){if(n||(T=a?t*h:A[0].pts),e.isAAC)for(var w=this.config.maxAudioFramesDrift,S=0,k=T;S<A.length;){var x,L=A[S];if((x=L.pts-k)<=-w*g)s.logger.warn("Dropping 1 audio frame @ "+I(k,!0)+" ms due to "+I(x,!0)+" ms overlap."),A.splice(S,1);else if(x>=w*g&&x<O&&k){var P=Math.round(x/g);s.logger.warn("Injecting "+P+" audio frames @ "+I(k,!0)+" ms due to "+I(k,!0)+" ms gap.");for(var j=0;j<P;j++){var D=Math.max(k,0);(l=C.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(s.logger.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),l=L.unit.subarray()),A.splice(S,0,{unit:l,pts:D,dts:D}),k+=g,S++}L.pts=L.dts=k,k+=g,S++}else Math.abs(x),L.pts=L.dts=k,k+=g,S++}for(var M=A.length,N=0;M--;)N+=A[M].unit.byteLength;for(var U=0,F=A.length;U<F;U++){var B=A[U],K=B.unit,V=B.pts;if(void 0!==f)o.duration=Math.round((V-f)/m);else{var G=V-T,H=0;if(n&&e.isAAC&&G){if(G>0&&G<O)H=Math.round((V-T)/g),s.logger.log(I(G,!0)+" ms hole between AAC samples detected,filling it"),H>0&&((l=C.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(l=K.subarray()),N+=H*l.length);else if(G<-12){s.logger.log("drop overlapping AAC sample, expected/parsed/delta: "+I(T,!0)+" ms / "+I(V,!0)+" ms / "+I(-G,!0)+" ms"),N-=K.byteLength;continue}V=T}if(d=V,!(N>0))return;N+=_;try{u=new Uint8Array(N)}catch(e){return void this.observer.trigger(r.default.ERROR,{type:i.ErrorTypes.MUX_ERROR,details:i.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:N,reason:"fail allocating audio mdat "+N})}b||(new DataView(u.buffer).setUint32(0,N),u.set(R.types.mdat,4));for(var Y=0;Y<H;Y++)(l=C.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(s.logger.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),l=K.subarray()),u.set(l,_),_+=l.byteLength,o={size:l.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},E.push(o)}u.set(K,_);var z=K.byteLength;_+=z,o={size:z,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},E.push(o),f=V}var W=0;if((M=E.length)>=2&&(W=E[M-2].duration,o.duration=W),M){this.nextAudioPts=T=f+m*W,e.samples=E,c=b?new Uint8Array:R.moof(e.sequenceNumber++,d/m,e),e.samples=[];var $=d/h,q=T/h,X={data1:c,data2:u,startPTS:$,endPTS:q,startDTS:$,endDTS:q,type:"audio",hasAudio:!0,hasVideo:!1,nb:M};return this.observer.trigger(r.default.FRAG_PARSING_DATA,X),X}return null}},t.remuxEmptyAudio=function(e,t,n,r){var i=e.inputTimeScale,a=i/(e.samplerate?e.samplerate:i),o=this.nextAudioPts,l=(void 0!==o?o:r.startDTS*i)+this._initDTS,u=r.endDTS*i+this._initDTS,c=1024*a,d=Math.ceil((u-l)/c),f=C.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(s.logger.warn("remux empty Audio"),f){for(var h=[],p=0;p<d;p++){var m=l+p*c;h.push({unit:f,pts:m,dts:m})}e.samples=h,this.remuxAudio(e,t,n)}else s.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!")},t.remuxID3=function(e){var t,n=e.samples.length,i=e.inputTimeScale,a=this._initPTS,o=this._initDTS;if(n){for(var s=0;s<n;s++)(t=e.samples[s]).pts=(t.pts-a)/i,t.dts=(t.dts-o)/i;this.observer.trigger(r.default.FRAG_PARSING_METADATA,{samples:e.samples})}e.samples=[]},t.remuxText=function(e){e.samples.sort((function(e,t){return e.pts-t.pts}));var t,n=e.samples.length,i=e.inputTimeScale,a=this._initPTS;if(n){for(var o=0;o<n;o++)(t=e.samples[o]).pts=(t.pts-a)/i;this.observer.trigger(r.default.FRAG_PARSING_USERDATA,{samples:e.samples})}e.samples=[]},t._PTSNormalize=function(e,t){var n;if(void 0===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;return e},e}(),N=function(){function e(e){this.observer=e}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(){},t.resetInitSegment=function(){},t.remux=function(e,t,n,i,a,o,s,l){var u=this.observer,c="";e&&(c+="audio"),t&&(c+="video"),u.trigger(r.default.FRAG_PARSING_DATA,{data1:l,startPTS:a,startDTS:a,type:c,hasAudio:!!e,hasVideo:!!t,nb:1,dropped:0}),u.trigger(r.default.FRAG_PARSED)},e}(),U=Object(l.getSelfScope)();try{j=U.performance.now.bind(U.performance)}catch(e){s.logger.debug("Unable to use Performance API on this environment"),j=U.Date.now}var F=function(){function e(e,t,n,r){this.observer=e,this.typeSupported=t,this.config=n,this.vendor=r}var t=e.prototype;return t.destroy=function(){var e=this.demuxer;e&&e.destroy()},t.push=function(e,t,n,i,o,s,l,u,c,d,f,h){var p=this;if(e.byteLength>0&&null!=t&&null!=t.key&&"AES-128"===t.method){var m=this.decrypter;null==m&&(m=this.decrypter=new a.default(this.observer,this.config));var g=j();m.decrypt(e,t.key.buffer,t.iv.buffer,(function(e){var a=j();p.observer.trigger(r.default.FRAG_DECRYPTED,{stats:{tstart:g,tdecrypt:a}}),p.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),i,o,s,l,u,c,d,f,h)}))}else this.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),i,o,s,l,u,c,d,f,h)},t.pushDecrypted=function(e,t,n,a,o,s,l,u,c,d,f,h){var p=this.demuxer;if(!p||(l||u)&&!this.probe(e)){for(var m=this.observer,g=this.typeSupported,v=this.config,_=[{demux:S,remux:M},{demux:b.default,remux:N},{demux:y,remux:M},{demux:k,remux:M}],A=0,E=_.length;A<E;A++){var T=_[A],w=T.demux.probe;if(w(e)){var C=this.remuxer=new T.remux(m,v,g,this.vendor);p=new T.demux(m,C,v,g),this.probe=w;break}}if(!p)return void m.trigger(r.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});this.demuxer=p}var x=this.remuxer;(l||u)&&(p.resetInitSegment(n,a,o,d),x.resetInitSegment()),l&&(p.resetTimeStamp(h),x.resetTimeStamp(h)),"function"==typeof p.setDecryptData&&p.setDecryptData(t),p.append(e,s,c,f)},e}();t.default=F},"./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": +/*! exports provided: default */ +/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/demux/demuxer.js (referenced with require.resolve) */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../demux/demuxer-inline */"./src/demux/demuxer-inline.js"),i=n(/*! ../events */"./src/events.js"),a=n(/*! ../utils/logger */"./src/utils/logger.js"),o=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");t.default=function(e){var t=new o.EventEmitter;t.trigger=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit.apply(t,[e,e].concat(r))},t.off=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.removeListener.apply(t,[e].concat(r))};var n=function(t,n){e.postMessage({event:t,data:n})};e.addEventListener("message",(function(i){var o=i.data;switch(o.cmd){case"init":var s=JSON.parse(o.config);e.demuxer=new r.default(t,o.typeSupported,s,o.vendor),Object(a.enableLogs)(s.debug),n("init",null);break;case"demux":e.demuxer.push(o.data,o.decryptdata,o.initSegment,o.audioCodec,o.videoCodec,o.timeOffset,o.discontinuity,o.trackSwitch,o.contiguous,o.duration,o.accurateTimeOffset,o.defaultInitPTS)}})),t.on(i.default.FRAG_DECRYPTED,n),t.on(i.default.FRAG_PARSING_INIT_SEGMENT,n),t.on(i.default.FRAG_PARSED,n),t.on(i.default.ERROR,n),t.on(i.default.FRAG_PARSING_METADATA,n),t.on(i.default.FRAG_PARSING_USERDATA,n),t.on(i.default.INIT_PTS_FOUND,n),t.on(i.default.FRAG_PARSING_DATA,(function(t,n){var r=[],i={event:t,data:n};n.data1&&(i.data1=n.data1.buffer,r.push(n.data1.buffer),delete n.data1),n.data2&&(i.data2=n.data2.buffer,r.push(n.data2.buffer),delete n.data2),e.postMessage(i,r)}))}},"./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": +/*! exports provided: default, utf8ArrayToStr */function(e,t,n){"use strict";n.r(t),n.d(t,"utf8ArrayToStr",(function(){return s}));var r,i=n(/*! ../utils/get-self-scope */"./src/utils/get-self-scope.js"),a=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,n){for(var r=n,i=0;e.isHeader(t,n);)i+=10,i+=e._readSize(t,n+6),e.isFooter(t,n+10)&&(i+=10),n+=i;if(i>0)return t.subarray(r,r+i)},e._readSize=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3]},e.getTimeStamp=function(t){for(var n=e.getID3Frames(t),r=0;r<n.length;r++){var i=n[r];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 n=String.fromCharCode(t[0],t[1],t[2],t[3]),r=e._readSize(t,4);return{type:n,size:r,data:t.subarray(10,10+r)}},e.getID3Frames=function(t){for(var n=0,r=[];e.isHeader(t,n);){for(var i=e._readSize(t,n+6),a=(n+=10)+i;n+8<a;){var o=e._getFrameData(t.subarray(n)),s=e._decodeFrame(o);s&&r.push(s),n+=o.size+10}e.isFooter(t,n)&&(n+=10)}return r},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),n=1&t[3],r=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return r/=45,n&&(r+=47721858.84),Math.round(r)}},e._decodePrivFrame=function(t){if(!(t.size<2)){var n=e._utf8ArrayToStr(t.data,!0),r=new Uint8Array(t.data.subarray(n.length+1));return{key:t.type,info:n,data:r.buffer}}},e._decodeTextFrame=function(t){if(!(t.size<2)){if("TXXX"===t.type){var n=1,r=e._utf8ArrayToStr(t.data.subarray(n),!0);n+=r.length+1;var i=e._utf8ArrayToStr(t.data.subarray(n));return{key:t.type,info:r,data:i}}var a=e._utf8ArrayToStr(t.data.subarray(1));return{key:t.type,data:a}}},e._decodeURLFrame=function(t){if("WXXX"===t.type){if(t.size<2)return;var n=1,r=e._utf8ArrayToStr(t.data.subarray(n));n+=r.length+1;var i=e._utf8ArrayToStr(t.data.subarray(n));return{key:t.type,info:r,data:i}}var a=e._utf8ArrayToStr(t.data);return{key:t.type,data:a}},e._utf8ArrayToStr=function(e,t){void 0===t&&(t=!1);var n=o();if(n){var r=n.decode(e);if(t){var i=r.indexOf("\0");return-1!==i?r.substring(0,i):r}return r.replace(/\0/g,"")}for(var a,s,l,u=e.length,c="",d=0;d<u;){if(0===(a=e[d++])&&t)return c;if(0!==a&&3!==a)switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(a);break;case 12:case 13:s=e[d++],c+=String.fromCharCode((31&a)<<6|63&s);break;case 14:s=e[d++],l=e[d++],c+=String.fromCharCode((15&a)<<12|(63&s)<<6|(63&l)<<0)}}return c},e}();function o(){var e=Object(i.getSelfScope)();return r||void 0===e.TextDecoder||(r=new e.TextDecoder("utf-8")),r}var s=a._utf8ArrayToStr;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,C=this._parsePMT,x=this._parsePES,R=this._parseAVCPES.bind(this),L=this._parseAACPES.bind(this),j=this._parseMPEGPES.bind(this),P=this._parseID3PES.bind(this),I=e._syncOffset(t);for(h-=(h+I)%188,a=I;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=x(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=x(S))&&void 0!==f.pts&&(y.isAAC?L(f):j(f)),S={data:[],size:0}),S&&(S.data.push(t.subarray(d,a+188)),S.size+=a+188-d);break;case A:s&&(w&&(f=x(w))&&void 0!==f.pts&&P(f),w={data:[],size:0}),w&&(w.data.push(t.subarray(d,a+188)),w.size+=a+188-d);break;case 0:s&&(d+=t[d]+1),E=this._pmtId=k(t,d);break;case E:s&&(d+=t[d]+1);var O=C(t,d,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(b=O.avc)>0&&(g.pid=b),(_=O.audio)>0&&(y.pid=_,y.isAAC=O.isAAC),(A=O.id3)>0&&(v.pid=A),p&&!m&&(l.logger.log("reparse from beginning"),p=!1,a=I-188),m=this.pmtParsed=!0;break;case 17:case 8191:break;default:p=!0}}else this.observer.trigger(o.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});T&&(f=x(T))&&void 0!==f.pts?(R(f,!0),g.pesData=null):g.pesData=T,S&&(f=x(S))&&void 0!==f.pts?(y.isAAC?L(f):j(f),y.pesData=null):(S&&S.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=S),w&&(f=x(w))&&void 0!==f.pts?(P(f),v.pesData=null):v.pesData=w,null==this.sampleAes?this.remuxer.remux(y,g,v,this._txtTrack,r,n,i):this.decryptAndRemux(y,g,v,this._txtTrack,r,n,i)},e.prototype.decryptAndRemux=function(e,t,r,n,i,o,a){if(e.samples&&e.isAAC){var s=this;this.sampleAes.decryptAacSamples(e.samples,0,(function(){s.decryptAndRemuxAvc(e,t,r,n,i,o,a)}))}else this.decryptAndRemuxAvc(e,t,r,n,i,o,a)},e.prototype.decryptAndRemuxAvc=function(e,t,r,n,i,o,a){if(t.samples){var s=this;this.sampleAes.decryptAvcSamples(t.samples,0,0,(function(){s.remuxer.remux(e,t,r,n,i,o,a)}))}else this.remuxer.remux(e,t,r,n,i,o,a)},e.prototype.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},e.prototype._parsePAT=function(e,t){return(31&e[t+10])<<8|e[t+11]},e.prototype._parsePMT=function(e,t,r,n){var i,o,a={audio:-1,avc:-1,id3:-1,isAAC:!0};for(i=t+3+((15&e[t+1])<<8|e[t+2])-4,t+=12+((15&e[t+10])<<8|e[t+11]);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": +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/logger */"./src/utils/logger.js"),i=n(/*! ../events */"./src/events.js"),a=Math.pow(2,32)-1,o=function(){function e(e,t){this.observer=e,this.remuxer=t}var t=e.prototype;return t.resetTimeStamp=function(e){this.initPTS=e},t.resetInitSegment=function(t,n,r,a){if(t&&t.byteLength){var o=this.initData=e.parseInitSegment(t);null==n&&(n="mp4a.40.5"),null==r&&(r="avc1.42e01e");var s={};o.audio&&o.video?s.audiovideo={container:"video/mp4",codec:n+","+r,initSegment:a?t:null}:(o.audio&&(s.audio={container:"audio/mp4",codec:n,initSegment:a?t:null}),o.video&&(s.video={container:"video/mp4",codec:r,initSegment:a?t:null})),this.observer.trigger(i.default.FRAG_PARSING_INIT_SEGMENT,{tracks:s})}else n&&(this.audioCodec=n),r&&(this.videoCodec=r)},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 n=e[t]<<8|e[t+1];return n<0?65536+n:n},e.readUint32=function(e,t){e.data&&(t+=e.start,e=e.data);var n=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return n<0?4294967296+n:n},e.writeUint32=function(e,t,n){e.data&&(t+=e.start,e=e.data),e[t]=n>>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},e.findBox=function(t,n){var r,i,a,o,s,l,u=[];if(t.data?(s=t.start,a=t.end,t=t.data):(s=0,a=t.byteLength),!n.length)return null;for(r=s;r<a;)l=(i=e.readUint32(t,r))>1?r+i:a,e.bin2str(t.subarray(r+4,r+8))===n[0]&&(1===n.length?u.push({data:t,start:r+8,end:l}):(o=e.findBox({data:t,start:r+8,end:l},n.slice(1))).length&&(u=u.concat(o))),r=l;return u},e.parseSegmentIndex=function(t){var n,r=e.findBox(t,["moov"])[0],i=r?r.end:null,a=0,o=e.findBox(t,["sidx"]);if(!o||!o[0])return null;n=[];var s=(o=o[0]).data[0];a=0===s?8:16;var l=e.readUint32(o,a);a+=4,a+=0===s?8:16,a+=2;var u=o.end+0,c=e.readUint16(o,a);a+=2;for(var d=0;d<c;d++){var f=a,h=e.readUint32(o,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(o,f);f+=4,n.push({referenceSize:p,subsegmentDuration:m,info:{duration:m/l,start:u,end:u+p-1}}),u+=p,a=f+=4}return{earliestPresentationTime:0,timescale:l,version:s,referencesCount:c,references:n,moovEndOffset:i}},e.parseInitSegment=function(t){var n=[];return e.findBox(t,["moov","trak"]).forEach((function(t){var i=e.findBox(t,["tkhd"])[0];if(i){var a=i.data[i.start],o=0===a?12:20,s=e.readUint32(i,o),l=e.findBox(t,["mdia","mdhd"])[0];if(l){o=0===(a=l.data[l.start])?12:20;var u=e.readUint32(l,o),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));r.logger.log("MP4Demuxer:"+d+":"+h+" found")}n[s]={timescale:u,type:d},n[d]={timescale:u,id:s}}}}}})),n},e.getStartDTS=function(t,n){var r,i,a;return r=e.findBox(n,["moof","traf"]),i=[].concat.apply([],r.map((function(n){return e.findBox(n,["tfhd"]).map((function(r){var i,a;return i=e.readUint32(r,4),a=t[i].timescale||9e4,e.findBox(n,["tfdt"]).map((function(t){var n,r;return n=t.data[t.start],r=e.readUint32(t,4),1===n&&(r*=Math.pow(2,32),r+=e.readUint32(t,8)),r}))[0]/a}))}))),a=Math.min.apply(null,i),isFinite(a)?a:0},e.offsetStartDTS=function(t,n,r){e.findBox(n,["moof","traf"]).map((function(n){return e.findBox(n,["tfhd"]).map((function(i){var o=e.readUint32(i,4),s=t[o].timescale||9e4;e.findBox(n,["tfdt"]).map((function(t){var n=t.data[t.start],i=e.readUint32(t,4);if(0===n)e.writeUint32(t,4,i-r*s);else{i*=Math.pow(2,32),i+=e.readUint32(t,8),i-=r*s,i=Math.max(i,0);var o=Math.floor(i/(a+1)),l=Math.floor(i%(a+1));e.writeUint32(t,4,o),e.writeUint32(t,8,l)}}))}))}))},t.append=function(t,n,r,a){var o=this.initData;o||(this.resetInitSegment(t,this.audioCodec,this.videoCodec,!1),o=this.initData);var s,l=this.initPTS;if(void 0===l){var u=e.getStartDTS(o,t);this.initPTS=l=u-n,this.observer.trigger(i.default.INIT_PTS_FOUND,{initPTS:l})}e.offsetStartDTS(o,t,l),s=e.getStartDTS(o,t),this.remuxer.remux(o.audio,o.video,null,null,s,r,a,t)},t.destroy=function(){},e}();t.default=o},"./src/errors.ts": /*!***********************!*\ - !*** ./src/errors.js ***! + !*** ./src/errors.ts ***! \***********************/ -/*! 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": +/*! exports provided: ErrorTypes, ErrorDetails */function(e,t,n){"use strict";var r,i;n.r(t),n.d(t,"ErrorTypes",(function(){return r})),n.d(t,"ErrorDetails",(function(){return i})),function(e){e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError"}(r||(r={})),function(e){e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException"}(i||(i={}))},"./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 C=new w(n);n.audioTrackController=C,k.push(C)}if(w=r.subtitleTrackController){var x=new w(n);n.subtitleTrackController=x,k.push(x)}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": +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),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",LIVE_BACK_BUFFER_REACHED:"hlsLiveBackBufferReached"}},"./src/hls.ts": /*!*********************************!*\ - !*** ./src/loader/level-key.js ***! + !*** ./src/hls.ts + 50 modules ***! \*********************************/ -/*! 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 C=y++;T.type=u,T.start=v,T.levelkey=_,T.sn=C,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 x=E.byteRangeEndOffset;x&&(T.lastByteRangeEndOffset=x)}}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),L=(" "+d[m+2]).slice(1);switch(d[m]){case"#":T.tagList.push(L?[R,L]:[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 j=R,P=new s.default(j),I=P.enumeratedString("METHOD"),O=P.URI,D=P.hexadecimalInteger("IV");I&&(_=new a.default,O&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(I)>=0&&(_.method=I,_.baseuri=r,_.reluri=O,_.key=null,_.iv=D));break;case"START":var M=R,N=new s.default(M).decimalFloatingPoint("TIME-OFFSET");e.isFinite(N)&&(b.startTimeOffset=N);break;case"MAP":var F=new s.default(R);T.relurl=F.URI,T.rawByteRange=F.BYTERANGE,T.baseurl=r,T.level=n,T.type=u,T.sn="initSegment",b.initSegment=T,(T=new i.default).rawProgramDateTime=b.initSegment.rawProgramDateTime;break;default:l.logger.warn("line parsed but not handled: "+d)}}}return(T=E)&&!T.relurl&&(b.fragments.pop(),v-=T.duration),b.totalduration=v,b.averagetargetduration=v/b.fragments.length,b.endSN=y-1,b.startCC=b.fragments[0]?b.fragments[0].cc:0,b.endCC=A,!b.initSegment&&b.fragments.length&&b.fragments.every((function(e){return p.test(e.relurl)}))&&(l.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(T=new i.default).relurl=b.fragments[0].relurl,T.baseurl=r,T.level=n,T.type=u,T.sn="initSegment",b.initSegment=T,b.needSidxRanges=!0),S&&function(e,t){for(var r=e[t],n=t-1;n>=0;n--){var i=e[n];i.programDateTime=r.programDateTime-1e3*i.duration,r=i}}(b.fragments,S),b},t}();function g(t,r){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):r&&r.programDateTime&&(t.programDateTime=r.endProgramDateTime),e.isFinite(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}t.default=m}).call(this,r(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/loader/playlist-loader.js": -/*!***************************************!*\ - !*** ./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 C=v[0];h=Math.max(C.dts,0),f=Math.max(C.pts,0);var x=Math.round((h-T)/90);r&&x&&(x>1?s.logger.log("AVC:"+x+" ms hole between fragments detected,filling it"):x<-1&&s.logger.log("AVC:"+-x+" ms overlapping between fragments detected"),h=T,v[0].dts=h,f=Math.max(f-x,T),v[0].pts=f,s.logger.log("Video/PTS/DTS adjusted: "+Math.round(f/90)+"/"+Math.round(h/90)+",delta:"+x+" ms")),C=v[v.length-1],m=Math.max(C.dts,0),p=Math.max(C.pts,0,m),S&&(u=Math.round((m-h)/(v.length-1)));var R=0,L=0;for(k=0;k<_;k++){for(var j=v[k],P=j.units,I=P.length,O=0,D=0;D<I;D++)O+=P[D].data.length;L+=O,R+=I,j.length=O,j.dts=S?h+k*u:Math.max(j.dts,h),j.pts=Math.max(j.pts,j.dts)}var M=L+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 F=v[k],U=F.units,B=0,K=void 0;for(D=0,I=U.length;D<I;D++){var G=U[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((F.pts-F.dts)/u));else{if(k<_-1)u=v[k+1].dts-F.dts;else{var Y=this.config,z=F.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)-F.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(F.pts-F.dts)}b.push({size:B,duration:u,cts:K,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:F.key?2:1,isNonSync:F.key?0:1}})}this.nextAvcDts=m+u;var X=e.dropped;if(e.len=0,e.nbNalu=0,e.dropped=0,b.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var J=b[0].flags;J.dependsOn=2,J.isNonSync=0}e.samples=b,d=i.default.moof(e.sequenceNumber++,h,e),e.samples=[];var Z={data1:d,data2:c,startPTS:f/y,endPTS:(p+u)/y,startDTS:h/y,endDTS:this.nextAvcDts/y,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:X};return this.observer.trigger(o.default.FRAG_PARSING_DATA,Z),Z}},e.prototype.remuxAudio=function(e,t,r,l){var u,c,d,f,h,p,m,g=e.inputTimeScale,y=e.timescale,v=g/y,b=(e.isAAC?1024:1152)*v,_=this._PTSNormalize,A=this._initPTS,E=!e.isAAC&&this.typeSupported.mpeg,T=e.samples,S=[],w=this.nextAudioPts;if(r|=T.length&&w&&(l&&Math.abs(t-w/g)<.1||Math.abs(T[0].pts-w-A)<20*b),T.forEach((function(e){e.pts=e.dts=_(e.pts-A,t*g)})),0!==(T=T.filter((function(e){return e.pts>=0}))).length){if(r||(w=l?t*g:T[0].pts),e.isAAC)for(var k=this.config.maxAudioFramesDrift,C=0,x=w;C<T.length;){var R,L=T[C];R=(F=L.pts)-x;var j=Math.abs(1e3*R/g);if(R<=-k*b)s.logger.warn("Dropping 1 audio frame @ "+(x/g).toFixed(3)+"s due to "+Math.round(j)+" ms overlap."),T.splice(C,1),e.len-=L.unit.length;else if(R>=k*b&&j<1e4&&x){var P=Math.round(R/b);s.logger.warn("Injecting "+P+" audio frame @ "+(x/g).toFixed(3)+"s due to "+Math.round(1e3*R/g)+" ms gap.");for(var I=0;I<P;I++){var O=Math.max(x,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=L.unit.subarray()),T.splice(C,0,{unit:d,pts:O,dts:O}),e.len+=d.length,x+=b,C++}L.pts=L.dts=x,x+=b,C++}else Math.abs(R),L.pts=L.dts=x,x+=b,C++}I=0;for(var D=T.length;I<D;I++){var M=T[I],N=M.unit,F=M.pts;if(void 0!==m)c.duration=Math.round((F-m)/v);else{var U=Math.round(1e3*(F-w)/g),B=0;if(r&&e.isAAC&&U){if(U>0&&U<1e4)B=Math.round((F-w)/b),s.logger.log(U+" ms hole between AAC samples detected,filling it"),B>0&&((d=n.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(d=N.subarray()),e.len+=B*d.length);else if(U<-12){s.logger.log("drop overlapping AAC sample, expected/parsed/delta:"+(w/g).toFixed(3)+"s/"+(F/g).toFixed(3)+"s/"+-U+"ms"),e.len-=N.byteLength;continue}F=w}if(p=F,!(e.len>0))return;var K=E?e.len:e.len+8;u=E?0:8;try{f=new Uint8Array(K)}catch(e){return void this.observer.trigger(o.default.ERROR,{type:a.ErrorTypes.MUX_ERROR,details:a.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:K,reason:"fail allocating audio mdat "+K})}for(E||(new DataView(f.buffer).setUint32(0,K),f.set(i.default.types.mdat,4)),C=0;C<B;C++)(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=F}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": +/*! exports provided: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/crypt/decrypter.js because of ./src/demux/demuxer-worker.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/demuxer-inline.js because of ./src/demux/demuxer-worker.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/id3.js because of ./src/demux/demuxer-worker.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/mp4demuxer.js because of ./src/demux/demuxer-worker.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/errors.ts because of ./src/demux/demuxer-worker.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/events.js because of ./src/demux/demuxer-worker.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/polyfills/number-isFinite.js because of ./src/demux/demuxer-worker.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/get-self-scope.js because of ./src/demux/demuxer-worker.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/logger.js because of ./src/demux/demuxer-worker.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/eventemitter3/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/url-toolkit/src/url-toolkit.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"newCue",(function(){return gt}));var i,a,o=n("./node_modules/url-toolkit/src/url-toolkit.js"),s=n("./src/errors.ts"),l=n("./src/polyfills/number-isFinite.js"),u=n("./src/events.js"),c=n("./src/utils/logger.js"),d={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},f=function(){function e(e){this.hls=void 0,this.handledEvents=void 0,this.useGenericHandler=void 0,this.hls=e,this.onEvent=this.onEvent.bind(this);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.handledEvents=n,this.useGenericHandler=!0,this.registerListeners()}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.unregisterListeners(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){},t.onHandlerDestroyed=function(){},t.isEventHandler=function(){return"object"==typeof this.handledEvents&&this.handledEvents.length&&"function"==typeof this.onEvent},t.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(e){if(d[e])throw new Error("Forbidden event-name: "+e);this.hls.on(e,this.onEvent)}),this)},t.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(e){this.hls.off(e,this.onEvent)}),this)},t.onEvent=function(e,t){this.onEventGeneric(e,t)},t.onEventGeneric=function(e,t){try{(function(e,t){var n="on"+e.replace("hls","");if("function"!=typeof this[n])throw new Error("Event "+e+" has no generic handler in this "+this.constructor.name+" class (tried "+n+")");return this[n].bind(this,t)}).call(this,e,t).call()}catch(t){c.logger.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,err:t})}},e}();!function(e){e.MANIFEST="manifest",e.LEVEL="level",e.AUDIO_TRACK="audioTrack",e.SUBTITLE_TRACK="subtitleTrack"}(i||(i={})),function(e){e.MAIN="main",e.AUDIO="audio",e.SUBTITLE="subtitle"}(a||(a={}));var h=n("./src/demux/mp4demuxer.js");function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var m,g=function(){function e(e,t){this._uri=null,this.baseuri=void 0,this.reluri=void 0,this.method=null,this.key=null,this.iv=null,this.baseuri=e,this.reluri=t}var t,n,r;return t=e,(n=[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=Object(o.buildAbsoluteURL)(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}])&&p(t.prototype,n),r&&p(t,r),e}();function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e.AUDIO="audio",e.VIDEO="video"}(m||(m={}));var y=function(){function e(){var e;this._url=null,this._byteRange=null,this._decryptdata=null,this._elementaryStreams=((e={})[m.AUDIO]=!1,e[m.VIDEO]=!1,e),this.deltaPTS=0,this.rawProgramDateTime=null,this.programDateTime=null,this.title=null,this.tagList=[],this.cc=void 0,this.type=void 0,this.relurl=void 0,this.baseurl=void 0,this.duration=void 0,this.start=void 0,this.sn=0,this.urlId=0,this.level=0,this.levelkey=void 0,this.loader=void 0}var t,n,r,i=e.prototype;return i.setByteRange=function(e,t){var n=e.split("@",2),r=[];1===n.length?r[0]=t?t.byteRangeEndOffset:0:r[0]=parseInt(n[1]),r[1]=parseInt(n[0])+r[0],this._byteRange=r},i.addElementaryStream=function(e){this._elementaryStreams[e]=!0},i.hasElementaryStream=function(e){return!0===this._elementaryStreams[e]},i.createInitializationVector=function(e){for(var t=new Uint8Array(16),n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t},i.setDecryptDataFromLevelKey=function(e,t){var n=e;return e&&e.method&&e.uri&&!e.iv&&((n=new g(e.baseuri,e.reluri)).method=e.method,n.iv=this.createInitializationVector(t)),n},t=e,(n=[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=Object(o.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(e){this._url=e}},{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var e=this.sn;"number"!=typeof e&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&c.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),e=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,e)}return this._decryptdata}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(l.isFiniteNumber)(this.programDateTime))return null;var e=Object(l.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)}}])&&v(t.prototype,n),r&&v(t,r),e}();function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var _=function(){function e(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}var t,n,r;return t=e,(n=[{key:"hasProgramDateTime",get:function(){return!(!this.fragments[0]||!Object(l.isFiniteNumber)(this.fragments[0].programDateTime))}}])&&b(t.prototype,n),r&&b(t,r),e}(),A=/^(\d+)x(\d+)$/,E=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,T=function(){function e(t){for(var n in"string"==typeof t&&(t=e.parseAttrList(t)),t)t.hasOwnProperty(n)&&(this[n]=t[n])}var t=e.prototype;return t.decimalInteger=function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(2*r,2*r+2),16);return n}return null},t.hexadecimalIntegerAsNumber=function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.enumeratedString=function(e){return this[e]},t.decimalResolution=function(e){var t=A.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={};for(E.lastIndex=0;null!==(t=E.exec(e));){var r=t[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[t[1]]=r}return n},e}(),w={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}};function S(e,t){return MediaSource.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"')}var k=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,C=/#EXT-X-MEDIA:(.*)/g,x=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),R=/(?:(?:#(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?/,L=/\.(mp4|m4s|m4v|m4a)$/i,I=function(){function e(){}return e.findGroup=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.id===t)return r}},e.convertAVC1ToAVCOTI=function(e){var t,n=e.split(".");return n.length>2?(t=n.shift()+".",t+=parseInt(n.shift()).toString(16),t+=("000"+parseInt(n.shift()).toString(16)).substr(-4)):t=e,t},e.resolve=function(e,t){return o.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,n){var r,i=[];function a(e,t){["video","audio"].forEach((function(n){var r=e.filter((function(e){return function(e,t){var n=w[t];return!!n&&!0===n[e.slice(0,4)]}(e,n)}));if(r.length){var i=r.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[n+"Codec"]=i.length>0?i[0]:r[0],e=e.filter((function(e){return-1===r.indexOf(e)}))}})),t.unknownCodecs=e}for(k.lastIndex=0;null!=(r=k.exec(t));){var o={},s=o.attrs=new T(r[1]);o.url=e.resolve(r[2],n);var l=s.decimalResolution("RESOLUTION");l&&(o.width=l.width,o.height=l.height),o.bitrate=s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),o.name=s.NAME,a([].concat((s.CODECS||"").split(/[ ,]+/)),o),o.videoCodec&&-1!==o.videoCodec.indexOf("avc1")&&(o.videoCodec=e.convertAVC1ToAVCOTI(o.videoCodec)),i.push(o)}return i},e.parseMasterPlaylistMedia=function(t,n,r,i){var a;void 0===i&&(i=[]);var o=[],s=0;for(C.lastIndex=0;null!==(a=C.exec(t));){var l=new T(a[1]);if(l.TYPE===r){var u={id:s++,groupId:l["GROUP-ID"],name:l.NAME||l.LANGUAGE,type:r,default:"YES"===l.DEFAULT,autoselect:"YES"===l.AUTOSELECT,forced:"YES"===l.FORCED,lang:l.LANGUAGE};if(l.URI&&(u.url=e.resolve(l.URI,n)),i.length){var c=e.findGroup(i,u.groupId);u.audioCodec=c?c.codec:i[0].codec}o.push(u)}}return o},e.parseLevelPlaylist=function(e,t,n,r,i){var a,o,s,u=0,d=0,f=new _(t),h=0,p=null,m=new y,v=null;for(x.lastIndex=0;null!==(a=x.exec(e));){var b=a[1];if(b){m.duration=parseFloat(b);var A=(" "+a[2]).slice(1);m.title=A||null,m.tagList.push(A?["INF",b,A]:["INF",b])}else if(a[3]){if(Object(l.isFiniteNumber)(m.duration)){var E=u++;m.type=r,m.start=d,s&&(m.levelkey=s),m.sn=E,m.level=n,m.cc=h,m.urlId=i,m.baseurl=t,m.relurl=(" "+a[3]).slice(1),P(m,p),f.fragments.push(m),p=m,d+=m.duration,m=new y}}else if(a[4]){var w=(" "+a[4]).slice(1);p?m.setByteRange(w,p):m.setByteRange(w)}else if(a[5])m.rawProgramDateTime=(" "+a[5]).slice(1),m.tagList.push(["PROGRAM-DATE-TIME",m.rawProgramDateTime]),null===v&&(v=f.fragments.length);else{if(!(a=a[0].match(R))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(o=1;o<a.length&&void 0===a[o];o++);var S=(" "+a[o+1]).slice(1),k=(" "+a[o+2]).slice(1);switch(a[o]){case"#":m.tagList.push(k?[S,k]:[S]);break;case"PLAYLIST-TYPE":f.type=S.toUpperCase();break;case"MEDIA-SEQUENCE":u=f.startSN=parseInt(S);break;case"TARGETDURATION":f.targetduration=parseFloat(S);break;case"VERSION":f.version=parseInt(S);break;case"EXTM3U":break;case"ENDLIST":f.live=!1;break;case"DIS":h++,m.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":h=parseInt(S);break;case"KEY":var C=new T(S),I=C.enumeratedString("METHOD"),j=C.URI,O=C.hexadecimalInteger("IV");I&&(s=new g(t,j),j&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(I)>=0&&(s.method=I,s.key=null,s.iv=O));break;case"START":var D=new T(S).decimalFloatingPoint("TIME-OFFSET");Object(l.isFiniteNumber)(D)&&(f.startTimeOffset=D);break;case"MAP":var M=new T(S);m.relurl=M.URI,M.BYTERANGE&&m.setByteRange(M.BYTERANGE),m.baseurl=t,m.level=n,m.type=r,m.sn="initSegment",f.initSegment=m,(m=new y).rawProgramDateTime=f.initSegment.rawProgramDateTime;break;default:c.logger.warn("line parsed but not handled: "+a)}}}return(m=p)&&!m.relurl&&(f.fragments.pop(),d-=m.duration),f.totalduration=d,f.averagetargetduration=d/f.fragments.length,f.endSN=u-1,f.startCC=f.fragments[0]?f.fragments[0].cc:0,f.endCC=h,!f.initSegment&&f.fragments.length&&f.fragments.every((function(e){return L.test(e.relurl)}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(m=new y).relurl=f.fragments[0].relurl,m.baseurl=t,m.level=n,m.type=r,m.sn="initSegment",f.initSegment=m,f.needSidxRanges=!0),v&&function(e,t){for(var n=e[t],r=t-1;r>=0;r--){var i=e[r];i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(f.fragments,v),f},e}();function P(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),Object(l.isFiniteNumber)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}var j=window.performance,O=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.MANIFEST_LOADING,u.default.LEVEL_LOADING,u.default.AUDIO_TRACK_LOADING,u.default.SUBTITLE_TRACK_LOADING)||this).loaders={},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.canHaveQualityLevels=function(e){return e!==i.AUDIO_TRACK&&e!==i.SUBTITLE_TRACK},r.mapContextToLevelType=function(e){switch(e.type){case i.AUDIO_TRACK:return a.AUDIO;case i.SUBTITLE_TRACK:return a.SUBTITLE;default:return a.MAIN}},r.getResponseUrl=function(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n};var o=r.prototype;return o.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,r=t.loader,i=new(n||r)(t);return e.loader=i,this.loaders[e.type]=i,i},o.getInternalLoader=function(e){return this.loaders[e.type]},o.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},o.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},o.destroy=function(){this.destroyInternalLoaders(),e.prototype.destroy.call(this)},o.onManifestLoading=function(e){this.load({url:e.url,type:i.MANIFEST,level:0,id:null,responseType:"text"})},o.onLevelLoading=function(e){this.load({url:e.url,type:i.LEVEL,level:e.level,id:e.id,responseType:"text"})},o.onAudioTrackLoading=function(e){this.load({url:e.url,type:i.AUDIO_TRACK,level:null,id:e.id,responseType:"text"})},o.onSubtitleTrackLoading=function(e){this.load({url:e.url,type:i.SUBTITLE_TRACK,level:null,id:e.id,responseType:"text"})},o.load=function(e){var t=this.hls.config;c.logger.debug("Loading playlist of type "+e.type+", level: "+e.level+", id: "+e.id);var n,r,a,o,s=this.getInternalLoader(e);if(s){var l=s.context;if(l&&l.url===e.url)return c.logger.trace("playlist request ongoing"),!1;c.logger.warn("aborting previous loader for type: "+e.type),s.abort()}switch(e.type){case i.MANIFEST:n=t.manifestLoadingMaxRetry,r=t.manifestLoadingTimeOut,a=t.manifestLoadingRetryDelay,o=t.manifestLoadingMaxRetryTimeout;break;case i.LEVEL:n=0,o=0,a=0,r=t.levelLoadingTimeOut;break;default:n=t.levelLoadingMaxRetry,r=t.levelLoadingTimeOut,a=t.levelLoadingRetryDelay,o=t.levelLoadingMaxRetryTimeout}s=this.createInternalLoader(e);var u={timeout:r,maxRetry:n,retryDelay:a,maxRetryDelay:o},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return c.logger.debug("Calling internal loader delegate for URL: "+e.url),s.load(e,u,d),!0},o.loadsuccess=function(e,t,n,r){if(void 0===r&&(r=null),n.isSidxRequest)return this._handleSidxRequest(e,n),void this._handlePlaylistLoaded(e,t,n,r);if(this.resetInternalLoader(n.type),"string"!=typeof e.data)throw new Error('expected responseType of "text" for PlaylistLoader');var i=e.data;t.tload=j.now(),0===i.indexOf("#EXTM3U")?i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(e,t,n,r):this._handleMasterPlaylist(e,t,n,r):this._handleManifestParsingError(e,n,"no EXTM3U delimiter",r)},o.loaderror=function(e,t,n){void 0===n&&(n=null),this._handleNetworkError(t,n,!1,e)},o.loadtimeout=function(e,t,n){void 0===n&&(n=null),this._handleNetworkError(t,n,!0)},o._handleMasterPlaylist=function(e,t,n,i){var a=this.hls,o=e.data,s=r.getResponseUrl(e,n),l=I.parseMasterPlaylist(o,s);if(l.length){var d=l.map((function(e){return{id:e.attrs.AUDIO,codec:e.audioCodec}})),f=I.parseMasterPlaylistMedia(o,s,"AUDIO",d),h=I.parseMasterPlaylistMedia(o,s,"SUBTITLES");if(f.length){var p=!1;f.forEach((function(e){e.url||(p=!0)})),!1===p&&l[0].audioCodec&&!l[0].attrs.AUDIO&&(c.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1}))}a.trigger(u.default.MANIFEST_LOADED,{levels:l,audioTracks:f,subtitles:h,url:s,stats:t,networkDetails:i})}else this._handleManifestParsingError(e,n,"no level found in manifest",i)},o._handleTrackOrLevelPlaylist=function(e,t,n,a){var o=this.hls,s=n.id,c=n.level,d=n.type,f=r.getResponseUrl(e,n),h=Object(l.isFiniteNumber)(s)?s:0,p=Object(l.isFiniteNumber)(c)?c:h,m=r.mapContextToLevelType(n),g=I.parseLevelPlaylist(e.data,f,p,m,h);if(g.tload=t.tload,d===i.MANIFEST){var v={url:f,details:g};o.trigger(u.default.MANIFEST_LOADED,{levels:[v],audioTracks:[],url:f,stats:t,networkDetails:a})}if(t.tparsed=j.now(),g.needSidxRanges){var y=g.initSegment.url;this.load({url:y,isSidxRequest:!0,type:d,level:c,levelDetails:g,id:s,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}else n.levelDetails=g,this._handlePlaylistLoaded(e,t,n,a)},o._handleSidxRequest=function(e,t){if("string"==typeof e.data)throw new Error("sidx request must be made with responseType of array buffer");var n=h.default.parseSegmentIndex(new Uint8Array(e.data));if(n){var r=n.references,i=t.levelDetails;r.forEach((function(e,t){var n=e.info;if(i){var r=i.fragments[t];0===r.byteRange.length&&r.setByteRange(String(1+n.end-n.start)+"@"+String(n.start))}})),i&&i.initSegment.setByteRange(String(n.moovEndOffset)+"@0")}},o._handleManifestParsingError=function(e,t,n,r){this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:e.url,reason:n,networkDetails:r})},o._handleNetworkError=function(e,t,n,r){var a,o;void 0===n&&(n=!1),void 0===r&&(r=null),c.logger.info("A network error occured while loading a "+e.type+"-type playlist");var l=this.getInternalLoader(e);switch(e.type){case i.MANIFEST:a=n?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,o=!0;break;case i.LEVEL:a=n?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,o=!1;break;case i.AUDIO_TRACK:a=n?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,o=!1;break;default:o=!1}l&&(l.abort(),this.resetInternalLoader(e.type));var d={type:s.ErrorTypes.NETWORK_ERROR,details:a,fatal:o,url:e.url,loader:l,context:e,networkDetails:t};r&&(d.response=r),this.hls.trigger(u.default.ERROR,d)},o._handlePlaylistLoaded=function(e,t,n,a){var o=n.type,s=n.level,l=n.id,c=n.levelDetails;if(c&&c.targetduration)if(r.canHaveQualityLevels(n.type))this.hls.trigger(u.default.LEVEL_LOADED,{details:c,level:s||0,id:l||0,stats:t,networkDetails:a});else switch(o){case i.AUDIO_TRACK:this.hls.trigger(u.default.AUDIO_TRACK_LOADED,{details:c,id:l,stats:t,networkDetails:a});break;case i.SUBTITLE_TRACK:this.hls.trigger(u.default.SUBTITLE_TRACK_LOADED,{details:c,id:l,stats:t,networkDetails:a})}else this._handleManifestParsingError(e,n,"invalid target duration",a)},r}(f),D=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.FRAG_LOADING)||this).loaders={},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){var t=this.loaders;for(var n in t){var r=t[n];r&&r.destroy()}this.loaders={},e.prototype.destroy.call(this)},i.onFragLoading=function(e){var t=e.frag,n=t.type,r=this.loaders,i=this.hls.config,a=i.fLoader,o=i.loader;t.loaded=0;var s,u,d,f=r[n];f&&(c.logger.warn("abort previous fragment loader for type: "+n),f.abort()),f=r[n]=t.loader=i.fLoader?new a(i):new o(i),s={url:t.url,frag:t,responseType:"arraybuffer",progressData:!1};var h=t.byteRangeStartOffset,p=t.byteRangeEndOffset;Object(l.isFiniteNumber)(h)&&Object(l.isFiniteNumber)(p)&&(s.rangeStart=h,s.rangeEnd=p),u={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:i.fragLoadingMaxRetryTimeout},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},f.load(s,u,d)},i.loadsuccess=function(e,t,n,r){void 0===r&&(r=null);var i=e.data,a=n.frag;a.loader=void 0,this.loaders[a.type]=void 0,this.hls.trigger(u.default.FRAG_LOADED,{payload:i,frag:a,stats:t,networkDetails:r})},i.loaderror=function(e,t,n){void 0===n&&(n=null);var r=t.frag,i=r.loader;i&&i.abort(),this.loaders[r.type]=void 0,this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t.frag,response:e,networkDetails:n})},i.loadtimeout=function(e,t,n){void 0===n&&(n=null);var r=t.frag,i=r.loader;i&&i.abort(),this.loaders[r.type]=void 0,this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t.frag,networkDetails:n})},i.loadprogress=function(e,t,n,r){void 0===r&&(r=null);var i=t.frag;i.loaded=e.loaded,this.hls.trigger(u.default.FRAG_LOAD_PROGRESS,{frag:i,stats:e,networkDetails:r})},r}(f),M=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.KEY_LOADING)||this).loaders={},n.decryptkey=null,n.decrypturl=null,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){for(var t in this.loaders){var n=this.loaders[t];n&&n.destroy()}this.loaders={},e.prototype.destroy.call(this)},i.onKeyLoading=function(e){var t=e.frag,n=t.type,r=this.loaders[n];if(t.decryptdata){var i=t.decryptdata.uri;if(i!==this.decrypturl||null===this.decryptkey){var a=this.hls.config;if(r&&(c.logger.warn("abort previous key loader for type:"+n),r.abort()),!i)return void c.logger.warn("key uri is falsy");t.loader=this.loaders[n]=new a.loader(a),this.decrypturl=i,this.decryptkey=null;var o={url:i,frag:t,responseType:"arraybuffer"},s={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:a.fragLoadingRetryDelay,maxRetryDelay:a.fragLoadingMaxRetryTimeout},l={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};t.loader.load(o,s,l)}else this.decryptkey&&(t.decryptdata.key=this.decryptkey,this.hls.trigger(u.default.KEY_LOADED,{frag:t}))}else c.logger.warn("Missing decryption data on fragment in onKeyLoading")},i.loadsuccess=function(e,t,n){var r=n.frag;r.decryptdata?(this.decryptkey=r.decryptdata.key=new Uint8Array(e.data),r.loader=void 0,delete this.loaders[r.type],this.hls.trigger(u.default.KEY_LOADED,{frag:r})):c.logger.error("after key load, decryptdata unset")},i.loaderror=function(e,t){var n=t.frag,r=n.loader;r&&r.abort(),delete this.loaders[n.type],this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:e})},i.loadtimeout=function(e,t){var n=t.frag,r=n.loader;r&&r.abort(),delete this.loaders[n.type],this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},r}(f),N="NOT_LOADED",U="APPENDING",F="PARTIAL",B="OK",K=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.BUFFER_APPENDED,u.default.FRAG_BUFFERED,u.default.FRAG_LOADED)||this).bufferPadding=.2,n.fragments=Object.create(null),n.timeRanges=Object.create(null),n.config=t.config,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,f.prototype.destroy.call(this),e.prototype.destroy.call(this)},i.getBufferedFrag=function(e,t){var n=this.fragments,r=Object.keys(n).filter((function(r){var i=n[r];if(i.body.type!==t)return!1;if(!i.buffered)return!1;var a=i.body;return a.startPTS<=e&&e<=a.endPTS}));if(0===r.length)return null;var i=r.pop();return n[i].body},i.detectEvictedFragments=function(e,t){var n,r,i=this;Object.keys(this.fragments).forEach((function(a){var o=i.fragments[a];if(!0===o.buffered){var s=o.range[e];if(s){n=s.time;for(var l=0;l<n.length;l++)if(r=n[l],!1===i.isTimeBuffered(r.startPTS,r.endPTS,t)){i.removeFragment(o.body);break}}}}))},i.detectPartialFragments=function(e){var t=this,n=this.getFragmentKey(e),r=this.fragments[n];r&&(r.buffered=!0,Object.keys(this.timeRanges).forEach((function(n){if(e.hasElementaryStream(n)){var i=t.timeRanges[n];r.range[n]=t.getBufferedTimes(e.startPTS,e.endPTS,i)}})))},i.getBufferedTimes=function(e,t,n){for(var r,i,a=[],o=!1,s=0;s<n.length;s++){if(r=n.start(s)-this.bufferPadding,i=n.end(s)+this.bufferPadding,e>=r&&t<=i){a.push({startPTS:Math.max(e,n.start(s)),endPTS:Math.min(t,n.end(s))});break}if(e<i&&t>r)a.push({startPTS:Math.max(e,n.start(s)),endPTS:Math.min(t,n.end(s))}),o=!0;else if(t<=r)break}return{time:a,partial:o}},i.getFragmentKey=function(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn},i.getPartialFragment=function(e){var t,n,r,i=this,a=null,o=0;return Object.keys(this.fragments).forEach((function(s){var l=i.fragments[s];i.isPartial(l)&&(n=l.body.startPTS-i.bufferPadding,r=l.body.endPTS+i.bufferPadding,e>=n&&e<=r&&(t=Math.min(e-n,r-e),o<=t&&(a=l.body,o=t)))})),a},i.getState=function(e){var t=this.getFragmentKey(e),n=this.fragments[t],r=N;return void 0!==n&&(r=n.buffered?!0===this.isPartial(n)?F:B:U),r},i.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)},i.isTimeBuffered=function(e,t,n){for(var r,i,a=0;a<n.length;a++){if(r=n.start(a)-this.bufferPadding,i=n.end(a)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1},i.onFragLoaded=function(e){var t=e.frag;Object(l.isFiniteNumber)(t.sn)&&!t.bitrateTest&&(this.fragments[this.getFragmentKey(t)]={body:t,range:Object.create(null),buffered:!1})},i.onBufferAppended=function(e){var t=this;this.timeRanges=e.timeRanges,Object.keys(this.timeRanges).forEach((function(e){var n=t.timeRanges[e];t.detectEvictedFragments(e,n)}))},i.onFragBuffered=function(e){this.detectPartialFragments(e.frag)},i.hasFragment=function(e){var t=this.getFragmentKey(e);return void 0!==this.fragments[t]},i.removeFragment=function(e){var t=this.getFragmentKey(e);delete this.fragments[t]},i.removeAllFragments=function(){this.fragments=Object.create(null)},r}(f),V={search:function(e,t){for(var n=0,r=e.length-1,i=null,a=null;n<=r;){var o=t(a=e[i=(n+r)/2|0]);if(o>0)n=i+1;else{if(!(o<0))return a;r=i-1}}return null}},G=function(){function e(){}return e.isBuffered=function(e,t){try{if(e)for(var n=e.buffered,r=0;r<n.length;r++)if(t>=n.start(r)&&t<=n.end(r))return!0}catch(e){}return!1},e.bufferInfo=function(e,t,n){try{if(e){var r,i=e.buffered,a=[];for(r=0;r<i.length;r++)a.push({start:i.start(r),end:i.end(r)});return this.bufferedInfo(a,t,n)}}catch(e){}return{len:0,start:t,end:t,nextStart:void 0}},e.bufferedInfo=function(e,t,n){e.sort((function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var r=[];if(n)for(var i=0;i<e.length;i++){var a=r.length;if(a){var o=r[a-1].end;e[i].start-o<n?e[i].end>o&&(r[a-1].end=e[i].end):r.push(e[i])}else r.push(e[i])}else r=e;for(var s,l=0,u=t,c=t,d=0;d<r.length;d++){var f=r[d].start,h=r[d].end;if(t+n>=f&&t<h)u=f,l=(c=h)-t;else if(t+n<f){s=f;break}}return{len:l,start:u,end:c,nextStart:s}},e}(),H=n("./node_modules/eventemitter3/index.js"),Y=n("./node_modules/webworkify-webpack/index.js"),z=n("./src/demux/demuxer-inline.js");function W(){return window.MediaSource||window.WebKitMediaSource}var $=n("./src/utils/get-self-scope.js"),q=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.trigger=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.emit.apply(this,[e,e].concat(n))},r}(H.EventEmitter),X=Object($.getSelfScope)(),J=W()||{isTypeSupported:function(){return!1}},Z=function(){function e(e,t){var n=this;this.hls=e,this.id=t;var r=this.observer=new q,i=e.config,a=function(t,r){(r=r||{}).frag=n.frag,r.id=n.id,e.trigger(t,r)};r.on(u.default.FRAG_DECRYPTED,a),r.on(u.default.FRAG_PARSING_INIT_SEGMENT,a),r.on(u.default.FRAG_PARSING_DATA,a),r.on(u.default.FRAG_PARSED,a),r.on(u.default.ERROR,a),r.on(u.default.FRAG_PARSING_METADATA,a),r.on(u.default.FRAG_PARSING_USERDATA,a),r.on(u.default.INIT_PTS_FOUND,a);var o={mp4:J.isTypeSupported("video/mp4"),mpeg:J.isTypeSupported("audio/mpeg"),mp3:J.isTypeSupported('audio/mp4; codecs="mp3"')},l=navigator.vendor;if(i.enableWorker&&"undefined"!=typeof Worker){var d;c.logger.log("demuxing in webworker");try{d=this.w=Y(/*! ../demux/demuxer-worker.js */"./src/demux/demuxer-worker.js"),this.onwmsg=this.onWorkerMessage.bind(this),d.addEventListener("message",this.onwmsg),d.onerror=function(t){e.trigger(u.default.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:t.message+" ("+t.filename+":"+t.lineno+")"}})},d.postMessage({cmd:"init",typeSupported:o,vendor:l,id:t,config:JSON.stringify(i)})}catch(e){c.logger.warn("Error in worker:",e),c.logger.error("Error while initializing DemuxerWorker, fallback on DemuxerInline"),d&&X.URL.revokeObjectURL(d.objectURL),this.demuxer=new z.default(r,o,i,l),this.w=void 0}}else this.demuxer=new z.default(r,o,i,l)}var t=e.prototype;return t.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 n=this.observer;n&&(n.removeAllListeners(),this.observer=null)},t.push=function(e,t,n,r,i,a,o,s){var u=this.w,d=Object(l.isFiniteNumber)(i.startPTS)?i.startPTS:i.start,f=i.decryptdata,h=this.frag,p=!(h&&i.cc===h.cc),m=!(h&&i.level===h.level),g=h&&i.sn===h.sn+1,v=!m&&g;if(p&&c.logger.log(this.id+":discontinuity detected"),m&&c.logger.log(this.id+":switch detected"),this.frag=i,u)u.postMessage({cmd:"demux",data:e,decryptdata:f,initSegment:t,audioCodec:n,videoCodec:r,timeOffset:d,discontinuity:p,trackSwitch:m,contiguous:v,duration:a,accurateTimeOffset:o,defaultInitPTS:s},e instanceof ArrayBuffer?[e]:[]);else{var y=this.demuxer;y&&y.push(e,f,t,n,r,d,p,m,v,a,o,s)}},t.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":X.URL.revokeObjectURL(this.w.objectURL);break;case u.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,n.trigger(t.event,t.data)}},e}();function Q(e,t,n){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(n);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(n)}}function ee(e,t,n){var r=e[t],i=e[n],a=i.startPTS;Object(l.isFiniteNumber)(a)?n>t?(r.duration=a-r.start,r.duration<0&&c.logger.warn("negative duration computed for frag "+r.sn+",level "+r.level+", there should be some duration drift between playlist and fragment!")):(i.duration=r.start-a,i.duration<0&&c.logger.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):i.start=n>t?r.start+r.duration:Math.max(r.start-i.duration,0)}function te(e,t,n,r,i,a){var o=n;if(Object(l.isFiniteNumber)(t.startPTS)){var s=Math.abs(t.startPTS-n);Object(l.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(s,t.deltaPTS):t.deltaPTS=s,o=Math.max(n,t.startPTS),n=Math.min(n,t.startPTS),r=Math.max(r,t.endPTS),i=Math.min(i,t.startDTS),a=Math.max(a,t.endDTS)}var u=n-t.start;t.start=t.startPTS=n,t.maxStartPTS=o,t.endPTS=r,t.startDTS=i,t.endDTS=a,t.duration=r-n;var c,d,f,h=t.sn;if(!e||h<e.startSN||h>e.endSN)return 0;for(c=h-e.startSN,(d=e.fragments)[c]=t,f=c;f>0;f--)ee(d,f,f-1);for(f=c;f<d.length-1;f++)ee(d,f,f+1);return e.PTSKnown=!0,u}function ne(e,t){t.initSegment&&e.initSegment&&(t.initSegment=e.initSegment);var n,r=0;if(re(e,t,(function(e,i){r=e.cc-i.cc,Object(l.isFiniteNumber)(e.startPTS)&&(i.start=i.startPTS=e.startPTS,i.endPTS=e.endPTS,i.duration=e.duration,i.backtracked=e.backtracked,i.dropped=e.dropped,n=i),t.PTSKnown=!0})),t.PTSKnown){if(r){c.logger.log("discontinuity sliding from playlist, take drift into account");for(var i=t.fragments,a=0;a<i.length;a++)i[a].cc+=r}n?te(t,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS):function(e,t){var n=t.startSN-e.startSN,r=e.fragments,i=t.fragments;if(!(n<0||n>r.length))for(var a=0;a<i.length;a++)i[a].start+=r[n].start}(e,t),t.PTSKnown=e.PTSKnown}}function re(e,t,n){if(e&&t)for(var r=Math.max(e.startSN,t.startSN)-t.startSN,i=Math.min(e.endSN,t.endSN)-t.startSN,a=t.startSN-e.startSN,o=r;o<=i;o++){var s=e.fragments[a+o],l=t.fragments[o];if(!s||!l)break;n(s,l,o)}}function ie(e,t,n){var r=1e3*(t.averagetargetduration?t.averagetargetduration:t.targetduration),i=r/2;return e&&t.endSN===e.endSN&&(r=i),n&&(r=Math.max(i,r-(window.performance.now()-n))),Math.round(r)}var ae={toString:function(e){for(var t="",n=e.length,r=0;r<n;r++)t+="["+e.start(r).toFixed(3)+","+e.end(r).toFixed(3)+"]";return t}};function oe(e,t){t.fragments.forEach((function(t){if(t){var n=t.start+e;t.start=t.startPTS=n,t.endPTS=n+t.duration}})),t.PTSKnown=!0}function se(e,t,n){!function(e,t,n){if(function(e,t,n){var r=!1;return t&&t.details&&n&&(n.endCC>n.startCC||e&&e.cc<n.startCC)&&(r=!0),r}(e,n,t)){var r=function(e,t){var n=e.fragments,r=t.fragments;if(r.length&&n.length){var i=function(e,t){for(var n=null,r=0;r<e.length;r+=1){var i=e[r];if(i&&i.cc===t){n=i;break}}return n}(n,r[0].cc);if(i&&(!i||i.startPTS))return i;c.logger.log("No frag in previous level to align on")}else c.logger.log("No fragments to align")}(n.details,t);r&&(c.logger.log("Adjusting PTS using last level due to CC increase within current level"),oe(r.start,t))}}(e,n,t),!n.PTSKnown&&t&&function(e,t){if(t&&t.fragments.length){if(!e.hasProgramDateTime||!t.hasProgramDateTime)return;var n=t.fragments[0].programDateTime,r=(e.fragments[0].programDateTime-n)/1e3+t.fragments[0].start;Object(l.isFiniteNumber)(r)&&(c.logger.log("adjusting PTS using programDateTime delta, sliding:"+r.toFixed(3)),oe(r,e))}}(n,t.details)}function le(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!Object(l.isFiniteNumber)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(var r=0;r<e.length;++r){var i=e[r];if(de(t,n,i))return i}return null}function ue(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i=e?t[e.sn-t[0].sn+1]:null;return i&&!ce(n,r,i)?i:V.search(t,ce.bind(null,n,r))}function ce(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0);var r=Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-r<=e?1:n.start-r>e&&n.start?-1:0}function de(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>e}var fe=function(){function e(e,t,n,r){this.config=e,this.media=t,this.fragmentTracker=n,this.hls=r,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var t=e.prototype;return t.poll=function(e){var t=this.config,n=this.media,r=this.stalled,i=n.currentTime,a=n.seeking,o=this.seeking&&!a,s=!this.seeking&&a;if(this.seeking=a,i===e){if((s||o)&&(this.stalled=null),!n.paused&&!n.ended&&0!==n.playbackRate&&n.buffered.length){var l=G.bufferInfo(n,i,0),u=l.len>0,d=l.nextStart||0;if(u||d){if(a){if(l.len>2||!d||d-i>2)return;this.moved=!1}if(!this.moved&&this.stalled){var f=Math.max(d,l.start||0)-i;if(f>0&&f<=2)return void this._trySkipBufferHole(null)}var h=self.performance.now();if(null!==r){var p=h-r;!a&&p>=250&&this._reportStall(l.len);var m=G.bufferInfo(n,i,t.maxBufferHole);this._tryFixBufferStall(m,p)}else this.stalled=h}}}else if(this.moved=!0,null!==r){if(this.stallReported){var g=self.performance.now()-r;c.logger.warn("playback not stuck anymore @"+i+", after "+Math.round(g)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},t._tryFixBufferStall=function(e,t){var n=this.config,r=this.fragmentTracker,i=this.media.currentTime,a=r.getPartialFragment(i);a&&this._trySkipBufferHole(a)||e.len>n.maxBufferHole&&t>1e3*n.highBufferWatchdogPeriod&&(c.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},t._reportStall=function(e){var t=this.hls,n=this.media;this.stallReported||(this.stallReported=!0,c.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer"),t.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},t._trySkipBufferHole=function(e){for(var t=this.config,n=this.hls,r=this.media,i=r.currentTime,a=0,o=0;o<r.buffered.length;o++){var l=r.buffered.start(o);if(i+t.maxBufferHole>=a&&i<l){var d=Math.max(l+.05,r.currentTime+.1);return c.logger.warn("skipping hole, adjusting currentTime from "+i+" to "+d),this.moved=!0,this.stalled=null,r.currentTime=d,e&&n.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+i+" to "+d,frag:e}),d}a=r.buffered.end(o)}return 0},t._tryNudgeBuffer=function(){var e=this.config,t=this.hls,n=this.media,r=n.currentTime,i=(this.nudgeRetry||0)+1;if(this.nudgeRetry=i,i<e.nudgeMaxRetry){var a=r+i*e.nudgeOffset;c.logger.warn("Nudging 'currentTime' from "+r+" to "+a),n.currentTime=a,t.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else c.logger.error("Playhead still not moving while enough data buffered @"+r+" after "+e.nudgeMaxRetry+" nudges"),t.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},e}();function he(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var pe=function(e){var t,n;function r(t){for(var n,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return(n=e.call.apply(e,[this,t].concat(i))||this)._boundTick=void 0,n._tickTimer=null,n._tickInterval=null,n._tickCallCount=0,n._boundTick=n.tick.bind(he(n)),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},i.hasInterval=function(){return!!this._tickInterval},i.hasNextTick=function(){return!!this._tickTimer},i.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,e),!0)},i.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},i.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},i.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&(this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)),this._tickCallCount=0)},i.doTick=function(){},r}(f),me="STOPPED",ge="STARTING",ve="IDLE",ye="PAUSED",be="KEY_LOADING",_e="FRAG_LOADING",Ae="FRAG_LOADING_WAITING_RETRY",Ee="WAITING_TRACK",Te="PARSING",we="PARSED",Se="BUFFER_FLUSHING",ke="ENDED",Ce="ERROR",xe="WAITING_INIT_PTS",Re="WAITING_LEVEL",Le=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.doTick=function(){},i.startLoad=function(){},i.stopLoad=function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragmentTracker.removeFragment(e)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=me},i._streamEnded=function(e,t){var n=this.fragCurrent,r=this.fragmentTracker;if(!t.live&&n&&!n.backtracked&&n.sn===t.endSN&&!e.nextStart){var i=r.getState(n);return i===F||i===B}return!1},i.onMediaSeeking=function(){var e=this.config,t=this.media,n=this.mediaBuffer,r=this.state,i=t?t.currentTime:null,a=G.bufferInfo(n||t,i,this.config.maxBufferHole);if(Object(l.isFiniteNumber)(i)&&c.logger.log("media seeking to "+i.toFixed(3)),r===_e){var o=this.fragCurrent;if(0===a.len&&o){var s=e.maxFragLookUpTolerance,u=o.start-s,d=o.start+o.duration+s;i<u||i>d?(o.loader&&(c.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),o.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=ve):c.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else r===ke&&(0===a.len&&(this.fragPrevious=null,this.fragCurrent=null),this.state=ve);t&&(this.lastCurrentTime=i),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=i),this.tick()},i.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},i.onHandlerDestroying=function(){this.stopLoad(),e.prototype.onHandlerDestroying.call(this)},i.onHandlerDestroyed=function(){this.state=me,this.fragmentTracker=null},i.computeLivePosition=function(e,t){var n=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*t.targetduration;return e+Math.max(0,t.totalduration-n)},r}(pe);function Ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Pe=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.MANIFEST_LOADING,u.default.MANIFEST_PARSED,u.default.LEVEL_LOADED,u.default.KEY_LOADED,u.default.FRAG_LOADED,u.default.FRAG_LOAD_EMERGENCY_ABORTED,u.default.FRAG_PARSING_INIT_SEGMENT,u.default.FRAG_PARSING_DATA,u.default.FRAG_PARSED,u.default.ERROR,u.default.AUDIO_TRACK_SWITCHING,u.default.AUDIO_TRACK_SWITCHED,u.default.BUFFER_CREATED,u.default.BUFFER_APPENDED,u.default.BUFFER_FLUSHED)||this).fragmentTracker=n,r.config=t.config,r.audioCodecSwap=!1,r._state=me,r.stallReported=!1,r.gapController=null,r.altAudio=!1,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,o,d,f=r.prototype;return f.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var r=n.startLevel;-1===r&&(r=0,this.bitrateTest=!0),this.level=n.nextLoadLevel=r,this.loadedmetadata=!1}t>0&&-1===e&&(c.logger.log("override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=ve,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this.forceStartLoad=!0,this.state=me},f.stopLoad=function(){this.forceStartLoad=!1,e.prototype.stopLoad.call(this)},f.doTick=function(){switch(this.state){case Se:this.fragLoadError=0;break;case ve:this._doTickIdle();break;case Re:var e=this.levels[this.level];e&&e.details&&(this.state=ve);break;case Ae:var t=window.performance.now(),n=this.retryDate;(!n||t>=n||this.media&&this.media.seeking)&&(c.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=ve)}this._checkBuffer(),this._checkFragmentChanged()},f._doTickIdle=function(){var e=this.hls,t=e.config,n=this.media;if(void 0!==this.levelLastLoaded&&(n||!this.startFragRequested&&t.startFragPrefetch)){var r;r=this.loadedmetadata?n.currentTime:this.nextLoadPosition;var i=e.nextLoadLevel,a=this.levels[i];if(a){var o,s=a.bitrate;o=s?Math.max(8*t.maxBufferSize/s,t.maxBufferLength):t.maxBufferLength,o=Math.min(o,t.maxMaxBufferLength);var l=G.bufferInfo(this.mediaBuffer?this.mediaBuffer:n,r,t.maxBufferHole),d=l.len;if(!(d>=o)){c.logger.trace("buffer length of "+d.toFixed(3)+" is below max of "+o.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=i;var f=a.details;if(!f||f.live&&this.levelLastLoaded!==i)this.state=Re;else{if(this._streamEnded(l,f)){var h={};return this.altAudio&&(h.type="video"),this.hls.trigger(u.default.BUFFER_EOS,h),void(this.state=ke)}this._fetchPayloadOrEos(r,l,f)}}}}},f._fetchPayloadOrEos=function(e,t,n){var r=this.fragPrevious,i=this.level,a=n.fragments,o=a.length;if(0!==o){var s,l=a[0].start,u=a[o-1].start+a[o-1].duration,d=t.end;if(n.initSegment&&!n.initSegment.data)s=n.initSegment;else if(n.live){var f=this.config.initialLiveManifestSize;if(o<f)return void c.logger.warn("Can not start playback of a level, reason: not enough fragments "+o+" < "+f);if(null===(s=this._ensureFragmentAtLivePoint(n,d,l,u,r,a,o)))return}else d<l&&(s=a[0]);s||(s=this._findFragment(l,r,o,a,d,u,n)),s&&(s.encrypted?(c.logger.log("Loading key for "+s.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+i),this._loadKey(s)):(c.logger.log("Loading "+s.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+i+", currentTime:"+e.toFixed(3)+",bufferEnd:"+d.toFixed(3)),this._loadFragment(s)))}},f._ensureFragmentAtLivePoint=function(e,t,n,r,i,a,o){var s,l=this.hls.config,u=this.media,d=void 0!==l.liveMaxLatencyDuration?l.liveMaxLatencyDuration:l.liveMaxLatencyDurationCount*e.targetduration;if(t<Math.max(n-l.maxFragLookUpTolerance,r-d)){var f=this.liveSyncPosition=this.computeLivePosition(n,e);t=f,u&&!u.paused&&u.readyState&&u.duration>f&&f>u.currentTime&&(c.logger.log("buffer end: "+t.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+f.toFixed(3)),u.currentTime=f),this.nextLoadPosition=f}if(e.PTSKnown&&t>r&&u&&u.readyState)return null;if(this.startFragRequested&&!e.PTSKnown){if(i)if(e.hasProgramDateTime)c.logger.log("live playlist, switching playlist, load frag with same PDT: "+i.programDateTime),s=le(a,i.endProgramDateTime,l.maxFragLookUpTolerance);else{var h=i.sn+1;if(h>=e.startSN&&h<=e.endSN){var p=a[h-e.startSN];i.cc===p.cc&&(s=p,c.logger.log("live playlist, switching playlist, load frag with next SN: "+s.sn))}s||(s=V.search(a,(function(e){return i.cc-e.cc})))&&c.logger.log("live playlist, switching playlist, load frag with same CC: "+s.sn)}s||(s=a[Math.min(o-1,Math.round(o/2))],c.logger.log("live playlist, switching playlist, unknown, load middle frag : "+s.sn))}return s},f._findFragment=function(e,t,n,r,i,a,o){var s,l=this.hls.config;if(s=i<a?ue(t,r,i,i>a-l.maxFragLookUpTolerance?0:l.maxFragLookUpTolerance):r[n-1]){var u=s.sn-o.startSN,d=t&&s.level===t.level,f=r[u-1],h=r[u+1];if(t&&s.sn===t.sn)if(d&&!s.backtracked)if(s.sn<o.endSN){var p=t.deltaPTS;p&&p>l.maxBufferHole&&t.dropped&&u?(s=f,c.logger.warn("Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this")):(s=h,c.logger.log("Re-loading fragment with SN: "+s.sn))}else s=null;else s.backtracked&&(h&&h.backtracked?(c.logger.warn("Already backtracked from fragment "+h.sn+", will not backtrack to fragment "+s.sn+". Loading fragment "+h.sn),s=h):(c.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),s.dropped=0,f?(s=f).backtracked=!0:u&&(s=null)))}return s},f._loadKey=function(e){this.state=be,this.hls.trigger(u.default.KEY_LOADING,{frag:e})},f._loadFragment=function(e){var t=this.fragmentTracker.getState(e);this.fragCurrent=e,"initSegment"!==e.sn&&(this.startFragRequested=!0),Object(l.isFiniteNumber)(e.sn)&&!e.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),e.backtracked||t===N||t===F?(e.autoLevel=this.hls.autoLevelEnabled,e.bitrateTest=this.bitrateTest,this.hls.trigger(u.default.FRAG_LOADING,{frag:e}),this.demuxer||(this.demuxer=new Z(this.hls,"main")),this.state=_e):t===U&&this._reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e)},f.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,a.MAIN)},f.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.endPTS+.5):null},f._checkFragmentChanged=function(){var e,t,n=this.media;if(n&&n.readyState&&!1===n.seeking&&((t=n.currentTime)>this.lastCurrentTime&&(this.lastCurrentTime=t),G.isBuffered(n,t)?e=this.getBufferedFrag(t):G.isBuffered(n,t+.1)&&(e=this.getBufferedFrag(t+.1)),e)){var r=e;if(r!==this.fragPlaying){this.hls.trigger(u.default.FRAG_CHANGED,{frag:r});var i=r.level;this.fragPlaying&&this.fragPlaying.level===i||this.hls.trigger(u.default.LEVEL_SWITCHED,{level:i}),this.fragPlaying=r}}},f.immediateLevelSwitch=function(){if(c.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var e,t=this.media;t?(e=t.paused,t.pause()):e=!0,this.previouslyPaused=e}var n=this.fragCurrent;n&&n.loader&&n.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},f.immediateLevelSwitchEnd=function(){var e=this.media;e&&e.buffered.length&&(this.immediateSwitch=!1,G.isBuffered(e,e.currentTime)&&(e.currentTime-=1e-4),this.previouslyPaused||e.play())},f.nextLevelSwitch=function(){var e=this.media;if(e&&e.readyState){var t,n,r;if((n=this.getBufferedFrag(e.currentTime))&&n.startPTS>1&&this.flushMainBuffer(0,n.startPTS-1),e.paused)t=0;else{var i=this.hls.nextLoadLevel,a=this.levels[i],o=this.fragLastKbps;t=o&&this.fragCurrent?this.fragCurrent.duration*a.bitrate/(1e3*o)+1:0}if((r=this.getBufferedFrag(e.currentTime+t))&&(r=this.followingBufferedFrag(r))){var s=this.fragCurrent;s&&s.loader&&s.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(r.maxStartPTS,Number.POSITIVE_INFINITY)}}},f.flushMainBuffer=function(e,t){this.state=Se;var n={startOffset:e,endOffset:t};this.altAudio&&(n.type="video"),this.hls.trigger(u.default.BUFFER_FLUSHING,n)},f.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 n=this.config;this.levels&&n.autoStartLoad&&this.hls.startLoad(n.startPosition),this.gapController=new fe(n,t,this.fragmentTracker,this.hls)},f.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(c.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.fragmentTracker.removeAllFragments(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},f.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:void 0;Object(l.isFiniteNumber)(t)&&c.logger.log("media seeked to "+t.toFixed(3)),this.tick()},f.onManifestLoading=function(){c.logger.log("trigger BUFFER_RESET"),this.hls.trigger(u.default.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},f.onManifestParsed=function(e){var t,n=!1,r=!1;e.levels.forEach((function(e){(t=e.audioCodec)&&(-1!==t.indexOf("mp4a.40.2")&&(n=!0),-1!==t.indexOf("mp4a.40.5")&&(r=!0))})),this.audioCodecSwitch=n&&r,this.audioCodecSwitch&&c.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.altAudio=e.altAudio,this.levels=e.levels,this.startFragRequested=!1;var i=this.config;(i.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(i.startPosition)},f.onLevelLoaded=function(e){var t=e.details,n=e.level,r=this.levels[this.levelLastLoaded],i=this.levels[n],a=t.totalduration,o=0;if(c.logger.log("level "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+a),t.live){var s=i.details;s&&t.fragments.length>0?(ne(s,t),o=t.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(o,s),t.PTSKnown&&Object(l.isFiniteNumber)(o)?c.logger.log("live playlist sliding:"+o.toFixed(3)):(c.logger.log("live playlist - outdated PTS, unknown sliding"),se(this.fragPrevious,r,t))):(c.logger.log("live playlist - first load, unknown sliding"),t.PTSKnown=!1,se(this.fragPrevious,r,t))}else t.PTSKnown=!1;if(i.details=t,this.levelLastLoaded=n,this.hls.trigger(u.default.LEVEL_UPDATED,{details:t,level:n}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var d=t.startTimeOffset;Object(l.isFiniteNumber)(d)?(d<0&&(c.logger.log("negative start time offset "+d+", count from end of last fragment"),d=o+a+d),c.logger.log("start time offset found in playlist, adjust startPosition to "+d),this.startPosition=d):t.live?(this.startPosition=this.computeLivePosition(o,t),c.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===Re&&(this.state=ve),this.tick()},f.onKeyLoaded=function(){this.state===be&&(this.state=ve,this.tick())},f.onFragLoaded=function(e){var t=this.fragCurrent,n=this.hls,r=this.levels,i=this.media,a=e.frag;if(this.state===_e&&t&&"main"===a.type&&a.level===t.level&&a.sn===t.sn){var o=e.stats,s=r[t.level],l=s.details;if(this.bitrateTest=!1,this.stats=o,c.logger.log("Loaded "+t.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+t.level),a.bitrateTest&&n.nextLoadLevel)this.state=ve,this.startFragRequested=!1,o.tparsed=o.tbuffered=window.performance.now(),n.trigger(u.default.FRAG_BUFFERED,{stats:o,frag:t,id:"main"}),this.tick();else if("initSegment"===a.sn)this.state=ve,o.tparsed=o.tbuffered=window.performance.now(),l.initSegment.data=e.payload,n.trigger(u.default.FRAG_BUFFERED,{stats:o,frag:t,id:"main"}),this.tick();else{c.logger.log("Parsing "+t.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+t.level+", cc "+t.cc),this.state=Te,this.pendingBuffering=!0,this.appended=!1,a.bitrateTest&&(a.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:a}));var d=!(i&&i.seeking)&&(l.PTSKnown||!l.live),f=l.initSegment?l.initSegment.data:[],h=this._getAudioCodec(s);(this.demuxer=this.demuxer||new Z(this.hls,"main")).push(e.payload,f,h,s.videoCodec,t,l.totalduration,d)}}this.fragLoadError=0},f.onFragParsingInitSegment=function(e){var t=this.fragCurrent,n=e.frag;if(t&&"main"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===Te){var r,i,a=e.tracks;if(a.audio&&this.altAudio&&delete a.audio,i=a.audio){var o=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase();o&&this.audioCodecSwap&&(c.logger.log("swapping playlist audio codec"),o=-1!==o.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==i.metadata.channelCount&&-1===s.indexOf("firefox")&&(o="mp4a.40.5"),-1!==s.indexOf("android")&&"audio/mpeg"!==i.container&&(o="mp4a.40.2",c.logger.log("Android: force audio codec to "+o)),i.levelCodec=o,i.id=e.id}for(r in(i=a.video)&&(i.levelCodec=this.levels[this.level].videoCodec,i.id=e.id),this.hls.trigger(u.default.BUFFER_CODECS,a),a){i=a[r],c.logger.log("main track:"+r+",container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var l=i.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.default.BUFFER_APPENDING,{type:r,data:l,parent:"main",content:"initSegment"}))}this.tick()}},f.onFragParsingData=function(e){var t=this,n=this.fragCurrent,r=e.frag;if(n&&"main"===e.id&&r.sn===n.sn&&r.level===n.level&&("audio"!==e.type||!this.altAudio)&&this.state===Te){var i=this.levels[this.level],a=n;if(Object(l.isFiniteNumber)(e.endPTS)||(e.endPTS=e.startPTS+n.duration,e.endDTS=e.startDTS+n.duration),!0===e.hasAudio&&a.addElementaryStream(m.AUDIO),!0===e.hasVideo&&a.addElementaryStream(m.VIDEO),c.logger.log("Parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb+",dropped:"+(e.dropped||0)),"video"===e.type)if(a.dropped=e.dropped,a.dropped)if(a.backtracked)c.logger.warn("Already backtracked on this fragment, appending with the gap",a.sn);else{var o=i.details;if(!o||a.sn!==o.startSN)return c.logger.warn("missing video frame(s), backtracking fragment",a.sn),this.fragmentTracker.removeFragment(a),a.backtracked=!0,this.nextLoadPosition=e.startPTS,this.state=ve,this.fragPrevious=a,void this.tick();c.logger.warn("missing video frame(s) on first frag, appending with gap",a.sn)}else a.backtracked=!1;var s=te(i.details,a,e.startPTS,e.endPTS,e.startDTS,e.endDTS),d=this.hls;d.trigger(u.default.LEVEL_PTS_UPDATED,{details:i.details,level:this.level,drift:s,type:e.type,start:e.startPTS,end:e.endPTS}),[e.data1,e.data2].forEach((function(n){n&&n.length&&t.state===Te&&(t.appended=!0,t.pendingBuffering=!0,d.trigger(u.default.BUFFER_APPENDING,{type:e.type,data:n,parent:"main",content:"data"}))})),this.tick()}},f.onFragParsed=function(e){var t=this.fragCurrent,n=e.frag;t&&"main"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===Te&&(this.stats.tparsed=window.performance.now(),this.state=we,this._checkAppendedParsed())},f.onAudioTrackSwitching=function(e){var t=!!e.url,n=e.id;if(!t){if(this.mediaBuffer!==this.media){c.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var r=this.fragCurrent;r.loader&&(c.logger.log("switching to main audio track, cancel main fragment load"),r.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=ve}var i=this.hls;i.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),i.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:n}),this.altAudio=!1}},f.onAudioTrackSwitched=function(e){var t=e.id,n=!!this.hls.audioTracks[t].url;if(n){var r=this.videoBuffer;r&&this.mediaBuffer!==r&&(c.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n,this.tick()},f.onBufferCreated=function(e){var t,n,r=e.tracks,i=!1;for(var a in r){var o=r[a];"main"===o.id?(n=a,t=o,"video"===a&&(this.videoBuffer=r[a].buffer)):i=!0}i&&t?(c.logger.log("alternate track found, use "+n+".buffered to schedule main fragment loading"),this.mediaBuffer=t.buffer):this.mediaBuffer=this.media},f.onBufferAppended=function(e){if("main"===e.parent){var t=this.state;t!==Te&&t!==we||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(!(this.state!==we||this.appended&&this.pendingBuffering)){var e=this.fragCurrent;if(e){var t=this.mediaBuffer?this.mediaBuffer:this.media;c.logger.log("main buffered : "+ae.toString(t.buffered)),this.fragPrevious=e;var n=this.stats;n.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*n.total/(n.tbuffered-n.tfirst)),this.hls.trigger(u.default.FRAG_BUFFERED,{stats:n,frag:e,id:"main"}),this.state=ve}this.tick()}},f.onError=function(e){var t=e.frag||this.fragCurrent;if(!t||"main"===t.type){var n=!!this.media&&G.isBuffered(this.media,this.media.currentTime)&&G.isBuffered(this.media,this.media.currentTime+.5);switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:if(!e.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var r=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);c.logger.warn("mediaController: frag loading failed, retry in "+r+" ms"),this.retryDate=window.performance.now()+r,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=Ae}else c.logger.error("mediaController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=Ce;break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==Ce&&(e.fatal?(this.state=Ce,c.logger.warn("streamController: "+e.details+",switch to "+this.state+" state ...")):e.levelRetry||this.state!==Re||(this.state=ve));break;case s.ErrorDetails.BUFFER_FULL_ERROR:"main"!==e.parent||this.state!==Te&&this.state!==we||(n?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=ve):(c.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},f._reduceMaxBufferLength=function(e){var t=this.config;return t.maxMaxBufferLength>=e&&(t.maxMaxBufferLength/=2,c.logger.warn("main:reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},f._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)}},f.onFragLoadEmergencyAborted=function(){this.state=ve,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},f.onBufferFlushed=function(){var e=this.mediaBuffer?this.mediaBuffer:this.media;e&&this.fragmentTracker.detectEvictedFragments(m.VIDEO,e.buffered),this.state=ve,this.fragPrevious=null},f.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},f._seekToStartPos=function(){var e=this.media,t=e.currentTime,n=e.seeking?t:this.startPosition;t!==n&&n>=0&&(c.logger.log("target start position not buffered, seek to buffered.start(0) "+n+" from current time "+t+" "),e.currentTime=n)},f._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&(c.logger.log("swapping playlist audio codec"),t&&(t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),t},i=r,(o=[{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,c.logger.log("main stream-controller: "+t+"->"+e),this.hls.trigger(u.default.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getBufferedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;return e?this.followingBufferedFrag(this.getBufferedFrag(e.currentTime)):null}},{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(e){this._liveSyncPosition=e}}])&&Ie(i.prototype,o),d&&Ie(i,d),r}(Le);function je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}window.performance;var Oe,De=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.MANIFEST_LOADED,u.default.LEVEL_LOADED,u.default.AUDIO_TRACK_SWITCHED,u.default.FRAG_LOADED,u.default.ERROR)||this).canload=!1,n.currentLevelIndex=null,n.manualLevelIndex=-1,n.timer=null,Oe=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o,l=r.prototype;return l.onHandlerDestroying=function(){this.clearTimer(),this.manualLevelIndex=-1},l.clearTimer=function(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)},l.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()},l.stopLoad=function(){this.canload=!1},l.onManifestLoaded=function(e){var t,n=[],r=[],i={},a=null,o=!1,l=!1;if(e.levels.forEach((function(e){var t=e.attrs;e.loadError=0,e.fragmentError=!1,o=o||!!e.videoCodec,l=l||!!e.audioCodec,Oe&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec=void 0),(a=i[e.bitrate])?a.url.push(e.url):(e.url=[e.url],e.urlId=0,i[e.bitrate]=e,n.push(e)),t&&(t.AUDIO&&(l=!0,Q(a||e,"audio",t.AUDIO)),t.SUBTITLES&&Q(a||e,"text",t.SUBTITLES))})),o&&l&&(n=n.filter((function(e){return!!e.videoCodec}))),n=n.filter((function(e){var t=e.audioCodec,n=e.videoCodec;return(!t||S(t,"audio"))&&(!n||S(n,"video"))})),e.audioTracks&&(r=e.audioTracks.filter((function(e){return!e.audioCodec||S(e.audioCodec,"audio")}))).forEach((function(e,t){e.id=t})),n.length>0){t=n[0].bitrate,n.sort((function(e,t){return e.bitrate-t.bitrate})),this._levels=n;for(var d=0;d<n.length;d++)if(n[d].bitrate===t){this._firstLevel=d,c.logger.log("manifest loaded,"+n.length+" level(s) found, first bitrate:"+t);break}this.hls.trigger(u.default.MANIFEST_PARSED,{levels:n,audioTracks:r,firstLevel:this._firstLevel,stats:e.stats,audio:l,video:o,altAudio:r.some((function(e){return!!e.url}))})}else this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},l.setLevelInternal=function(e){var t=this._levels,n=this.hls;if(e>=0&&e<t.length){if(this.clearTimer(),this.currentLevelIndex!==e){c.logger.log("switching to level "+e),this.currentLevelIndex=e;var r=t[e];r.level=e,n.trigger(u.default.LEVEL_SWITCHING,r)}var i=t[e],a=i.details;if(!a||a.live){var o=i.urlId;n.trigger(u.default.LEVEL_LOADING,{url:i.url[o],level:e,id:o})}}else n.trigger(u.default.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:!1,reason:"invalid level idx"})},l.onError=function(e){if(e.fatal)e.type===s.ErrorTypes.NETWORK_ERROR&&this.clearTimer();else{var t,n=!1,r=!1;switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:t=e.frag.level,r=!0;break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:t=e.context.level,n=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:t=e.level,n=!0}void 0!==t&&this.recoverLevel(e,t,n,r)}},l.recoverLevel=function(e,t,n,r){var i,a,o,s=this,l=this.hls.config,u=e.details,d=this._levels[t];if(d.loadError++,d.fragmentError=r,n){if(!(this.levelRetryCount+1<=l.levelLoadingMaxRetry))return c.logger.error("level controller, cannot recover from "+u+" error"),this.currentLevelIndex=null,this.clearTimer(),void(e.fatal=!0);a=Math.min(Math.pow(2,this.levelRetryCount)*l.levelLoadingRetryDelay,l.levelLoadingMaxRetryTimeout),this.timer=setTimeout((function(){return s.loadLevel()}),a),e.levelRetry=!0,this.levelRetryCount++,c.logger.warn("level controller, "+u+", retry in "+a+" ms, current retry count is "+this.levelRetryCount)}(n||r)&&((i=d.url.length)>1&&d.loadError<i?(d.urlId=(d.urlId+1)%i,d.details=void 0,c.logger.warn("level controller, "+u+" for level "+t+": switching to redundant URL-id "+d.urlId)):-1===this.manualLevelIndex?(o=0===t?this._levels.length-1:t-1,c.logger.warn("level controller, "+u+": switch to "+o),this.hls.nextAutoLevel=this.currentLevelIndex=o):r&&(c.logger.warn("level controller, "+u+": reload a fragment"),this.currentLevelIndex=null))},l.onFragLoaded=function(e){var t=e.frag;if(void 0!==t&&"main"===t.type){var n=this._levels[t.level];void 0!==n&&(n.fragmentError=!1,n.loadError=0,this.levelRetryCount=0)}},l.onLevelLoaded=function(e){var t=this,n=e.level,r=e.details;if(n===this.currentLevelIndex){var i=this._levels[n];if(i.fragmentError||(i.loadError=0,this.levelRetryCount=0),r.live){var a=ie(i.details,r,e.stats.trequest);c.logger.log("live playlist, reload in "+Math.round(a)+" ms"),this.timer=setTimeout((function(){return t.loadLevel()}),a)}else this.clearTimer()}},l.onAudioTrackSwitched=function(e){var t=this.hls.audioTracks[e.id].groupId,n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){for(var r=-1,i=0;i<n.audioGroupIds.length;i++)if(n.audioGroupIds[i]===t){r=i;break}r!==n.urlId&&(n.urlId=r,this.startLoad())}},l.loadLevel=function(){if(c.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,n=e.urlId,r=e.url[n];c.logger.log("Attempt loading level index "+t+" with URL-id "+n),this.hls.trigger(u.default.LEVEL_LOADING,{url:r,level:t,id:n})}}},i=r,(a=[{key:"levels",get:function(){return this._levels}},{key:"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))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"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}},{key:"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)}}])&&je(i.prototype,a),o&&je(i,o),r}(f),Me=n("./src/demux/id3.js");function Ne(e,t){var n;try{n=new Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function Ue(e){if(e&&e.cues)for(;e.cues.length>0;)e.removeCue(e.cues[0])}var Fe=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.FRAG_PARSING_METADATA,u.default.LIVE_BACK_BUFFER_REACHED)||this).id3Track=void 0,n.media=void 0,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){f.prototype.destroy.call(this)},i.onMediaAttached=function(e){this.media=e.media,this.media},i.onMediaDetaching=function(){Ue(this.id3Track),this.id3Track=void 0,this.media=void 0},i.getID3Track=function(e){for(var t=0;t<e.length;t++){var n=e[t];if("metadata"===n.kind&&"id3"===n.label)return Ne(n,this.media),n}return this.media.addTextTrack("metadata","id3")},i.onFragParsingMetadata=function(e){var t=e.frag,n=e.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var r=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,i=0;i<n.length;i++){var a=Me.default.getID3Frames(n[i].data);if(a){var o=n[i].pts,s=i<n.length-1?n[i+1].pts:t.endPTS;o===s?s+=1e-4:o>s&&(c.logger.warn("detected an id3 sample with endTime < startTime, adjusting endTime to (startTime + 0.25)"),s=o+.25);for(var l=0;l<a.length;l++){var u=a[l];if(!Me.default.isTimeStampFrame(u)){var d=new r(o,s,"");d.value=u,this.id3Track.addCue(d)}}}}},i.onLiveBackBufferReached=function(e){var t=e.bufferEnd,n=this.id3Track;if(n&&n.cues&&n.cues.length){var r=function(e,t){if(t<e[0].endTime)return e[0];if(t>e[e.length-1].endTime)return e[e.length-1];for(var n=0,r=e.length-1;n<=r;){var i=Math.floor((r+n)/2);if(t<e[i].endTime)r=i-1;else{if(!(t>e[i].endTime))return e[i];n=i+1}}return e[n].endTime-t<t-e[r].endTime?e[n]:e[r]}(n.cues,t);if(r)for(;n.cues[0]!==r;)n.removeCue(n.cues[0])}},r}(f),Be=function(){function e(e){this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}var t=e.prototype;return t.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/e}return this.estimate_},e}(),Ke=function(){function e(e,t,n,r){this.hls=void 0,this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.hls=e,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Be(t),this.fast_=new Be(n)}var t=e.prototype;return t.sample=function(e,t){var n=(e=Math.max(e,this.minDelayMs_))/1e3,r=8*t/n;this.fast_.sample(n,r),this.slow_.sample(n,r)},t.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}();function Ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ge=window.performance,He=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.FRAG_LOADING,u.default.FRAG_LOADED,u.default.FRAG_BUFFERED,u.default.ERROR)||this).lastLoadedFragLevel=0,n._nextAutoLevel=-1,n.hls=t,n.timer=null,n._bwEstimator=null,n.onCheck=n._abandonRulesCheck.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o,d=r.prototype;return d.destroy=function(){this.clearTimer(),f.prototype.destroy.call(this)},d.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 n,r,i=this.hls,a=i.config,o=t.level;i.levels[o].details.live?(n=a.abrEwmaFastLive,r=a.abrEwmaSlowLive):(n=a.abrEwmaFastVoD,r=a.abrEwmaSlowVoD),this._bwEstimator=new Ke(i,r,n,a.abrEwmaDefaultEstimate)}},d._abandonRulesCheck=function(){var e=this.hls,t=e.media,n=this.fragCurrent;if(n){var r=n.loader,i=e.minAutoLevel;if(!r||r.stats&&r.stats.aborted)return c.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);var a=r.stats;if(t&&a&&(!t.paused&&0!==t.playbackRate||!t.readyState)&&n.autoLevel&&n.level){var o=Ge.now()-a.trequest,s=Math.abs(t.playbackRate);if(o>500*n.duration/s){var l=e.levels,d=Math.max(1,a.bw?a.bw/8:1e3*a.loaded/o),f=l[n.level],h=f.realBitrate?Math.max(f.realBitrate,f.bitrate):f.bitrate,p=a.total?a.total:Math.max(a.loaded,Math.round(n.duration*h/8)),m=t.currentTime,g=(p-a.loaded)/d,v=(G.bufferInfo(t,m,e.config.maxBufferHole).end-m)/s;if(v<2*n.duration/s&&g>v){var y;for(y=n.level-1;y>i;y--){var b=l[y].realBitrate?Math.max(l[y].realBitrate,l[y].bitrate):l[y].bitrate;if(n.duration*b/(6.4*d)<v)break}void 0<g&&(c.logger.warn("loading too slow, abort fragment loading and switch to level "+y+":fragLoadedDelay["+y+"]<fragLoadedDelay["+(n.level-1)+"];bufferStarvationDelay:"+(void 0).toFixed(1)+"<"+g.toFixed(1)+":"+v.toFixed(1)),e.nextLoadLevel=y,this._bwEstimator.sample(o,a.loaded),r.abort(),this.clearTimer(),e.trigger(u.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,stats:a}))}}}}},d.onFragLoaded=function(e){var t=e.frag;if("main"===t.type&&Object(l.isFiniteNumber)(t.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var n=this.hls.levels[t.level],r=(n.loaded?n.loaded.bytes:0)+e.stats.loaded,i=(n.loaded?n.loaded.duration:0)+e.frag.duration;n.loaded={bytes:r,duration:i},n.realBitrate=Math.round(8*r/i)}if(e.frag.bitrateTest){var a=e.stats;a.tparsed=a.tbuffered=a.tload,this.onFragBuffered(e)}}},d.onFragBuffered=function(e){var t=e.stats,n=e.frag;if(!0!==t.aborted&&"main"===n.type&&Object(l.isFiniteNumber)(n.sn)&&(!n.bitrateTest||t.tload===t.tbuffered)){var r=t.tparsed-t.trequest;c.logger.log("latency/loading/parsing/append/kbps:"+Math.round(t.tfirst-t.trequest)+"/"+Math.round(t.tload-t.tfirst)+"/"+Math.round(t.tparsed-t.tload)+"/"+Math.round(t.tbuffered-t.tparsed)+"/"+Math.round(8*t.loaded/(t.tbuffered-t.trequest))),this._bwEstimator.sample(r,t.loaded),t.bwEstimate=this._bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=r/1e3:this.bitrateTestDelay=0}},d.onError=function(e){switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},d.clearTimer=function(){clearInterval(this.timer),this.timer=null},d._findBestLevel=function(e,t,n,r,i,a,o,s,l){for(var u=i;u>=r;u--){var d=l[u];if(d){var f=d.details,h=f?f.totalduration/f.fragments.length:t,p=!!f&&f.live,m=void 0;m=u<=e?o*n:s*n;var g=l[u].realBitrate?Math.max(l[u].realBitrate,l[u].bitrate):l[u].bitrate,v=g*h/m;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+u+"/"+Math.round(m)+"/"+g+"/"+h+"/"+a+"/"+v),m>g&&(!v||p&&!this.bitrateTestDelay||v<a))return u}}return-1},i=r,(a=[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this._bwEstimator;if(!(-1===e||t&&t.canEstimate()))return e;var n=this._nextABRAutoLevel;return-1!==e&&(n=Math.min(e,n)),n},set:function(e){this._nextAutoLevel=e}},{key:"_nextABRAutoLevel",get:function(){var e=this.hls,t=e.maxAutoLevel,n=e.levels,r=e.config,i=e.minAutoLevel,a=e.media,o=this.lastLoadedFragLevel,s=this.fragCurrent?this.fragCurrent.duration:0,l=a?a.currentTime:0,u=a&&0!==a.playbackRate?Math.abs(a.playbackRate):1,d=this._bwEstimator?this._bwEstimator.getEstimate():r.abrEwmaDefaultEstimate,f=(G.bufferInfo(a,l,r.maxBufferHole).end-l)/u,h=this._findBestLevel(o,s,d,i,t,f,r.abrBandWidthFactor,r.abrBandWidthUpFactor,n);if(h>=0)return h;c.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var p=s?Math.min(s,r.maxStarvationDelay):r.maxStarvationDelay,m=r.abrBandWidthFactor,g=r.abrBandWidthUpFactor;if(0===f){var v=this.bitrateTestDelay;v&&(p=(s?Math.min(s,r.maxLoadingDelay):r.maxLoadingDelay)-v,c.logger.trace("bitrate test took "+Math.round(1e3*v)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*p)+" ms"),m=g=1)}return h=this._findBestLevel(o,s,d,i,t,f+p,m,g,n),Math.max(h,0)}}])&&Ve(i.prototype,a),o&&Ve(i,o),r}(f),Ye=W(),ze=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.MANIFEST_PARSED,u.default.BUFFER_RESET,u.default.BUFFER_APPENDING,u.default.BUFFER_CODECS,u.default.BUFFER_EOS,u.default.BUFFER_FLUSHING,u.default.LEVEL_PTS_UPDATED,u.default.LEVEL_UPDATED)||this)._msDuration=null,n._levelDuration=null,n._levelTargetDuration=10,n._live=null,n._objectUrl=null,n._needsFlush=!1,n._needsEos=!1,n.config=void 0,n.audioTimestampOffset=void 0,n.bufferCodecEventsExpected=0,n._bufferCodecEventsTotal=0,n.media=null,n.mediaSource=null,n.segments=[],n.parent=void 0,n.appending=!1,n.appended=0,n.appendError=0,n.flushBufferCounter=0,n.tracks={},n.pendingTracks={},n.sourceBuffer={},n.flushRange=[],n._onMediaSourceOpen=function(){c.logger.log("media source opened"),n.hls.trigger(u.default.MEDIA_ATTACHED,{media:n.media});var e=n.mediaSource;e&&e.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},n._onMediaSourceClose=function(){c.logger.log("media source closed")},n._onMediaSourceEnded=function(){c.logger.log("media source ended")},n._onSBUpdateEnd=function(){if(n.audioTimestampOffset&&n.sourceBuffer.audio){var e=n.sourceBuffer.audio;c.logger.warn("change mpeg audio timestamp offset from "+e.timestampOffset+" to "+n.audioTimestampOffset),e.timestampOffset=n.audioTimestampOffset,delete n.audioTimestampOffset}n._needsFlush&&n.doFlush(),n._needsEos&&n.checkEos(),n.appending=!1;var t=n.parent,r=n.segments.reduce((function(e,n){return n.parent===t?e+1:e}),0),i={},a=n.sourceBuffer;for(var o in a){var s=a[o];if(!s)throw Error("handling source buffer update end error: source buffer for "+o+" uninitilized and unable to update buffered TimeRanges.");i[o]=s.buffered}n.hls.trigger(u.default.BUFFER_APPENDED,{parent:t,pending:r,timeRanges:i}),n._needsFlush||n.doAppending(),n.updateMediaElementDuration(),0===r&&n.flushLiveBackBuffer()},n._onSBUpdateError=function(e){c.logger.error("sourceBuffer error:",e),n.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})},n.config=t.config,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){f.prototype.destroy.call(this)},i.onLevelPtsUpdated=function(e){var t=e.type,n=this.tracks.audio;if("audio"===t&&n&&"audio/mpeg"===n.container){var r=this.sourceBuffer.audio;if(!r)throw Error("Level PTS Updated and source buffer for audio uninitalized");if(Math.abs(r.timestampOffset-e.start)>.1){var i=r.updating;try{r.abort()}catch(e){c.logger.warn("can not abort audio buffer: "+e)}i?this.audioTimestampOffset=e.start:(c.logger.warn("change mpeg audio timestamp offset from "+r.timestampOffset+" to "+e.start),r.timestampOffset=e.start)}}},i.onManifestParsed=function(e){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=e.altAudio?2:1,c.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},i.onMediaAttaching=function(e){var t=this.media=e.media;if(t&&Ye){var n=this.mediaSource=new Ye;n.addEventListener("sourceopen",this._onMediaSourceOpen),n.addEventListener("sourceended",this._onMediaSourceEnded),n.addEventListener("sourceclose",this._onMediaSourceClose),t.src=window.URL.createObjectURL(n),this._objectUrl=t.src}},i.onMediaDetaching=function(){c.logger.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(e){c.logger.warn("onMediaDetaching:"+e.message+" while calling endOfStream")}e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),this.media&&(this._objectUrl&&window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):c.logger.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.hls.trigger(u.default.MEDIA_DETACHED)},i.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.pendingTracks,n=Object.keys(t).length;(n&&!e||2===n)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())},i.onBufferReset=function(){var e=this.sourceBuffer;for(var t in e){var n=e[t];try{n&&(this.mediaSource&&this.mediaSource.removeSourceBuffer(n),n.removeEventListener("updateend",this._onSBUpdateEnd),n.removeEventListener("error",this._onSBUpdateError))}catch(e){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},i.onBufferCodecs=function(e){var t=this;Object.keys(this.sourceBuffer).length||(Object.keys(e).forEach((function(n){t.pendingTracks[n]=e[n]})),this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},i.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");for(var r in e)if(!t[r]){var i=e[r];if(!i)throw Error("source buffer exists for track "+r+", however track does not");var a=i.levelCodec||i.codec,o=i.container+";codecs="+a;c.logger.log("creating sourceBuffer("+o+")");try{var l=t[r]=n.addSourceBuffer(o);l.addEventListener("updateend",this._onSBUpdateEnd),l.addEventListener("error",this._onSBUpdateError),this.tracks[r]={buffer:l,codec:a,id:i.id,container:i.container,levelCodec:i.levelCodec}}catch(e){c.logger.error("error while trying to add sourceBuffer:"+e.message),this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:e,mimeType:o})}}this.hls.trigger(u.default.BUFFER_CREATED,{tracks:this.tracks})},i.onBufferAppending=function(e){this._needsFlush||(this.segments?this.segments.push(e):this.segments=[e],this.doAppending())},i.onBufferEos=function(e){for(var t in this.sourceBuffer)if(!e.type||e.type===t){var n=this.sourceBuffer[t];n&&!n.ended&&(n.ended=!0,c.logger.log(t+" sourceBuffer now EOS"))}this.checkEos()},i.checkEos=function(){var e=this.sourceBuffer,t=this.mediaSource;if(t&&"open"===t.readyState){for(var n in e){var r=e[n];if(r){if(!r.ended)return;if(r.updating)return void(this._needsEos=!0)}}c.logger.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{t.endOfStream()}catch(e){c.logger.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}else this._needsEos=!1},i.onBufferFlushing=function(e){e.type?this.flushRange.push({start:e.startOffset,end:e.endOffset,type:e.type}):(this.flushRange.push({start:e.startOffset,end:e.endOffset,type:"video"}),this.flushRange.push({start:e.startOffset,end:e.endOffset,type:"audio"})),this.flushBufferCounter=0,this.doFlush()},i.flushLiveBackBuffer=function(){if(this._live){var e=this.config.liveBackBufferLength;if(isFinite(e)&&!(e<0))if(this.media)for(var t=this.media.currentTime,n=this.sourceBuffer,r=Object.keys(n),i=t-Math.max(e,this._levelTargetDuration),a=r.length-1;a>=0;a--){var o=r[a],s=n[o];if(s){var l=s.buffered;l.length>0&&i>l.start(0)&&this.removeBufferRange(o,s,0,i)&&this.hls.trigger(u.default.LIVE_BACK_BUFFER_REACHED,{bufferEnd:i})}}else c.logger.error("flushLiveBackBuffer called without attaching media")}},i.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())},i.updateMediaElementDuration=function(){var e,t=this.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){var r=this.sourceBuffer[n];if(r&&!0===r.updating)return}e=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===t.liveDurationInfinity?(c.logger.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>e||!Object(l.isFiniteNumber)(e))&&(c.logger.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},i.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,n=this.sourceBuffer;try{for(var r in n){var i=n[r];i&&(t+=i.buffered.length)}}catch(e){c.logger.error("error while accessing sourceBuffer.buffered")}this.appended=t,this.hls.trigger(u.default.BUFFER_FLUSHED)}},i.doAppending=function(){var e=this.config,t=this.hls,n=this.segments,r=this.sourceBuffer;if(Object.keys(r).length){if(!this.media||this.media.error)return this.segments=[],void c.logger.error("trying to append although a media error occured, flush segment and abort");if(!this.appending){var i=n.shift();if(i)try{var a=r[i.type];if(!a)return void this._onSBUpdateEnd();if(a.updating)return void n.unshift(i);a.ended=!1,this.parent=i.parent,a.appendBuffer(i.data),this.appendError=0,this.appended++,this.appending=!0}catch(r){c.logger.error("error while trying to append buffer:"+r.message),n.unshift(i);var o={type:s.ErrorTypes.MEDIA_ERROR,parent:i.parent,details:"",fatal:!1};22===r.code?(this.segments=[],o.details=s.ErrorDetails.BUFFER_FULL_ERROR):(this.appendError++,o.details=s.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>e.appendErrorMaxRetry&&(c.logger.log("fail "+e.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],o.fatal=!0)),t.trigger(u.default.ERROR,o)}}}},i.flushBuffer=function(e,t,n){var r=this.sourceBuffer;if(!Object.keys(r).length)return!0;var i="null";if(this.media&&(i=this.media.currentTime.toFixed(3)),c.logger.log("flushBuffer,pos/start/end: "+i+"/"+e+"/"+t),this.flushBufferCounter>=this.appended)return c.logger.warn("abort flushing too many retries"),!0;var a=r[n];if(a){if(a.ended=!1,a.updating)return c.logger.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(n,a,e,t))return this.flushBufferCounter++,!1}return c.logger.log("buffer flushed"),!0},i.removeBufferRange=function(e,t,n,r){try{for(var i=0;i<t.buffered.length;i++){var a=t.buffered.start(i),o=t.buffered.end(i),s=Math.max(a,n),l=Math.min(o,r);if(Math.min(l,o)-s>.5){var u="null";return this.media&&(u=this.media.currentTime.toString()),c.logger.log("sb remove "+e+" ["+s+","+l+"], of ["+a+","+o+"], pos:"+u),t.remove(s,l),!0}}}catch(e){c.logger.warn("removeBufferRange failed",e)}return!1},r}(f);function We(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var $e=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.FPS_DROP_LEVEL_CAPPING,u.default.MEDIA_ATTACHING,u.default.MANIFEST_PARSED,u.default.BUFFER_CODECS,u.default.MEDIA_DETACHING)||this).autoLevelCapping=Number.POSITIVE_INFINITY,n.firstLevel=null,n.levels=[],n.media=null,n.restrictedLevels=[],n.timer=null,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o,s=r.prototype;return s.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=null,this.stopCapping())},s.onFpsDropLevelCapping=function(e){r.isLevelAllowed(e.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(e.droppedLevel)},s.onMediaAttaching=function(e){this.media=e.media instanceof window.HTMLVideoElement?e.media:null},s.onManifestParsed=function(e){var t=this.hls;this.restrictedLevels=[],this.levels=e.levels,this.firstLevel=e.firstLevel,t.config.capLevelToPlayerSize&&e.video&&this.startCapping()},s.onBufferCodecs=function(e){this.hls.config.capLevelToPlayerSize&&e.video&&this.startCapping()},s.onLevelsUpdated=function(e){this.levels=e.levels},s.onMediaDetaching=function(){this.stopCapping()},s.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}}},s.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)},s.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},s.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},r.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},r.getMaxLevelByMediaSize=function(e,t,n){if(!e||e&&!e.length)return-1;for(var r,i,a=e.length-1,o=0;o<e.length;o+=1){var s=e[o];if((s.width>=t||s.height>=n)&&(r=s,!(i=e[o+1])||r.width!==i.width||r.height!==i.height)){a=o;break}}return a},i=r,o=[{key:"contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){}return e}}],(a=[{key:"mediaWidth",get:function(){var e,t=this.media;return t&&(e=t.width||t.clientWidth||t.offsetWidth,e*=r.contentScaleFactor),e}},{key:"mediaHeight",get:function(){var e,t=this.media;return t&&(e=t.height||t.clientHeight||t.offsetHeight,e*=r.contentScaleFactor),e}}])&&We(i.prototype,a),o&&We(i,o),r}(f),qe=window.performance,Xe=function(e){var t,n;function r(t){return e.call(this,t,u.default.MEDIA_ATTACHING)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},i.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))},i.checkFPS=function(e,t,n){var r=qe.now();if(t){if(this.lastTime){var i=r-this.lastTime,a=n-this.lastDroppedFrames,o=t-this.lastDecodedFrames,s=1e3*a/i,l=this.hls;if(l.trigger(u.default.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:n}),s>0&&a>l.config.fpsDroppedMonitoringThreshold*o){var d=l.currentLevel;c.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+d),d>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=d)&&(d-=1,l.trigger(u.default.FPS_DROP_LEVEL_CAPPING,{level:d,droppedLevel:l.currentLevel}),l.autoLevelCapping=d,l.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},i.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)},r}(f),Je=window,Ze=Je.performance,Qe=Je.XMLHttpRequest,et=function(){function e(e){e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}var t=e.prototype;return t.destroy=function(){this.abort(),this.loader=null},t.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},t.load=function(e,t,n){this.context=e,this.config=t,this.callbacks=n,this.stats={trequest:Ze.now(),retry:0},this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e,t=this.context;e=this.loader=new Qe;var n=this.stats;n.tfirst=0,n.loaded=0;var r=this.xhrSetup;try{if(r)try{r(e,t.url)}catch(n){e.open("GET",t.url,!0),r(e,t.url)}e.readyState||e.open("GET",t.url,!0)}catch(n){return void this.callbacks.onError({code:e.status,text:n.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()},t.readystatechange=function(e){var t=e.currentTarget,n=t.readyState,r=this.stats,i=this.context,a=this.config;if(!r.aborted&&n>=2)if(window.clearTimeout(this.requestTimeout),0===r.tfirst&&(r.tfirst=Math.max(Ze.now(),r.trequest)),4===n){var o=t.status;if(o>=200&&o<300){var s,l;r.tload=Math.max(r.tfirst,Ze.now()),l="arraybuffer"===i.responseType?(s=t.response).byteLength:(s=t.responseText).length,r.loaded=r.total=l;var u={url:t.responseURL,data:s};this.callbacks.onSuccess(u,r,i,t)}else r.retry>=a.maxRetry||o>=400&&o<499?(c.logger.error(o+" while loading "+i.url),this.callbacks.onError({code:o,text:t.statusText},i,t)):(c.logger.warn(o+" while loading "+i.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),r.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),a.timeout)},t.loadtimeout=function(){c.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},t.loadprogress=function(e){var t=e.currentTarget,n=this.stats;n.loaded=e.loaded,e.lengthComputable&&(n.total=e.total);var r=this.callbacks.onProgress;r&&r(n,this.context,null,t)},e}();function tt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var nt=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.MANIFEST_LOADING,u.default.MANIFEST_PARSED,u.default.AUDIO_TRACK_LOADED,u.default.AUDIO_TRACK_SWITCHED,u.default.LEVEL_LOADED,u.default.ERROR)||this)._trackId=-1,n._selectDefaultTrack=!0,n.tracks=[],n.trackIdBlacklist=Object.create(null),n.audioGroupId=null,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o,l=r.prototype;return l.onManifestLoading=function(){this.tracks=[],this._trackId=-1,this._selectDefaultTrack=!0},l.onManifestParsed=function(e){var t=this.tracks=e.audioTracks||[];this.hls.trigger(u.default.AUDIO_TRACKS_UPDATED,{audioTracks:t}),this._selectAudioGroup(this.hls.nextLoadLevel)},l.onAudioTrackLoaded=function(e){if(e.id>=this.tracks.length)c.logger.warn("Invalid audio track id:",e.id);else{if(c.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()}},l.onAudioTrackSwitched=function(e){var t=this.tracks[e.id].groupId;t&&this.audioGroupId!==t&&(this.audioGroupId=t)},l.onLevelLoaded=function(e){this._selectAudioGroup(e.level)},l.onError=function(e){e.type===s.ErrorTypes.NETWORK_ERROR&&(e.fatal&&this.clearInterval(),e.details===s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&(c.logger.warn("Network failure on audio-track id:",e.context.id),this._handleLoadError()))},l._setAudioTrack=function(e){if(this._trackId===e&&this.tracks[this._trackId].details)c.logger.debug("Same id as current audio-track passed, and track details available -> no-op");else if(e<0||e>=this.tracks.length)c.logger.warn("Invalid id passed to audio-track controller");else{var t=this.tracks[e];c.logger.log("Now switching to audio-track index "+e),this.clearInterval(),this._trackId=e;var n=t.url,r=t.type,i=t.id;this.hls.trigger(u.default.AUDIO_TRACK_SWITCHING,{id:i,type:r,url:n}),this._loadTrackDetailsIfNeeded(t)}},l.doTick=function(){this._updateTrack(this._trackId)},l._selectAudioGroup=function(e){var t=this.hls.levels[e];if(t&&t.audioGroupIds){var n=t.audioGroupIds[t.urlId];this.audioGroupId!==n&&(this.audioGroupId=n,this._selectInitialAudioTrack())}},l._selectInitialAudioTrack=function(){var e=this,t=this.tracks;if(t.length){var n=this.tracks[this._trackId],r=null;if(n&&(r=n.name),this._selectDefaultTrack){var i=t.filter((function(e){return e.default}));i.length?t=i:c.logger.warn("No default audio tracks defined")}var a=!1,o=function(){t.forEach((function(t){a||e.audioGroupId&&t.groupId!==e.audioGroupId||r&&r!==t.name||(e._setAudioTrack(t.id),a=!0)}))};o(),a||(r=null,o()),a||(c.logger.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},l._needsTrackLoading=function(e){var t=e.details,n=e.url;return!(t&&!t.live||!n)},l._loadTrackDetailsIfNeeded=function(e){if(this._needsTrackLoading(e)){var t=e.url,n=e.id;c.logger.log("loading audio-track playlist for id: "+n),this.hls.trigger(u.default.AUDIO_TRACK_LOADING,{url:t,id:n})}},l._updateTrack=function(e){if(!(e<0||e>=this.tracks.length)){this.clearInterval(),this._trackId=e,c.logger.log("trying to update audio-track "+e);var t=this.tracks[e];this._loadTrackDetailsIfNeeded(t)}},l._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var e=this._trackId,t=this.tracks[e],n=t.name,r=t.language,i=t.groupId;c.logger.warn("Loading failed on audio track id: "+e+", group-id: "+i+', name/language: "'+n+'" / "'+r+'"');for(var a=e,o=0;o<this.tracks.length;o++)if(!this.trackIdBlacklist[o]&&this.tracks[o].name===n){a=o;break}a!==e?(c.logger.log("Attempting audio-track fallback id:",a,"group-id:",this.tracks[a].groupId),this._setAudioTrack(a)):c.logger.warn('No fallback audio-track found for name/language: "'+n+'" / "'+r+'"')},i=r,(a=[{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this._trackId},set:function(e){this._setAudioTrack(e),this._selectDefaultTrack=!1}}])&&tt(i.prototype,a),o&&tt(i,o),r}(pe);function rt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var it=window.performance,at=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.AUDIO_TRACKS_UPDATED,u.default.AUDIO_TRACK_SWITCHING,u.default.AUDIO_TRACK_LOADED,u.default.KEY_LOADED,u.default.FRAG_LOADED,u.default.FRAG_PARSING_INIT_SEGMENT,u.default.FRAG_PARSING_DATA,u.default.FRAG_PARSED,u.default.ERROR,u.default.BUFFER_RESET,u.default.BUFFER_CREATED,u.default.BUFFER_APPENDED,u.default.BUFFER_FLUSHED,u.default.INIT_PTS_FOUND)||this).fragmentTracker=n,r.config=t.config,r.audioCodecSwap=!1,r._state=me,r.initPTS=[],r.waitingFragment=null,r.videoTrackCC=null,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o,d=r.prototype;return d.onInitPtsFound=function(e){var t=e.id,n=e.frag.cc,r=e.initPTS;"main"===t&&(this.initPTS[n]=r,this.videoTrackCC=n,c.logger.log("InitPTS for cc: "+n+" found from video track: "+r),this.state===xe&&this.tick())},d.startLoad=function(e){if(this.tracks){var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,t>0&&-1===e?(c.logger.log("audio:override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=ve):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=ge),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=me},d.doTick=function(){var e,t,n,r=this.hls,i=r.config;switch(this.state){case Ce:case ye:case Se:break;case ge:this.state=Ee,this.loadedmetadata=!1;break;case ve:var a=this.tracks;if(!a)break;if(!this.media&&(this.startFragRequested||!i.startFragPrefetch))break;if(this.loadedmetadata)e=this.media.currentTime;else if(void 0===(e=this.nextLoadPosition))break;var o=this.mediaBuffer?this.mediaBuffer:this.media,s=this.videoBuffer?this.videoBuffer:this.media,d=G.bufferInfo(o,e,i.maxBufferHole),f=G.bufferInfo(s,e,i.maxBufferHole),h=d.len,p=d.end,m=this.fragPrevious,g=Math.min(i.maxBufferLength,i.maxMaxBufferLength),v=Math.max(g,f.len),y=this.audioSwitch,b=this.trackId;if((h<v||y)&&b<a.length){if(void 0===(n=a[b].details)){this.state=Ee;break}if(!y&&this._streamEnded(d,n))return this.hls.trigger(u.default.BUFFER_EOS,{type:"audio"}),void(this.state=ke);var _,A=n.fragments,E=A.length,T=A[0].start,w=A[E-1].start+A[E-1].duration;if(y)if(n.live&&!n.PTSKnown)c.logger.log("switching audiotrack, live stream, unknown PTS,load first fragment"),p=0;else if(p=e,n.PTSKnown&&e<T){if(!(d.end>T||d.nextStart))return;c.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=T+.05}if(n.initSegment&&!n.initSegment.data)_=n.initSegment;else if(p<=T){if(_=A[0],null!==this.videoTrackCC&&_.cc!==this.videoTrackCC&&(_=function(e,t){return V.search(e,(function(e){return e.cc<t?1:e.cc>t?-1:0}))}(A,this.videoTrackCC)),n.live&&_.loadIdx&&_.loadIdx===this.fragLoadIdx){var S=d.nextStart?d.nextStart:T;return c.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(S+.05)),void(this.media.currentTime=S+.05)}}else{var k,C=i.maxFragLookUpTolerance,x=m?A[m.sn-A[0].sn+1]:void 0,R=function(e){var t=Math.min(C,e.duration);return e.start+e.duration-t<=p?1:e.start-t>p&&e.start?-1:0};p<w?(p>w-C&&(C=0),k=x&&!R(x)?x:V.search(A,R)):k=A[E-1],k&&(_=k,T=k.start,m&&_.level===m.level&&_.sn===m.sn&&(_.sn<n.endSN?(_=A[_.sn+1-n.startSN],c.logger.log("SN just loaded, load next one: "+_.sn)):_=null))}_&&(_.encrypted?(c.logger.log("Loading key for "+_.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+b),this.state=be,r.trigger(u.default.KEY_LOADING,{frag:_})):(c.logger.log("Loading "+_.sn+", cc: "+_.cc+" of ["+n.startSN+" ,"+n.endSN+"],track "+b+", currentTime:"+e+",bufferEnd:"+p.toFixed(3)),this.fragCurrent=_,(y||this.fragmentTracker.getState(_)===N)&&("initSegment"!==_.sn&&(this.startFragRequested=!0),Object(l.isFiniteNumber)(_.sn)&&(this.nextLoadPosition=_.start+_.duration),r.trigger(u.default.FRAG_LOADING,{frag:_}),this.state=_e)))}break;case Ee:(t=this.tracks[this.trackId])&&t.details&&(this.state=ve);break;case Ae:var L=it.now(),I=this.retryDate,P=(o=this.media)&&o.seeking;(!I||L>=I||P)&&(c.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=ve);break;case xe:var j=this.videoTrackCC;if(void 0===this.initPTS[j])break;var O=this.waitingFragment;if(O){var D=O.frag.cc;j!==D?(t=this.tracks[this.trackId]).details&&t.details.live&&(c.logger.warn("Waiting fragment CC ("+D+") does not match video track CC ("+j+")"),this.waitingFragment=null,this.state=ve):(this.state=_e,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=ve}},d.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 n=this.config;this.tracks&&n.autoStartLoad&&this.startLoad(n.startPosition)},d.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(c.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.fragmentTracker.removeAllFragments(),this.stopLoad()},d.onAudioTracksUpdated=function(e){c.logger.log("audio tracks updated"),this.tracks=e.audioTracks},d.onAudioTrackSwitching=function(e){var t=!!e.url;this.trackId=e.id,this.fragCurrent=null,this.state=ye,this.waitingFragment=null,t?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),t&&(this.audioSwitch=!0,this.state=ve),this.tick()},d.onAudioTrackLoaded=function(e){var t=e.details,n=e.id,r=this.tracks[n],i=t.totalduration,a=0;if(c.logger.log("track "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+i),t.live){var o=r.details;o&&t.fragments.length>0?(ne(o,t),a=t.fragments[0].start,t.PTSKnown?c.logger.log("live audio playlist sliding:"+a.toFixed(3)):c.logger.log("live audio playlist - outdated PTS, unknown sliding")):(t.PTSKnown=!1,c.logger.log("live audio playlist - first load, unknown sliding"))}else t.PTSKnown=!1;if(r.details=t,!this.startFragRequested){if(-1===this.startPosition){var s=t.startTimeOffset;Object(l.isFiniteNumber)(s)?(c.logger.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s):t.live?(this.startPosition=this.computeLivePosition(a,t),c.logger.log("compute startPosition for audio-track to "+this.startPosition)):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===Ee&&(this.state=ve),this.tick()},d.onKeyLoaded=function(){this.state===be&&(this.state=ve,this.tick())},d.onFragLoaded=function(e){var t=this.fragCurrent,n=e.frag;if(this.state===_e&&t&&"audio"===n.type&&n.level===t.level&&n.sn===t.sn){var r=this.tracks[this.trackId],i=r.details,a=i.totalduration,o=t.level,s=t.sn,l=t.cc,d=this.config.defaultAudioCodec||r.audioCodec||"mp4a.40.2",f=this.stats=e.stats;if("initSegment"===s)this.state=ve,f.tparsed=f.tbuffered=it.now(),i.initSegment.data=e.payload,this.hls.trigger(u.default.FRAG_BUFFERED,{stats:f,frag:t,id:"audio"}),this.tick();else{this.state=Te,this.appended=!1,this.demuxer||(this.demuxer=new Z(this.hls,"audio"));var h=this.initPTS[l],p=i.initSegment?i.initSegment.data:[];i.initSegment||void 0!==h?(this.pendingBuffering=!0,c.logger.log("Demuxing "+s+" of ["+i.startSN+" ,"+i.endSN+"],track "+o),this.demuxer.push(e.payload,p,d,null,t,a,!1,h)):(c.logger.log("unknown video PTS for continuity counter "+l+", waiting for video PTS before demuxing audio frag "+s+" of ["+i.startSN+" ,"+i.endSN+"],track "+o),this.waitingFragment=e,this.state=xe)}}this.fragLoadError=0},d.onFragParsingInitSegment=function(e){var t=this.fragCurrent,n=e.frag;if(t&&"audio"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===Te){var r,i=e.tracks;if(i.video&&delete i.video,r=i.audio){r.levelCodec=r.codec,r.id=e.id,this.hls.trigger(u.default.BUFFER_CODECS,i),c.logger.log("audio track:audio,container:"+r.container+",codecs[level/parsed]=["+r.levelCodec+"/"+r.codec+"]");var a=r.initSegment;if(a){var o={type:"audio",data:a,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[o]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.default.BUFFER_APPENDING,o))}this.tick()}}},d.onFragParsingData=function(e){var t=this,n=this.fragCurrent,r=e.frag;if(n&&"audio"===e.id&&"audio"===e.type&&r.sn===n.sn&&r.level===n.level&&this.state===Te){var i=this.trackId,a=this.tracks[i],o=this.hls;Object(l.isFiniteNumber)(e.endPTS)||(e.endPTS=e.startPTS+n.duration,e.endDTS=e.startDTS+n.duration),n.addElementaryStream(m.AUDIO),c.logger.log("parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb),te(a.details,n,e.startPTS,e.endPTS);var d=this.audioSwitch,f=this.media,h=!1;if(d)if(f&&f.readyState){var p=f.currentTime;c.logger.log("switching audio track : currentTime:"+p),p>=e.startPTS&&(c.logger.log("switching audio track : flushing all audio"),this.state=Se,o.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),h=!0,this.audioSwitch=!1,o.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:i}))}else this.audioSwitch=!1,o.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:i});var g=this.pendingData;if(!g)return c.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void o.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([e.data1,e.data2].forEach((function(t){t&&t.length&&g.push({type:e.type,data:t,parent:"audio",content:"data"})})),!h&&g.length&&(g.forEach((function(e){t.state===Te&&(t.pendingBuffering=!0,t.hls.trigger(u.default.BUFFER_APPENDING,e))})),this.pendingData=[],this.appended=!0)),this.tick()}},d.onFragParsed=function(e){var t=this.fragCurrent,n=e.frag;t&&"audio"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===Te&&(this.stats.tparsed=it.now(),this.state=we,this._checkAppendedParsed())},d.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},d.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)},d.onBufferAppended=function(e){if("audio"===e.parent){var t=this.state;t!==Te&&t!==we||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},d._checkAppendedParsed=function(){if(!(this.state!==we||this.appended&&this.pendingBuffering)){var e=this.fragCurrent,t=this.stats,n=this.hls;if(e){this.fragPrevious=e,t.tbuffered=it.now(),n.trigger(u.default.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var r=this.mediaBuffer?this.mediaBuffer:this.media;r&&c.logger.log("audio buffered : "+ae.toString(r.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,n.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=ve}this.tick()}},d.onError=function(e){var t=e.frag;if(!t||"audio"===t.type)switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:var n=e.frag;if(n&&"audio"!==n.type)break;if(!e.fatal){var r=this.fragLoadError;r?r++:r=1;var i=this.config;if(r<=i.fragLoadingMaxRetry){this.fragLoadError=r;var a=Math.min(Math.pow(2,r-1)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);c.logger.warn("AudioStreamController: frag loading failed, retry in "+a+" ms"),this.retryDate=it.now()+a,this.state=Ae}else c.logger.error("AudioStreamController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=Ce}break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==Ce&&(this.state=e.fatal?Ce:ve,c.logger.warn("AudioStreamController: "+e.details+" while loading frag, now switching to "+this.state+" state ..."));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===e.parent&&(this.state===Te||this.state===we)){var o=this.mediaBuffer,l=this.media.currentTime;if(o&&G.isBuffered(o,l)&&G.isBuffered(o,l+.5)){var d=this.config;d.maxMaxBufferLength>=d.maxBufferLength&&(d.maxMaxBufferLength/=2,c.logger.warn("AudioStreamController: reduce max buffer length to "+d.maxMaxBufferLength+"s")),this.state=ve}else c.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=Se,this.hls.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},d.onBufferFlushed=function(){var e=this,t=this.pendingData;t&&t.length?(c.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),t.forEach((function(t){e.hls.trigger(u.default.BUFFER_APPENDING,t)})),this.appended=!0,this.pendingData=[],this.state=we):(this.state=ve,this.fragPrevious=null,this.tick())},i=r,(a=[{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,c.logger.log("audio stream:"+t+"->"+e)}},get:function(){return this._state}}])&&rt(i.prototype,a),o&&rt(i,o),r}(Le),ot=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 n(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}function r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function i(t,i,a){var o=this,s={enumerable:!0};o.hasBeenReset=!1;var l="",u=!1,c=t,d=i,f=a,h=null,p="",m=!0,g="auto",v="start",y=50,b="middle",_=50,A="middle";Object.defineProperty(o,"id",r({},s,{get:function(){return l},set:function(e){l=""+e}})),Object.defineProperty(o,"pauseOnExit",r({},s,{get:function(){return u},set:function(e){u=!!e}})),Object.defineProperty(o,"startTime",r({},s,{get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");c=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",r({},s,{get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",r({},s,{get:function(){return f},set:function(e){f=""+e,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",r({},s,{get:function(){return h},set:function(e){h=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",r({},s,{get:function(){return p},set:function(t){var n=function(t){return"string"==typeof t&&!!e[t.toLowerCase()]&&t.toLowerCase()}(t);if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");p=n,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",r({},s,{get:function(){return m},set:function(e){m=!!e,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",r({},s,{get:function(){return g},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");g=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",r({},s,{get:function(){return v},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");v=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",r({},s,{get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",r({},s,{get:function(){return b},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",r({},s,{get:function(){return _},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");_=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",r({},s,{get:function(){return A},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");A=t,this.hasBeenReset=!0}})),o.displayState=void 0}return i.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},i}(),st=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}};function lt(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new st,this.regionList=[]}function ut(){this.values=Object.create(null)}function ct(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}ut.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){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 dt=new ot(0,0,0),ft="middle"===dt.align?"middle":"center";function ht(e,t,n){var r=e;function i(){var t=function(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=i(),a(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),a(),t.endTime=i(),a(),function(e,t){var r=new ut;ct(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];r.integer(e,o),r.percent(e,o)&&r.set("snapToLines",!1),r.alt(e,o,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start",ft,"end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start",ft,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",ft,"end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===dt.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",ft);var a=r.get("position","auto");"auto"===a&&50===dt.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function pt(e){return e.replace(/<br(?: \/)?>/gi,"\n")}lt.prototype={parse:function(e){var t=this;function n(){var e=t.buffer,n=0;for(e=pt(e);n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var r;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var i=(r=n()).match(/^()?WEBVTT([ \t].*)?$/);if(!i||!i[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:r=n(),t.state){case"HEADER":/:/.test(r)?ct(r,(function(e,t){}),/:/):r||(t.state="ID");continue;case"NOTE":r||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){t.state="NOTE";break}if(!r)continue;if(t.cue=new ot(0,0,""),t.state="CUE",-1===r.indexOf("--\x3e")){t.cue.id=r;continue}case"CUE":try{ht(r,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var o=-1!==r.indexOf("--\x3e");if(!r||o&&(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+=r;continue;case"BADCUE":r||(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}};var mt=lt;function gt(e,t,n,r){for(var i,a,o,s,l,u=window.VTTCue||TextTrackCue,c=0;c<r.rows.length;c++)if(o=!0,s=0,l="",!(i=r.rows[c]).isEmpty()){for(var d=0;d<i.chars.length;d++)i.chars[d].uchar.match(/\s/)&&o?s++:(l+=i.chars[d].uchar,o=!1);i.cueStartTime=t,t===n&&(n+=1e-4),a=new u(t,n,pt(l.trim())),s>=16?s--:s++,navigator.userAgent.match(/Firefox\//)?a.line=c+1:a.line=c>7?c-2:c+1,a.align="left",a.position=Math.max(0,Math.min(100,s/32*100)),e.addCue(a)}}var vt,yt={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},bt=function(e){var t=e;return yt.hasOwnProperty(e)&&(t=yt[e]),String.fromCharCode(t)},_t={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},At={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Et={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Tt={25:2,26:4,29:6,30:8,31:10,27:13,28:15},wt=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(e){e[e.ERROR=0]="ERROR",e[e.TEXT=1]="TEXT",e[e.WARNING=2]="WARNING",e[e.INFO=2]="INFO",e[e.DEBUG=3]="DEBUG",e[e.DATA=3]="DATA"}(vt||(vt={}));var St={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}},kt=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},Ct=function(){function e(e,t,n,r,i){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=e||"white",this.underline=t||!1,this.italics=n||!1,this.background=r||"black",this.flash=i||!1}var t=e.prototype;return t.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}},t.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},t.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},t.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),xt=function(){function e(e,t,n,r,i,a){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new Ct(t,n,r,i,a)}var t=e.prototype;return t.reset=function(){this.uchar=" ",this.penState.reset()},t.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},t.setPenState=function(e){this.penState.copy(e)},t.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},t.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},t.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),Rt=function(){function e(){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.chars=[];for(var e=0;e<100;e++)this.chars.push(new xt);this.pos=0,this.currPenState=new Ct}var t=e.prototype;return t.equals=function(e){for(var t=!0,n=0;n<100;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<100;t++)this.chars[t].copy(e.chars[t])},t.isEmpty=function(){for(var e=!0,t=0;t<100;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},t.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(St.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>100&&(St.log("ERROR","Too large cursor position "+this.pos),this.pos=100)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},t.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.insertChar=function(e){e>=144&&this.backSpace();var t=bt(e);this.pos>=100?St.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))},t.clearFromPos=function(e){var t;for(t=e;t<100;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,n=0;n<100;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),Lt=function(){function e(){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.rows=[];for(var e=0;e<15;e++)this.rows.push(new Rt);this.currRow=14,this.nrRollUpRows=null,this.reset()}var t=e.prototype;return t.reset=function(){for(var e=0;e<15;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,n=0;n<15;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<15;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<15;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){St.log("INFO","setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){St.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 n=0;n<15;n++)this.rows[n].clear();var r=this.currRow+1-this.nrRollUpRows,i=this.lastOutputScreen;if(i){var a=i.rows[r].cueStartTime;if(a&&St.time&&a<St.time)for(var o=0;o<this.nrRollUpRows;o++)this.rows[t-this.nrRollUpRows+o+1].copy(i.rows[r+o])}}this.currRow=t;var s=this.rows[this.currRow];if(null!==e.indent){var l=e.indent,u=Math.max(l-1,0);s.setCursor(e.indent),e.color=s.chars[u].penState.foreground}var c={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(c)},t.setBkgData=function(e){St.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},t.setRollUpRows=function(e){this.nrRollUpRows=e},t.rollUp=function(){if(null!==this.nrRollUpRows){St.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),St.log("INFO","Rolling up")}else St.log("DEBUG","roll_up but nrRollUpRows not set yet")},t.getDisplayText=function(e){e=e||!1;for(var t=[],n="",r=-1,i=0;i<15;i++){var a=this.rows[i].getTextString();a&&(r=i+1,e?t.push("Row "+r+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},t.getTextAndFormat=function(){return this.rows},e}(),It=function(){function e(e,t){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.lastCueEndTime=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Lt,this.nonDisplayedMemory=new Lt,this.lastOutputScreen=new Lt,this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}var t=e.prototype;return t.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},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,St.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)},t.insertChars=function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";St.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(St.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},t.ccRCL=function(){St.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.ccBS=function(){St.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.ccAOF=function(){},t.ccAON=function(){},t.ccDER=function(){St.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.ccRU=function(e){St.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},t.ccFON=function(){St.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.ccRDC=function(){St.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.ccTR=function(){St.log("INFO","TR"),this.setMode("MODE_TEXT")},t.ccRTD=function(){St.log("INFO","RTD"),this.setMode("MODE_TEXT")},t.ccEDM=function(){St.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.ccCR=function(){St.log("INFO","CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.ccENM=function(){St.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.ccEOC=function(){if(St.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,St.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},t.ccTO=function(e){St.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},t.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}St.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=St.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),Pt=function(){function e(e,t,n){this.field=void 0,this.outputs=void 0,this.channels=void 0,this.currChNr=void 0,this.lastCmdA=void 0,this.lastCmdB=void 0,this.lastTime=void 0,this.dataCounters=void 0,this.field=e||1,this.outputs=[t,n],this.channels=[new It(1,t),new It(2,n)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var n,r,i,a=!1;this.lastTime=e,St.setTime(e);for(var o=0;o<t.length;o+=2)r=127&t[o],i=127&t[o+1],0!==r||0!==i?(St.log("DATA","["+kt([t[o],t[o+1]])+"] -> ("+kt([r,i])+")"),(n=this.parseCmd(r,i))||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),n||(a=this.parseChars(r,i))&&(this.currChNr&&this.currChNr>=0?this.channels[this.currChNr-1].insertChars(a):St.log("WARNING","No channel found yet. TEXT-MODE?")),n?this.dataCounters.cmd+=2:a?this.dataCounters.char+=2:(this.dataCounters.other+=2,St.log("WARNING","Couldn't parse cleaned data "+kt([r,i])+" orig: "+kt([t[o],t[o+1]])))):this.dataCounters.padding+=2},t.parseCmd=function(e,t){var n=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,St.log("DEBUG","Repeated command ("+kt([e,t])+") is dropped"),!0;n=20===e||23===e?1:2;var r=this.channels[n-1];return 20===e||28===e?32===t?r.ccRCL():33===t?r.ccBS():34===t?r.ccAOF():35===t?r.ccAON():36===t?r.ccDER():37===t?r.ccRU(2):38===t?r.ccRU(3):39===t?r.ccRU(4):40===t?r.ccFON():41===t?r.ccRDC():42===t?r.ccTR():43===t?r.ccRTD():44===t?r.ccEDM():45===t?r.ccCR():46===t?r.ccENM():47===t&&r.ccEOC():r.ccTO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},t.parseMidrow=function(e,t){var n=null;return(17===e||25===e)&&t>=32&&t<=47&&((n=17===e?1:2)!==this.currChNr?(St.log("ERROR","Mismatch channel in midrow parsing"),!1):(this.channels[n-1].ccMIDROW(t),St.log("DEBUG","MIDROW ("+kt([e,t])+")"),!0))},t.parsePAC=function(e,t){var n,r=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;n=e<=23?1:2,r=t>=64&&t<=95?1===n?_t[e]:Et[e]:1===n?At[e]:Tt[e];var i=this.interpretPAC(r,t);return this.channels[n-1].setPAC(i),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},t.interpretPAC=function(e,t){var n=t,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},t.parseChars=function(e,t){var n=null,r=null,i=null;if(e>=25?(n=2,i=e-8):(n=1,i=e),i>=17&&i<=19){var a=t;a=17===i?t+80:18===i?t+112:t+144,St.log("INFO","Special char '"+bt(a)+"' in channel "+n),r=[a]}else e>=32&&e<=127&&(r=0===t?[e]:[e,t]);if(r){var o=kt(r);St.log("DEBUG","Char codes = "+o.join(",")),this.lastCmdA=null,this.lastCmdB=null}return r},t.parseBackgroundAttributes=function(e,t){var n,r,i;return((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47)&&(n={},16===e||24===e?(r=Math.floor((t-32)/2),n.background=wt[r],t%2==1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),i=e<24?1:2,this.channels[i-1].setBkgData(n),this.lastCmdA=null,this.lastCmdB=null,!0)},t.reset=function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null},t.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)},e}(),jt=function(){function e(e,t){this.timelineController=void 0,this.trackName=void 0,this.startTime=void 0,this.endTime=void 0,this.screen=void 0,this.timelineController=e,this.trackName=t,this.startTime=null,this.endTime=null,this.screen=null}var t=e.prototype;return t.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen),this.startTime=null)},t.newCue=function(e,t,n){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},e}(),Ot=function(e,t,n){return e.substr(n||0,t.length)===t},Dt=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()},Mt={parse:function(e,t,n,r,i,a){var o,s=Object(Me.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(/\r\n|\n\r|\n|\r/g,"\n").split("\n"),u="00:00.000",c=0,d=0,f=0,h=[],p=!0,m=!1,g=new mt;g.oncue=function(e){var t=n[r],i=n.ccOffset;t&&t.new&&(void 0!==d?i=n.ccOffset=t.start:function(e,t,n){var r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;i&&i.new;)e.ccOffset+=r.start-i.start,r.new=!1,i=e[(r=i).prevCC];e.presentationOffset=n}(n,r,f)),f&&(i=f-n.presentationOffset),m&&(e.startTime+=i-d,e.endTime+=i-d),e.id=Dt(e.startTime.toString())+Dt(e.endTime.toString())+Dt(e.text),e.text=decodeURIComponent(encodeURIComponent(e.text)),e.endTime>0&&h.push(e)},g.onparsingerror=function(e){o=e},g.onflush=function(){o&&a?a(o):i(h)},s.forEach((function(e){if(p){if(Ot(e,"X-TIMESTAMP-MAP=")){p=!1,m=!0,e.substr(16).split(",").forEach((function(e){Ot(e,"LOCAL:")?u=e.substr(6):Ot(e,"MPEGTS:")&&(c=parseInt(e.substr(7)))}));try{t+(9e4*n[r].start||0)<0&&(t+=8589934592),c-=t,d=function(e){var t=parseInt(e.substr(-3)),n=parseInt(e.substr(-6,2)),r=parseInt(e.substr(-9,2)),i=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;if(!(Object(l.isFiniteNumber)(t)&&Object(l.isFiniteNumber)(n)&&Object(l.isFiniteNumber)(r)&&Object(l.isFiniteNumber)(i)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*n,t+=6e4*r,t+=36e5*i}(u)/1e3,f=c/9e4}catch(e){m=!1,o=e}return}""===e&&(p=!1)}g.parse(e+"\n")})),g.flush()}};function Nt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ut(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}var Ft=function(e){var t,n;function r(t){var n;if((n=e.call(this,t,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.FRAG_PARSING_USERDATA,u.default.FRAG_DECRYPTED,u.default.MANIFEST_LOADING,u.default.MANIFEST_LOADED,u.default.FRAG_LOADED,u.default.INIT_PTS_FOUND)||this).media=null,n.config=void 0,n.enabled=!0,n.Cues=void 0,n.textTracks=[],n.tracks=[],n.initPTS=[],n.unparsedVttFrags=[],n.cueRanges=[],n.captionsTracks={},n.captionsProperties=void 0,n.cea608Parser=void 0,n.lastSn=-1,n.prevCC=-1,n.vttCCs=null,n.hls=t,n.config=t.config,n.Cues=t.config.cueHandler,n.captionsProperties={textTrack1:{label:n.config.captionsTextTrack1Label,languageCode:n.config.captionsTextTrack1LanguageCode},textTrack2:{label:n.config.captionsTextTrack2Label,languageCode:n.config.captionsTextTrack2LanguageCode}},n.config.enableCEA708Captions){var r=new jt(Nt(n),"textTrack1"),i=new jt(Nt(n),"textTrack2");n.cea608Parser=new Pt(0,r,i)}return n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.addCues=function(e,t,n,r){for(var i,a,o,s,l=this.cueRanges,u=!1,c=l.length;c--;){var d=l[c],f=(i=d[0],a=d[1],o=t,s=n,Math.min(a,s)-Math.max(i,o));if(f>=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),u=!0,f/(n-t)>.5))return}u||l.push([t,n]),this.Cues.newCue(this.captionsTracks[e],t,n,r)},i.onInitPtsFound=function(e){var t=this,n=e.frag,r=e.id,i=e.initPTS,a=this.unparsedVttFrags;"main"===r&&(this.initPTS[n.cc]=i),a.length&&(this.unparsedVttFrags=[],a.forEach((function(e){t.onFragLoaded(e)})))},i.getExistingTrack=function(e){var t=this.media;if(t)for(var n=0;n<t.textTracks.length;n++){var r=t.textTracks[n];if(r[e])return r}return null},i.createCaptionsTrack=function(e){var t=this.captionsProperties,n=this.captionsTracks,r=this.media,i=t[e],a=i.label,o=i.languageCode;if(!n[e]){var s=this.getExistingTrack(e);if(s)n[e]=s,Ue(n[e]),Ne(n[e],r);else{var l=this.createTextTrack("captions",a,o);l&&(l[e]=!0,n[e]=l)}}},i.createTextTrack=function(e,t,n){var r=this.media;if(r)return r.addTextTrack(e,t,n)},i.destroy=function(){e.prototype.destroy.call(this)},i.onMediaAttaching=function(e){this.media=e.media,this._cleanTracks()},i.onMediaDetaching=function(){var e=this.captionsTracks;Object.keys(e).forEach((function(t){Ue(e[t]),delete e[t]}))},i.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this._cleanTracks()},i._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var n=0;n<t.length;n++)Ue(t[n])}},i.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 n=this.media?this.media.textTracks:[];this.tracks.forEach((function(e,r){var i;if(r<n.length){for(var a=null,o=0;o<n.length;o++)if(Ut(n[o],e)){a=n[o];break}a&&(i=a)}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)}))}},i.onFragLoaded=function(e){var t=e.frag,n=e.payload,r=this.cea608Parser,i=this.initPTS,a=this.lastSn,o=this.unparsedVttFrags;if("main"===t.type){var s=t.sn;t.sn!==a+1&&r&&r.reset(),this.lastSn=s}else if("subtitle"===t.type)if(n.byteLength){if(!Object(l.isFiniteNumber)(i[t.cc]))return o.push(e),void(i.length&&this.hls.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t}));var c=t.decryptdata;null!=c&&null!=c.key&&"AES-128"===c.method||this._parseVTTs(t,n)}else this.hls.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t})},i._parseVTTs=function(e,t){var n=this.hls,r=this.prevCC,i=this.textTracks,a=this.vttCCs;a[e.cc]||(a[e.cc]={start:e.start,prevCC:r,new:!0},this.prevCC=e.cc),Mt.parse(t,this.initPTS[e.cc],a,e.cc,(function(t){var r=i[e.level];"disabled"!==r.mode?(t.forEach((function(e){if(!r.cues.getCueById(e.id))try{if(r.addCue(e),!r.cues.getCueById(e.id))throw new Error("addCue is failed for: "+e)}catch(n){c.logger.debug("Failed occurred on adding cues: "+n);var t=new window.TextTrackCue(e.startTime,e.endTime,e.text);t.id=e.id,r.addCue(t)}})),n.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})):n.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})}),(function(t){c.logger.log("Failed to parse VTT cue: "+t),n.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})}))},i.onFragDecrypted=function(e){var t=e.frag,n=e.payload;if("subtitle"===t.type){if(!Object(l.isFiniteNumber)(this.initPTS[t.cc]))return void this.unparsedVttFrags.push(e);this._parseVTTs(t,n)}},i.onFragParsingUserdata=function(e){if(this.enabled&&this.cea608Parser)for(var t=0;t<e.samples.length;t++){var n=e.samples[t].bytes;if(n){var r=this.extractCea608Data(n);this.cea608Parser.addData(e.samples[t].pts,r)}}},i.extractCea608Data=function(e){for(var t,n,r,i=31&e[0],a=2,o=[],s=0;s<i;s++)t=e[a++],n=127&e[a++],r=127&e[a++],0===n&&0===r||0!=(4&t)&&0==(3&t)&&(o.push(n),o.push(r));return o},r}(f);function Bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kt(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"subtitles"===r.kind&&r.label&&t.push(e[n])}return t}var Vt,Gt=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.MANIFEST_LOADED,u.default.SUBTITLE_TRACK_LOADED)||this).tracks=[],n.trackId=-1,n.media=null,n.stopped=!0,n.subtitleDisplay=!0,n.queuedDefaultTrack=null,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o,s=r.prototype;return s.destroy=function(){f.prototype.destroy.call(this)},s.onMediaAttached=function(e){var t=this;this.media=e.media,this.media&&(Object(l.isFiniteNumber)(this.queuedDefaultTrack)&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=null),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))},s.onMediaDetaching=function(){this.media&&(this.useTextTrackPolling?clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),Object(l.isFiniteNumber)(this.subtitleTrack)&&(this.queuedDefaultTrack=this.subtitleTrack),Kt(this.media.textTracks).forEach((function(e){Ue(e)})),this.subtitleTrack=-1,this.media=null)},s.onManifestLoaded=function(e){var t=this,n=e.subtitles||[];this.tracks=n,this.hls.trigger(u.default.SUBTITLE_TRACKS_UPDATED,{subtitleTracks:n}),n.forEach((function(e){e.default&&(t.media?t.subtitleTrack=e.id:t.queuedDefaultTrack=e.id)}))},s.onSubtitleTrackLoaded=function(e){var t=this,n=e.id,r=e.details,i=this.trackId,a=this.tracks,o=a[i];if(n>=a.length||n!==i||!o||this.stopped)this._clearReloadTimer();else if(c.logger.log("subtitle track "+n+" loaded"),r.live){var s=ie(o.details,r,e.stats.trequest);c.logger.log("Reloading live subtitle playlist in "+s+"ms"),this.timer=setTimeout((function(){t._loadCurrentTrack()}),s)}else this._clearReloadTimer()},s.startLoad=function(){this.stopped=!1,this._loadCurrentTrack()},s.stopLoad=function(){this.stopped=!0,this._clearReloadTimer()},s._clearReloadTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},s._loadCurrentTrack=function(){var e=this.trackId,t=this.tracks,n=this.hls,r=t[e];e<0||!r||r.details&&!r.details.live||(c.logger.log("Loading subtitle track "+e),n.trigger(u.default.SUBTITLE_TRACK_LOADING,{url:r.url,id:e}))},s._toggleTrackModes=function(e){var t=this.media,n=this.subtitleDisplay,r=this.trackId;if(t){var i=Kt(t.textTracks);if(-1===e)[].slice.call(i).forEach((function(e){e.mode="disabled"}));else{var a=i[r];a&&(a.mode="disabled")}var o=i[e];o&&(o.mode=n?"showing":"hidden")}},s._setSubtitleTrackInternal=function(e){var t=this.hls,n=this.tracks;!Object(l.isFiniteNumber)(e)||e<-1||e>=n.length||(this.trackId=e,c.logger.log("Switching to subtitle track "+e),t.trigger(u.default.SUBTITLE_TRACK_SWITCH,{id:e}),this._loadCurrentTrack())},s._onTextTracksChanged=function(){if(this.media){for(var e=-1,t=Kt(this.media.textTracks),n=0;n<t.length;n++)if("hidden"===t[n].mode)e=n;else if("showing"===t[n].mode){e=n;break}this.subtitleTrack=e}},i=r,(a=[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.trackId!==e&&(this._toggleTrackModes(e),this._setSubtitleTrackInternal(e))}}])&&Bt(i.prototype,a),o&&Bt(i,o),r}(f),Ht=n("./src/crypt/decrypter.js"),Yt=window.performance,zt=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.ERROR,u.default.KEY_LOADED,u.default.FRAG_LOADED,u.default.SUBTITLE_TRACKS_UPDATED,u.default.SUBTITLE_TRACK_SWITCH,u.default.SUBTITLE_TRACK_LOADED,u.default.SUBTITLE_FRAG_PROCESSED,u.default.LEVEL_UPDATED)||this).fragmentTracker=n,r.config=t.config,r.state=me,r.tracks=[],r.tracksBuffered=[],r.currentTrackId=-1,r.decrypter=new Ht.default(t,t.config),r.lastAVStart=0,r._onMediaSeeking=r.onMediaSeeking.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r)),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.onSubtitleFragProcessed=function(e){var t=e.frag,n=e.success;if(this.fragPrevious=t,this.state=ve,n){var r=this.tracksBuffered[this.currentTrackId];if(r){for(var i,a=t.start,o=0;o<r.length;o++)if(a>=r[o].start&&a<=r[o].end){i=r[o];break}var s=t.start+t.duration;i?i.end=s:(i={start:a,end:s},r.push(i))}}},i.onMediaAttached=function(e){var t=e.media;this.media=t,t.addEventListener("seeking",this._onMediaSeeking),this.state=ve},i.onMediaDetaching=function(){var e=this;this.media&&(this.media.removeEventListener("seeking",this._onMediaSeeking),this.fragmentTracker.removeAllFragments(),this.currentTrackId=-1,this.tracks.forEach((function(t){e.tracksBuffered[t.id]=[]})),this.media=null,this.state=me)},i.onError=function(e){var t=e.frag;t&&"subtitle"===t.type&&(this.state=ve)},i.onSubtitleTracksUpdated=function(e){var t=this;c.logger.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=e.subtitleTracks,this.tracks.forEach((function(e){t.tracksBuffered[e.id]=[]}))},i.onSubtitleTrackSwitch=function(e){if(this.currentTrackId=e.id,this.tracks&&this.tracks.length&&-1!==this.currentTrackId){var t=this.tracks[this.currentTrackId];t&&t.details&&this.setInterval(500)}else this.clearInterval()},i.onSubtitleTrackLoaded=function(e){var t=e.id,n=e.details,r=this.currentTrackId,i=this.tracks,a=i[r];t>=i.length||t!==r||!a||(n.live&&function(e,t,n){void 0===n&&(n=0);var r=-1;re(e,t,(function(e,t,n){t.start=e.start,r=n}));var i=t.fragments;if(r<0)i.forEach((function(e){e.start+=n}));else for(var a=r+1;a<i.length;a++)i[a].start=i[a-1].start+i[a-1].duration}(a.details,n,this.lastAVStart),a.details=n,this.setInterval(500))},i.onKeyLoaded=function(){this.state===be&&(this.state=ve)},i.onFragLoaded=function(e){var t=this.fragCurrent,n=e.frag.decryptdata,r=e.frag,i=this.hls;if(this.state===_e&&t&&"subtitle"===e.frag.type&&t.sn===e.frag.sn&&e.payload.byteLength>0&&n&&n.key&&"AES-128"===n.method){var a=Yt.now();this.decrypter.decrypt(e.payload,n.key.buffer,n.iv.buffer,(function(e){var t=Yt.now();i.trigger(u.default.FRAG_DECRYPTED,{frag:r,payload:e,stats:{tstart:a,tdecrypt:t}})}))}},i.onLevelUpdated=function(e){var t=e.details.fragments;this.lastAVStart=t.length?t[0].start:0},i.doTick=function(){if(this.media)switch(this.state){case ve:var e=this.config,t=this.currentTrackId,n=this.fragmentTracker,r=this.media,i=this.tracks;if(!i||!i[t]||!i[t].details)break;var a,o=e.maxBufferHole,s=e.maxFragLookUpTolerance,l=Math.min(e.maxBufferLength,e.maxMaxBufferLength),d=G.bufferedInfo(this._getBuffered(),r.currentTime,o),f=d.end,h=d.len,p=i[t].details,m=p.fragments,g=m.length,v=m[g-1].start+m[g-1].duration;if(h>l)return;var y=this.fragPrevious;f<v?(y&&p.hasProgramDateTime&&(a=le(m,y.endProgramDateTime,s)),a||(a=ue(y,m,f,s))):a=m[g-1],a&&a.encrypted?(c.logger.log("Loading key for "+a.sn),this.state=be,this.hls.trigger(u.default.KEY_LOADING,{frag:a})):a&&n.getState(a)===N&&(this.fragCurrent=a,this.state=_e,this.hls.trigger(u.default.FRAG_LOADING,{frag:a}))}else this.state=ve},i.stopLoad=function(){this.lastAVStart=0,e.prototype.stopLoad.call(this)},i._getBuffered=function(){return this.tracksBuffered[this.currentTrackId]||[]},i.onMediaSeeking=function(){this.fragPrevious=null},r}(Le);!function(e){e.WIDEVINE="com.widevine.alpha",e.PLAYREADY="com.microsoft.playready"}(Vt||(Vt={}));var Wt="undefined"!=typeof window&&window.navigator&&window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess.bind(window.navigator):null;function $t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var qt=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHED,u.default.MANIFEST_PARSED)||this)._widevineLicenseUrl=void 0,n._licenseXhrSetup=void 0,n._emeEnabled=void 0,n._requestMediaKeySystemAccess=void 0,n._config=void 0,n._mediaKeysList=[],n._media=null,n._hasSetMediaKeys=!1,n._requestLicenseFailureCount=0,n._onMediaEncrypted=function(e){c.logger.log('Media is encrypted using "'+e.initDataType+'" init data type'),n._attemptSetMediaKeys(),n._generateRequestWithPreferredKeySession(e.initDataType,e.initData)},n._config=t.config,n._widevineLicenseUrl=n._config.widevineLicenseUrl,n._licenseXhrSetup=n._config.licenseXhrSetup,n._emeEnabled=n._config.emeEnabled,n._requestMediaKeySystemAccess=n._config.requestMediaKeySystemAccessFunc,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o,l=r.prototype;return l.getLicenseServerUrl=function(e){switch(e){case Vt.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+e+'"')},l._attemptKeySystemAccess=function(e,t,n){var r=this,i=function(e,t,n){switch(e){case Vt.WIDEVINE:return function(e,t){var n={videoCapabilities:[]};return t.forEach((function(e){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+e+'"'})})),[n]}(0,n);default:throw new Error("Unknown key-system: "+e)}}(e,0,n);c.logger.log("Requesting encrypted media key-system access"),this.requestMediaKeySystemAccess(e,i).then((function(t){r._onMediaKeySystemAccessObtained(e,t)})).catch((function(t){c.logger.error('Failed to obtain key-system "'+e+'" access:',t)}))},l._onMediaKeySystemAccessObtained=function(e,t){var n=this;c.logger.log('Access for key-system "'+e+'" obtained');var r={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:e};this._mediaKeysList.push(r),t.createMediaKeys().then((function(t){r.mediaKeys=t,c.logger.log('Media-keys created for key-system "'+e+'"'),n._onMediaKeysCreated()})).catch((function(e){c.logger.error("Failed to create media-keys:",e)}))},l._onMediaKeysCreated=function(){var e=this;this._mediaKeysList.forEach((function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),e._onNewMediaKeySession(t.mediaKeysSession))}))},l._onNewMediaKeySession=function(e){var t=this;c.logger.log("New key-system session "+e.sessionId),e.addEventListener("message",(function(n){t._onKeySessionMessage(e,n.message)}),!1)},l._onKeySessionMessage=function(e,t){c.logger.log("Got EME message event, creating license request"),this._requestLicense(t,(function(t){c.logger.log("Received license data (length: "+(t?t.byteLength:t)+"), updating key-session"),e.update(t)}))},l._attemptSetMediaKeys=function(){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var e=this._mediaKeysList[0];if(!e||!e.mediaKeys)return c.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});c.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(e.mediaKeys),this._hasSetMediaKeys=!0}},l._generateRequestWithPreferredKeySession=function(e,t){var n=this,r=this._mediaKeysList[0];if(!r)return c.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(r.mediaKeysSessionInitialized)c.logger.warn("Key-Session already initialized but requested again");else{var i=r.mediaKeysSession;if(!i)return c.logger.error("Fatal: Media is encrypted but no key-session existing"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});if(!t)return c.logger.warn("Fatal: initData required for generating a key session is null"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});c.logger.log('Generating key-session request for "'+e+'" init data type'),r.mediaKeysSessionInitialized=!0,i.generateRequest(e,t).then((function(){c.logger.debug("Key-session generation succeeded")})).catch((function(e){c.logger.error("Error generating key-session request:",e),n.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})}))}},l._createLicenseXhr=function(e,t,n){var r=new XMLHttpRequest,i=this._licenseXhrSetup;try{if(i)try{i(r,e)}catch(t){r.open("POST",e,!0),i(r,e)}r.readyState||r.open("POST",e,!0)}catch(e){throw new Error("issue setting up KeySystem license XHR "+e)}return r.responseType="arraybuffer",r.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,r,e,t,n),r},l._onLicenseRequestReadyStageChange=function(e,t,n,r){switch(e.readyState){case 4:if(200===e.status)this._requestLicenseFailureCount=0,c.logger.log("License request succeeded"),"arraybuffer"!==e.responseType&&c.logger.warn("xhr response type was not set to the expected arraybuffer for license request"),r(e.response);else{if(c.logger.error("License Request XHR failed ("+t+"). Status: "+e.status+" ("+e.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>3)return void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var i=3-this._requestLicenseFailureCount+1;c.logger.warn("Retrying license request, "+i+" attempts left"),this._requestLicense(n,r)}}},l._generateLicenseRequestChallenge=function(e,t){switch(e.mediaKeySystemDomain){case Vt.WIDEVINE:return t}throw new Error("unsupported key-system: "+e.mediaKeySystemDomain)},l._requestLicense=function(e,t){c.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return c.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var r=this.getLicenseServerUrl(n.mediaKeySystemDomain),i=this._createLicenseXhr(r,e,t);c.logger.log("Sending license request to URL: "+r);var a=this._generateLicenseRequestChallenge(n,e);i.send(a)}catch(e){c.logger.error("Failure requesting DRM license: "+e),this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},l.onMediaAttached=function(e){if(this._emeEnabled){var t=e.media;this._media=t,t.addEventListener("encrypted",this._onMediaEncrypted)}},l.onMediaDetached=function(){this._media&&(this._media.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null)},l.onManifestParsed=function(e){if(this._emeEnabled){var t=e.levels.map((function(e){return e.audioCodec})),n=e.levels.map((function(e){return e.videoCodec}));this._attemptKeySystemAccess(Vt.WIDEVINE,t,n)}},i=r,(a=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&$t(i.prototype,a),o&&$t(i,o),r}(f);function Xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jt=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Xt(e,t,n[t])}))}return e}({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:et,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,abrController:He,bufferController:ze,capLevelController:$e,fpsController:Xe,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:Wt},{cueHandler:r,enableCEA708Captions:!0,enableWebVTT:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es"},{subtitleStreamController:zt,subtitleTrackController:Gt,timelineController:Ft,audioStreamController:at,audioTrackController:nt,emeController:qt});function Zt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function en(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tn(e,t,n){return t&&en(e.prototype,t),n&&en(e,n),e}n.d(t,"default",(function(){return nn}));var nn=function(e){var t,n;function r(t){var n;void 0===t&&(t={}),(n=e.call(this)||this).config=void 0,n._autoLevelCapping=void 0,n.abrController=void 0,n.capLevelController=void 0,n.levelController=void 0,n.streamController=void 0,n.networkControllers=void 0,n.audioTrackController=void 0,n.subtitleTrackController=void 0,n.emeController=void 0,n.coreComponents=void 0,n.media=null,n.url=null;var i=r.DefaultConfig;if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");n.config=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Zt(e,t,n[t])}))}return e}({},i,t);var a=Qt(n).config;if(void 0!==a.liveMaxLatencyDurationCount&&a.liveMaxLatencyDurationCount<=a.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==a.liveMaxLatencyDuration&&(void 0===a.liveSyncDuration||a.liveMaxLatencyDuration<=a.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(c.enableLogs)(a.debug),n._autoLevelCapping=-1;var o=n.abrController=new a.abrController(Qt(n)),s=new a.bufferController(Qt(n)),l=n.capLevelController=new a.capLevelController(Qt(n)),u=new a.fpsController(Qt(n)),d=new O(Qt(n)),f=new D(Qt(n)),h=new M(Qt(n)),p=new Fe(Qt(n)),m=n.levelController=new De(Qt(n)),g=new K(Qt(n)),v=[m,n.streamController=new Pe(Qt(n),g)],y=a.audioStreamController;y&&v.push(new y(Qt(n),g)),n.networkControllers=v;var b=[d,f,h,o,s,l,u,p,g];if(y=a.audioTrackController){var _=new y(Qt(n));n.audioTrackController=_,b.push(_)}if(y=a.subtitleTrackController){var A=new y(Qt(n));n.subtitleTrackController=A,v.push(A)}if(y=a.emeController){var E=new y(Qt(n));n.emeController=E,b.push(E)}return(y=a.subtitleStreamController)&&v.push(new y(Qt(n),g)),(y=a.timelineController)&&b.push(new y(Qt(n))),n.coreComponents=b,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.isSupported=function(){return function(){var e=W();if(!e)return!1;var t=self.SourceBuffer||self.WebKitSourceBuffer,n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!r}()},tn(r,null,[{key:"version",get:function(){return"0.13.2"}},{key:"Events",get:function(){return u.default}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return r.defaultConfig?r.defaultConfig:Jt},set:function(e){r.defaultConfig=e}}]);var i=r.prototype;return i.destroy=function(){c.logger.log("destroy"),this.trigger(u.default.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach((function(e){e.destroy()})),this.url=null,this.removeAllListeners(),this._autoLevelCapping=-1},i.attachMedia=function(e){c.logger.log("attachMedia"),this.media=e,this.trigger(u.default.MEDIA_ATTACHING,{media:e})},i.detachMedia=function(){c.logger.log("detachMedia"),this.trigger(u.default.MEDIA_DETACHING),this.media=null},i.loadSource=function(e){e=o.buildAbsoluteURL(window.location.href,e,{alwaysNormalize:!0}),c.logger.log("loadSource:"+e),this.url=e,this.trigger(u.default.MANIFEST_LOADING,{url:e})},i.startLoad=function(e){void 0===e&&(e=-1),c.logger.log("startLoad("+e+")"),this.networkControllers.forEach((function(t){t.startLoad(e)}))},i.stopLoad=function(){c.logger.log("stopLoad"),this.networkControllers.forEach((function(e){e.stopLoad()}))},i.swapAudioCodec=function(){c.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},i.recoverMediaError=function(){c.logger.log("recoverMediaError");var e=this.media;this.detachMedia(),e&&this.attachMedia(e)},tn(r,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){c.logger.log("set currentLevel:"+e),this.loadLevel=e,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){c.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){c.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){c.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){c.logger.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",set:function(e){var t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){c.logger.log("set autoLevelCapping:"+e),this._autoLevelCapping=e}},{key:"bandwidthEstimate",get:function(){var e=this.abrController._bwEstimator;return e?e.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var e=this.levels,t=this.config.minAutoBitrate,n=e?e.length:0,r=0;r<n;r++)if((e[r].realBitrate?Math.max(e[r].realBitrate,e[r].bitrate):e[r].bitrate)>t)return r;return 0}},{key:"maxAutoLevel",get:function(){var e=this.levels,t=this.autoLevelCapping;return-1===t&&e&&e.length?e.length-1:t}},{key:"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)}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}}]),r}(q);nn.defaultConfig=void 0},"./src/polyfills/number-isFinite.js": /*!******************************************!*\ - !*** ./src/remux/passthrough-remuxer.js ***! + !*** ./src/polyfills/number-isFinite.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": +/*! exports provided: isFiniteNumber */function(e,t,n){"use strict";n.r(t),n.d(t,"isFiniteNumber",(function(){return r}));var r=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)}},"./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": +/*! exports provided: getSelfScope */function(e,t,n){"use strict";function r(){return"undefined"==typeof window?self:window}n.r(t),n.d(t,"getSelfScope",(function(){return r}))},"./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": +/*! exports provided: enableLogs, logger */function(e,t,n){"use strict";n.r(t),n.d(t,"enableLogs",(function(){return c})),n.d(t,"logger",(function(){return d}));var r=n(/*! ./get-self-scope */"./src/utils/get-self-scope.js");function i(){}var a={trace:i,debug:i,log:i,warn:i,info:i,error:i},o=a;function s(e,t){return t="["+e+"] > "+t}var l=Object(r.getSelfScope)();function u(e){var t=l.console[e];return t?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];r[0]&&(r[0]=s(e,r[0])),t.apply(l.console,r)}:i}var c=function(e){if(l.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n.forEach((function(t){o[t]=e[t]?e[t].bind(e):u(t)}))}(e,"debug","log","info","warn","error");try{o.log()}catch(e){o=a}}else o=a},d=o}}).default},e.exports=r())},"./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": +/*! no static exports found */function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();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(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.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 n=1;n<arguments.length;n++)t[n-1]=arguments[n];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": +/*! no static exports found */function(e,t,n){var r,i,a={},o=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.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 n=s.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),u=null,c=0,d=[],f=n(/*! ./urls */"./node_modules/style-loader/lib/urls.js");function h(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=a[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(b(r.parts[o],t))}else{var s=[];for(o=0;o<r.parts.length;o++)s.push(b(r.parts[o],t));a[r.id]={id:r.id,refs:1,parts:s}}}}function p(e,t){for(var n=[],r={},i=0;i<e.length;i++){var a=e[i],o=t.base?a[0]+t.base:a[0],s={css:a[1],media:a[2],sourceMap:a[3]};r[o]?r[o].parts.push(s):n.push(r[o]={id:o,parts:[s]})}return n}function m(e,t){var n=l(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=d[d.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),d.push(t);else if("bottom"===e.insertAt)n.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);n.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 v(e){var t=document.createElement("style");return e.attrs.type="text/css",y(t,e.attrs),m(e,t),t}function y(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,r,i,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var o=c++;n=u||(u=v(t)),r=E.bind(null,n,o,!1),i=E.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",y(t,e.attrs),m(e,t),t}(t),r=w.bind(null,n,t),i=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),r=T.bind(null,n),i=function(){g(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(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=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return h(n,t),function(e){for(var r=[],i=0;i<n.length;i++){var o=n[i];(s=a[o.id]).refs--,r.push(s)}for(e&&h(p(e,t),t),i=0;i<r.length;i++){var s;if(0===(s=r[i]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete a[s.id]}}}};var _,A=(_=[],function(e,t){return _[e]=t,_.filter(Boolean).join("\n")});function E(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=A(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function T(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function w(e,t,n){var r=n.css,i=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||a)&&(r=f(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(o),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": +/*! 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 n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var i,a=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?e:(i=0===a.indexOf("//")?a:0===a.indexOf("/")?n+a:r+a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=l(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=l(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=l(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=n(/*! ./utils */"./src/base/utils.js");function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a._options=n,a.uniqueId=(0,s.uniqueId)("o"),a}return(0,o.default)(t,e),(0,a.default)(t,[{key:"options",get:function(){return this._options}}]),t}(l(n(/*! ./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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=d(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=d(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=d(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=d(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=d(n(/*! ./base_object */"./src/base/base_object.js")),u=n(/*! ./utils */"./src/base/utils.js"),c=d(n(/*! ./error_mixin */"./src/base/error_mixin.js"));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(n){(0,i.default)(this,t);var r=(0,a.default)(this,e.call(this,n.options));return r.container=n,r.enabled=!0,r.bindEvents(),r}return(0,s.default)(t,e),(0,o.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,r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=d(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=d(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=d(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=d(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=n(/*! ./utils */"./src/base/utils.js"),u=d(n(/*! ./base_object */"./src/base/base_object.js")),c=d(n(/*! ./error_mixin */"./src/base/error_mixin.js"));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(n){(0,i.default)(this,t);var r=(0,a.default)(this,e.call(this,n.options));return r.core=n,r.enabled=!0,r.bindEvents(),r}return(0,s.default)(t,e),(0,o.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,r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=o(n(/*! ../plugins/log */"./src/plugins/log/index.js")),a=o(n(/*! ../components/error */"./src/components/error/index.js"));function o(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},n=this.constructor&&this.constructor.type||"",o=this.name||n,s=this.i18n||this.core&&this.core.i18n||this.container&&this.container.i18n,l=o+":"+(e&&e.code||"unknown"),u={description:"",level:a.default.Levels.FATAL,origin:o,scope:n,raw:{}},c=(0,r.default)({},u,e,{code:t.useCodePrefix?l:e.code});if(s&&c.level==a.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(o,"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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(/*! babel-runtime/core-js/object/keys */"./node_modules/babel-runtime/core-js/object/keys.js")),i=l(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=l(n(/*! babel-runtime/helpers/typeof */"./node_modules/babel-runtime/helpers/typeof.js")),o=l(n(/*! ../plugins/log */"./src/plugins/log/index.js")),s=n(/*! ./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,n,r){if(!n)return!0;if("object"===(void 0===n?"undefined":(0,a.default)(n))){for(var i in n)e[t].apply(e,[i,n[i]].concat(r));return!1}if(c.test(n)){for(var o=n.split(c),s=0,l=o.length;s<l;s++)e[t].apply(e,[o[s]].concat(r));return!1}return!0},f=function(e,t,n,r){var i=void 0,a=-1,s=e.length,l=t[0],u=t[1],c=t[2];!function d(){try{switch(t.length){case 0:for(;++a<s;)(i=e[a]).callback.call(i.ctx);return;case 1:for(;++a<s;)(i=e[a]).callback.call(i.ctx,l);return;case 2:for(;++a<s;)(i=e[a]).callback.call(i.ctx,l,u);return;case 3:for(;++a<s;)(i=e[a]).callback.call(i.ctx,l,u,c);return;default:for(;++a<s;)(i=e[a]).callback.apply(i.ctx,t);return}}catch(e){o.default.error.apply(o.default,[n,"error on event",r,"trigger","-",e]),d()}}()},h=function(){function e(){(0,i.default)(this,e)}return e.prototype.on=function(e,t,n){return d(this,"on",e,[t,n])&&t?(this._events||(this._events={}),(this._events[e]||(this._events[e]=[])).push({callback:t,context:n,ctx:n||this}),this):this},e.prototype.once=function(e,t,n){var r=this,i=void 0;if(!d(this,"once",e,[t,n])||!t)return this;var a=function(){return r.off(e,i)};return i=function(){a(),t.apply(this,arguments)},this.on(e,i,n)},e.prototype.off=function(e,t,n){var i,a,o=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,n]))return this;if(!e&&!t&&!n)return this._events=void 0,this;for(u=0,a=(i=e?[e]:(0,r.default)(this._events)).length;u<a;u++)if(e=i[u],l=this._events[e]){if(this._events[e]=o=[],t||n)for(c=0,f=l.length;c<f;c++)s=l[c],(t&&t!==s.callback&&t!==s.callback._callback||n&&n!==s.context)&&o.push(s);o.length||delete this._events[e]}return this},e.prototype.trigger=function(e){var t=this.name||this.constructor.name;if(o.default.debug.apply(o.default,[t].concat(Array.prototype.slice.call(arguments))),!this._events)return this;var n=u.call(arguments,1);if(!d(this,"trigger",e,n))return this;var r=this._events[e],i=this._events.all;return r&&f(r,n,t,e),i&&f(i,arguments,t,e),this},e.prototype.stopListening=function(e,t,n){var i=this._listeningTo;if(!i)return this;var o=!t&&!n;for(var s in n||"object"!==(void 0===t?"undefined":(0,a.default)(t))||(n=this),e&&((i={})[e._listenId]=e),i)(e=i[s]).off(t,n,this),(o||0===(0,r.default)(e._events).length)&&delete this._listeningTo[s];return this},e.register=function(t){e.Custom||(e.Custom={});var n="string"==typeof t&&t.toUpperCase().trim();n&&!e.Custom[n]?e.Custom[n]=n.toLowerCase().split("_").map((function(e,t){return 0===t?e:e=e[0].toUpperCase()+e.slice(1)})).join(""):o.default.error("Events","Error when register event: "+t)},e.listAvailableCustomEvents=function(){return e.Custom||(e.Custom={}),(0,r.default)(e.Custom).filter((function(t){return"string"==typeof e.Custom[t]}))},e}();t.default=h;var p={listenTo:"on",listenToOnce:"once"};(0,r.default)(p).forEach((function(e){h.prototype[e]=function(t,n,r){return(this._listeningTo||(this._listeningTo={}))[t._listenId||(t._listenId=(0,s.uniqueId)("l"))]=t,r||"object"!==(void 0===n?"undefined":(0,a.default)(n))||(r=this),t[p[e]](n,r,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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=t.mp4="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=";t.default={mp4:r}},"./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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=f(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=f(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=f(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=f(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=n(/*! ./utils */"./src/base/utils.js"),u=f(n(/*! ./ui_object */"./src/base/ui_object.js")),c=f(n(/*! ./error_mixin */"./src/base/error_mixin.js")),d=f(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(n,r,o){(0,i.default)(this,t);var s=(0,a.default)(this,e.call(this,n));return s.settings={},s._i18n=r,s.playerError=o,s._consented=!1,s}return(0,s.default)(t,e),(0,o.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,n){t&&e.play()}))},t.prototype.canAutoPlay=function(e){e(!0,null)},(0,o.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,r.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": +/*! no static exports found */function(e,t,n){"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),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i<n;){var a=t[i];if(e.call(r,a,i,t))return a;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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),i=a(n(/*! ./template */"./src/base/template.js"));function a(e){return e&&e.__esModule?e:{default:e}}var o={getStyleFor:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{baseUrl:""};return(0,r.default)('<style class="clappr-style"></style>').html((0,i.default)(e.toString())(t))}};t.default=o,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": +/*! no static exports found */function(e,t,n){"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 r=h(n(/*! ../icons/01-play.svg */"./src/icons/01-play.svg")),i=h(n(/*! ../icons/02-pause.svg */"./src/icons/02-pause.svg")),a=h(n(/*! ../icons/03-stop.svg */"./src/icons/03-stop.svg")),o=h(n(/*! ../icons/04-volume.svg */"./src/icons/04-volume.svg")),s=h(n(/*! ../icons/05-mute.svg */"./src/icons/05-mute.svg")),l=h(n(/*! ../icons/06-expand.svg */"./src/icons/06-expand.svg")),u=h(n(/*! ../icons/07-shrink.svg */"./src/icons/07-shrink.svg")),c=h(n(/*! ../icons/08-hd.svg */"./src/icons/08-hd.svg")),d=h(n(/*! ../icons/09-cc.svg */"./src/icons/09-cc.svg")),f=h(n(/*! ../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=r.default,t.reload=f.default,t.stop=a.default,t.volume=o.default,t.volumeMute=s.default,t.default={cc:d.default,exitFullscreen:u.default,fullscreen:l.default,hd:c.default,pause:i.default,play:r.default,reload:f.default,stop:a.default,volume:o.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},i=/(.)^/,a={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},o=/\\|'|\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 n,s=new RegExp([(r.escape||i).source,(r.interpolate||i).source,(r.evaluate||i).source].join("|")+"|$","g"),l=0,d="__p+='";e.replace(s,(function(t,n,r,i,s){return d+=e.slice(l,s).replace(o,(function(e){return"\\"+a[e]})),n&&(d+="'+\n((__t=("+n+"))==null?'':escapeExpr(__t))+\n'"),r&&(d+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),i&&(d+="';\n"+i+"\n__p+='"),l=s+t.length,t})),d+="';\n",r.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{n=new Function(r.variable||"obj","escapeExpr",d)}catch(e){throw e.source=d,e}if(t)return n(t,u);var f=function(e){return n.call(this,e,u)};return f.source="function("+(r.variable||"obj")+"){\n"+d+"}",f};d.settings=r,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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=d(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=d(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=d(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=d(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=n(/*! ./utils */"./src/base/utils.js"),u=d(n(/*! ./ui_object */"./src/base/ui_object.js")),c=d(n(/*! ./error_mixin */"./src/base/error_mixin.js"));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(n){(0,i.default)(this,t);var r=(0,a.default)(this,e.call(this,n.options));return r.container=n,r.enabled=!0,r.bindEvents(),r}return(0,s.default)(t,e),(0,o.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,r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=d(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=d(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=d(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=d(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=n(/*! ./utils */"./src/base/utils.js"),u=d(n(/*! ./ui_object */"./src/base/ui_object.js")),c=d(n(/*! ./error_mixin */"./src/base/error_mixin.js"));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(n){(0,i.default)(this,t);var r=(0,a.default)(this,e.call(this,n.options));return r.core=n,r.enabled=!0,r.bindEvents(),r.render(),r}return(0,s.default)(t,e),(0,o.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,r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=c(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=c(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=c(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=c(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),l=n(/*! ./utils */"./src/base/utils.js"),u=c(n(/*! ./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(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a.cid=(0,l.uniqueId)("c"),a._ensureElement(),a.delegateEvents(),a}return(0,o.default)(t,e),(0,a.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 n=e[t];if(n&&n.constructor!==Function&&(n=this[e[t]]),n){var r=t.match(d),i=r[1],a=r[2];i+=".delegateEvents"+this.cid,""===a?this.$el.on(i,n.bind(this)):this.$el.on(i,a,n.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=x,t.now=R,t.removeArrayItem=L,t.listContainsIgnoreCase=function(e,t){return void 0!==e&&void 0!==t&&void 0!==t.find((function(t){return e.toLowerCase()===t.toLowerCase()}))},t.canAutoPlayMedia=j,r(/*! ./polyfills */"./src/base/polyfills.js");var c=p(r(/*! ../components/browser */"./src/components/browser/index.js")),d=p(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),f=p(r(/*! ./media */"./src/base/media.js")),h=p(r(/*! ./svg_icons */"./src/base/svg_icons.js"));function p(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(t)for(var r in t){var n=(0,u.default)(t,r);n?(0,l.default)(e,r,n):e[r]=t[r]}return e}function g(e,t){var r=function(e){function r(){(0,o.default)(this,r);for(var n=arguments.length,i=Array(n),s=0;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),C=t.cancelAnimationFrame=(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout).bind(window);function x(){return window.navigator&&window.navigator.language}function R(){return window.performance&&window.performance.now?performance.now():Date.now()}function L(e,t){var r=e.indexOf(t);r>=0&&e.splice(r,1)}function j(e,t){var r=(t=(0,n.default)({inline:!1,muted:!1,timeout:250,type:"video",source:f.default.mp4,element:null},t)).element?t.element:document.createElement(t.type);r.muted=t.muted,!0===t.muted&&r.setAttribute("muted","muted"),!0===t.inline&&r.setAttribute("playsinline","playsinline"),r.src=t.source;var i=r.play(),o=setTimeout((function(){a(!1,new Error("Timeout "+t.timeout+" ms has been reached"))}),t.timeout),a=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;clearTimeout(o),e(t,r)};void 0!==i?i.then((function(){return a(!0)})).catch((function(e){return a(!1,e)})):a(!0)}var P=[],I=t.DomRecycler=function(){function e(){(0,o.default)(this,e)}return e.configure=function(e){this.options=d.default.extend(this.options,e)},e.create=function(e){return this.options.recycleVideo&&"video"===e&&P.length>0?P.shift():(0,d.default)("<"+e+">")},e.garbage=function(e){this.options.recycleVideo&&"VIDEO"===e[0].tagName.toUpperCase()&&(e.children().remove(),P.push(e))},e}();I.options={recycleVideo:!1};var O=t.DoubleEventHandler=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;(0,o.default)(this,e),this.delay=t,this.lastTime=0}return e.prototype.handle=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=(new Date).getTime(),i=n-this.lastTime;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:I,extend:g,formatTime:y,seekStringToSeconds:A,uniqueId:T,currentScriptUrl:w,isNumber:S,requestAnimationFrame:k,cancelAnimationFrame:C,getBrowserLanguage:x,now:R,removeArrayItem:L,canAutoPlayMedia:j,Media:f.default,DoubleEventHandler:O,SvgIcons:h.default}},"./src/components/browser/browser.js": +/*! no static exports found */function(e,t,n){"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 r=p(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=p(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=p(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=p(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=p(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=p(n(/*! babel-runtime/core-js/object/define-property */"./node_modules/babel-runtime/core-js/object/define-property.js")),u=p(n(/*! 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=v,t.seekStringToSeconds=A,t.uniqueId=T,t.isNumber=w,t.currentScriptUrl=S,t.getBrowserLanguage=x,t.now=R,t.removeArrayItem=L,t.listContainsIgnoreCase=function(e,t){return void 0!==e&&void 0!==t&&void 0!==t.find((function(t){return e.toLowerCase()===t.toLowerCase()}))},t.canAutoPlayMedia=I,n(/*! ./polyfills */"./src/base/polyfills.js");var c=p(n(/*! ../components/browser */"./src/components/browser/index.js")),d=p(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),f=p(n(/*! ./media */"./src/base/media.js")),h=p(n(/*! ./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 n in t){var r=(0,u.default)(t,n);r?(0,l.default)(e,n,r):e[n]=t[n]}return e}function g(e,t){var n=function(e){function n(){(0,a.default)(this,n);for(var r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];var l=(0,o.default)(this,e.call.apply(e,[this].concat(i)));return t.initialize&&t.initialize.apply(l,i),l}return(0,s.default)(n,e),n}(e);return m(n.prototype,t),n}function v(e,t){if(!isFinite(e))return"--:--";e*=1e3;var n=(e=parseInt(e/1e3))%60,r=(e=parseInt(e/60))%60,i=(e=parseInt(e/60))%24,a=parseInt(e/24),o="";return a&&a>0&&(o+=a+":",i<1&&(o+="00:")),(i&&i>0||t)&&(o+=("0"+i).slice(-2)+":"),o+=("0"+r).slice(-2)+":",(o+=("0"+n).slice(-2)).trim()}var y=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,a.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,a.default)(this,e)}return e.parse=function(e){for(var t=void 0,n=/\+/g,r=/([^&=]+)=?([^&]*)/g,i=function(e){return decodeURIComponent(e.replace(n," "))},a={};t=r.exec(e);)a[i(t[1]).toLowerCase()]=i(t[2]);return a},(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,n=_.params[e]||_.hashParams[e]||"",r=n.match(/[0-9]+[hms]+/g)||[];if(r.length>0){var i={h:3600,m:60,s:1};r.forEach((function(e){if(e){var n=e[e.length-1],r=parseInt(e.slice(0,e.length-1),10);t+=r*i[n]}}))}else n&&(t=parseInt(n,10));return t}var E={};function T(e){return E[e]||(E[e]=0),e+ ++E[e]}function w(e){return e-parseFloat(e)+1>=0}function S(){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),C=t.cancelAnimationFrame=(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout).bind(window);function x(){return window.navigator&&window.navigator.language}function R(){return window.performance&&window.performance.now?performance.now():Date.now()}function L(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}function I(e,t){var n=(t=(0,r.default)({inline:!1,muted:!1,timeout:250,type:"video",source:f.default.mp4,element:null},t)).element?t.element:document.createElement(t.type);n.muted=t.muted,!0===t.muted&&n.setAttribute("muted","muted"),!0===t.inline&&n.setAttribute("playsinline","playsinline"),n.src=t.source;var i=n.play(),a=setTimeout((function(){o(!1,new Error("Timeout "+t.timeout+" ms has been reached"))}),t.timeout),o=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;clearTimeout(a),e(t,n)};void 0!==i?i.then((function(){return o(!0)})).catch((function(e){return o(!1,e)})):o(!0)}var P=[],j=t.DomRecycler=function(){function e(){(0,a.default)(this,e)}return e.configure=function(e){this.options=d.default.extend(this.options,e)},e.create=function(e){return this.options.recycleVideo&&"video"===e&&P.length>0?P.shift():(0,d.default)("<"+e+">")},e.garbage=function(e){this.options.recycleVideo&&"VIDEO"===e[0].tagName.toUpperCase()&&(e.children().remove(),P.push(e))},e}();j.options={recycleVideo:!1};var O=t.DoubleEventHandler=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;(0,a.default)(this,e),this.delay=t,this.lastTime=0}return e.prototype.handle=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=(new Date).getTime(),i=r-this.lastTime;i<this.delay&&i>0&&(t(),n&&e.preventDefault()),this.lastTime=r},e}();t.SvgIcons=h.default,t.default={Config:b,Fullscreen:y,QueryString:_,DomRecycler:j,extend:g,formatTime:v,seekStringToSeconds:A,uniqueId:T,currentScriptUrl:S,isNumber:w,requestAnimationFrame:k,cancelAnimationFrame:C,getBrowserLanguage:x,now:R,removeArrayItem:L,canAutoPlayMedia:I,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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDevice=t.getViewportSize=t.getOsData=t.getBrowserData=t.getBrowserInfo=void 0;var r=s(n(/*! babel-runtime/core-js/get-iterator */"./node_modules/babel-runtime/core-js/get-iterator.js")),i=s(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),a=s(n(/*! ./browser_data */"./src/components/browser/browser_data.js")),o=s(n(/*! ./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)||[],n=void 0;if(/trident/i.test(t[1]))return n=/\brv[ :]+(\d+)/g.exec(e)||[],{name:"IE",version:parseInt(n[1]||"")};if("Chrome"===t[1]){if(null!=(n=e.match(/\bOPR\/(\d+)/)))return{name:"Opera",version:parseInt(n[1])};if(null!=(n=e.match(/\bEdge\/(\d+)/)))return{name:"Edge",version:parseInt(n[1])}}else/android/i.test(e)&&(n=e.match(/version\/(\d+)/i))&&(t.splice(1,1,"Android WebView"),t.splice(2,1,n[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(),n=!0,i=!1,o=void 0;try{for(var s,u=(0,r.default)(a.default);!(n=(s=u.next()).done);n=!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,o=e}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return e},d=function(e,t){var n=e.split(".",2);t.fullVersion=e,n[0]&&(t.majorVersion=parseInt(n[0])),n[1]&&(t.minorVersion=parseInt(n[1]))},f=t.getOsData=function(){var e={},t=l.userAgent.toLowerCase(),n=!0,i=!1,a=void 0;try{for(var s,u=(0,r.default)(o.default);!(n=(s=u.next()).done);n=!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,a=e}finally{try{!n&&u.return&&u.return()}finally{if(i)throw a}}return e},h=function(e,t,n){var r="["==t.substr(0,1)?new RegExp(t,"g"):t,i=e.split(r,2);"."!=t&&(e=e.replace(new RegExp(t,"g"),".")),n.fullVersion=e,i&&i[0]&&(n.majorVersion=parseInt(i[0])),i&&i[1]&&(n.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": +/*! no static exports found */function(e,t,n){"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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./browser */"./src/components/browser/browser.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){"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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=h(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=h(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=h(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=h(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=h(n(/*! ../../base/events */"./src/base/events.js")),u=h(n(/*! ../../base/ui_object */"./src/base/ui_object.js")),c=h(n(/*! ../../base/error_mixin */"./src/base/error_mixin.js")),d=n(/*! ../../base/utils */"./src/base/utils.js");n(/*! ./public/style.scss */"./src/components/container/public/style.scss");var f=h(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function h(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(n,r,o){(0,i.default)(this,t);var s=(0,a.default)(this,e.call(this,n));return s._i18n=r,s.currentTime=0,s.volume=100,s.playback=n.playback,s.playerError=o,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,o.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),n=0;n<e;n++)t[n]=arguments[n];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 n=t*(e/100);this.seek(n)}},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,r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./container */"./src/components/container/container.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/components/container/public/style.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(/*! babel-runtime/helpers/typeof */"./node_modules/babel-runtime/helpers/typeof.js")),i=f(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=f(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=f(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=f(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=f(n(/*! ../../base/base_object */"./src/base/base_object.js")),u=f(n(/*! ../../base/events */"./src/base/events.js")),c=f(n(/*! ../../components/container */"./src/components/container/index.js")),d=f(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(n,r,o,s){(0,i.default)(this,t);var l=(0,a.default)(this,e.call(this,n));return l._i18n=o,l.loader=r,l.playerError=s,l}return(0,s.default)(t,e),(0,o.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(n){return n.canPlay(e,t)}))[0]},t.prototype.createContainer=function(e){var t=null,n=this.options.mimeType;"object"===(void 0===e?"undefined":(0,r.default)(e))?(t=e.source.toString(),e.mimeType&&(n=e.mimeType)):t=e.toString(),t.match(/^\/\//)&&(t=window.location.protocol+t);var i=d.default.extend({},this.options,{src:t,mimeType:n}),a=new(this.findPlaybackPlugin(t,n))(i,this._i18n,this.playerError);i=d.default.extend({},i,{playback:a});var o=new c.default(i,this._i18n,this.playerError),s=d.default.Deferred();return s.promise(o),this.addContainerPlugins(o),this.listenToOnce(o,u.default.CONTAINER_READY,(function(){return s.resolve(o)})),o},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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./container_factory */"./src/components/container_factory/container_factory.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=A(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=A(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=A(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=A(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=A(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=n(/*! ../../base/utils */"./src/base/utils.js"),u=A(n(/*! ../../base/styler */"./src/base/styler.js")),c=A(n(/*! ../../base/events */"./src/base/events.js")),d=A(n(/*! ../../base/ui_object */"./src/base/ui_object.js")),f=A(n(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),h=A(n(/*! ../../components/browser */"./src/components/browser/index.js")),p=A(n(/*! ../../components/container_factory */"./src/components/container_factory/index.js")),m=A(n(/*! ../../components/mediator */"./src/components/mediator.js")),g=A(n(/*! ../../components/player_info */"./src/components/player_info.js")),v=A(n(/*! ../../components/error */"./src/components/error/index.js")),y=A(n(/*! ../../base/error_mixin */"./src/base/error_mixin.js")),b=A(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));n(/*! ./public/style.scss */"./src/components/core/public/style.scss");var _=A(n(/*! ./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(n){(0,i.default)(this,t);var r=(0,a.default)(this,e.call(this,n));return r.playerError=new v.default(n,r),r.configureDomRecycler(),r.playerInfo=g.default.getInstance(n.playerId),r.firstResize=!0,r.plugins=[],r.containers=[],r._boundFullscreenHandler=function(){return r.handleFullscreenChange()},(0,b.default)(document).bind("fullscreenchange",r._boundFullscreenHandler),(0,b.default)(document).bind("MSFullscreenChange",r._boundFullscreenHandler),(0,b.default)(document).bind("mozfullscreenchange",r._boundFullscreenHandler),h.default.isMobile&&(0,b.default)(window).bind("resize",(function(e){r.handleWindowResize(e)})),r}return(0,s.default)(t,e),(0,o.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 n=this.containerFactory.createContainer(e,t);return this.setupContainer(n),this.el.appendChild(n.render().el),n},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 n=e.source||e.sources;n&&this.load(n,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,r.default)(T.prototype,y.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./core */"./src/components/core/core.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/components/core/public/Roboto.ttf": /*!***********************************************!*\ !*** ./src/components/core/public/Roboto.ttf ***! \***********************************************/ @@ -1020,47 +713,47 @@ /*!**********************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! ../../../../node_modules/css-loader/lib/url/escape.js */"./node_modules/css-loader/lib/url/escape.js");(e.exports=n(/*! ../../../../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('+r(n(/*! ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/components/core/public/style.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=u(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=u(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=u(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=u(n(/*! ../../base/base_object */"./src/base/base_object.js")),l=u(n(/*! ../core */"./src/components/core/index.js"));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this));return a.player=n,a._options=n.options,a}return(0,o.default)(t,e),(0,a.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 n=new t(e.core);e.core.addPlugin(n),e.setupExternalInterface(n)})),this.core},t.prototype.setupExternalInterface=function(e){var t=e.getExternalInterface();for(var n in t)this.player[n]=t[n].bind(e),this.core[n]=t[n].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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./core_factory */"./src/components/core_factory/core_factory.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=c(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=c(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=c(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=c(n(/*! ../../base/events */"./src/base/events.js")),l=c(n(/*! ../../base/base_object */"./src/base/base_object.js")),u=c(n(/*! ../../plugins/log */"./src/plugins/log/index.js"));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments[1];(0,r.default)(this,t);var o=(0,i.default)(this,e.call(this,n));return o.core=a,o}return(0,o.default)(t,e),(0,a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./error */"./src/components/error/error.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./loader */"./src/components/loader/loader.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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=P(r(/*! babel-runtime/core-js/object/create */"./node_modules/babel-runtime/core-js/object/create.js")),i=P(r(/*! babel-runtime/helpers/toConsumableArray */"./node_modules/babel-runtime/helpers/toConsumableArray.js")),o=P(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=P(r(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=P(r(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=P(r(/*! ../../base/base_object */"./src/base/base_object.js")),u=P(r(/*! ../player_info */"./src/components/player_info.js")),c=P(r(/*! ../../playbacks/html5_video */"./src/playbacks/html5_video/index.js")),d=P(r(/*! ../../playbacks/flash */"./src/playbacks/flash/index.js")),f=P(r(/*! ../../playbacks/html5_audio */"./src/playbacks/html5_audio/index.js")),h=P(r(/*! ../../playbacks/flashls */"./src/playbacks/flashls/index.js")),p=P(r(/*! ../../playbacks/hls */"./src/playbacks/hls/index.js")),m=P(r(/*! ../../playbacks/html_img */"./src/playbacks/html_img/index.js")),g=P(r(/*! ../../playbacks/no_op */"./src/playbacks/no_op/index.js")),y=P(r(/*! ../../plugins/spinner_three_bounce */"./src/plugins/spinner_three_bounce/index.js")),v=P(r(/*! ../../plugins/stats */"./src/plugins/stats/index.js")),b=P(r(/*! ../../plugins/watermark */"./src/plugins/watermark/index.js")),_=P(r(/*! ../../plugins/poster */"./src/plugins/poster/index.js")),A=P(r(/*! ../../plugins/google_analytics */"./src/plugins/google_analytics/index.js")),E=P(r(/*! ../../plugins/click_to_pause */"./src/plugins/click_to_pause/index.js")),T=P(r(/*! ../../plugins/media_control */"./src/plugins/media_control/index.js")),S=P(r(/*! ../../plugins/dvr_controls */"./src/plugins/dvr_controls/index.js")),w=P(r(/*! ../../plugins/closed_captions */"./src/plugins/closed_captions/index.js")),k=P(r(/*! ../../plugins/favicon */"./src/plugins/favicon/index.js")),C=P(r(/*! ../../plugins/seek_time */"./src/plugins/seek_time/index.js")),x=P(r(/*! ../../plugins/sources */"./src/plugins/sources.js")),R=P(r(/*! ../../plugins/end_video */"./src/plugins/end_video.js")),L=P(r(/*! ../../plugins/strings */"./src/plugins/strings.js")),j=P(r(/*! ../../plugins/error_screen */"./src/plugins/error_screen/index.js"));function P(e){return e&&e.__esModule?e:{default:e}}var I=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,o.default)(this,t);var l=(0,a.default)(this,e.call(this));return l.playerId=n,l.playbackPlugins=[],s||(l.playbackPlugins=[].concat((0,i.default)(l.playbackPlugins),[p.default])),l.playbackPlugins=[].concat((0,i.default)(l.playbackPlugins),[c.default,f.default]),s||(l.playbackPlugins=[].concat((0,i.default)(l.playbackPlugins),[d.default,h.default])),l.playbackPlugins=[].concat((0,i.default)(l.playbackPlugins),[m.default,g.default]),l.containerPlugins=[y.default,b.default,_.default,v.default,A.default,E.default],l.corePlugins=[T.default,S.default,w.default,k.default,C.default,x.default,R.default,j.default,L.default],Array.isArray(r)||l.validateExternalPluginsType(r),l.addExternalPlugins(r),l}return(0,s.default)(t,e),t.prototype.groupPluginsByType=function(e){return Array.isArray(e)&&(e=e.reduce((function(e,t){return e[t.type]||(e[t.type]=[]),e[t.type].push(t),e}),{})),e},t.prototype.removeDups=function(e){var t=e.reduceRight((function(e,t){return e[t.prototype.name]&&delete e[t.prototype.name],e[t.prototype.name]=t,e}),(0,n.default)(null)),r=[];for(var i in t)r.unshift(t[i]);return r},t.prototype.addExternalPlugins=function(e){(e=this.groupPluginsByType(e)).playback&&(this.playbackPlugins=this.removeDups(e.playback.concat(this.playbackPlugins))),e.container&&(this.containerPlugins=this.removeDups(e.container.concat(this.containerPlugins))),e.core&&(this.corePlugins=this.removeDups(e.core.concat(this.corePlugins))),u.default.getInstance(this.playerId).playbackPlugins=this.playbackPlugins},t.prototype.validateExternalPluginsType=function(e){["playback","container","core"].forEach((function(t){(e[t]||[]).forEach((function(e){var r="external "+e.type+" plugin on "+t+" array";if(e.type!==t)throw new ReferenceError(r)}))}))},t}(l.default);t.default=I,e.exports=t.default},"./src/components/mediator.js": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=P(n(/*! babel-runtime/core-js/object/create */"./node_modules/babel-runtime/core-js/object/create.js")),i=P(n(/*! babel-runtime/helpers/toConsumableArray */"./node_modules/babel-runtime/helpers/toConsumableArray.js")),a=P(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=P(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=P(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=P(n(/*! ../../base/base_object */"./src/base/base_object.js")),u=P(n(/*! ../player_info */"./src/components/player_info.js")),c=P(n(/*! ../../playbacks/html5_video */"./src/playbacks/html5_video/index.js")),d=P(n(/*! ../../playbacks/flash */"./src/playbacks/flash/index.js")),f=P(n(/*! ../../playbacks/html5_audio */"./src/playbacks/html5_audio/index.js")),h=P(n(/*! ../../playbacks/flashls */"./src/playbacks/flashls/index.js")),p=P(n(/*! ../../playbacks/hls */"./src/playbacks/hls/index.js")),m=P(n(/*! ../../playbacks/html_img */"./src/playbacks/html_img/index.js")),g=P(n(/*! ../../playbacks/no_op */"./src/playbacks/no_op/index.js")),v=P(n(/*! ../../plugins/spinner_three_bounce */"./src/plugins/spinner_three_bounce/index.js")),y=P(n(/*! ../../plugins/stats */"./src/plugins/stats/index.js")),b=P(n(/*! ../../plugins/watermark */"./src/plugins/watermark/index.js")),_=P(n(/*! ../../plugins/poster */"./src/plugins/poster/index.js")),A=P(n(/*! ../../plugins/google_analytics */"./src/plugins/google_analytics/index.js")),E=P(n(/*! ../../plugins/click_to_pause */"./src/plugins/click_to_pause/index.js")),T=P(n(/*! ../../plugins/media_control */"./src/plugins/media_control/index.js")),w=P(n(/*! ../../plugins/dvr_controls */"./src/plugins/dvr_controls/index.js")),S=P(n(/*! ../../plugins/closed_captions */"./src/plugins/closed_captions/index.js")),k=P(n(/*! ../../plugins/favicon */"./src/plugins/favicon/index.js")),C=P(n(/*! ../../plugins/seek_time */"./src/plugins/seek_time/index.js")),x=P(n(/*! ../../plugins/sources */"./src/plugins/sources.js")),R=P(n(/*! ../../plugins/end_video */"./src/plugins/end_video.js")),L=P(n(/*! ../../plugins/strings */"./src/plugins/strings.js")),I=P(n(/*! ../../plugins/error_screen */"./src/plugins/error_screen/index.js"));function P(e){return e&&e.__esModule?e:{default:e}}var j=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,a.default)(this,t);var l=(0,o.default)(this,e.call(this));return l.playerId=r,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=[v.default,b.default,_.default,y.default,A.default,E.default],l.corePlugins=[T.default,w.default,S.default,k.default,C.default,x.default,R.default,I.default,L.default],Array.isArray(n)||l.validateExternalPluginsType(n),l.addExternalPlugins(n),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,r.default)(null)),n=[];for(var i in t)n.unshift(t[i]);return n},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 n="external "+e.type+" plugin on "+t+" array";if(e.type!==t)throw new ReferenceError(n)}))}))},t}(l.default);t.default=j,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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js"));function i(e){return e&&e.__esModule?e:{default:e}}var a=new(i(n(/*! ../base/events */"./src/base/events.js")).default),o=function e(){(0,r.default)(this,e)};t.default=o,o.on=function(e,t,n){a.on(e,t,n)},o.once=function(e,t,n){a.once(e,t,n)},o.off=function(e,t,n){a.off(e,t,n)},o.trigger=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];a.trigger.apply(a,[e].concat(n))},o.stopListening=function(e,t,n){a.stopListening(e,t,n)},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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=y(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=y(n(/*! babel-runtime/core-js/object/keys */"./node_modules/babel-runtime/core-js/object/keys.js")),a=y(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=y(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=y(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),l=y(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),u=n(/*! ../base/utils */"./src/base/utils.js"),c=y(n(/*! ../base/base_object */"./src/base/base_object.js")),d=y(n(/*! ../base/events */"./src/base/events.js")),f=y(n(/*! ./browser */"./src/components/browser/index.js")),h=y(n(/*! ./core_factory */"./src/components/core_factory/index.js")),p=y(n(/*! ./loader */"./src/components/loader/index.js")),m=y(n(/*! ./player_info */"./src/components/player_info.js")),g=y(n(/*! ../base/error_mixin */"./src/base/error_mixin.js")),v=y(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function y(e){return e&&e.__esModule?e:{default:e}}var b=(0,u.currentScriptUrl)().replace(/\/[^/]+$/,""),_=function(e){function t(n){(0,a.default)(this,t);var r=(0,o.default)(this,e.call(this,n)),i={playerId:(0,u.uniqueId)(""),persistConfig:!0,width:640,height:360,baseUrl:b,allowUserInteraction:f.default.isMobile,playback:{recycleVideo:!0}};return r._options=v.default.extend(i,n),r.options.sources=r._normalizeSources(n),r.options.chromeless||(r.options.allowUserInteraction=!0),r.options.allowUserInteraction||(r.options.disableKeyboardShortcuts=!0),r._registerOptionEventListeners(r.options.events),r._coreFactory=new h.default(r),r.playerInfo=m.default.getInstance(r.options.playerId),r.playerInfo.currentSize={width:n.width,height:n.height},r.playerInfo.options=r.options,r.options.parentId?r.setParentId(r.options.parentId):r.options.parent&&r.attachTo(r.options.parent),r}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]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,i.default)(t).length>0;return r&&(0,i.default)(n).forEach((function(t){var r=e.eventsMapping[t];r&&e.off(r,n[t])})),(0,i.default)(t).forEach((function(n){var r=e.eventsMapping[n];if(r){var i=t[n];(i="function"==typeof i&&i)&&e.on(r,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,n){return void 0!==n&&this.configure({autoPlay:!!n}),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,r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js"),a=(r=i)&&r.__esModule?r:{default:r},o=function e(){(0,a.default)(this,e),this.options={},this.playbackPlugins=[],this.currentSize={width:0,height:0}};o._players={},o.getInstance=function(e){return o._players[e]||(o._players[e]=new o)},t.default=o,e.exports=t.default},"./src/icons/01-play.svg": /*!*******************************!*\ !*** ./src/icons/01-play.svg ***! \*******************************/ @@ -1104,15 +797,15 @@ /*!*********************!*\ !*** ./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")),C=B(r(/*! ./playbacks/no_op */"./src/playbacks/no_op/index.js")),x=B(r(/*! ./plugins/media_control */"./src/plugins/media_control/index.js")),R=B(r(/*! ./plugins/click_to_pause */"./src/plugins/click_to_pause/index.js")),L=B(r(/*! ./plugins/dvr_controls */"./src/plugins/dvr_controls/index.js")),j=B(r(/*! ./plugins/favicon */"./src/plugins/favicon/index.js")),P=B(r(/*! ./plugins/log */"./src/plugins/log/index.js")),I=B(r(/*! ./plugins/poster */"./src/plugins/poster/index.js")),O=B(r(/*! ./plugins/spinner_three_bounce */"./src/plugins/spinner_three_bounce/index.js")),D=B(r(/*! ./plugins/watermark */"./src/plugins/watermark/index.js")),M=B(r(/*! ./base/styler */"./src/base/styler.js")),N=B(r(/*! ./vendor */"./src/vendor/index.js")),F=B(r(/*! ./base/template */"./src/base/template.js")),U=B(r(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function B(e){return e&&e.__esModule?e:{default:e}}t.default={Player:n.default,Mediator:v.default,Events:o.default,Browser:h.default,PlayerInfo:b.default,MediaControl:x.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:C.default,ClickToPausePlugin:R.default,DVRControls:L.default,Favicon:j.default,Log:P.default,Poster:I.default,SpinnerThreeBouncePlugin:O.default,WaterMarkPlugin:D.default,Styler:M.default,Vendor:N.default,version:"0.3.12",template:F.default,$:U.default},e.exports=t.default},"./src/playbacks/base_flash_playback/base_flash_playback.js": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=B(n(/*! ./components/player */"./src/components/player.js")),i=B(n(/*! ./base/utils */"./src/base/utils.js")),a=B(n(/*! ./base/events */"./src/base/events.js")),o=B(n(/*! ./base/playback */"./src/base/playback.js")),s=B(n(/*! ./base/container_plugin */"./src/base/container_plugin.js")),l=B(n(/*! ./base/core_plugin */"./src/base/core_plugin.js")),u=B(n(/*! ./base/ui_core_plugin */"./src/base/ui_core_plugin.js")),c=B(n(/*! ./base/ui_container_plugin */"./src/base/ui_container_plugin.js")),d=B(n(/*! ./base/base_object */"./src/base/base_object.js")),f=B(n(/*! ./base/ui_object */"./src/base/ui_object.js")),h=B(n(/*! ./components/browser */"./src/components/browser/index.js")),p=B(n(/*! ./components/container */"./src/components/container/index.js")),m=B(n(/*! ./components/core */"./src/components/core/index.js")),g=B(n(/*! ./components/error */"./src/components/error/index.js")),v=B(n(/*! ./components/loader */"./src/components/loader/index.js")),y=B(n(/*! ./components/mediator */"./src/components/mediator.js")),b=B(n(/*! ./components/player_info */"./src/components/player_info.js")),_=B(n(/*! ./playbacks/base_flash_playback */"./src/playbacks/base_flash_playback/index.js")),A=B(n(/*! ./playbacks/flash */"./src/playbacks/flash/index.js")),E=B(n(/*! ./playbacks/flashls */"./src/playbacks/flashls/index.js")),T=B(n(/*! ./playbacks/hls */"./src/playbacks/hls/index.js")),w=B(n(/*! ./playbacks/html5_audio */"./src/playbacks/html5_audio/index.js")),S=B(n(/*! ./playbacks/html5_video */"./src/playbacks/html5_video/index.js")),k=B(n(/*! ./playbacks/html_img */"./src/playbacks/html_img/index.js")),C=B(n(/*! ./playbacks/no_op */"./src/playbacks/no_op/index.js")),x=B(n(/*! ./plugins/media_control */"./src/plugins/media_control/index.js")),R=B(n(/*! ./plugins/click_to_pause */"./src/plugins/click_to_pause/index.js")),L=B(n(/*! ./plugins/dvr_controls */"./src/plugins/dvr_controls/index.js")),I=B(n(/*! ./plugins/favicon */"./src/plugins/favicon/index.js")),P=B(n(/*! ./plugins/log */"./src/plugins/log/index.js")),j=B(n(/*! ./plugins/poster */"./src/plugins/poster/index.js")),O=B(n(/*! ./plugins/spinner_three_bounce */"./src/plugins/spinner_three_bounce/index.js")),D=B(n(/*! ./plugins/watermark */"./src/plugins/watermark/index.js")),M=B(n(/*! ./base/styler */"./src/base/styler.js")),N=B(n(/*! ./vendor */"./src/vendor/index.js")),U=B(n(/*! ./base/template */"./src/base/template.js")),F=B(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function B(e){return e&&e.__esModule?e:{default:e}}t.default={Player:r.default,Mediator:y.default,Events:a.default,Browser:h.default,PlayerInfo:b.default,MediaControl:x.default,ContainerPlugin:s.default,UIContainerPlugin:c.default,CorePlugin:l.default,UICorePlugin:u.default,Playback:o.default,Container:p.default,Core:m.default,PlayerError:g.default,Loader:v.default,BaseObject:d.default,UIObject:f.default,Utils:i.default,BaseFlashPlayback:_.default,Flash:A.default,FlasHLS:E.default,HLS:T.default,HTML5Audio:w.default,HTML5Video:S.default,HTMLImg:k.default,NoOp:C.default,ClickToPausePlugin:R.default,DVRControls:L.default,Favicon:I.default,Log:P.default,Poster:j.default,SpinnerThreeBouncePlugin:O.default,WaterMarkPlugin:D.default,Styler:M.default,Vendor:N.default,version:"0.3.13",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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=d(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=d(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=d(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=d(n(/*! ../../base/playback */"./src/base/playback.js")),l=d(n(/*! ../../base/template */"./src/base/template.js")),u=d(n(/*! ../../components/browser */"./src/components/browser/index.js")),c=d(n(/*! ./public/flash.html */"./src/playbacks/base_flash_playback/public/flash.html"));function d(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/flash.scss */"./src/playbacks/base_flash_playback/public/flash.scss");var f=function(e){function t(){return(0,r.default)(this,t),(0,a.default)(this,e.apply(this,arguments))}return(0,o.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=n(/*! ./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 ***! \*************************************************************/ @@ -1120,15 +813,15 @@ /*!*************************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/base_flash_playback/public/flash.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=g(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=g(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=g(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=g(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=n(/*! ../../base/utils */"./src/base/utils.js"),l=g(n(/*! ../../playbacks/base_flash_playback */"./src/playbacks/base_flash_playback/index.js")),u=g(n(/*! ../../components/browser */"./src/components/browser/index.js")),c=g(n(/*! ../../components/mediator */"./src/components/mediator.js")),d=g(n(/*! ../../base/template */"./src/base/template.js")),f=g(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),h=g(n(/*! ../../base/events */"./src/base/events.js")),p=g(n(/*! ../../base/playback */"./src/base/playback.js")),m=g(n(/*! ./public/Player.swf */"./src/playbacks/flash/public/Player.swf"));function g(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(){(0,r.default)(this,t);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];var s=(0,i.default)(this,e.call.apply(e,[this].concat(a)));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,o.default)(t,e),(0,a.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 n=this.el.getDuration()*(e/100);this.seek(n)}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,a.default)(t,[{key:"isReady",get:function(){return this._isReadyState}}]),t}(l.default);t.default=v,v.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./flash */"./src/playbacks/flash/flash.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/playbacks/flash/public/Player.swf": /*!***********************************************!*\ !*** ./src/playbacks/flash/public/Player.swf ***! \***********************************************/ @@ -1136,15 +829,15 @@ /*!******************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=v(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=v(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=v(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=v(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=v(n(/*! ../../playbacks/base_flash_playback */"./src/playbacks/base_flash_playback/index.js")),l=v(n(/*! ../../base/events */"./src/base/events.js")),u=v(n(/*! ../../base/template */"./src/base/template.js")),c=v(n(/*! ../../base/playback */"./src/base/playback.js")),d=v(n(/*! ../../components/mediator */"./src/components/mediator.js")),f=v(n(/*! ../../components/browser */"./src/components/browser/index.js")),h=v(n(/*! ../../components/error */"./src/components/error/index.js")),p=v(n(/*! ./flashls_events */"./src/playbacks/flashls/flashls_events.js")),m=v(n(/*! ./public/HLSPlayer.swf */"./src/playbacks/flashls/public/HLSPlayer.swf")),g=v(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function v(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(){(0,r.default)(this,t);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];var s=(0,i.default)(this,e.call.apply(e,[this].concat(a)));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,o.default)(t,e),(0,a.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,n,r){return e._flashPlaybackError(t,n,r)})),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),n=Math.min(Math.max(e.position,0),t),r=this._dvrEnabled,i=this._playbackType===c.default.LIVE;this._dvrEnabled=i&&t>this._hlsMinimumDvrSize,100!==t&&void 0!==i&&(this._dvrEnabled!==r&&(this._updateSettings(),this.trigger(l.default.PLAYBACK_SETTINGSUPDATE,this.name)),i&&!this._dvrEnabled&&(n=t),this.trigger(l.default.PLAYBACK_TIMEUPDATE,{current:n,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,n){return e._manifestLoaded(t,n)})),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(),n=0;e>0&&(n=t*e/100),this.seek(n)},t.prototype.seek=function(e){var t=this.getDuration();if(this._playbackType===c.default.LIVE){var n=t-e>3;this._updateDvr(n)}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,n){var r={code:e,description:n,level:h.default.Levels.FATAL,raw:{code:e,url:t,message:n}},i=this.createError(r);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 n=0;n<t;n++)this._levels.push({id:n,label:e[n].height+"p",level:e[n]});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,n){e.flashlsEvents[t].apply(e.flashlsEvents,n)}},t.prototype.render=function(){return e.prototype.render.call(this),this._createCallbacks(),this},(0,a.default)(t,[{key:"isReady",get:function(){return this._isReadyState}},{key:"dvrEnabled",get:function(){return!!this._dvrEnabled}}]),t}(s.default);t.default=y,y.canPlay=function(e,t){var n=e.split("?")[0].match(/.*\.(.*)$/)||[];return f.default.hasFlash&&(n.length>1&&"m3u8"===n[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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=a(n(/*! ../../components/mediator */"./src/components/mediator.js"));function a(e){return e&&e.__esModule?e:{default:e}}var o=function(){function e(t){(0,r.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,n){i.default.trigger(this.instanceId+":error",e,t,n)},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=o,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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./flashls */"./src/playbacks/flashls/flashls.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/playbacks/flashls/public/HLSPlayer.swf": /*!****************************************************!*\ !*** ./src/playbacks/flashls/public/HLSPlayer.swf ***! \****************************************************/ @@ -1152,31 +845,31 @@ /*!**********************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=v(n(/*! babel-runtime/helpers/toConsumableArray */"./node_modules/babel-runtime/helpers/toConsumableArray.js")),i=v(n(/*! babel-runtime/core-js/json/stringify */"./node_modules/babel-runtime/core-js/json/stringify.js")),a=v(n(/*! babel-runtime/helpers/extends */"./node_modules/babel-runtime/helpers/extends.js")),o=v(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),s=v(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),l=v(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),u=v(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),c=v(n(/*! ../../playbacks/html5_video */"./src/playbacks/html5_video/index.js")),d=v(n(/*! hls.js */"./node_modules/hls.js/dist/hls.js")),f=v(n(/*! ../../base/events */"./src/base/events.js")),h=v(n(/*! ../../base/playback */"./src/base/playback.js")),p=n(/*! ../../base/utils */"./src/base/utils.js"),m=v(n(/*! ../../plugins/log */"./src/plugins/log/index.js")),g=v(n(/*! ../../components/error */"./src/components/error/index.js"));function v(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(){(0,o.default)(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var l=(0,s.default)(this,e.call.apply(e,[this].concat(r)));return l.options.playback=(0,a.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,n=(e.remote+t)/1e3;return Math.min(n,this._playableRegionStartTime+this._extrapolatedWindowDuration)}},{key:"_extrapolatedEndTime",get:function(){var e=this._playableRegionStartTime+this._playableRegionDuration;if(!this._localEndTimeCorrelation)return e;var t=this._localEndTimeCorrelation,n=this._now-t.local,r=(t.remote+n)/1e3;return Math.max(e-this._extrapolatedWindowDuration,Math.min(r,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,n){return e._updatePlaybackType(t,n)})),this._hls.on(d.default.Events.LEVEL_UPDATED,(function(t,n){return e._onLevelUpdated(t,n)})),this._hls.on(d.default.Events.LEVEL_SWITCHING,(function(t,n){return e._onLevelSwitch(t,n)})),this._hls.on(d.default.Events.FRAG_LOADED,(function(t,n){return e._onFragmentLoaded(t,n)})),this._hls.on(d.default.Events.ERROR,(function(t,n){return e._onHLSJSError(t,n)})),this._hls.on(d.default.Events.SUBTITLE_TRACK_LOADED,(function(t,n){return e._onSubtitleLoaded(t,n)})),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,n){if(this._recoveredDecodingError)if(this._recoveredAudioCodecError){m.default.error("hlsjs: failed to recover",{evt:e,data:t}),n.level=g.default.Levels.FATAL;var r=this.createError(n);this.trigger(f.default.PLAYBACK_ERROR,r),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 n={code:t.type+"_"+t.details,description:this.name+" error: type: "+t.type+", details: "+t.details,raw:t},r=void 0;if(t.response&&(n.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}),r=this.createError(n),this.trigger(f.default.PLAYBACK_ERROR,r),this.stop();break;default:m.default.warn("hlsjs: trying to recover from network error.",{evt:e,data:t}),n.level=g.default.Levels.WARN,this.createError(n),this._hls.startLoad()}break;case d.default.ErrorTypes.MEDIA_ERROR:m.default.warn("hlsjs: trying to recover from media error.",{evt:e,data:t}),n.level=g.default.Levels.WARN,this.createError(n),this._recover(e,t,n);break;default:m.default.error("hlsjs: could not recover from error.",{evt:e,data:t}),r=this.createError(n),this.trigger(f.default.PLAYBACK_ERROR,r),this.stop()}else m.default.error("hlsjs: could not recover from error after maximum number of attempts.",{evt:e,data:t}),r=this.createError(n),this.trigger(f.default.PLAYBACK_ERROR,r),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}),r=this.createError(n),this.trigger(f.default.PLAYBACK_ERROR,r),void this.stop();n.level=g.default.Levels.WARN,this.createError(n),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,n=0;n<this.el.buffered.length;n++)e=[].concat((0,r.default)(e),[{start:Math.max(0,this.el.buffered.start(n)-this._playableRegionStartTime),end:Math.max(0,this.el.buffered.end(n)-this._playableRegionStartTime)}]),this.el.currentTime>=e[n].start&&this.el.currentTime<=e[n].end&&(t=n);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 n=!1,r=!1,i=t.details.fragments,a=this._playableRegionStartTime,o=this._playableRegionDuration;if(0!==i.length){if(i[0].rawProgramDateTime&&(this._programDateTime=i[0].rawProgramDateTime),this._playableRegionStartTime!==i[0].start&&(n=!0,this._playableRegionStartTime=i[0].start),n)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>a+this._extrapolatedWindowDuration&&(this._localStartTimeCorrelation={local:this._now,remote:1e3*Math.max(i[0].start,a+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&&(r=!0,this._playableRegionDuration=c);var p=i[0].start+c,m=a+o;if(p!==m)if(this._localEndTimeCorrelation){var g=this._localEndTimeCorrelation,v=this._now-g.local,y=(g.remote+v)/1e3;y>p?this._localEndTimeCorrelation={local:this._now,remote:1e3*p}:y<p-this._extrapolatedWindowDuration?this._localEndTimeCorrelation={local:this._now,remote:1e3*(p-this._extrapolatedWindowDuration)}:y>m&&(this._localEndTimeCorrelation={local:this._now,remote:1e3*m})}else this._localEndTimeCorrelation={local:this._now,remote:1e3*p};r&&this._onDurationChange(),n&&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 n=this._hls.levels[t.level];n&&(this.highDefinition=n.height>=720||n.bitrate/1e3>=2e3,this.trigger(f.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(f.default.PLAYBACK_BITRATE,{height:n.height,width:n.width,bandwidth:n.bitrate,bitrate:n.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=y,y.canPlay=function(e,t){var n=e.split("?")[0].match(/.*\.(.*)$/)||[],r=n.length>1&&"m3u8"===n[1].toLowerCase()||(0,p.listContainsIgnoreCase)(t,["application/vnd.apple.mpegurl","application/x-mpegURL"]);return!(!d.default.isSupported()||!r)},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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./hls */"./src/playbacks/hls/hls.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=c(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=c(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=c(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=c(n(/*! ../../base/events */"./src/base/events.js")),l=c(n(/*! ../../base/playback */"./src/base/playback.js")),u=c(n(/*! ../../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,r.default)(this,t),(0,a.default)(this,e.apply(this,arguments))}return(0,o.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./html5_audio */"./src/playbacks/html5_audio/html5_audio.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){"use strict";(function(r){Object.defineProperty(t,"__esModule",{value:!0});var i=_(n(/*! babel-runtime/core-js/array/from */"./node_modules/babel-runtime/core-js/array/from.js")),a=_(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=_(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=_(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),l=_(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),u=_(n(/*! babel-runtime/helpers/toConsumableArray */"./node_modules/babel-runtime/helpers/toConsumableArray.js")),c=_(n(/*! babel-runtime/core-js/object/keys */"./node_modules/babel-runtime/core-js/object/keys.js")),d=n(/*! ../../base/utils */"./src/base/utils.js"),f=_(n(/*! ../../base/playback */"./src/base/playback.js")),h=_(n(/*! ../../components/browser */"./src/components/browser/index.js")),p=_(n(/*! ../../components/error */"./src/components/error/index.js")),m=_(n(/*! ../../base/events */"./src/base/events.js")),g=_(n(/*! ../../plugins/log */"./src/plugins/log/index.js")),v=_(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),y=_(n(/*! ../../base/template */"./src/base/template.js")),b=_(n(/*! ./public/tracks.html */"./src/playbacks/html5_video/public/tracks.html"));function _(e){return e&&e.__esModule?e:{default:e}}n(/*! ./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]))}),[]),w={code:"unknown",message:"unknown"},S=function(e){function t(){(0,a.default)(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var s=(0,o.default)(this,e.call.apply(e,[this].concat(r)));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)),v.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,n=t._mimeTypesForUrl(e,E,this.options.mimeType);return this.options.playback&&this.options.playback.audioOnly||this.options.audioOnly||T.indexOf(n[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,n){n&&g.default.warn(e.name,"autoplay error.",{result:t,error:n}),t&&r.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||w,t=e.code,n=e.message,r=t===w.code,i=this.createError({code:t,description:n,raw:this.el.error,level:r?p.default.Levels.WARN:p.default.Levels.FATAL});r?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,n=0;n<this.el.buffered.length;n++)e=[].concat((0,u.default)(e),[{start:this.el.buffered.start(n),end:this.el.buffered.end(n)}]),this.el.currentTime>=e[n].start&&this.el.currentTime<=e[n].end&&(t=n);var r={start:e[t].start,current:e[t].end,total:this.el.duration};this.trigger(m.default.PLAYBACK_PROGRESS,r,e)}},t.prototype._typeFor=function(e){var n=t._mimeTypesForUrl(e,A,this.options.mimeType);return 0===n.length&&(n=t._mimeTypesForUrl(e,E,this.options.mimeType)),(n[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,n=void 0;if(-1!==e){if(!(n=t.find((function(t){return t.id===e}))))return;if("showing"===n.track.mode)return}t.filter((function(e){return"hidden"!==e.track.mode})).forEach((function(e){return e.track.mode="hidden"})),n&&(n.track.mode="showing"),this._ccTrackId=e,this.trigger(m.default.PLAYBACK_SUBTITLE_CHANGED,{id:e})}}},{key:"template",get:function(){return(0,y.default)(b.default)}}]),t}(f.default);t.default=S,S._mimeTypesForUrl=function(e,t,n){var r=(e.split("?")[0].match(/.*\.(.*)$/)||[])[1],i=n||r&&t[r.toLowerCase()]||[];return i.constructor===Array?i:[i]},S._canPlay=function(e,t,n,r){var i=S._mimeTypesForUrl(n,t,r),a=document.createElement(e);return!!i.filter((function(e){return!!a.canPlayType(e).replace(/no/,"")}))[0]},S.canPlay=function(e,t){return S._canPlay("audio",E,e,t)||S._canPlay("video",A,e,t)},e.exports=t.default}).call(this,n(/*! ./../../../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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./html5_video */"./src/playbacks/html5_video/html5_video.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/html5_video/public/style.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.locals)},"./src/playbacks/html5_video/public/tracks.html": /*!******************************************************!*\ !*** ./src/playbacks/html5_video/public/tracks.html ***! \******************************************************/ @@ -1184,23 +877,23 @@ /*!********************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=u(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=u(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=u(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=u(n(/*! ../../base/playback */"./src/base/playback.js")),l=u(n(/*! ../../base/events */"./src/base/events.js"));function u(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/style.scss */"./src/playbacks/html_img/public/style.scss");var c=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a.el.src=n.src,a}return(0,o.default)(t,e),t.prototype.getPlaybackType=function(){return s.default.NO_OP},(0,a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./html_img */"./src/playbacks/html_img/html_img.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/html_img/public/style.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./no_op */"./src/playbacks/no_op/no_op.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=f(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=f(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=f(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=n(/*! ../../base/utils */"./src/base/utils.js"),l=f(n(/*! ../../base/playback */"./src/base/playback.js")),u=f(n(/*! ../../base/template */"./src/base/template.js")),c=f(n(/*! ../../base/events */"./src/base/events.js")),d=f(n(/*! ./public/error.html */"./src/playbacks/no_op/public/error.html"));function f(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/style.scss */"./src/playbacks/no_op/public/style.scss");var h=function(e){function t(){(0,r.default)(this,t);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];var s=(0,i.default)(this,e.call.apply(e,[this].concat(a)));return s._noiseFrameNum=-1,s}return(0,o.default)(t,e),(0,a.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 n=e.data,r=0;r<n.length;r++)t[r]=n[r]}for(var i=t.length,a=6*Math.random()+4,o=0,s=0,l=0;l<i;)o<0&&(o=a*Math.random(),s=255*Math.pow(Math.random(),.4)<<24),o-=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 ***! \***********************************************/ @@ -1208,23 +901,23 @@ /*!***********************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/no_op/public/style.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=c(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=c(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=c(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=c(n(/*! ../../base/container_plugin */"./src/base/container_plugin.js")),l=c(n(/*! ../../base/events */"./src/base/events.js")),u=c(n(/*! ../../base/playback */"./src/base/playback.js"));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(n){return(0,r.default)(this,t),(0,i.default)(this,e.call(this,n))}return(0,o.default)(t,e),(0,a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./click_to_pause */"./src/plugins/click_to_pause/click_to_pause.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=f(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=f(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=f(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=f(n(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),l=f(n(/*! ../../base/template */"./src/base/template.js")),u=f(n(/*! ../../base/events */"./src/base/events.js")),c=n(/*! ../../base/utils */"./src/base/utils.js"),d=f(n(/*! ./public/closed_captions.html */"./src/plugins/closed_captions/public/closed_captions.html"));function f(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/closed_captions.scss */"./src/plugins/closed_captions/public/closed_captions.scss");var h=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n)),o=n.options.closedCaptionsConfig;return a._title=o&&o.title?o.title:null,a._ariaLabel=o&&o.ariaLabel?o.ariaLabel:"cc-button",a._labelCb=o&&o.labelCallback&&"function"==typeof o.labelCallback?o.labelCallback:function(e){return e.name},a}return(0,o.default)(t,e),(0,a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./closed_captions */"./src/plugins/closed_captions/closed_captions.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/closed_captions/public/closed_captions.html": /*!*****************************************************************!*\ !*** ./src/plugins/closed_captions/public/closed_captions.html ***! \*****************************************************************/ @@ -1232,19 +925,19 @@ /*!*****************************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/closed_captions/public/closed_captions.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=f(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=f(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=f(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=f(n(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),l=f(n(/*! ../../base/template */"./src/base/template.js")),u=f(n(/*! ../../base/playback */"./src/base/playback.js")),c=f(n(/*! ../../base/events */"./src/base/events.js")),d=f(n(/*! ./public/index.html */"./src/plugins/dvr_controls/public/index.html"));function f(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/dvr_controls.scss */"./src/plugins/dvr_controls/public/dvr_controls.scss");var h=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a.settingsUpdate(),a}return(0,o.default)(t,e),(0,a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./dvr_controls */"./src/plugins/dvr_controls/dvr_controls.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/dvr_controls/public/dvr_controls.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.locals)},"./src/plugins/dvr_controls/public/index.html": /*!****************************************************!*\ !*** ./src/plugins/dvr_controls/public/index.html ***! \****************************************************/ @@ -1252,15 +945,15 @@ /*!**********************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=l(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=l(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=l(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=l(n(/*! ../base/events */"./src/base/events.js"));function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(){return(0,r.default)(this,t),(0,a.default)(this,e.apply(this,arguments))}return(0,o.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(n(/*! ../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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=h(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=h(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=h(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=h(n(/*! ../../base/events */"./src/base/events.js")),l=h(n(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),u=h(n(/*! ../../base/template */"./src/base/template.js")),c=h(n(/*! ../../components/error/ */"./src/components/error/index.js")),d=n(/*! ../../base/utils */"./src/base/utils.js"),f=h(n(/*! ./public/error_screen.html */"./src/plugins/error_screen/public/error_screen.html"));function h(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/error_screen.scss */"./src/plugins/error_screen/public/error_screen.scss");var p=function(e){function t(n){var a;(0,r.default)(this,t);var o=(0,i.default)(this,e.call(this,n));return o.options.disableErrorScreen?(a=o.disable(),(0,i.default)(o,a)):o}return(0,o.default)(t,e),(0,a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./error_screen */"./src/plugins/error_screen/error_screen.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/error_screen/public/error_screen.html": /*!***********************************************************!*\ !*** ./src/plugins/error_screen/public/error_screen.html ***! \***********************************************************/ @@ -1268,39 +961,39 @@ /*!***********************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/error_screen/public/error_screen.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=d(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=d(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=d(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=d(n(/*! ../../base/core_plugin */"./src/base/core_plugin.js")),l=d(n(/*! ../../base/events */"./src/base/events.js")),u=d(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),c=n(/*! ../../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(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a._container=null,a.configure(),a}return(0,o.default)(t,e),(0,a.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 n=t[0].getContext("2d");n.fillStyle="#000";var r=(0,u.default)(e).find("path").attr("d"),i=new Path2D(r);n.fill(i);var a=(0,u.default)('<link rel="shortcut icon" type="image/png"/>');return a.attr("href",t[0].toDataURL("image/png")),a},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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./favicon.js */"./src/plugins/favicon/favicon.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=u(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=u(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=u(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=u(n(/*! ../../base/container_plugin */"./src/base/container_plugin.js")),l=u(n(/*! ../../base/events */"./src/base/events.js"));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a.container.options.gaAccount&&(a.account=a.container.options.gaAccount,a.trackerName=a.container.options.gaTrackerName?a.container.options.gaTrackerName+".":"Clappr.",a.domainName=a.container.options.gaDomainName,a.currentHDState=void 0,a.embedScript()),a}return(0,o.default)(t,e),(0,a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./google_analytics */"./src/plugins/google_analytics/google_analytics.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./log */"./src/plugins/log/log.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js"),a=(r=i)&&r.__esModule?r:{default:r},o=n(/*! ../../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,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;(0,a.default)(this,e),this.kibo=new o.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=n,this.offLevel=r}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,n){if(!(this.BLACKLIST.indexOf(n[0])>=0||t<this.level)){n||(n=e,e=null);var r=c[t],i="";e&&(i="["+e+"]"),window.console&&window.console.log&&window.console.log.apply(console,["%c["+d[t]+"]"+i,r].concat(n))}},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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./media_control */"./src/plugins/media_control/media_control.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){"use strict";(function(r){Object.defineProperty(t,"__esModule",{value:!0});var i=b(n(/*! babel-runtime/core-js/json/stringify */"./node_modules/babel-runtime/core-js/json/stringify.js")),a=b(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=b(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=b(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),l=b(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),u=n(/*! ../../base/utils */"./src/base/utils.js"),c=n(/*! ../../vendor */"./src/vendor/index.js"),d=b(n(/*! ../../base/events */"./src/base/events.js")),f=b(n(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),h=b(n(/*! ../../components/browser */"./src/components/browser/index.js")),p=b(n(/*! ../../components/mediator */"./src/components/mediator.js")),m=b(n(/*! ../../base/template */"./src/base/template.js")),g=b(n(/*! ../../base/playback */"./src/base/playback.js")),v=b(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));n(/*! ./public/media-control.scss */"./src/plugins/media_control/public/media-control.scss");var y=b(n(/*! ./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(n){(0,a.default)(this,t);var r=(0,o.default)(this,e.call(this,n));return r.persistConfig=r.options.persistConfig,r.currentPositionValue=null,r.currentDurationValue=null,r.keepVisible=!1,r.fullScreenOnVideoTagSupported=null,r.setInitialVolume(),r.settings={left:["play","stop","pause"],right:["volume"],default:["position","seekbar","duration"]},r.kibo=new c.Kibo(r.options.focusElement),r.bindKeyEvents(),r.container?v.default.isEmptyObject(r.container.settings)||(r.settings=v.default.extend({},r.container.settings)):r.settings={},r.userDisabled=!1,(r.container&&r.container.mediaControlDisabled||r.options.chromeless)&&r.disable(),r.stopDragHandler=function(e){return r.stopDrag(e)},r.updateDragHandler=function(e){return r.updateDrag(e)},(0,v.default)(document).bind("mouseup",r.stopDragHandler),(0,v.default)(document).bind("mousemove",r.updateDragHandler),r}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)(y.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(),n=(e-t)/2,r=t*this.volume/100+n;this.$volumeBarFill.css({width:this.volume+"%"}),this.$volumeBarScrubber.css({left:r}),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,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=Math.min(100,Math.max(e,0)),this.intendedVolume=e,this.persistConfig&&!n&&u.Config.persist("volume",e);var r=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?r():this.listenToOnce(this,d.default.MEDIACONTROL_CONTAINERCHANGED,(function(){return r()}))},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,n=e.current/e.total*100;this.$seekBarLoaded.css({left:t+"%",width:n-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 n=e&&e.clientX!==this.lastMouseX&&e.clientY!==this.lastMouseY;(!e||n||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 n=t||2e3;if(clearTimeout(this.hideId),this.disabled||!1!==this.options.hideMediaControl){var r=this.userKeepVisible||this.keepVisible,i=this.draggingSeekBar||this.draggingVolumeBar;if(!this.disabled&&(t||r||i))this.hideId=setTimeout((function(){return e.hide()}),n);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 a=!1;this.updateCursorStyle(a)}}}},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 v.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(),n=this.container.getDuration(),r=Math.min(Math.max(t+e,0),n);r=Math.min(100*r/n,100),this.container.seekPercentage(r)}},t.prototype.bindKeyAndShow=function(e,t){var n=this;this.kibo.down(e,(function(){return n.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,v.default)(e).find("svg path").css("fill",this.buttonsColor)},t.prototype.destroy=function(){(0,v.default)(document).unbind("mouseup",this.stopDragHandler),(0,v.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 n=0;return this.displayedSeekBarPercentage&&(n=this.displayedSeekBarPercentage),this.displayedSeekBarPercentage=null,this.setSeekPercentage(n),r.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,n(/*! ./../../../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 ***! \**********************************************************/ @@ -1312,15 +1005,15 @@ /*!*************************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/media_control/public/media-control.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./poster */"./src/plugins/poster/poster.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){"use strict";(function(r){Object.defineProperty(t,"__esModule",{value:!0});var i=m(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=m(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=m(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=m(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=m(n(/*! ../../base/ui_container_plugin */"./src/base/ui_container_plugin.js")),u=m(n(/*! ../../base/events */"./src/base/events.js")),c=m(n(/*! ../../base/template */"./src/base/template.js")),d=m(n(/*! ../../base/playback */"./src/base/playback.js")),f=m(n(/*! ../../components/error/error */"./src/components/error/error.js")),h=m(n(/*! ./public/poster.html */"./src/plugins/poster/public/poster.html")),p=n(/*! ../../base/utils */"./src/base/utils.js");function m(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/poster.scss */"./src/plugins/poster/public/poster.scss");var g=function(e){function t(n){(0,i.default)(this,t);var o=(0,a.default)(this,e.call(this,n));return o.hasStartedPlaying=!1,o.playRequested=!1,o.render(),r.nextTick((function(){return o.update()})),o}return(0,s.default)(t,e),(0,o.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,n(/*! ./../../../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 ***! \***********************************************/ @@ -1328,11 +1021,11 @@ /*!***********************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/poster/public/poster.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./seek_time */"./src/plugins/seek_time/seek_time.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/seek_time/public/seek_time.html": /*!*****************************************************!*\ !*** ./src/plugins/seek_time/public/seek_time.html ***! \*****************************************************/ @@ -1340,19 +1033,19 @@ /*!*****************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/seek_time/public/seek_time.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=h(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=h(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=h(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=n(/*! ../../base/utils */"./src/base/utils.js"),l=h(n(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),u=h(n(/*! ../../base/template */"./src/base/template.js")),c=h(n(/*! ../../base/events */"./src/base/events.js")),d=h(n(/*! ../../base/playback */"./src/base/playback.js")),f=h(n(/*! ./public/seek_time.html */"./src/plugins/seek_time/public/seek_time.html"));function h(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/seek_time.scss */"./src/plugins/seek_time/public/seek_time.scss");var p=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a.hoveringOverSeekBar=!1,a.hoverPosition=null,a.duration=null,a.firstFragDateTime=null,a.actualLiveTime=!!a.mediaControl.options.actualLiveTime,a.actualLiveTime&&(a.mediaControl.options.actualLiveServerTime?a.actualLiveServerTimeDiff=(new Date).getTime()-new Date(a.mediaControl.options.actualLiveServerTime).getTime():a.actualLiveServerTimeDiff=0),a}return(0,o.default)(t,e),(0,a.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,n=void 0,r=void 0;return this.useActualLiveTime?(this.firstFragDateTime?(r=new Date(this.firstFragDateTime),(n=new Date(this.firstFragDateTime)).setHours(0,0,0,0),t=(r.getTime()-n.getTime())/1e3+this.duration):(n=new Date((new Date).getTime()-this.actualLiveServerTimeDiff),t=((r=new Date(n))-n.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 n=(0,s.formatTime)(this.actualLiveTime?e.secondsSinceMidnight:this.duration,this.actualLiveTime);n!==this.displayedDuration&&(this.$durationEl.text(n),this.displayedDuration=n)}else this.$durationEl.hide();this.$el.show();var r=this.mediaControl.$seekBarContainer.width(),i=this.$el.width(),a=this.hoverPosition*r;a-=i/2,a=Math.max(0,Math.min(a,r-i)),this.$el.css("left",a)}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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=u(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=u(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=u(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=u(n(/*! ../base/core_plugin */"./src/base/core_plugin.js")),l=u(n(/*! ../base/events */"./src/base/events.js"));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,r.default)(this,t),(0,a.default)(this,e.apply(this,arguments))}return(0,o.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./spinner_three_bounce */"./src/plugins/spinner_three_bounce/spinner_three_bounce.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/spinner_three_bounce/public/spinner.html": /*!**************************************************************!*\ !*** ./src/plugins/spinner_three_bounce/public/spinner.html ***! \**************************************************************/ @@ -1360,27 +1053,27 @@ /*!**************************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/spinner_three_bounce/public/spinner.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=d(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=d(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=d(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=d(n(/*! ../../base/ui_container_plugin */"./src/base/ui_container_plugin.js")),l=d(n(/*! ../../base/events */"./src/base/events.js")),u=d(n(/*! ../../base/template */"./src/base/template.js")),c=d(n(/*! ./public/spinner.html */"./src/plugins/spinner_three_bounce/public/spinner.html"));function d(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/spinner.scss */"./src/plugins/spinner_three_bounce/public/spinner.scss");var f=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a.template=(0,u.default)(c.default),a.showTimeout=null,a.listenTo(a.container,l.default.CONTAINER_STATE_BUFFERING,a.onBuffering),a.listenTo(a.container,l.default.CONTAINER_STATE_BUFFERFULL,a.onBufferFull),a.listenTo(a.container,l.default.CONTAINER_STOP,a.onStop),a.listenTo(a.container,l.default.CONTAINER_ENDED,a.onStop),a.listenTo(a.container,l.default.CONTAINER_ERROR,a.onStop),a.render(),a}return(0,o.default)(t,e),(0,a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./stats */"./src/plugins/stats/stats.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=c(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=c(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=c(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=c(n(/*! ../../base/container_plugin */"./src/base/container_plugin.js")),l=c(n(/*! ../../base/events */"./src/base/events.js")),u=c(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a.setInitialAttrs(),a.reportInterval=a.options.reportInterval||5e3,a.state="IDLE",a}return(0,o.default)(t,e),(0,a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=u(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=u(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=u(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=n(/*! ../base/utils */"./src/base/utils.js"),l=u(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a._initializeMessages(),a}return(0,o.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"strings"}}]),t.prototype.t=function(e){var t=this._language(),n=this._messages.en;return(t&&this._messages[t]||n)[e]||n[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(n(/*! ../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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./watermark */"./src/plugins/watermark/watermark.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/watermark/public/watermark.html": /*!*****************************************************!*\ !*** ./src/plugins/watermark/public/watermark.html ***! \*****************************************************/ @@ -1388,34 +1081,34 @@ /*!*****************************************************!*\ !*** ./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": +/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/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/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/watermark/public/watermark.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=d(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=d(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=d(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=d(n(/*! ../../base/ui_container_plugin */"./src/base/ui_container_plugin.js")),l=d(n(/*! ../../base/events */"./src/base/events.js")),u=d(n(/*! ../../base/template */"./src/base/template.js")),c=d(n(/*! ./public/watermark.html */"./src/plugins/watermark/public/watermark.html"));function d(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/watermark.scss */"./src/plugins/watermark/public/watermark.scss");var f=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a.configure(),a}return(0,o.default)(t,e),(0,a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./kibo */"./src/vendor/kibo.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default={Kibo:a.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": +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.element=e||window.document,this.initialize()};r.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"},r.KEY_CODES_BY_NAME={},function(){for(var e in r.KEY_NAMES_BY_CODE)Object.prototype.hasOwnProperty.call(r.KEY_NAMES_BY_CODE,e)&&(r.KEY_CODES_BY_NAME[r.KEY_NAMES_BY_CODE[e]]=+e)}(),r.MODIFIERS=["shift","ctrl","alt"],r.registerEvent=document.addEventListener?function(e,t,n){e.addEventListener(t,n,!1)}:document.attachEvent?function(e,t,n){e.attachEvent("on"+t,n)}:void 0,r.unregisterEvent=document.removeEventListener?function(e,t,n){e.removeEventListener(t,n,!1)}:document.detachEvent?function(e,t,n){e.detachEvent("on"+t,n)}:void 0,r.stringContains=function(e,t){return-1!==e.indexOf(t)},r.neatString=function(e){return e.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")},r.capitalize=function(e){return e.toLowerCase().replace(/^./,(function(e){return e.toUpperCase()}))},r.isString=function(e){return r.stringContains(Object.prototype.toString.call(e),"String")},r.arrayIncludes=Array.prototype.indexOf?function(e,t){return-1!==e.indexOf(t)}:function(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return!0;return!1},r.extractModifiers=function(e){var t,n;for(t=[],n=0;n<r.MODIFIERS.length;n++)r.stringContains(e,r.MODIFIERS[n])&&t.push(r.MODIFIERS[n]);return t},r.extractKey=function(e){var t,n;for(t=r.neatString(e).split(" "),n=0;n<t.length;n++)if(!r.arrayIncludes(r.MODIFIERS,t[n]))return t[n]},r.modifiersAndKey=function(e){var t,n;return r.stringContains(e,"any")?r.neatString(e).split(" ").slice(0,2).join(" "):(t=r.extractModifiers(e),(n=r.extractKey(e))&&!r.arrayIncludes(r.MODIFIERS,n)&&t.push(n),t.join(" "))},r.keyName=function(e){return r.KEY_NAMES_BY_CODE[e+""]},r.keyCode=function(e){return+r.KEY_CODES_BY_NAME[e]},r.prototype.initialize=function(){var e,t=this;for(this.lastKeyCode=-1,this.lastModifiers={},e=0;e<r.MODIFIERS.length;e++)this.lastModifiers[r.MODIFIERS[e]]=!1;this.keysDown={any:[]},this.keysUp={any:[]},this.downHandler=this.handler("down"),this.upHandler=this.handler("up"),r.registerEvent(this.element,"keydown",this.downHandler),r.registerEvent(this.element,"keyup",this.upHandler),r.registerEvent(window,"unload",(function e(){r.unregisterEvent(t.element,"keydown",t.downHandler),r.unregisterEvent(t.element,"keyup",t.upHandler),r.unregisterEvent(window,"unload",e)}))},r.prototype.handler=function(e){var t=this;return function(n){var i,a,o;for(n=n||window.event,t.lastKeyCode=n.keyCode,i=0;i<r.MODIFIERS.length;i++)t.lastModifiers[r.MODIFIERS[i]]=n[r.MODIFIERS[i]+"Key"];for(r.arrayIncludes(r.MODIFIERS,r.keyName(t.lastKeyCode))&&(t.lastModifiers[r.keyName(t.lastKeyCode)]=!0),a=t["keys"+r.capitalize(e)],i=0;i<a.any.length;i++)!1===a.any[i](n)&&n.preventDefault&&n.preventDefault();if(a[o=t.lastModifiersAndKey()])for(i=0;i<a[o].length;i++)!1===a[o][i](n)&&n.preventDefault&&n.preventDefault()}},r.prototype.registerKeys=function(e,t,n){var i,a,o=this["keys"+r.capitalize(e)];for(r.isString(t)&&(t=[t]),i=0;i<t.length;i++)a=t[i],o[a=r.modifiersAndKey(a+"")]?o[a].push(n):o[a]=[n];return this},r.prototype.unregisterKeys=function(e,t,n){var i,a,o,s=this["keys"+r.capitalize(e)];for(r.isString(t)&&(t=[t]),i=0;i<t.length;i++)if(o=t[i],o=r.modifiersAndKey(o+""),null===n)delete s[o];else if(s[o])for(a=0;a<s[o].length;a++)if(String(s[o][a])===String(n)){s[o].splice(a,1);break}return this},r.prototype.off=function(e){return this.unregisterKeys("down",e,null)},r.prototype.delegate=function(e,t,n){return null!==n||void 0!==n?this.registerKeys(e,t,n):this.unregisterKeys(e,t,n)},r.prototype.down=function(e,t){return this.delegate("down",e,t)},r.prototype.up=function(e,t){return this.delegate("up",e,t)},r.prototype.lastKey=function(e){return e?this.lastModifiers[e]:r.keyName(this.lastKeyCode)},r.prototype.lastModifiersAndKey=function(){var e,t;for(e=[],t=0;t<r.MODIFIERS.length;t++)this.lastKey(r.MODIFIERS[t])&&e.push(r.MODIFIERS[t]);return r.arrayIncludes(e,this.lastKey())||e.push(this.lastKey()),e.join(" ")},t.default=r,e.exports=t.default}})},e.exports=r()},function(e,t,n){var r;window,r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="dist/",n(n.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 C(e,t){e.f=0,e.b=t||0}function x(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 L(e){e.i=[e.a],e.f=0,e.b=0}function j(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 P(e){this.a=new A,this.b=e}function I(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=I(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=I(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?I(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 P(t))}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function F(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 U(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 F(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!==U(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=U(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 F(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 Ce(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 xe(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 Le(e,t,r){if(r||(r=xe),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 je(){this.a=[]}function Pe(e,t){e.a.push(t.finally((function(){Re(e.a,t)})))}function Ie(e){ke.call(this),this.f=!1,this.g=new je,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},je.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(Ie,ke),G("shaka.net.NetworkingEngine",Ie),Ie.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4},Ie.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 Fe(e,t,r){ye.call(this,e,t),this.b=r}function Ue(){}function Be(){this.a=new we}function Ke(e,t,r,n){this.target=e,this.type=t,this.listener=r,this.a=function(e,t){if(null==t)return!1;if("boolean"==typeof t)return t;var r=new Set(["passive","capture"]);return Object.keys(t).filter((function(e){return!r.has(e)})),function(e){var t=Ge;if(null==t){t=!1;try{var r={},n={get:function(){return t=!0,!1}};Object.defineProperty(r,"passive",n),Object.defineProperty(r,"capture",n),n=function(){},e.addEventListener("test",n,r),e.removeEventListener("test",n,r)}catch(e){t=!1}Ge=t}return t||!1}(e)?t:t.capture||!1}(e,n),this.target.addEventListener(t,r,this.a)}Ie.registerScheme=De,Ie.unregisterScheme=function(e){delete Oe[e]},Ie.prototype.Tf=function(e){this.a.add(e)},Ie.prototype.registerRequestFilter=Ie.prototype.Tf,Ie.prototype.vg=function(e){this.a.delete(e)},Ie.prototype.unregisterRequestFilter=Ie.prototype.vg,Ie.prototype.Ie=function(){this.a.clear()},Ie.prototype.clearAllRequestFilters=Ie.prototype.Ie,Ie.prototype.Uf=function(e){this.b.add(e)},Ie.prototype.registerResponseFilter=Ie.prototype.Uf,Ie.prototype.wg=function(e){this.b.delete(e)},Ie.prototype.unregisterResponseFilter=Ie.prototype.wg,Ie.prototype.Je=function(){this.b.clear()},Ie.prototype.clearAllResponseFilters=Ie.prototype.Je,Ie.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0}},Ie.makeRequest=Me,Ie.prototype.destroy=function(){return this.f=!0,this.a.clear(),this.b.clear(),this.g.destroy()},Ie.prototype.destroy=Ie.prototype.destroy,Ie.prototype.request=function(e,t){var r=this,n=new Ne;if(this.f){var i=Promise.reject(new me(2,7,7001));return i.catch((function(){})),new Fe(i,(function(){return Promise.resolve()}),n)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?Ce(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},t.uris=Ce(t.uris);var o=(i=function(e,t,r){for(var n=_e(void 0),i={},o=(e=f(e.a)).next();!o.done;i={qd:i.qd},o=e.next())i.qd=o.value,n=n.U(function(e){return function(){return e.qd(t,r)}}(i));return n.U(void 0,(function(e){if(e&&7001==e.code)throw e;throw new me(2,1,1006,e)}))}(this,e,t)).U((function(){return function e(t,r,n,i,o,a,s){var l=new Z(n.uris[o]),u=l.ta,c=!1;u||(u=(u=location.protocol).slice(0,-1),Q(l,u),n.uris[o]=l.toString()),u=u.toLowerCase();var d,f=(u=Oe[u])?u.Rf:null;return f?Ae(pe(i)).U((function(){return t.f?be():(d=Date.now(),f(n.uris[o],n,r,(function(e,n,i){t.c&&1==r&&(t.c(e,n),c=!0,s.a=i)})))})).U((function(e){return null==e.timeMs&&(e.timeMs=Date.now()-d),{response:e,qf:c}}),(function(l){if(l&&7001==l.code)throw l;if(t.f)return be();if(l&&1==l.severity)return t.dispatchEvent(new Se("retry",{error:l instanceof me?l:null})),o=(o+1)%n.uris.length,e(t,r,n,i,o,l,s);throw l||a})):ve(new me(2,1,1e3,l))}(r,e,t,new he(t.retryParameters,!1),0,null,n)})),a=o.U((function(t){return function(e,t,r){for(var n=_e(void 0),i=(e=f(e.b)).next();!i.done;i=e.next())n=n.U(i.value.bind(null,t,r.response));return n.U((function(){return r}),(function(e){if(e&&7001==e.code)throw e;var t=2;throw e instanceof me&&(t=e.severity),new me(t,1,1007,e)}))}(r,e,t)})),s=Date.now(),l=0;i.promise.then((function(){l=Date.now()-s}),(function(){}));var u=0;return o.promise.then((function(){u=Date.now()}),(function(){})),i=new Fe((i=a.U((function(t){var n=Date.now()-u,i=t.response;return i.timeMs+=l,i.timeMs+=n,t.qf||!r.c||i.fromCache||1!=e||r.c(i.timeMs,i.data.byteLength),i}),(function(e){throw e&&(e.severity=2),e}))).promise,i.Zd,n),Pe(this.g,i),i},Ie.prototype.request=Ie.prototype.request,Ie.NumBytesRemainingClass=Ne,_(Fe,ye),Ie.PendingRequest=Fe,Fe.all=Ee,Fe.notAbortable=Ae,Fe.completed=_e,Fe.aborted=be,Fe.failed=ve,G("shaka.util.IReleasable",Ue),Ue.prototype.release=function(){},G("shaka.util.EventManager",Be),Be.prototype.release=function(){this.$a(),this.a=null},Be.prototype.release=Be.prototype.release,Be.prototype.w=function(e,t,r,n){this.a&&(e=new Ke(e,t,r,n),this.a.push(t,e))},Be.prototype.listen=Be.prototype.w,Be.prototype.da=function(e,t,r,n){var i=this;this.w(e,t,(function n(o){i.ea(e,t,n),r(o)}),n)},Be.prototype.listenOnce=Be.prototype.da,Be.prototype.ea=function(e,t,r){if(this.a)for(var n=this.a.get(t)||[],i=(n=f(n)).next();!i.done;i=n.next())(i=i.value).target!=e||r!=i.listener&&r||(i.ea(),this.a.remove(t,i))},Be.prototype.unlisten=Be.prototype.ea,Be.prototype.$a=function(){if(this.a){for(var e=this.a.getAll(),t=(e=f(e)).next();!t.done;t=e.next())t.value.ea();this.a.a={}}},Be.prototype.removeAll=Be.prototype.$a,Ke.prototype.ea=function(){this.target.removeEventListener(this.type,this.listener,this.a),this.listener=this.target=null,this.a=!1},Ke.prototype.unlisten=Ke.prototype.ea;var Ge=void 0;function Ve(e){if(e=new Uint8Array(e),new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");return new Z(e=st(e.subarray(4),!0)).sa}function He(e,t,r){function n(e){new DataView(o.buffer).setUint32(a,e.byteLength,!0),a+=4,i(e)}function i(e){o.set(e,a),a+=e.byteLength}if(!r||!r.byteLength)throw new me(2,6,6015);t="string"==typeof t?new Uint8Array(ct(t,!0)):new Uint8Array(t);var o=new Uint8Array(8+e.byteLength+t.byteLength+r.byteLength),a=0;return i(new Uint8Array(e)),n(t),n(new Uint8Array(r)),o}function Ye(e,t){for(var r=[],n=f(e),i=n.next();!i.done;i=n.next())r.push(t(i.value));return r}function ze(e,t){for(var r=f(e),n=r.next();!n.done;n=r.next())if(!t(n.value))return!1;return!0}function 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())It(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())It(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:x(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,Pt(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 Ct(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,Pt(e)&&e.m.resolve()})).R(Ot))}.bind(this)))}.bind(e),function(e){this.c||(e=new me(2,6,6007,e),this.g(e),n&&n.ya&&n.ya.reject(e))}.bind(e)).catch(function(e){this.c||(e=new me(2,6,6008,e.message),this.g(e),n&&n.ya&&n.ya.reject(e))}.bind(e))}function xt(){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:x(n,0);break;case 2:R(n),r.set(e,null),w(n)}}))}))}(e)})),Promise.all(e).then((function(){return $e(r)}))}function Rt(e,t){var r=t.audio,n=t.video;if(r&&r.encrypted&&!At(e,qe(r.mimeType,r.codecs))||n&&n.encrypted&&!At(e,qe(n.mimeType,n.codecs)))return!1;var i=_t(e.a);return 0==t.drmInfos.length||t.drmInfos.some((function(e){return e.keySystem==i}))}function Lt(e,t){if(!e.length)return t;if(!t.length)return e;for(var r=[],n=0;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 jt(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:x(t,0);break;case 2:R(t),w(t)}}))}))}))),0)}}))}))}function Pt(e){return ze(e=e.b.values(),(function(e){return e.loaded}))}function It(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,jt(e),2);case 2:if(!e.h){t.A(3);break}return k(t,4),S(t,e.h.setMediaKeys(null),6);case 6:x(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++)Ct(t,t.F[e]);t.oa=!0,t.F=[]})),"webkitCurrentPlaybackTargetIsWireless"in this.h&&this.i.w(this.h,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return jt(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):Ct(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(){}))),Pt(this)&&(this.m.resolve(),this.O.R(Dt))};var Ot=5,Dt=.5;function Mt(){this.a=new muxjs.mp4.CaptionParser,this.g=[],this.f={}}function Nt(){}function Ft(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function Ut(e,t,r){return r=void 0===r?0:r,!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t+r>=e.start(0)}function Bt(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;for(var r=0,n=e.length-1;0<=n&&e.end(n)>t;--n)r+=e.end(n)-Math.max(e.start(n),t);return r}function Kt(e){if(!e)return[];for(var t=[],r=0;r<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:Ft(Sr(e,t))}function Sr(e,t){try{return e.b[t].buffered}catch(e){return null}}function wr(t,r,n,i,o,a){return"text"==r?function(e,t,r,n){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==r||null==n)this.g.parseInit(new Uint8Array(t));else{var e={periodStart:this.m,segmentStart:r,segmentEnd:n};e=this.g.parseMedia(new Uint8Array(t),e).filter(function(e){return e.startTime>=this.f&&e.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),xr(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)}))),xr(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 Cr(e,t){return"text"==t?e.a?(e.m.c(),e.a.remove(0,1/0)):Promise.resolve():xr(e,t,e.se.bind(e,t,0,e.h.duration))}function xr(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)),Lr(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)Lr(this,r);return e}.bind(e),function(e){throw e}.bind(e))}function Lr(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)),Lr(e,t)}}function jr(e,t){return e=Ir(e),t=Ir(t),e.split("-")[0]==t.split("-")[0]}function Pr(e,t){e=Ir(e),t=Ir(t);var r=e.split("-"),n=t.split("-");return r[0]==n[0]&&1==r.length&&2==n.length}function Ir(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?Ir(e.language):e.audio&&e.audio.language?Ir(e.audio.language):e.video&&e.video.language?Ir(e.video.language):"und"}function Dr(e,t){for(var r=Ir(e),n=new Set,i=f(t),o=i.next();!o.done;o=i.next())n.add(Ir(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(Pr(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=Ir(a),s=Ir(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(Pr(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):xr(this,e,this.se.bind(this,e,t,r))},n.flush=function(e){return"text"==e?Promise.resolve():xr(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(),Lr(this,e))};var Mr=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]),Nr={bd:function(e,t,r){function n(e,t,r){return e>=t&&e<=r}var i=e.video;return!(i&&i.width&&i.height&&(!n(i.width,t.minWidth,Math.min(t.maxWidth,r.width))||!n(i.height,t.minHeight,Math.min(t.maxHeight,r.height))||!n(i.width*i.height,t.minPixels,t.maxPixels))||e&&e.frameRate&&!n(e.frameRate,t.minFrameRate,t.maxFrameRate)||!n(e.bandwidth,t.minBandwidth,t.maxBandwidth))},Gd:function(e,t,r){var n=!1;return e.forEach((function(e){var i=e.allowedByApplication;e.allowedByApplication=Nr.bd(e,t,r),i!=e.allowedByApplication&&(n=!0)})),n},filterNewPeriod:function(e,t,r,n){n.variants=n.variants.filter((function(n){if(e&&e.S&&!Rt(e,n))return!1;var i=n.audio;return n=n.video,!(i&&!br(i)||n&&!br(n)||i&&t&&!Nr.Hd(i,t)||n&&r&&!Nr.Hd(n,r))})),n.textStreams=n.textStreams.filter((function(e){return pr(qe(e.mimeType,e.codecs))}))},Hd:function(e,t){return e.mimeType==t.mimeType&&e.codecs.split(".")[0]==t.codecs.split(".")[0]},Ed:function(e){var t=e.audio,r=e.video,n=t?t.codecs:null,i=r?r.codecs:null,o=[];i&&o.push(i),n&&o.push(n);var a=[];r&&a.push(r.mimeType),t&&a.push(t.mimeType),a=a[0]||null;var s=[];t&&s.push(t.kind),r&&s.push(r.kind),s=s[0]||null;var l=new Set;return t&&t.roles.forEach((function(e){return l.add(e)})),r&&r.roles.forEach((function(e){return l.add(e)})),e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:s,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:a,codecs:o.join(", "),audioCodec:n,videoCodec:i,primary:e.primary,roles:Array.from(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null},r&&(e.videoId=r.id,e.originalVideoId=r.originalId,e.width=r.width||null,e.height=r.height||null,e.frameRate=r.frameRate||null,e.pixelAspectRatio=r.pixelAspectRatio||null,e.videoBandwidth=r.bandwidth||null),t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.label=t.label,e.audioRoles=t.roles),e},xc:function(e){return{id:e.id,active:!1,type:"text",bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:e.mimeType,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId}},Wc:function(e){return e.__shaka_id||(e.__shaka_id=Nr.yf++),e.__shaka_id},yf:0,sf:function(e){var t=Nr.Sd(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="application/cea-608"),t},rf:function(e){var t=Nr.Sd(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,"main"==e.kind?(t.primary=!0,t.roles=["main"],t.audioRoles=["main"]):t.audioRoles=[],t},Sd:function(e){return{id:Nr.Wc(e),active:!1,type:"",bandwidth:0,language:Ir(e.language),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}},rb:function(e){return e.allowedByApplication&&e.allowedByKeySystem},df:function(e){return e.filter((function(e){return Nr.rb(e)}))},Nd:function(e,t){for(var r=e.filter((function(e){return e.audio&&e.audio.channelsCount})),n=new Map,i=(r=f(r)).next();!i.done;i=r.next()){var o=(i=i.value).audio.channelsCount;n.has(o)||n.set(o,[]),n.get(o).push(i)}return 0==(r=Array.from(n.keys())).length?e:(i=r.filter((function(e){return e<=t}))).length?n.get(Math.max.apply(null,i)):n.get(Math.min.apply(null,r))},Jb:function(e,t,r){var n=e,i=e.filter((function(e){return e.primary}));i.length&&(n=i);var o=n.length?n[0].language:"";if(n=n.filter((function(e){return e.language==o})),t){var a=Dr(Ir(t),e.map((function(e){return e.language})));a&&(n=e.filter((function(e){return Ir(e.language)==a})))}if(r){if((e=Nr.Md(n,r)).length)return e}else if((e=n.filter((function(e){return 0==e.roles.length}))).length)return e;return(e=n.map((function(e){return e.roles})).reduce(Gt.Gc,[])).length?Nr.Md(n,e[0]):n},Md:function(e,t){return e.filter((function(e){return e.roles.includes(t)}))},Qd:function(e,t,r){for(var n=0;n<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 Fr(){this.h=null,this.f=!1,this.b=new W,this.c=[],this.i=!1,this.a=this.g=null}function Ur(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",Fr),Fr.prototype.stop=function(){this.h=null,this.f=!1,this.c=[],this.g=null},Fr.prototype.stop=Fr.prototype.stop,Fr.prototype.init=function(e){this.h=e},Fr.prototype.init=Fr.prototype.init,Fr.prototype.chooseVariant=function(){var e=Ur(this.a.restrictions,this.c),t=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!e.length&&(e=[(e=Ur(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},Fr.prototype.chooseVariant=Fr.prototype.chooseVariant,Fr.prototype.enable=function(){this.f=!0},Fr.prototype.enable=Fr.prototype.enable,Fr.prototype.disable=function(){this.f=!1},Fr.prototype.disable=Fr.prototype.disable,Fr.prototype.segmentDownloaded=function(e,t){var r=this.b;if(!(16e3>t)){var n=8e3*t/e,i=e/1e3;r.a+=t,Y(r.b,i,n),Y(r.c,i,n)}if(null!=this.g&&this.f)e:{if(this.i){if(Date.now()-this.g<1e3*this.a.switchInterval)break e}else{if(!(128e3<=this.b.a))break e;this.i=!0}r=this.chooseVariant(),this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate),this.h(r)}},Fr.prototype.segmentDownloaded=Fr.prototype.segmentDownloaded,Fr.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)},Fr.prototype.getBandwidthEstimate=Fr.prototype.getBandwidthEstimate,Fr.prototype.setVariants=function(e){this.c=e},Fr.prototype.setVariants=Fr.prototype.setVariants,Fr.prototype.configure=function(e){this.a=e},Fr.prototype.configure=Fr.prototype.configure,Br.prototype.toString=function(){return"v"+this.a+"."+this.b};var Hr=null,Yr="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),zr="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),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)||xn(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),Cn(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:""};xn(e,0,t)}function Cn(e,t,r,n){e.u&&(e=rn(t),n?r.getCastChannel(n).send(e):r.broadcast(e))}function xn(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),Cn(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),Cn(this,{type:"event",targetName:e,event:t},this.f))},n.Oe=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Cn(this,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},this.f),Cn(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(),xn(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(),xn(this,0);break;case"PAUSE":this.a.pause(),xn(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(),xn(this,0)):r&&"PLAYBACK_PAUSE"==r&&(this.a.pause(),xn(this,0));break;case"STOP":this.b.Cd().then(function(){this.b&&xn(this,0)}.bind(this));break;case"GET_STATUS":xn(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||xn(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"),Cn(this,{requestId:Number(t.requestId),type:r},this.i)}.bind(this));break;default:Cn(this,{requestId:Number(t.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.i)}},n.oe=function(e,t,r){this.b&&Cn(this,{type:"asyncComplete",id:t,error:r},this.f,e)};var Rn={IDLE:"IDLE",ze:"PLAYING",we:"BUFFERING",ye:"PAUSED"};function Ln(e,t){this.J=e,this.b=t==jn,this.a=0}G("shaka.util.DataViewReader",Ln);var jn=1;function Pn(){throw new me(2,3,3e3)}function In(){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 Fn(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function Un(e){var t=this;this.a=[],this.b=[],this.data=[],(new In).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)}Ln.Endianness={Bg:0,Dg:jn},Ln.prototype.ua=function(){return this.a<this.J.byteLength},Ln.prototype.hasMoreData=Ln.prototype.ua,Ln.prototype.ca=function(){return this.a},Ln.prototype.getPosition=Ln.prototype.ca,Ln.prototype.Ve=function(){return this.J.byteLength},Ln.prototype.getLength=Ln.prototype.Ve,Ln.prototype.la=function(){try{var e=this.J.getUint8(this.a);return this.a+=1,e}catch(e){Pn()}},Ln.prototype.readUint8=Ln.prototype.la,Ln.prototype.Tb=function(){try{var e=this.J.getUint16(this.a,this.b);return this.a+=2,e}catch(e){Pn()}},Ln.prototype.readUint16=Ln.prototype.Tb,Ln.prototype.G=function(){try{var e=this.J.getUint32(this.a,this.b);return this.a+=4,e}catch(e){Pn()}},Ln.prototype.readUint32=Ln.prototype.G,Ln.prototype.ke=function(){try{var e=this.J.getInt32(this.a,this.b);return this.a+=4,e}catch(e){Pn()}},Ln.prototype.readInt32=Ln.prototype.ke,Ln.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){Pn()}if(2097151<t)throw new me(2,3,3001);return this.a+=8,t*Math.pow(2,32)+e},Ln.prototype.readUint64=Ln.prototype.Bb,Ln.prototype.Za=function(e){this.a+e>this.J.byteLength&&Pn();var t=new Uint8Array(this.J.buffer,this.J.byteOffset+this.a,e);return this.a+=e,t},Ln.prototype.readBytes=Ln.prototype.Za,Ln.prototype.M=function(e){this.a+e>this.J.byteLength&&Pn(),this.a+=e},Ln.prototype.skip=Ln.prototype.M,Ln.prototype.me=function(e){this.a<e&&Pn(),this.a-=e},Ln.prototype.rewind=Ln.prototype.me,Ln.prototype.seek=function(e){(0>e||e>this.J.byteLength)&&Pn(),this.a=e},Ln.prototype.seek=Ln.prototype.seek,Ln.prototype.md=function(){for(var e=this.a;this.ua()&&0!=this.J.getUint8(this.a);)this.a+=1;return e=new Uint8Array(this.J.buffer,this.J.byteOffset+e,this.a-e),this.a+=1,at(e)},Ln.prototype.readTerminatedString=Ln.prototype.md,G("shaka.util.Mp4Parser",In),In.prototype.H=function(e,t){var r=Nn(e);return this.c[r]=0,this.b[r]=t,this},In.prototype.box=In.prototype.H,In.prototype.fa=function(e,t){var r=Nn(e);return this.c[r]=1,this.b[r]=t,this},In.prototype.fullBox=In.prototype.fa,In.prototype.stop=function(){this.a=!0},In.prototype.stop=In.prototype.stop,In.prototype.parse=function(e,t){var r=new Uint8Array(e);for(r=new Ln(new DataView(r.buffer,r.byteOffset,r.byteLength),0),this.a=!1;r.ua()&&!this.a;)this.sc(0,r,t)},In.prototype.parse=In.prototype.parse,In.prototype.sc=function(e,t,r){var n=t.ca(),i=t.G(),o=t.G();switch(i){case 0:i=t.J.byteLength-n;break;case 1:i=t.Bb()}var a=this.b[o];if(a){var s=null,l=null;1==this.c[o]&&(s=(l=t.G())>>>24,l&=16777215),o=n+i,r&&o>t.J.byteLength&&(o=t.J.byteLength),o-=t.ca(),t=0<o?t.Za(o):new Uint8Array(0),a({parser:this,partialOkay:r||!1,version:s,flags:l,reader:t=new Ln(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()))},In.prototype.parseNext=In.prototype.sc,In.children=On,In.sampleDescription=Dn,In.allData=Mn,In.typeToString=Fn;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 In).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 Ln(e,0),Vn||(Vn=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}function ni(e){var t=ii(e);if(7<t.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,x(t,3);break;case 2:n=R(t),e.b&&(n.severity=1,e.b.onError(n));case 3:if(!e.b)return t.return();Si(e,r),w(t)}}))}))}(e)})),this.g=new je}function _i(e){var t=Date.now(),r=e.b.networkingEngine.request(0,Me(e.f,e.a.retryParameters));return Pe(e.g,r),r.promise.then((function(t){if(e.b)return t.uri&&!e.f.includes(t.uri)&&e.f.unshift(t.uri),function(e,t,r){if(!(t=Bn.ge(t,"MPD")))throw new me(2,4,4001,r);return t=Xn(t,e.a.retryParameters,e.a.dash.xlinkFailGracefully,r,e.b.networkingEngine),Pe(e.g,t),t.promise.then((function(t){return function(e,t,r){return p((function n(){var i,o,a,s,l,u,c,d,f,h,p,m,g,y,v,b,_,A,E,T,k,C,x,R;return M(n,(function(n){switch(n.j){case 1:s=Gt,u=[r],0<(c=(l=Bn).P(t,"Location").map(l.ic).filter(s.Ia)).length&&(d=Vt(u,c),u=e.f=d),f=l.P(t,"BaseURL").map(l.ic),h=Vt(u,f),p=e.a.dash.ignoreMinBufferTime,m=0,p||(m=l.I(t,"minBufferTime",l.Ea)),e.s=l.I(t,"minimumUpdatePeriod",l.Ea,-1),g=l.I(t,"availabilityStartTime",l.Of),y=l.I(t,"timeShiftBufferDepth",l.Ea),v=l.I(t,"maxSegmentDuration",l.Ea),b=t.getAttribute("type")||"static",_=e.a.dash.ignoreSuggestedPresentationDelay,A=null,_||(A=l.I(t,"suggestedPresentationDelay",l.Ea)),e.c?E=e.c.presentationTimeline:(T=Math.max(e.a.dash.defaultPresentationDelay,1.5*m),E=new yi(g,null!=A?A:T,e.a.dash.autoCorrectDrift));for(var L={mb:"static"!=b,presentationTimeline:E,ka:null,T:null,aa:null,C:null,bandwidth:0,Vd:!1},j=h,P=Bn.I(t,"mediaPresentationDuration",Bn.Ea),I=[],O=0,D=Bn.P(t,"Period"),M=0;M<D.length;M++){var N=D[M];O=Bn.I(N,"start",Bn.Ea,O);var F=Bn.I(N,"duration",Bn.Ea),U=null;if(M!=D.length-1){var B=Bn.I(D[M+1],"start",Bn.Ea);null!=B&&(U=B-O)}else null!=P&&(U=P-O);if(null==U&&(U=F),N=Ai(e,L,j,{start:O,duration:U,node:N,Zc:null==U||M==D.length-1}),I.push(N),F=L.ka.id,e.l.includes(F)||(e.l.push(F),e.c&&(e.b.filterNewPeriod(N),e.c.periods.push(N))),null==U){O=null;break}O+=U}if(null==e.c&&e.b.filterAllPeriods(I),null!=P?(i=I,o=P,a=!1):(i=I,o=O,a=!0),k=o,C=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:C,offlineSessionIds:[],minBufferTime:m||0},!E.ue()){n.A(0);break}return x=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,x),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<Lt(i,o).length){o=Lt(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=Ci(s,l)),{qa:Vt(r,o),Ub:Bn.gc(e,"SegmentBase")||t.Ub,La:Bn.gc(e,"SegmentList")||t.La,Wb:Bn.gc(e,"SegmentTemplate")||t.Wb,width:Bn.I(e,"width",n)||t.width,height:Bn.I(e,"height",n)||t.height,contentType:a,mimeType:s,codecs:l,frameRate:i,pixelAspectRatio:u,emsgSchemeIdUris:d,id:e.getAttribute("id"),gd:c,audioSamplingRate:h}}function ki(e,t,r,n){return(t=Me(t=Vt(t,[r]),e.a.retryParameters)).method=n,t=e.b.networkingEngine.request(4,t),Pe(e.g,t),t.promise.then((function(e){if("HEAD"==n){if(!e.headers||!e.headers.date)return 0;e=e.headers.date}else e=at(e.data);return e=Date.parse(e),isNaN(e)?0:e-Date.now()}))}function Ci(e,t){return pr(qe(e,t))?"text":e.split("/")[0]}function xi(e,t,r,n){this.b=e,this.type=t,this.a=r,this.segments=n||null}function Ri(e,t,r,n){this.id=e,this.name=t,this.a=r,this.value=void 0===n?null:n}function Li(e,t){this.name=e,this.value=t}function ji(e,t,r){return(e=e.getAttribute(t))?e.value:r||null}function Pi(e,t){this.b=t,this.a=e}G("shaka.media.ManifestParser.registerParserByExtension",gi.pd),gi.Cb=function(e,t){gi.zb[e]=t},G("shaka.media.ManifestParser.registerParserByMime",gi.Cb),gi.Sf=function(){var e={};if(Ze()){for(var t in gi.zb)e[t]=!0;for(var r in gi.Sb)e[r]=!0}t={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var n=(r=f(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!n.done;n=r.next())e[n=n.value]=Ze()?!!gi.zb[n]:Qe(n);for(var i in t)e[i]=Ze()?!!gi.Sb[i]:Qe(t[i]);return e},gi.create=function(e,t,r,n){return p((function i(){var o,a;return M(i,(function(i){switch(i.j){case 1:return k(i,2),S(i,gi.Ue(e,t,r,n),4);case 4:return o=i.o,i.return(new o);case 2:throw(a=R(i)).severity=2,a}}))}))},gi.Ue=function(e,t,r,n){return p((function i(){var o,a,s,l,u;return M(i,(function(i){switch(i.j){case 1:if(o=gi,n&&(a=o.zb[n.toLowerCase()]))return i.return(a);if((s=o.getExtension(e))&&(l=o.Sb[s]))return i.return(l);if(n){i.A(2);break}return S(i,o.bf(e,t,r),3);case 3:if((n=i.o)&&(u=gi.zb[n]))return i.return(u);case 2:throw new me(2,4,4e3,e)}}))}))},gi.bf=function(e,t,r){return p((function n(){var i,o,a;return M(n,(function(n){switch(n.j){case 1:return(i=Me([e],r)).method="HEAD",S(n,t.request(0,i).promise,2);case 2:return o=n.o,a=o.headers["content-type"],n.return(a?a.toLowerCase().split(";").shift():"")}}))}))},gi.getExtension=function(e){return 1==(e=new Z(e).ja.split("/").pop().split(".")).length?"":e.pop().toLowerCase()},gi.isSupported=function(e,t){return!!Ze()&&(t in gi.zb||gi.getExtension(e)in gi.Sb)},G("shaka.media.PresentationTimeline",yi),yi.prototype.Y=function(){return this.g},yi.prototype.getDuration=yi.prototype.Y,yi.prototype.$e=function(){return this.a},yi.prototype.getMaxSegmentDuration=yi.prototype.$e,yi.prototype.xa=function(e){this.g=e},yi.prototype.setDuration=yi.prototype.xa,yi.prototype.hf=function(){return this.f},yi.prototype.getPresentationStartTime=yi.prototype.hf,yi.prototype.pe=function(e){this.l=e},yi.prototype.setClockOffset=yi.prototype.pe,yi.prototype.Xb=function(e){this.m=e},yi.prototype.setStatic=yi.prototype.Xb,yi.prototype.xd=function(e){this.h=e},yi.prototype.setSegmentAvailabilityDuration=yi.prototype.xd,yi.prototype.ig=function(e){this.vc=e},yi.prototype.setDelay=yi.prototype.ig,yi.prototype.Se=function(){return this.vc},yi.prototype.getDelay=yi.prototype.Se,yi.prototype.vb=function(e,t){if(0!=e.length){var r=e[e.length-1].endTime+t;this.fd(e[0].startTime+t),this.a=e.reduce((function(e,t){return Math.max(e,t.endTime-t.startTime)}),this.a),this.b=Math.max(this.b,r),null!=this.f&&this.s&&(this.f=(Date.now()+this.l)/1e3-this.b-this.a)}},yi.prototype.notifySegments=yi.prototype.vb,yi.prototype.fd=function(e){this.c=null==this.c?e:Math.min(this.c,e)},yi.prototype.notifyMinSegmentStartTime=yi.prototype.fd,yi.prototype.ed=function(e){this.a=Math.max(this.a,e)},yi.prototype.notifyMaxSegmentDuration=yi.prototype.ed,yi.prototype.offset=function(e){null!=this.c&&(this.c+=e),null!=this.b&&(this.b+=e)},yi.prototype.offset=yi.prototype.offset,yi.prototype.V=function(){return 1/0==this.g&&!this.m},yi.prototype.isLive=yi.prototype.V,yi.prototype.Xa=function(){return 1/0!=this.g&&!this.m},yi.prototype.isInProgress=yi.prototype.Xa,yi.prototype.Ob=function(){if(1/0==this.h)return this.i;var e=this.pb()-this.h;return Math.max(this.i,e)},yi.prototype.getSegmentAvailabilityStart=yi.prototype.Ob,yi.prototype.qe=function(e){this.i=e},yi.prototype.setUserSeekStart=yi.prototype.qe,yi.prototype.pb=function(){return this.V()||this.Xa()?Math.min(Math.max(0,(Date.now()+this.l)/1e3-this.a-this.f),this.g):this.g},yi.prototype.getSegmentAvailabilityEnd=yi.prototype.pb,yi.prototype.Nb=function(e){var t=Math.max(this.c,this.i);if(1/0==this.h)return t;var r=this.pb()-this.h;return e=Math.min(r+e,this.Ca()),Math.max(t,e)},yi.prototype.getSafeSeekRangeStart=yi.prototype.Nb,yi.prototype.ob=function(){return this.Nb(0)},yi.prototype.getSeekRangeStart=yi.prototype.ob,yi.prototype.Ca=function(){var e=this.V()||this.Xa()?this.vc:0;return Math.max(0,this.pb()-e)},yi.prototype.getSeekRangeEnd=yi.prototype.Ca,yi.prototype.ue=function(){return!(null==this.f||null!=this.b&&this.s)},yi.prototype.usingPresentationStartTime=yi.prototype.ue,G("shaka.dash.DashParser",bi),(n=bi.prototype).configure=function(e){this.a=e},n.start=function(e,t){var r=this;return p((function n(){var i;return M(n,(function(n){switch(n.j){case 1:return r.f=[e],r.b=t,S(n,_i(r),2);case 2:if(i=n.o,r.b&&Si(r,i),!r.b)throw new me(2,7,7001);return n.return(r.c)}}))}))},n.stop=function(){return this.a=this.b=null,this.f=[],this.c=null,this.l=[],this.m={},null!=this.i&&(this.i.stop(),this.i=null),this.g.destroy()},n.update=function(){_i(this).catch(function(e){this.b&&this.b.onError(e)}.bind(this))},n.onExpirationUpdated=function(){},n.Nf=function(e,t){if(e.aa=wi(t,e.ka,null),"image"==e.aa.contentType)return null;var r=!1,n=Bn.P(t,"Role"),i=n.map((function(e){return e.getAttribute("value")})).filter(Gt.Ia),o=void 0,a="text"==e.aa.contentType;a&&(o="subtitle");for(var s=0;s<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,Ir(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=Ir(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=Ci(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),Pe(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 Ii={nb:function(e,t){return e.filter((function(e){return e.name==t}))},Ta:function(e,t){var r=Ii.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 Fi(){this.a=0}function Ui(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(!Ii.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(Ii.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 xi(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 Li("URI",n[o])),o+=1)}return new xi(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(Ii.Yc(r))return[];r=Ii.Hc(t,r.trim()),i.push(new Pi(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 Li(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 Fi,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),x(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 je,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=Ii,i=ho,o=t.Ce,S(r,uo(e,Me([o],e.a.retryParameters),0),2);case 2:if(a=r.o,1!=(s=Ui(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=Ir(ji(t,"LANGUAGE","und")),l=ji(t,"NAME"),u=t.getAttribute("DEFAULT"),c=t.getAttribute("AUTOSELECT"),d=ji(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,C,L,j,P,I,O,D,N,F,U,B,K,G;return M(u,(function(u){switch(u.j){case 1:return d=(c=Ii).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=Ui(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=Ii.Ta(t.a,"EXT-X-PLAYLIST-TYPE"),i=Ii.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),C=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,C,m),3);case 3:return L=u.o,ao.includes(L)&&(C=""),P=(j=c.Ta(m.a,"EXT-X-MEDIA-SEQUENCE"))?Number(j.value):0,k(u,4),S(u,eo(e,t,m,P,L,C),6);case 6:I=u.o,x(u,5);break;case 4:if(4035==(O=R(u)).code)return q("Skipping unsupported HLS stream",L,t),u.return(null);throw O;case 5:return D=I[0].startTime,N=I[I.length-1].endTime,F=N-D,U=new ei(I),B=Ji(m),K=void 0,"text"==n&&(K="subtitle"),G={id:e.$++,originalId:a,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:U.find.bind(U),getSegmentReference:U.get.bind(U),initSegmentReference:B,presentationTimeOffset:0,mimeType:L,codecs:C,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:U,drmInfos:v,Bc:t,Ce:d,dd:D,Hg:N,duration:F})}}))}))}function Ji(e){var t=Ii.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=Ii.Hc(e.b,r);return e=0,r=null,(t=ji(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=Ii.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 In).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 In).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 Ln(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=Ii.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=Ui(e.s,t,e.u)).type)throw new me(2,4,4022);return S(r,function(e,t){return p((function r(){var n,i,o,a,s,l,u,c,d,h,m,g;return M(r,(function(r){switch(r.j){case 1:return n=Ii,i=Gt,o=t.a,a=n.nb(t.a,"EXT-X-MEDIA"),s=a.filter(function(e){return"SUBTITLES"==no(e,"TYPE")}.bind(e)),l=s.map(function(e){var t=this;return p((function r(){var n;return M(r,(function(r){switch(r.j){case 1:return t.a.disableText?r.return(null):(k(r,2),S(r,function(e,t){return p((function r(){var n;return M(r,(function(r){switch(r.j){case 1:return no(t,"TYPE"),S(r,qi(e,t,[]),2);case 2:return n=r.o,r.return(n.stream)}}))}))}(t,e),4));case 4:return r.return(r.o);case 2:if(n=R(r),t.a.hls.ignoreTextStreamFailures)return r.return(null);throw n}}))}))}.bind(e)),u=a.filter((function(e){return"CLOSED-CAPTIONS"==no(e,"TYPE")})),function(e,t){for(var r=f(t),n=r.next();!n.done;n=r.next()){no(n=n.value,"TYPE");var i=ji(n,"LANGUAGE")||"und";i=Ir(i);var o=no(n,"GROUP-ID");n=no(n,"INSTREAM-ID"),e.l.get(o)||e.l.set(o,new Map),e.l.get(o).set(n,i)}}(e,u),S(r,Promise.all(l),2);case 2:return c=r.o,d=n.nb(o,"EXT-X-STREAM-INF"),h=d.map(function(e){return function(e,t,r){return p((function n(){var i,o,a,s,l,u,c,d,h,m,g,y,v,b,_,A,E,T,w,k,C,x,R,L,j,P,I;return M(n,(function(n){switch(n.j){case 1:return i=Yt,o=Ii,a=ji(t,"CODECS","avc1.42E01E,mp4a.40.2"),s=function(e){for(var t=new Set,r=[],n=(e=f(e)).next();!n.done;n=e.next()){var i=Xe(n=n.value)[0];t.has(i)||(r.push(n),t.add(i))}return r}(a.split(/\s*,\s*/)),l=t.getAttribute("RESOLUTION"),c=u=null,d=ji(t,"FRAME-RATE"),h=Number(no(t,"BANDWIDTH")),l&&(m=l.value.split("x"),u=m[0],c=m[1]),g=(g=(g=o.nb(r.a,"EXT-X-MEDIA")).filter((function(e){return"CLOSED-CAPTIONS"!=no(e,"TYPE")}))).filter((function(e){var t=ji(e,"URI")||"";return"SUBTITLES"==(ji(e,"TYPE")||"")||""!=t})),y=ji(t,"AUDIO"),v=ji(t,"VIDEO"),y?g=o.Pc(g,"AUDIO",y):v&&(g=o.Pc(g,"VIDEO",v)),(b=ro(i.ra,s))&&((_=ji(t,"SUBTITLES"))&&(A=o.Pc(g,"SUBTITLES",_)).length&&(E=e.D.get(A[0].id))&&(E.stream.codecs=b),Re(s,b)),T=g.map(function(e){return qi(this,e,s)}.bind(e)),w=[],k=[],S(n,Promise.all(T),2);case 2:if(x=(x=n.o).filter((function(e){return null!=e})),y?w=x:v&&(k=x),L=!1,w.length||k.length?w.length?(P=no(t,"URI"),I=w[0].Bc,P==I?(R=i.Eb,L=!0):R=i.Pa):R=i.Eb:1==s.length?(j=ro(i.Pa,s),R=l||d||j?i.Pa:i.Eb):(R=i.Pa,s=[s.join(",")]),L){n.A(3);break}return S(n,function(e,t,r,n){return p((function i(){var o,a,s,l,u;return M(i,(function(i){switch(i.j){case 1:return o=Yt,a=no(t,"URI"),e.b.has(a)?i.return(e.b.get(a)):(s=ji(t,"CLOSED-CAPTIONS"),l=null,n==o.Pa&&s&&"NONE"!=s&&(l=e.l.get(s)),S(i,Xi(e,a,r,n,"und",!1,null,null,l),2));case 2:return null==(u=i.o)?i.return(null):e.b.has(a)?i.return(e.b.get(a)):(e.b.set(a,u),i.return(u))}}))}))}(e,t,s,R),4);case 4:C=n.o;case 3:if(C)C.stream.type==i.Eb?w=[C]:k=[C];else if(null===C)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<Lt(p,m).length))continue;g=Lt(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),Pe(e.i,t),t.promise}var co={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=no(e,"METHOD");return Kr("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227"),["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].includes(t)?(t=no(e,"URI"),t=Hi.parse(t),t=Ht("com.widevine.alpha",[{initDataType:"cenc",initData:t=new Uint8Array(t.data)}]),(e=ji(e,"KEYID"))&&(t.keyIds=[e.substr(2).toLowerCase()]),t):null}},fo="VOD",ho={Qa:fo,xe:"EVENT",Fd:"LIVE"};function po(){this.a=new Map}function mo(e,t,r){go(e,t).text=r}function go(e,t){return e.a.has(t)||e.a.set(t,new yo),e.a.get(t)}function yo(){this.text=this.variant=null}function vo(e,t){this.a=e,this.b=new Set([e]);for(var r=f(t=t||[]),n=r.next();!n.done;n=r.next())this.add(n.value)}function bo(e,t){var r;if(!(r=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(r=e.audio&&t.audio)){r=e.audio;var n=t.audio;r=!(r.channelsCount==n.channelsCount&&_o(r,n)&&Ao(r.roles,n.roles))}return!r&&(r=e.video&&t.video)&&(r=!(_o(r=e.video,n=t.video)&&Ao(r.roles,n.roles))),!r}function _o(e,t){if(e.mimeType!=t.mimeType)return!1;var r=e.codecs.split(",").map((function(e){return Xe(e)[0]})),n=t.codecs.split(",").map((function(e){return Xe(e)[0]}));if(r.length!=n.length)return!1;r.sort(),n.sort();for(var i=0;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=Co,this.b=(new Map).set(Co,2).set(ko,1)}function wo(e,t,r){e.b.set(Co,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(Ir(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,Co=1;function xo(e,t){this.g=e,this.h=Lo(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 Lo(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 jo(e,t,r,n,i){var o=this;this.a=e,this.u=t,this.s=r,this.l=i,this.f=new Be,this.i=!1,this.m=e.readyState,this.c=!1,this.b=n,this.h=!1,this.f.w(e,"waiting",(function(){return Po(o)})),this.g=new fe((function(){Po(o)})).Na(.25)}function Po(e){if(0!=e.a.readyState){if(e.a.seeking){if(!e.i)return}else e.i=!1;if(!e.a.paused){e.a.readyState!=e.m&&(e.c=!1,e.m=e.a.readyState);var t=e.s.smallGapLimit,r=e.a.currentTime,n=e.a.buffered;e:{if(n&&n.length&&!(1==n.length&&1e-6>n.end(0)-n.start(0)))for(var i=rt("Edge/")||rt("Trident/")||rt("Tizen")||rt("CrKey")?.5:.1,o=0;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=Lo(n=(e=e.b).g),i=n.a.currentTime,o=Date.now()/1e3,e.a==i&&e.h==r||(e.f=o,e.a=i,e.h=r,e.b=!1),(i=o-e.f)>=e.i&&r&&!e.b&&(e.c(e.a,i),e.b=!0,e.a=n.a.currentTime));else if(0!=i||e.h){o=n.start(i);var a=e.u.Ca();if(!(o>=a)){t=(a=o-r)<=t;var s=!1;.001>a||(t||e.c||(e.c=!0,(r=new Se("largegap",{currentTime:r,gapSize:a})).cancelable=!0,e.l(r),e.s.jumpLargeGaps&&!r.defaultPrevented&&(s=!0)),!t&&!s)||(0!=i&&n.end(i-1),e.a.currentTime=o)}}}}}function Io(e){var t=this;this.c=e,this.a=new Set,this.b=new fe((function(){Oo(t,!1)})).Na(.25)}function Oo(e,t){for(var r=f(e.a),n=r.next();!n.done;n=r.next())n.value.g(e.c.currentTime,t)}function Do(e){for(var t=[],r=(e=f(e)).next();!r.done;r=e.next())for(var n=(r=f(r.value.variants)).next();!n.done;n=r.next())t.push(n.value);return t}function Mo(e,t){for(var r=null,n=f(e),i=n.next();!i.done;i=n.next())t>=(i=i.value).startTime&&(r=i);return r}function No(e){this.c=e,this.a=null,this.b=function(){}}function Fo(e){var t=this;this.a=e,this.f=!1,this.c=this.a.jc(),this.b=new fe((function(){t.a.Yd(.25*t.c)}))}function Uo(e){e.b.stop();var t=e.f?0:e.c;if(0<=t)try{return void(e.a.jc()!=t&&e.a.wd(t))}catch(e){}e.b.Na(.25),0!=e.a.jc()&&e.a.wd(0)}function Bo(e,t,r){this.a=e,this.f=t,this.g=r,this.h=!1,this.b=new Be,this.c=new Yo(e),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 jo(e,t.presentationTimeline,r,function(e,t){if(!t.stallEnabled)return null;var r=t.stallSkip,n=new xo(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=Ut.bind(null,e.b.buffered),n=Math.max(e.B,e.g.rebufferingGoal),i=e.g.safeSeekOffset,o=e.a.ob(),a=e.a.Ca(),s=e.a.Y();3>a-o&&(o=a-3);var l=e.a.Nb(n),u=e.a.Nb(i);return n=e.a.Nb(n+i),t>=s?qo(e,t):t>a?a:t<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)}}]}xo.prototype.release=function(){this.g=null,this.c=function(){}},jo.prototype.release=function(){this.f&&(this.f.release(),this.f=null),null!=this.g&&(this.g.stop(),this.g=null),this.b&&(this.b.release(),this.b=null),this.a=this.u=this.l=null},jo.prototype.jd=function(){this.h=!0,Po(this)},Io.prototype.release=function(){this.b.stop();for(var e=f(this.a),t=e.next();!t.done;t=e.next())t.value.release();this.a.clear()},No.prototype.release=function(){this.a=this.c=null,this.b=function(){}},No.prototype.g=function(e){var t=this.a,r=this.c.periods;t!=(e=Mo(r,e)||r[0])&&this.b(e),this.a=e},Fo.prototype.release=function(){this.b&&(this.b.stop(),this.b=null),this.a=null},Fo.prototype.set=function(e){this.c=e,Uo(this)},Bo.prototype.release=function(){this.b&&(this.b.release(),this.b=null),null!=this.c&&(this.c.release(),this.c=null),this.f=function(){},this.a=null},Yo.prototype.release=function(){this.a&&(this.a.stop(),this.a=null),this.b=null},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,Cr(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):(Ca(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):(Ca(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();x(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([xr(e,t,e.Be.bind(e,t)),xr(e,t,e.kg.bind(e,t,r)),xr(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 In).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,xa(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 xa(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=Cr(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:x(r,0);break;case 2:n=R(r),e.a&&e.a.onError(n),w(r)}}))}))})).R(r)}function Ca(e){null!=e.Ga&&(e.Ga.stop(),e.Ga=null)}function xa(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 La(e,t,r,n){var i=new La.b;We(t.headers).forEach((function(e,t){i.append(t,e)}));var o=new La.a,a={Id:!1,te:!1};if(e=new ye(e=La.l(e,r,{body:t.body||void 0,headers:i,method:t.method,signal:o.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},a,n),(function(){return a.Id=!0,o.abort(),Promise.resolve()})),t=t.retryParameters.timeout){var s=new fe((function(){a.te=!0,o.abort()}));s.R(t/1e3),e.finally((function(){s.stop()}))}return e}function ja(e,t,r,n){var i=new ja.f,o=Date.now(),a=0;return new ye(new Promise((function(s,l){for(var u in i.open(t.method,e,!0),i.responseType="arraybuffer",i.timeout=t.retryParameters.timeout,i.withCredentials=t.allowCrossSiteCredentials,i.onabort=function(){l(new me(1,1,7001,e,r))},i.onload=function(t){for(var n=(t=t.target).getAllResponseHeaders().trim().split("\r\n"),i={},o=(n=f(n)).next();!o.done;o=n.next())i[(o=o.value.split(": "))[0].toLowerCase()]=o.slice(1).join(": ");try{var a=Ra(i,t.response,t.status,e,t.responseURL,r);s(a)}catch(e){l(e)}},i.onerror=function(t){l(new me(1,1,1002,e,t,r))},i.ontimeout=function(){l(new me(1,1,1003,e,r))},i.onprogress=function(e){var t=Date.now();(100<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 Pa(){this.a=this.f=this.b=0,this.c=new Map,this.g=0}function Ia(e,t,r){this.h=e,this.b=new Map,this.c=!1,this.g=t,this.f=r,this.a=new Pa}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 Un(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 Fa(e,t){return Ua(e,t,"readwrite")}function Ua(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=Fa(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=Ua(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())Ca(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",La),La.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=La.g,s=La.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,x(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,x(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))}}))}))},La.isSupported=function(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!(!e.fetch||!e.AbortController)},La.isSupported=La.isSupported,La.g=e.fetch,La.a=e.AbortController,La.c=e.ReadableStream,La.b=e.Headers,La.isSupported()&&(De("http",La,2),De("https",La,2)),G("shaka.net.HttpXHRPlugin",ja),ja.f=e.XMLHttpRequest,De("http",ja,1),De("https",ja,1),Pa.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}},Ia.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=Fa(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=Ua(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=Fa(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=Ua(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=Fa(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=Fa(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:x(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:x(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),x(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&&Le(e.audioCapabilities,t.audioCapabilities,r)&&Le(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),x(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]=Ce(u):u.constructor==Object&&t[o]&&t[o].constructor==Object?(e[o]||(e[o]=Ce(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:Fr,abr:{enabled:!0,defaultBandwidthEstimate:e,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:t,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null}};return o.trackSelectionCallback=function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return t.return(function(e,t){var r=e.filter((function(e){return"variant"==e.type})),n=[],i=Dr(t,r.map((function(e){return e.language})));i&&(n=r.filter((function(e){return Ir(e.language)==i}))),0==n.length&&(n=r.filter((function(e){return e.primary}))),0==n.length&&(r.map((function(e){return e.language})),n=r);var o=n.filter((function(e){return e.height&&480>=e.height}));if(o.length&&(o.sort((function(e,t){return t.height-e.height})),n=o.filter((function(e){return e.height==o[0].height}))),r=[],n.length){var a=Math.floor(n.length/2);n.sort((function(e,t){return e.bandwidth-t.bandwidth})),r.push(n[a])}for(n=f(e),a=n.next();!a.done;a=n.next())"text"==(a=a.value).type&&r.push(a);return r}(e,a.preferredAudioLanguage))}}))}))},a}function Es(e,t,r){var n={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return vs(e,t,r||As(),n,"")}function Ts(){this.a=null,this.b=[]}function Ss(e,t){if(null==e.a)e.a={timestamp:Date.now()/1e3,state:t,duration:0};else{var r=Date.now()/1e3;e.a.duration=r-e.a.timestamp,e.a.state!=t&&(e.b.push(e.a),e.a={timestamp:r,state:t,duration:0})}}function ws(e,t){var r=0;e.a&&e.a.state==t&&(r+=e.a.duration);for(var n=f(e.b),i=n.next();!i.done;i=n.next())r+=(i=i.value).state==t?i.duration:0;return r}function ks(){this.b=this.c=null,this.a=[]}function Cs(){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 xs(t,r){var n=this;ke.call(this),this.i=pl,this.a=null,this.gb=!1,this.g=new Be,this.Dc=this.l=this.Fb=this.b=this.s=this.f=this.Yb=this.B=this.Zb=this.W=this.ib=this.m=this.D=this.h=this.K=null,this.Xd=1e9,this.ac=new Set,this.kb=!0,this.pa=null,this.Ud=!1,this.Rd=0,this.oa=null,this.$=new po,this.c=Fs(this),this.bc={width:1/0,height:1/0},this.u=null,this.Gb=new To(this.c.preferredAudioLanguage,this.c.preferredVariantRole,this.c.preferredAudioChannelCount),this.na=this.c.preferredTextLanguage,this.fb=this.c.preferredTextRole,r&&r(this),this.K=function(e){return new Ie((function(t,r){e.l&&e.l.segmentDownloaded(t,r)}))}(this),this.g.w(e,"online",(function(){n.sd()})),this.F={name:"detach"},this.O={name:"attach"},this.Ha={name:"unload"},this.Mc={name:"manifest-parser"},this.Kc={name:"manifest"},this.hb={name:"media-source"},this.Ec={name:"drm-engine"},this.S={name:"load"},this.Rc={name:"src-equals-drm-engine"},this.jb={name:"src-equals"};var i=new Map;i.set(this.O,(function(e,t){return Ae(function(e,t,r){return null==t.v&&(t.v=r.v,e.g.w(t.v,"error",(function(){var t=el(e);t&&e.Ma(t)}))),e.a=t.v,Promise.resolve()}(n,e,t))})),i.set(this.F,(function(e){return e.v&&(n.g.ea(e.v,"error"),e.v=null),n.a=null,Ae(e=Promise.resolve())})),i.set(this.Ha,(function(e){return Ae(Ps(n,e))})),i.set(this.hb,(function(t){return Ae(t=function(t,r){return p((function n(){var i,o,a,s;return M(n,(function(n){switch(n.j){case 1:return i=e.muxjs?new Mt:new Nt,o=t.c.textDisplayFactory,a=new o,t.Fc=o,S(n,(s=new yr(r.v,i,a)).s,2);case 2:t.D=s,w(n)}}))}))}(n,t))})),i.set(this.Mc,(function(e,t){return Ae(function(e,t,r){return p((function n(){var i,o,a,s;return M(n,(function(n){switch(n.j){case 1:if(t.Aa=r.Aa,t.mimeType=r.mimeType,t.uri=r.uri,i=t.uri,o=e.K,e.Fb=i,t.Aa){e.s=t.Aa(),n.A(2);break}return a=e,S(n,gi.create(i,o,e.c.manifest.retryParameters,t.mimeType),3);case 3:a.s=n.o;case 2:s=Ce(e.c.manifest),r.v&&"AUDIO"===r.v.nodeName&&(s.disableVideo=!0),e.s.configure(s),w(n)}}))}))}(n,e,t))})),i.set(this.Kc,(function(e){return function(e,t){var r=t.uri,n=e.K;e.Yb=new Zo,function(e,t){e.b=t}(e.Yb,(function(t){Qs(e,"timelineregionadded",t)}));var i={networkingEngine:n,filterNewPeriod:function(t){return e.Nc(t)},filterAllPeriods:function(t){return Us(e,t)},onTimelineRegionAdded:function(t){var r=e.Yb;e:{for(var n=f(r.a),i=n.next();!i.done;i=n.next())if((i=i.value).schemeIdUri==t.schemeIdUri&&i.id==t.id&&i.startTime==t.startTime&&i.endTime==t.endTime){n=i;break e}n=null}null==n&&(r.a.add(t),r.b(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return e.Ma(t)}};return new ye(Promise.resolve().then((function(){return p((function t(){var n;return M(t,(function(t){switch(t.j){case 1:return n=e,S(t,e.s.start(r,i),2);case 2:if(n.b=t.o,e.dispatchEvent(new Se("manifestparsed")),0==e.b.periods.length)throw new me(2,4,4014);!function(e){function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}e.some((function(e){return e.variants.some(t)}))&&e.forEach((function(e){e.variants=e.variants.filter(t)}))}(e.b.periods),w(t)}}))}))})),(function(){return e.s.stop()}))}(n,e)})),i.set(this.Ec,(function(){return Ae(function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return e.h=new pt({ub:e.K,onError:function(t){e.Ma(t)},qc:function(t){tl(e,t)},onExpirationUpdated:function(t,r){rl(e,t,r)},onEvent:function(t){e.dispatchEvent(t)}}),e.h.configure(e.c.drm),S(t,mt(e.h,Do(e.b.periods),e.b.offlineSessionIds),2);case 2:Us(e,e.b.periods),w(t)}}))}))}(n))})),i.set(this.S,(function(e,t){return Ae(function(e,t,r){return p((function n(){var i,o,a,s,l,u,c,d,h;return M(n,(function(n){switch(n.j){case 1:return t.startTime=r.startTime,i=t.v,o=t.uri,e.Fb=o,e.u=new Cs,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:Ut(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 Io(e.a);return n.a.add(t),n.a.add(r),n}(e),e.W=new Fo({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),Is(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 Cs,e.m=new Wo(t.v),null!=t.startTime&&e.m.m(t.startTime),e.W=new Fo({jc:function(){return t.v.playbackRate},wd:function(e){t.v.playbackRate=e},Yd:function(e){t.v.currentTime+=e}}),Is(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,Ps(n,e),2);case 2:return t.return(e.v?n.O:n.F)}}))}))},Bf:function(e){n.dispatchEvent(new Se("onstateidle",{state:e.name}))}}),t&&this.Hb(t,!0)}_(qa,Ba),qa.prototype.updateManifestExpiration=function(e,t){var r=Fa(this.b,this.a),n=r.store(),i=new ge;return n.get(e).onsuccess=function(r){(r=r.target.result)?(r.expiration=t,n.put(r),i.resolve()):i.reject(new me(2,9,9012,"Could not find values for "+e))},r.promise().then((function(){return i}))},qa.prototype.ec=function(e){return{originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,periods:e.periods.map(Xa),sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata}},qa.prototype.Jd=function(e){return{data:e.data}},_(es,Ba),es.prototype.hasFixedKeySpace=function(){return this.f},es.prototype.addSegments=function(e){return this.f?Ka(this.c):this.add(this.c,e)},es.prototype.addManifests=function(e){return this.f?Ka(this.a):this.add(this.a,e)},es.prototype.ec=function(e){return null==e.expiration&&(e.expiration=1/0),e},(n=ts.prototype).init=function(){var t=this,r=new ge,n=e.indexedDB.open("shaka_offline_db",4);return n.onsuccess=function(e){e=e.target.result,t.f=e;var n=e.objectStoreNames;n=n.contains("manifest")&&n.contains("segment")?new qa(e,"segment","manifest"):null,t.a=n,n=(n=e.objectStoreNames).contains("manifest-v2")&&n.contains("segment-v2")?new es(e,"segment-v2","manifest-v2",!0):null,t.b=n,n=(n=e.objectStoreNames).contains("manifest-v3")&&n.contains("segment-v3")?new es(e,"segment-v3","manifest-v3",!1):null,t.c=n,e=e.objectStoreNames.contains("session-ids")?new Ha(e):null,t.g=e,r.resolve()},n.onupgradeneeded=function(e){e=e.target.result;for(var t=f(["segment-v3","manifest-v3","session-ids"]),r=t.next();!r.done;r=t.next())r=r.value,e.objectStoreNames.contains(r)||e.createObjectStore(r,{autoIncrement:!0})},n.onerror=function(e){r.reject(new me(2,9,9001,n.error)),e.preventDefault()},r},n.destroy=function(){var e=this;return p((function t(){return M(t,(function(t){switch(t.j){case 1:if(!e.a){t.A(2);break}return S(t,e.a.destroy(),2);case 2:if(!e.b){t.A(4);break}return S(t,e.b.destroy(),4);case 4:if(!e.c){t.A(6);break}return S(t,e.c.destroy(),6);case 6:if(!e.g){t.A(8);break}return S(t,e.g.destroy(),8);case 8:e.f&&e.f.close(),w(t)}}))}))},n.getCells=function(){var e=new Map;return this.a&&e.set("v1",this.a),this.b&&e.set("v2",this.b),this.c&&e.set("v3",this.c),e},n.getEmeSessionCell=function(){return this.g},n.erase=function(){var t=this;return p((function r(){return M(r,(function(r){switch(r.j){case 1:if(!t.a){r.A(2);break}return S(r,t.a.destroy(),2);case 2:if(!t.b){r.A(4);break}return S(r,t.b.destroy(),4);case 4:if(!t.c){r.A(6);break}return S(r,t.c.destroy(),6);case 6:return t.f&&t.f.close(),S(r,function(){var t=new ge,r=e.indexedDB.deleteDatabase("shaka_offline_db");return r.onblocked=function(){},r.onsuccess=function(){t.resolve()},r.onerror=function(e){t.reject(new me(2,9,9001,r.error)),e.preventDefault()},t}(),8);case 8:return t.f=null,t.a=null,t.b=null,t.c=null,S(r,t.init(),0)}}))}))},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,C(r,2),S(r,i.init(),4));case 4:return S(r,za(i,n.wa(),n.ba()),5);case 5:return S(r,r.o.getManifests([n.key()]),6);case 6:return o=r.o,a=o[0],s=new is(n.wa(),n.ba()),r.return(function(e,t){var r=new yi(null,0);r.xa(t.duration);var n=t.periods.map((function(t){return os(e,t,r)})),i=t.drmInfo?[t.drmInfo]:[];return t.drmInfo&&n.forEach((function(e){e.variants.forEach((function(e){e.drmInfos=i}))})),{presentationTimeline:r,minBufferTime:2,offlineSessionIds:t.sessionIds,periods:n}}(s,a));case 2:return L(r),S(r,i.destroy(),7);case 7:j(r,0)}}))}))},n.stop=function(){return Promise.resolve()},n.update=function(){},n.onExpirationUpdated=function(e,t){var r=this;return p((function n(){var i,o,a,s,l,u,c;return M(n,(function(n){switch(n.j){case 1:return i=r.a,o=new Ya,k(n,2,3),S(n,o.init(),5);case 5:return S(n,za(o,i.wa(),i.ba()),6);case 6:return S(n,(a=n.o).getManifests([i.key()]),7);case 7:if(s=n.o,l=s[0],u=l.sessionIds.includes(e),c=null==l.expiration||l.expiration>t,!u||!c){n.A(3);break}return S(n,a.updateManifestExpiration(i.key(),t),3);case 3:return L(n),S(n,o.destroy(),10);case 10:j(n,0);break;case 2:R(n),n.A(3)}}))}))},gi.Cb("application/x-offline-manifest",ls),G("shaka.offline.OfflineScheme",us),us.h=function(e){return _e(e={uri:e,ld:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}})},us.i=function(e,t){var r=new Ya;return _e(void 0).U((function(){return r.init()})).U((function(){return za(r,t.wa(),t.ba())})).U((function(e){return e.getSegments([t.key()])})).U((function(e){return{uri:t,ld:t,data:e[0].data,headers:{}}})).finally((function(){return r.destroy()}))},De("offline",us),fs.prototype.destroy=function(){var e=this;return p((function t(){return M(t,(function(t){switch(t.j){case 1:return e.l=!1,e.b&&e.b.abort(),ps(e),S(t,e.m,2);case 2:e.a&&e.a.va.Ya();for(var r=f(e.f),n=r.next();!n.done;n=r.next())n.value.va.Ya();e.a=null,e.f=[],e.g=null,w(t)}}))}))},G("shaka.text.SimpleTextDisplayer",ms),ms.prototype.remove=function(e,t){return!!this.a&&(ys(this.a,(function(r){return r.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(xs,ke),G("shaka.Player",xs),xs.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)}}))}))},xs.prototype.destroy=xs.prototype.destroy,xs.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 Ls=["output-restricted","internal-error"],js={};function Ps(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 Is(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||Ft(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(Ft(e.a.buffered)>=r){t=!0;break e}}t=!1}break;default:t=!1}var n=Bt(e.a.buffered,e.a.currentTime),i=t,o=(r=e.B).b.get(r.a);t=r.a,n=i||n>=o?Co:ko,r.a=n,t!=n&&Gs(e)}function Ds(e){if(e.s){var t=Ce(e.c.manifest);e.a&&"AUDIO"===e.a.nodeName&&(t.disableVideo=!0),e.s.configure(t)}if(e.h&&e.h.configure(e.c.drm),e.f){e.f.configure(e.c.streaming);try{e.b.periods.forEach(e.Nc.bind(e))}catch(t){e.Ma(t)}var r=ia(e.f),n=oa(e.f);t=ll(e),r=Nr.Qd(r,n,t.variants),e.l&&r&&r.allowedByApplication&&r.allowedByKeySystem?Hs(e,t.variants):Ys(e,t)}if(e.D&&(t=e.c.textDisplayFactory,e.Fc!=t)){r=new t;var i=(n=e.D).g;n.g=r,i&&(r.setTextVisibility(i.isTextVisible()),i.destroy()),n.a&&(n.a.c=r),e.Fc=t,e.f&&(r=(t=e.f).b.get("text"))&&ca(t,r.stream,!0,0,!0)}e.l&&(e.l.configure(e.c.abr),e.c.abr.enabled&&!e.kb?e.l.enable():e.l.disable(),Zs(e)),e.B&&(t=e.c.streaming.rebufferingGoal,e.b&&(t=Math.max(t,e.b.minBufferTime)),wo(e.B,t,Math.min(.5,t/2)))}function Ms(e,t,r,n){go(e.$,t).variant=r,(e=e.u.c).c!=r&&(e.c=r,e.a.push({timestamp:Date.now()/1e3,id:r.id,type:"variant",fromAdaptation:n,bandwidth:r.bandwidth}))}function Ns(e,t,r,n){mo(e.$,t,r),(e=e.u.c).b!=r&&(e.b=r,e.a.push({timestamp:Date.now()/1e3,id:r.id,type:"text",fromAdaptation:n,bandwidth:null}))}function Fs(e){var t=As();return t.streaming.failureCallback=function(t){e.V()&&[1001,1002,1003].includes(t.code)&&(t.severity=1,e.sd())},t.textDisplayFactory=function(){return new ms(e.a)},t}function Us(e,t){var r=e.f?ia(e.f):null,n=e.f?oa(e.f):null;if(t.forEach(Nr.filterNewPeriod.bind(null,e.h,r,n)),0==(r=function(e,t){var r=0;return e.forEach((function(e){r+=t(e)?1:0})),r}(t,(function(e){return e.variants.some(Nr.rb)}))))throw new me(2,4,4032);if(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,Uo(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&&!Ls.includes(r)),i!=e.allowedByKeySystem&&(n=!0)}))}))})),i=ia(e.f);var a=oa(e.f);(i=Nr.Qd(i,a,r.variants))&&!i.allowedByKeySystem&&zs(e,r),n&&($s(e),Hs(e,r.variants))}}function rl(e,t,r){e.s&&e.s.onExpirationUpdated&&e.s.onExpirationUpdated(t,r),e.dispatchEvent(new Se("expirationupdated"))}function nl(e,t){var r=e.h?$e(e.h.W):{},n=Object.keys(r);n=n.length&&"00"==n[0];for(var i=!1,o=!1,a=[],s=[],l=f(t),u=l.next();!u.done;u=l.next()){var c=[];(u=u.value).audio&&c.push(u.audio),u.video&&c.push(u.video);for(var d=(c=f(c)).next();!d.done;d=c.next())if((d=d.value).keyId){var h=r[n?"00":d.keyId];h?Ls.includes(h)&&(s.includes(h)||s.push(h)):a.includes(d.keyId)||a.push(d.keyId)}u.allowedByApplication?u.allowedByKeySystem&&(i=!0):o=!0}if(!i)throw new me(2,4,4012,{hasAppRestrictions:o,missingKeys:a,restrictedKeyStatuses:s})}function il(e,t){p((function r(){return M(r,(function(r){switch(r.j){case 1:return S(r,Promise.resolve(),2);case 2:e.i!=hl&&e.dispatchEvent(t),w(r)}}))}))}function ol(e){for(var t=new Set,r=(e=f(e)).next();!r.done;r=e.next())(r=r.value).language?t.add(Ir(r.language)):t.add("und");return t}function al(e){for(var t=new Map,r=(e=f(e)).next();!r.done;r=e.next()){var n=r.value;r="und";var i=[];for(n.language&&(r=Ir(n.language)),(i="variant"==n.type?n.audioRoles:n.roles)&&i.length||(i=[""]),t.has(r)||t.set(r,new Set),i=(n=f(i)).next();!i.done;i=n.next())i=i.value,t.get(r).add(i)}var o=[];return t.forEach((function(e,t){for(var r=f(e),n=r.next();!n.done;n=r.next())o.push({language:t,role:n.value})})),o}function sl(e){return null==(e=ll(e))?[]:e.variants.filter((function(e){return Nr.rb(e)}))}function ll(e){for(var t=e.m.h(),r=null,n=(e=f(e.b.periods)).next();!n.done;n=e.next())(n=n.value).startTime<=t&&(r=n);return r}function ul(e){var t=ll(e);return go(e.$,t).variant}function cl(){return new me(2,7,7e3)}function dl(e,t,r,n,i,o){return n==e&&i.v==o.v&&i.uri==o.uri&&i.mimeType==o.mimeType&&i.Aa==o.Aa?t:r}function fl(e){return new Promise((function(t,r){e.Ya=function(){return r(cl())},e.pc=function(){return t()},e.onError=function(e){return r(e)},e.rc=function(){return r(cl())}}))}xs.registerSupportPlugin=function(e,t){js[e]=t},xs.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"))},xs.probeSupport=function(){return xt().then((function(e){for(var t=gi.Sf(),r={},n=f('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",")),i=n.next();!i.done;i=n.next()){r[i=i.value]=Ze()?!!pr(i)||MediaSource.isTypeSupported(i)||Wt(i):Qe(i);var o=i.split(";")[0];r[o]=r[o]||r[i]}for(var a in e={manifest:t,media:r,drm:e},js)e[a]=js[a]();return e}))},xs.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)},xs.prototype.attach=xs.prototype.Hb,xs.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)},xs.prototype.detach=xs.prototype.detach,xs.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)},xs.prototype.unload=xs.prototype.Cd,xs.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)}}))},xs.prototype.load=xs.prototype.load,xs.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=bs(e,t));var r=Es(this.c,e,Fs(this));return Ds(this),r},xs.prototype.configure=xs.prototype.configure,xs.prototype.getConfiguration=function(){var e=Fs(this);return Es(e,this.c,Fs(this)),e},xs.prototype.getConfiguration=xs.prototype.getConfiguration,xs.prototype.$f=function(){for(var e in this.c)delete this.c[e];Es(this.c,Fs(this),Fs(this)),Ds(this)},xs.prototype.resetConfiguration=xs.prototype.$f,xs.prototype.We=function(){return this.i},xs.prototype.getLoadMode=xs.prototype.We,xs.prototype.af=function(){return this.a},xs.prototype.getMediaElement=xs.prototype.af,xs.prototype.Mb=function(){return this.K},xs.prototype.getNetworkingEngine=xs.prototype.Mb,xs.prototype.hc=function(){return this.Fb},xs.prototype.getAssetUri=xs.prototype.hc,xs.prototype.Ze=function(){return Kr("getManifestUri",'Please use "getAssetUri" instead.'),this.hc()},xs.prototype.getManifestUri=xs.prototype.Ze,xs.prototype.V=function(){return this.b?this.b.presentationTimeline.V():!(!this.a||!this.a.src)&&1/0==this.a.duration},xs.prototype.isLive=xs.prototype.V,xs.prototype.Xa=function(){return!!this.b&&this.b.presentationTimeline.Xa()},xs.prototype.isInProgress=xs.prototype.Xa,xs.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)},xs.prototype.isAudioOnly=xs.prototype.uf,xs.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}},xs.prototype.seekRange=xs.prototype.bg,xs.prototype.keySystem=function(){return _t(this.drmInfo())},xs.prototype.keySystem=xs.prototype.keySystem,xs.prototype.drmInfo=function(){return this.h?this.h.a:null},xs.prototype.drmInfo=xs.prototype.drmInfo,xs.prototype.Lb=function(){return this.h?this.h.Lb():1/0},xs.prototype.getExpiration=xs.prototype.Lb,xs.prototype.Xc=function(){return!!this.B&&this.B.a==ko},xs.prototype.isBuffering=xs.prototype.Xc,xs.prototype.ef=function(){if(this.W){var e=this.W;e=e.f?0:e.c}else e=0;return e},xs.prototype.getPlaybackRate=xs.prototype.ef,xs.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)))},xs.prototype.trickPlay=xs.prototype.ug,xs.prototype.Ge=function(){this.i==gl&&this.W.set(1),this.i==ml&&(this.W.set(1),la(this.f,!1))},xs.prototype.cancelTrickPlay=xs.prototype.Ge,xs.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)})):[]},xs.prototype.getVariantTracks=xs.prototype.Vc,xs.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)})):[]},xs.prototype.getTextTracks=xs.prototype.qb,xs.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)}},xs.prototype.selectTextTrack=xs.prototype.td,xs.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])},xs.prototype.selectEmbeddedTextTrack=xs.prototype.dg,xs.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},xs.prototype.usingEmbeddedTextTrack=xs.prototype.zg,xs.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)}},xs.prototype.selectVariantTrack=xs.prototype.fg,xs.prototype.Re=function(){return al(this.Vc())},xs.prototype.getAudioLanguagesAndRoles=xs.prototype.Re,xs.prototype.mf=function(){return al(this.qb())},xs.prototype.getTextLanguagesAndRoles=xs.prototype.mf,xs.prototype.Qe=function(){return Array.from(ol(this.Vc()))},xs.prototype.getAudioLanguages=xs.prototype.Qe,xs.prototype.lf=function(){return Array.from(ol(this.qb()))},xs.prototype.getTextLanguages=xs.prototype.lf,xs.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)}},xs.prototype.selectAudioLanguage=xs.prototype.cg,xs.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)},xs.prototype.selectTextLanguage=xs.prototype.eg,xs.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))}},xs.prototype.selectVariantsByLabel=xs.prototype.gg,xs.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},xs.prototype.isTextTrackVisible=xs.prototype.mc,xs.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"))&&(Ca(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)}}))}))},xs.prototype.setTextTrackVisibility=xs.prototype.jg,xs.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},xs.prototype.getPlayheadTimeAsDate=xs.prototype.gf,xs.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},xs.prototype.getPresentationStartTimeAsDate=xs.prototype.jf,xs.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},xs.prototype.getBufferedInfo=xs.prototype.Sc,xs.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}},xs.prototype.getStats=xs.prototype.getStats,xs.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))}}))}))},xs.prototype.addTextTrack=xs.prototype.addTextTrack,xs.prototype.vd=function(e,t){this.bc.width=e,this.bc.height=t},xs.prototype.setMaxHardwareResolution=xs.prototype.vd,xs.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},xs.prototype.retryStreaming=xs.prototype.sd,xs.prototype.Xe=function(){return this.b},xs.prototype.getManifest=xs.prototype.Xe,xs.prototype.Ye=function(){return this.s?this.s.constructor:null},xs.prototype.getManifestParserFactory=xs.prototype.Ye,(n=xs.prototype).Nc=function(e){var t=this.f?ia(this.f):null,r=this.f?oa(this.f):null;if(Nr.filterNewPeriod(this.h,t,r,e),!(t=e.variants).some(Nr.rb))throw new me(2,4,4011);if(nl(this,e.variants),Nr.Gd(t,this.c.restrictions,this.bc)&&this.f&&ll(this)==e&&$s(this),e=this.h?this.h.a:null)for(r=(t=f(t)).next();!r.done;r=t.next())for(var n=(r=f(r.value.drmInfos)).next();!n.done;n=r.next())if((n=n.value).keySystem==e.keySystem)for(var i=(n=f(n.initData||[])).next();!i.done;i=n.next())i=i.value,bt(this.h,i.initDataType,i.initData)},n.zf=function(e){try{this.kb=!0,this.l.disable(),Zs(this);var t=Hs(this,e.variants),r=Nr.Jb(e.textStreams,this.na,this.fb)[0]||null;this.pa&&(e.variants.includes(this.pa)&&(t=this.pa),this.pa=null),this.oa&&(e.textStreams.includes(this.oa)&&(r=this.oa),this.oa=null),t&&Ms(this,e,t,!0),r&&Ns(this,e,r,!0);var n=this.f,i=n.b.get("video");if(i)var o=n.c.periods[i.ia];else{var a=n.b.get("audio");o=a?n.c.periods[a.ia]:null}var s=t?t.audio:null;if(!o&&r){var l;if(l=s){e=r;var u=Ir(this.c.preferredTextLanguage),c=Ir(s.language),d=Ir(e.language);l=jr(d,u)&&!jr(c,d)}l&&(this.gb=!0),this.gb&&this.D.g.setTextVisibility(!0),Js(this)}return this.c.streaming.alwaysStreamText||this.mc()?{variant:t,text:r}:{variant:t,text:null}}catch(e){return this.Ma(e),{variant:null,text:null}}},n.Fe=function(){this.kb=!1,this.c.abr.enabled&&(this.l.enable(),Zs(this)),this.pa&&(ua(this.f,this.pa,this.Ud,this.Rd),qs(this),this.pa=null),this.oa&&(ca(this.f,this.oa,!0,0,!1),Xs(this),this.oa=null)},n.Ef=function(){this.s&&this.s.update&&this.s.update()},n.Jf=function(){this.m&&this.m.s()},n.Ma=function(e){if(this.i!=hl){var t=new Se("error",{detail:e});this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)}};var hl=0,pl=1,ml=2,gl=3;function yl(e,t){var r=os(new is(e.wa(),e.ba()),t.periods[0],new yi(null,0)),n=t.appMetadata||{};return r=vl(r),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:r,appMetadata:n}}function vl(e){for(var t=[],r=Nr.df(e.variants),n=(r=f(r)).next();!n.done;n=r.next())t.push(Nr.Ed(n.value));for(r=(e=f(e.textStreams)).next();!r.done;r=e.next())t.push(Nr.xc(r.value));return t}function bl(){this.a={}}function _l(e,t){var r=t.audio,n=t.video;if(r&&!n&&(e.a[r.id]=r.bandwidth||t.bandwidth),!r&&n&&(e.a[n.id]=n.bandwidth||t.bandwidth),r&&n){var i=r.bandwidth||393216,o=n.bandwidth||t.bandwidth-i;0>=o&&(o=t.bandwidth),e.a[r.id]=i,e.a[n.id]=o}}function Al(e,t){var r=e.a[t];return null==r&&(r=0),r}function El(e){this.a=!1,this.b=new ge,this.c=e}function Tl(e){var t=new wl;e.periods.forEach((function(e,r){var n=Cl(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 Cl(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 xl(e){var t=this;if(e&&e.constructor!=xs)throw new me(2,9,9008);this.b=this.a=null,e?(this.a=e.c,this.b=e.Mb()):(this.a=As(),this.b=new Ie),this.f=!1,this.c=[],this.g=[];var r=!e;this.h=new El((function(){return p((function e(){var n;return M(e,(function(e){switch(e.j){case 1:return n=function(){},S(e,Promise.all(t.g.map((function(e){return e.then(n,n)}))),2);case 2:if(!r){e.A(3);break}return S(e,t.b.destroy(),3);case 3:t.a=null,t.b=null,w(e)}}))}))}))}function Rl(){if(Ze())e:{for(var e=f($a.values()),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function Ll(e,t){for(var r=[],n=f(e.periods),i=n.next();!i.done;i=n.next())for(var o=(i=f(i.value.streams)).next();!o.done;o=i.next())o=o.value,t&&"video"==o.contentType?r.push({contentType:qe(o.mimeType,o.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=o.contentType||r.push({contentType:qe(o.mimeType,o.codecs),robustness:e.drmInfo.audioRobustness});return r}function jl(e,t,r){return p((function n(){return M(n,(function(n){switch(n.j){case 1:return S(n,function(e,t,r,n){return p((function i(){var o,a,s;return M(i,(function(i){switch(i.j){case 1:return n.drmInfo?(o=function(e){var t=Array.from(e.a.keys());if(!t.length)throw new me(2,9,9e3,"No supported storage mechanisms found");return e.a.get(t[0]).getEmeSessionCell()}(r),a=n.sessionIds.map((function(e){return{sessionId:e,keySystem:n.drmInfo.keySystem,licenseUri:n.drmInfo.licenseServerUri,serverCertificate:n.drmInfo.serverCertificate,audioCapabilities:Ll(n,!1),videoCapabilities:Ll(n,!0)}})),S(i,cs(t,e,a),2)):i.return();case 2:return s=i.o,S(i,o.remove(s),3);case 3:return S(i,o.add(a.filter((function(e){return-1==s.indexOf(e.sessionId)}))),0)}}))}))}(e.b,e.a.drm,r,t),0)}}))}))}function Pl(e,t,r,n){function i(){s+=1,e.a.offline.progressCallback(l,s/a)}var o=function(e){var t=[];return e.periods.forEach((function(e){e.streams.forEach((function(e){null!=e.initSegmentKey&&t.push(e.initSegmentKey),e.segments.forEach((function(e){t.push(e.dataKey)}))}))})),t}(n),a=o.length+1,s=0,l=yl(r,n);return Promise.all([t.removeSegments(o,i),t.removeManifests([r.key()],i)])}function Il(e,t,r,n,i,o){var a={id:o.id,originalId:o.originalId,primary:o.primary,presentationTimeOffset:o.presentationTimeOffset||0,contentType:o.type,mimeType:o.mimeType,codecs:o.codecs,frameRate:o.frameRate,pixelAspectRatio:o.pixelAspectRatio,kind:o.kind,language:o.language,label:o.label,width:o.width||null,height:o.height||null,initSegmentKey:null,encrypted:o.encrypted,keyId:o.keyId,segments:[],variantIds:[]};i=i.presentationTimeline.Ob();var s=o.id,l=o.initSegmentReference;return l&&(l=vi(l.c(),l.b,l.a,e.a.streaming.retryParameters),Oa(t,s,l,.5*Al(n,o.id),!0,(function(t){return p((function n(){var i;return M(n,(function(n){switch(n.j){case 1:return S(n,r.addSegments([{data:t}]),2);case 2:i=n.o,e.c.push(i[0]),a.initSegmentKey=i[0],w(n)}}))}))}))),function(e,t,r){for(var n=null==(t=e.findSegmentPosition(t))?null:e.getSegmentReference(t);n;)r(n),n=e.getSegmentReference(++t)}(o,i,(function(i){var l=vi(i.c(),i.b,i.a,e.a.streaming.retryParameters);Oa(t,s,l,function(e,t,r){return r=r.endTime-r.startTime,Al(e,t)*r}(n,o.id,i),!1,(function(t){return p((function n(){var o;return M(n,(function(n){switch(n.j){case 1:return S(n,r.addSegments([{data:t}]),2);case 2:o=n.o,e.c.push(o[0]),a.segments.push({startTime:i.startTime,endTime:i.endTime,dataKey:o[0]}),w(n)}}))}))}))})),a}function Ol(e){if(e.h.a)throw new me(2,9,7001)}function Dl(){if(!Rl())throw new me(2,9,9e3)}function Ml(e,t){return p((function r(){return M(r,(function(r){switch(r.j){case 1:return e.g.push(t),C(r,2),S(r,t,4);case 4:return r.return(r.o);case 2:L(r),Re(e.g,t),j(r,0)}}))}))}function Nl(e){e.variants.map((function(e){return e.video}));var t=new Set(e.variants.map((function(e){return e.audio})));e=e.textStreams;for(var r=f(t),n=r.next();!n.done;n=r.next())for(var i=(n=f(t)).next();!i.done;i=n.next());for(r=(t=f(e)).next();!r.done;r=t.next())for(n=(r=f(e)).next();!n.done;n=r.next());}xs.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",xl),xl.support=Rl,xl.prototype.destroy=function(){return this.h.destroy()},xl.prototype.destroy=xl.prototype.destroy,xl.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)},xl.prototype.configure=xl.prototype.configure,xl.prototype.getConfiguration=function(){var e=As();return Es(e,this.a,As()),e},xl.prototype.getConfiguration=xl.prototype.getConfiguration,xl.prototype.Mb=function(){return this.b},xl.prototype.getNetworkingEngine=xl.prototype.Mb,xl.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),C(n,3),S(n,s.start(t,a),5);case 5:return l=n.o,Ol(e),u=function(e){for(var t=new Set,r=(e=f(e.periods)).next();!r.done;r=e.next()){for(var n=f((r=r.value).textStreams),i=n.next();!i.done;i=n.next())t.add(i.value);for(r=f(r.variants),n=r.next();!n.done;n=r.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video)}return t}(l),S(n,Promise.all(Ye(u,(function(e){return e.createSegmentIndex()}))),6);case 6:if(Ol(e),i)throw i;return n.return(l);case 3:return L(n),S(n,s.stop(),7);case 7:j(n,0)}}))}))}(e,t,n),2));case 2:if(o=i.o,Ol(e),o.presentationTimeline.V()||o.presentationTimeline.Xa())throw new me(2,9,9005,t);return a=null,s=new Ya,u=l=null,k(i,3,4),S(i,function(e,t,r){return p((function n(){var i,o,a;return M(n,(function(n){switch(n.j){case 1:return i=new pt({ub:e.b,onError:r,qc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),o=Do(t.periods),a=e.a,i.configure(a.drm),S(n,function(e,t,r){return e.s=[],e.D=r,gt(e,t)}(i,o,a.offline.usePersistentLicense),2);case 2:return S(n,yt(i),3);case 3:return S(n,vt(i),4);case 4:return n.return(i)}}))}))}(e,o,(function(e){u=u||e})),6);case 6:if(a=i.o,Ol(e),u)throw u;return S(i,function(e,t,r){return p((function n(){var i;return M(n,(function(n){switch(n.j){case 1:return i={width:1/0,height:1/0},function(e,t,r){for(var n=(e=f(e.periods)).next();!n.done;n=e.next())(n=n.value).variants=n.variants.filter((function(e){return Nr.bd(e,t,r)}))}(t,e.a.restrictions,i),function(e){for(var t=(e=f(e.periods)).next();!t.done;t=e.next())(t=t.value).variants=t.variants.filter((function(e){var t=!0;return e.audio&&(t=t&&br(e.audio)),e.video&&(t=t&&br(e.video)),t}))}(t),function(e,t){for(var r=f(e.periods),n=r.next();!n.done;n=r.next())(n=n.value).variants=n.variants.filter((function(e){return Rt(t,e)}))}(t,r),Tl(t),S(n,function(e,t){return p((function r(){var n,i,o,a;return M(r,(function(r){switch(r.j){case 1:n=null,i=f(e.periods),o=i.next();case 2:if(o.done){r.A(0);break}return a=o.value,n&&(a.variants=a.variants.filter((function(e){return kl(n,new Sl(e))}))),S(r,t(a),5);case 5:n=Cl(a.variants),o=i.next(),r.A(2)}}))}))}(t,(function(t){return p((function r(){var n,i,o,a,s,l,u,c;return M(r,(function(r){switch(r.j){case 1:n=Nr,i=[];for(var d=f(t.variants),h=d.next();!h.done;h=d.next())o=h.value,i.push(n.Ed(o));for(h=(d=f(t.textStreams)).next();!h.done;h=d.next())a=h.value,i.push(n.xc(a));return S(r,e.a.offline.trackSelectionCallback(i),2);case 2:for(s=r.o,l=new Set,u=new Set,h=(d=f(s)).next();!h.done;h=d.next())"variant"==(c=h.value).type&&l.add(c.id),"text"==c.type&&u.add(c.id);t.variants=t.variants.filter((function(e){return l.has(e.id)})),t.textStreams=t.textStreams.filter((function(e){return u.has(e.id)})),w(r)}}))}))})),2);case 2:(function(e){if(0==e.periods.length)throw new me(2,4,4014);for(var t=(e=f(e.periods)).next();!t.done;t=e.next())Nl(t.value)})(t),w(n)}}))}))}(e,o,a),7);case 7:return S(i,s.init(),8);case 8:return Ol(e),S(i,function(e){var t=null;if(e.a.forEach((function(e,r){e.getCells().forEach((function(e,n){e.hasFixedKeySpace()||t||(t={path:{wa:r,ba:n},ba:e})}))})),t)return t;throw new me(2,9,9013,"Could not find a cell that supports add-operations")}(s),9);case 9:return l=i.o,Ol(e),S(i,function(e,t,r,n,i,o){return p((function a(){var s,l,u,c,d,h,m,g,y,v;return M(a,(function(a){switch(a.j){case 1:return s=function(e,t,r){var n=null==t.expiration?1/0:t.expiration;return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.Y(),size:0,expiration:n,tracks:t=vl(t.periods[0]),appMetadata:r}}(i,n,o),l=n.periods.some((function(e){return e.variants.some((function(e){return e.drmInfos&&e.drmInfos.length}))})),u=n.periods.some((function(e){return e.variants.some((function(e){return e.drmInfos.some((function(e){return e.initData&&e.initData.length}))}))})),d=null,(c=l&&!u)&&(h=r.a,d=Fl.get(h.keySystem)),m=new Ia(e.b,(function(t,r){s.size=r,e.a.offline.progressCallback(s,t)}),(function(t,n){c&&e.a.offline.usePersistentLicense&&d==n&&bt(r,"cenc",t)})),C(a,2),y=g=function(e,t,r,n,i,o,a){var s=new bl,l=i.periods.map((function(n){return function(e,t,r,n,i,o){for(var a=f(o.variants),s=a.next();!s.done;s=a.next())_l(n,s.value);for(a=f(o.textStreams),s=a.next();!s.done;s=a.next())n.a[s.value.id]=52;a=function(e){for(var t=new Set,r=f(e.textStreams),n=r.next();!n.done;n=r.next())t.add(n.value);for(e=f(e.variants),r=e.next();!r.done;r=e.next())(r=r.value).audio&&t.add(r.audio),r.video&&t.add(r.video);return t}(o);var l=new Map;for(a=f(a),s=a.next();!s.done;s=a.next()){s=s.value;var u=Il(e,t,r,n,i,s);l.set(s.id,u)}return o.variants.forEach((function(e){e.audio&&l.get(e.audio.id).variantIds.push(e.id),e.video&&l.get(e.video.id).variantIds.push(e.id)})),{startTime:o.startTime,streams:Array.from(l.values())}}(e,t,r,s,i,n)})),u=n.a,c=e.a.offline.usePersistentLicense;return u&&c&&(u.initData=[]),{originalManifestUri:o,duration:i.presentationTimeline.Y(),size:0,expiration:n.Lb(),periods:l,sessionIds:c?Et(n):[],drmInfo:u,appMetadata:a}}(e,m,t,r,n,i,o),S(a,function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return S(t,Promise.all(e.b.values()),2);case 2:return t.return(e.a.a)}}))}))}(m),4);case 4:if(y.size=a.o,g.expiration=r.Lb(),v=Et(r),g.sessionIds=e.a.offline.usePersistentLicense?v:[],l&&e.a.offline.usePersistentLicense&&!v.length)throw new me(2,9,9007);return a.return(g);case 2:return L(a),S(a,m.destroy(),5);case 5:j(a,0)}}))}))}(e,l.ba,a,o,t,r),10);case 10:if(c=i.o,Ol(e),u)throw u;return S(i,l.ba.addManifests([c]),11);case 11:return d=i.o,Ol(e),h=new rs("manifest",l.path.wa,l.path.ba,d[0]),i.return(yl(h,c));case 4:return L(i),e.f=!1,e.c=[],S(i,s.destroy(),12);case 12:if(!a){i.A(13);break}return S(i,a.destroy(),13);case 13:j(i,0);break;case 3:if(m=R(i),!l){i.A(15);break}return S(i,l.ba.removeSegments(e.c,(function(){})),15);case 15:throw u||m}}))}))}(this,e,t||{},(function(){return p((function t(){var i,o;return M(t,(function(t){switch(t.j){case 1:return r&&"string"!=typeof r?(Kr("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),i=r,t.return(new i)):S(t,gi.create(e,n.b,n.a.manifest.retryParameters,r),2);case 2:return o=t.o,t.return(o)}}))}))})))},xl.prototype.store=xl.prototype.store,xl.prototype.kf=function(){return this.f},xl.prototype.getStoreInProgress=xl.prototype.kf,xl.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,C(r,2),S(r,o.init(),4));case 4:return S(r,za(o,i.wa(),i.ba()),5);case 5:return S(r,(a=r.o).getManifests([i.key()]),6);case 6:return s=r.o,l=s[0],S(r,Promise.all([jl(e,l,o),Pl(e,a,i,l)]),2);case 2:return L(r),S(r,o.destroy(),8);case 8:j(r,0)}}))}))}(this,e))},xl.prototype.remove=xl.prototype.remove,xl.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,C(t,2),S(t,i.init(),4);case 4:for(a=[],function(e,t){e.a.forEach((function(e){t(e.getEmeSessionCell())}))}(i,(function(e){return a.push(e)})),s=Promise.resolve(),l={},u=f(a),c=u.next();!c.done;l={wc:l.wc},c=u.next())l.wc=c.value,s=s.then(function(e){return function(){return p((function t(){var i,a;return M(t,(function(t){switch(t.j){case 1:return S(t,e.wc.getAll(),2);case 2:return i=t.o,S(t,cs(n,r,i),3);case 3:return a=t.o,S(t,e.wc.remove(a),4);case 4:a.length!=i.length&&(o=!0),w(t)}}))}))}}(l));return S(t,s,2);case 2:return L(t),S(t,i.destroy(),6);case 6:j(t,3);break;case 3:return t.return(!o)}}))}))}(this))},xl.prototype.removeEmeSessions=xl.prototype.Xf,xl.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,C(e,2),S(e,r.init(),4);case 4:return n=Promise.resolve(),function(e,t){e.a.forEach((function(e,r){e.getCells().forEach((function(e,n){t({wa:r,ba:n},e)}))}))}(r,(function(e,r){n=n.then((function(){return p((function n(){return M(n,(function(n){switch(n.j){case 1:return S(n,r.getAllManifests(),2);case 2:n.o.forEach((function(r,n){var i=yl(new rs("manifest",e.wa,e.ba,n),r);t.push(i)})),w(n)}}))}))}))})),S(e,n,2);case 2:return L(e),S(e,r.destroy(),6);case 6:j(e,3);break;case 3:return e.return(t)}}))})))},xl.prototype.list=xl.prototype.list,xl.deleteAll=function(){return p((function e(){var t;return M(e,(function(e){switch(e.j){case 1:return t=new Ya,C(e,2),S(e,t.erase(),2);case 2:return L(e),S(e,t.destroy(),5);case 5:j(e,0)}}))}))};var Fl=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");js.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 Ul,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 Un(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,Ul)},n.get=function(e){if(this.has(e))return this.a},n.has=function(e){var t=Ul;return!(!this.a||!ht.za(new Uint8Array(e),new Uint8Array(t)))},n.entries=function(){},n.keys=function(){},n.values=function(){},Gl((function(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(Ul=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=$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 Cu(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 xu(){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 Lu(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function ju(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function Pu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function Iu(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=xu,Object.defineProperty(t,"disablePictureInPicture",{get:Lu,set:ju,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Ru,document.addEventListener("webkitpresentationmodechanged",Cu,!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=Pu)}})),Gl((function(){if(!e.VTTCue&&e.TextTrackCue){var t=TextTrackCue.length;if(3==t)e.VTTCue=Iu;else if(6==t)e.VTTCue=Ou;else{try{var r=!!Iu(1,2,"")}catch(e){r=!1}r&&(e.VTTCue=Iu)}}})),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=Fu.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=Fu.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=Fu.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,Fu=/^(\d{1,2}(?:\.\d+)?|100)% (\d{1,2}(?:\.\d+)?|100)%$/,Uu=/^(\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(Uu)&&(e.lineHeight=o),(o=Zu(t,r,i,"fontSize"))&&o.match(Uu)&&(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 In).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} +/*! no static exports found */function(e,t,n){(function(e,n){!function(){var r="undefined"!=typeof window?window:e,i={};for(var a in function(e,t){var r,i="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},a=void 0!==e&&e===this?this:void 0!==t&&null!=t?t:this;function o(){o=function(){},a.Symbol||(a.Symbol=l)}var s,l=(s=0,function(e){return"jscomp_symbol_"+(e||"")+s++});function u(){o();var e=a.Symbol.iterator;e||(e=a.Symbol.iterator=a.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})[a.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 n=a,r=e.split("."),o=0;o<r.length-1;o++){var s=r[o];s in n||(n[s]={}),n=n[s]}(s=t(o=n[r=r[r.length-1]]))!=o&&null!=s&&i(n,r,{configurable:!0,writable:!0,value:s})}}function p(e){return function(e){function t(t){return e.next(t)}function n(t){return e.throw(t)}return new Promise((function(r,i){!function e(a){a.done?r(a.value):Promise.resolve(a.value).then(t,n).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 n(){this.a=null}function r(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;n.prototype.b=function(e){null==this.a&&(this.a=[],this.f()),this.a.push(e)},n.prototype.f=function(){var e=this;this.c((function(){e.h()}))};var i=a.setTimeout;n.prototype.c=function(e){i(e,0)},n.prototype.h=function(){for(;this.a&&this.a.length;){var e=this.a;this.a=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(e){this.g(e)}}}this.a=null},n.prototype.g=function(e){this.c((function(){throw e}))},t.prototype.c=function(){function e(e){return function(r){n||(n=!0,e.call(t,r))}}var t=this,n=!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 n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?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)o.b(this.a[e]);this.a=null}};var o=new n;return t.prototype.u=function(e){var t=this.c();e.cc(t.resolve,t.reject)},t.prototype.B=function(e,t){var n=this.c();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function r(e,t){return"function"==typeof e?function(t){try{i(e(t))}catch(e){a(e)}}:t}var i,a,o=new t((function(e,t){i=e,a=t}));return this.cc(r(e,i),r(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.cc=function(e,t){function n(){switch(r.b){case 1:e(r.g);break;case 2:t(r.g);break;default:throw Error("Unexpected state: "+r.b)}}var r=this;null==this.a?o.b(n):this.a.push(n)},t.resolve=r,t.reject=function(e){return new t((function(t,n){n(e)}))},t.race=function(e){return new t((function(t,n){for(var i=f(e),a=i.next();!a.done;a=i.next())r(a.value).cc(t,n)}))},t.all=function(e){var n=f(e),i=n.next();return i.done?r([]):new t((function(e,t){function a(t){return function(n){o[t]=n,0==--s&&e(o)}}var o=[],s=0;do{o.push(void 0),s++,r(i.value).cc(a(o.length-1),t),i=n.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 v;e:{var y={};try{y.__proto__={Ae:!0},v=y.Ae;break e}catch(s){}v=!1}m=v?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 n in t)if("prototype"!=n)if(Object.defineProperties){var r=Object.getOwnPropertyDescriptor(t,n);r&&Object.defineProperty(e,n,r)}else e[n]=t[n];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 w(e,t,n){return e.j=n,{value:t}}function S(e){e.j=0}function k(e,t,n){e.f=t,null!=n&&(e.b=n)}function C(e,t){e.f=0,e.b=t||0}function x(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 L(e){e.i=[e.a],e.f=0,e.b=0}function I(e,t){var n=e.i.splice(0)[0];(n=e.a=e.a||n)?n.Wd?e.j=e.f||e.b:null!=n.A&&e.b<n.A?(e.j=n.A,e.a=null):e.j=e.b:e.j=t}function P(e){this.a=new A,this.b=e}function j(e,t,n,r){try{var i=t.call(e.a.c,n);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return e.a.g=!1,i;var a=i.value}catch(t){return e.a.c=null,T(e.a,t),O(e)}return e.a.c=null,r.call(e.a,a),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=j(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=j(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 n=e.a.c;return n?j(e,"return"in n?n.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 P(t))}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function U(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,i=0;i<r;i++){var a=e[i];if(t.call(n,a,i,e))return{Td:i,ve:a}}return{Td:-1,ve:void 0}}function F(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" 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){o(),u(),e=f(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(e){N(e,a)||i(e,a,{value:{}})}function r(e){var t=Object[e];t&&(Object[e]=function(e){return n(e),t(e)})}if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}),n=Object.seal({}),r=new e([[t,2],[n,3]]);return 2==r.get(t)&&3==r.get(n)&&(r.delete(t),r.set(n,4),!r.has(t)&&4==r.get(n))}catch(e){return!1}}())return e;var a="$jscomp_hidden_"+Math.random();r("freeze"),r("preventExtensions"),r("seal");var s=0;return t.prototype.set=function(e,t){if(n(e),!N(e,a))throw Error("WeakMap key fail: "+e);return e[a][this.a]=t,this},t.prototype.get=function(e){return N(e,a)?e[a][this.a]:void 0},t.prototype.has=function(e){return N(e,a)&&N(e[a],this.a)},t.prototype.delete=function(e){return!(!N(e,a)||!N(e[a],this.a))&&delete e[a][this.a]},t})),h("Map",(function(e){function t(){var e={};return e.Fa=e.next=e.head=e}function n(e,t){var n=e.a;return d((function(){if(n){for(;n.head!=e.a;)n=n.Fa;for(;n.next!=n.head;)return n=n.next,{done:!1,value:t(n)};n=null}return{done:!0,value:void 0}}))}function r(e,t){var n=t&&typeof t;"object"==n||"function"==n?a.has(t)?n=a.get(t):(n=""+ ++s,a.set(t,n)):n="p_"+t;var r=e.b[n];if(r&&N(e.b,n))for(var i=0;i<r.length;i++){var o=r[i];if(t!=t&&o.key!=o.key||t===o.key)return{id:n,list:r,index:i,X:o}}return{id:n,list:r,index:-1,X:void 0}}function i(e){if(this.b={},this.a=t(),this.size=0,e){e=f(e);for(var n;!(n=e.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(f([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var r=n.entries(),i=r.next();return!i.done&&i.value[0]==t&&"s"==i.value[1]&&!((i=r.next()).done||4!=i.value[0].x||"t"!=i.value[1]||!r.next().done)}catch(e){return!1}}())return e;o(),u();var a=new WeakMap;i.prototype.set=function(e,t){var n=r(this,e);return n.list||(n.list=this.b[n.id]=[]),n.X?n.X.value=t:(n.X={next:this.a,Fa:this.a.Fa,head:this.a,key:e,value:t},n.list.push(n.X),this.a.Fa.next=n.X,this.a.Fa=n.X,this.size++),this},i.prototype.delete=function(e){return!(!(e=r(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!!r(this,e).X},i.prototype.get=function(e){return(e=r(this,e).X)&&e.value},i.prototype.entries=function(){return n(this,(function(e){return[e.key,e.value]}))},i.prototype.keys=function(){return n(this,(function(e){return e.key}))},i.prototype.values=function(){return n(this,(function(e){return e.value}))},i.prototype.forEach=function(e,t){for(var n,r=this.entries();!(n=r.next()).done;)n=n.value,e.call(t,n[1],n[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}),n=new e(f([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var r=n.entries(),i=r.next();return!i.done&&i.value[0]==t&&i.value[1]==t&&!(i=r.next()).done&&i.value[0]!=t&&4==i.value[0].x&&i.value[1]==i.value[0]&&r.next().done}catch(e){return!1}}()?e:(o(),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 n=this;this.a.forEach((function(r){return e.call(t,r,r,n)}))},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 n=0,r={next:function(){if(n<e.length){var i=n++;return{value:t(i,e[i]),done:!1}}return r.next=function(){return{done:!0,value:void 0}},r.next()}};return r[Symbol.iterator]=function(){return r},r}(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 n=this;n instanceof String&&(n=String(n));var r=n.length,i=t||0;for(0>i&&(i=Math.max(i+r,0));i<r;i++){var a=n[i];if(a===e||Object.is(a,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,n){u(),t=null!=t?t:function(e){return e};var r=[],i=e[Symbol.iterator];if("function"==typeof i)for(e=i.call(e);!(i=e.next()).done;)r.push(t.call(n,i.value));else{i=e.length;for(var a=0;a<i;a++)r.push(t.call(n,e[a]))}return r}})),h("String.prototype.startsWith",(function(e){return e||function(e,t){for(var n=F(this,e,"startsWith"),r=n.length,i=e.length,a=Math.max(0,Math.min(0|t,n.length)),o=0;o<i&&a<r;)if(n[a++]!=e[o++])return!1;return o>=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 n=1;n<arguments.length;n++){var r=arguments[n];if(r)for(var i in r)N(r,i)&&(e[i]=r[i])}return e};h("Object.assign",(function(e){return e||B}));var K=this;function V(e,t){var n,r=e.split("."),i=K;r[0]in i||!i.execScript||i.execScript("var "+r[0]);for(;r.length&&(n=r.shift());)r.length||void 0===t?i=i[n]?i[n]:i[n]={}:i[n]=t}function G(e,t){function n(){}n.prototype=t.prototype,e.tg=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Eg=function(e,n,r){return t.prototype[n].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,n){var r=Math.pow(e.c,t);n=n*(1-r)+r*e.a,isNaN(n)||(e.a=n,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=ne(t[2]||""),this.sa=ne(t[3]||"",!0),ee(this,t[4]),this.ja=ne(t[5]||"",!0),te(this,t[6]||"",!0),this.Sa=ne(t[7]||"")):this.a=new ce(null)}function Q(e,t,n){e.ta=n?ne(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,n){t instanceof ce?e.a=t:(n||(t=re(t,le)),e.a=new ce(t))}function ne(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function re(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,ie),n&&(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)}(r=Z.prototype).ta="",r.bb="",r.sa="",r.Ab=null,r.ja="",r.Sa="",r.toString=function(){var e=[],t=this.ta;if(t&&e.push(re(t,ae,!0),":"),t=this.sa){e.push("//");var n=this.bb;n&&e.push(re(n,ae,!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(re(t,"/"==t.charAt(0)?se:oe,!0))),(t=this.a.toString())&&e.push("?",t),(t=this.Sa)&&e.push("#",re(t,ue)),e.join("")},r.resolve=function(e){var t=this.clone();"data"===t.ta&&(t=new Z);var n=!!e.ta;n?Q(t,e.ta):n=!!e.bb,n?t.bb=e.bb:n=!!e.sa,n?t.sa=e.sa:n=null!=e.Ab;var r=e.ja;if(n)ee(t,e.Ab);else if(n=!!e.ja){if("/"!=r.charAt(0))if(this.sa&&!this.ja)r="/"+r;else{var i=t.ja.lastIndexOf("/");-1!=i&&(r=t.ja.substr(0,i+1)+r)}if(".."==r||"."==r)r="";else if(-1!=r.indexOf("./")||-1!=r.indexOf("/.")){i=0==r.lastIndexOf("/",0),r=r.split("/");for(var a=[],o=0;o<r.length;){var s=r[o++];"."==s?i&&o==r.length&&a.push(""):".."==s?((1<a.length||1==a.length&&""!=a[0])&&a.pop(),i&&o==r.length&&a.push("")):(a.push(s),i=!0)}r=a.join("/")}}return n?t.ja=r:n=""!==e.a.toString(),n?te(t,e.a.clone()):n=!!e.Sa,n&&(t.Sa=e.Sa),t},r.clone=function(){return new Z(this)};var ae=/[#\/\?@]/g,oe=/[#\?:]/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 n={maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0};this.i=null==e.maxAttempts?n.maxAttempts:e.maxAttempts,this.f=null==e.baseDelay?n.baseDelay:e.baseDelay,this.h=null==e.fuzzFactor?n.fuzzFactor:e.fuzzFactor,this.g=null==e.backoffFactor?n.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 n,r;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 n=e.a,e.a++,0==n?t.return():(r=e.b*(1+(2*Math.random()-1)*e.h),w(t,new Promise((function(e){new fe(e).R(r/1e3)})),2));case 2:e.b*=e.g,S(t)}}))}))}function me(e,t,n,r){for(var i=[],a=3;a<arguments.length;++a)i[a-3]=arguments[a];this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1}function ge(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function ve(e,t){this.promise=e,this.Zd=t,this.a=!1}function ye(e){return new ve(Promise.reject(e),(function(){return Promise.resolve()}))}function be(){var e=Promise.reject(new me(2,7,7001));return e.catch((function(){})),new ve(e,(function(){return Promise.resolve()}))}function _e(e){return new ve(Promise.resolve(e),(function(){return Promise.resolve()}))}function Ae(e){return new ve(e,(function(){return e.catch((function(){}))}))}function Ee(e){return new ve(Promise.all(e.map((function(e){return e.promise}))),(function(){return Promise.all(e.map((function(e){return e.abort()})))}))}function Te(e,t,n){try{var r=e(t);return r&&r.promise&&r.abort?(n.resolve(r.promise),function(){return r.abort()}):(n.resolve(r),function(){return Promise.resolve(r).then((function(){})).catch((function(){}))})}catch(e){return n.reject(e),function(){return Promise.resolve()}}}function we(t,n){for(var r in n=void 0===n?{}:n)this[r]=n[r];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 Se(){this.a={}}function ke(){this.Jc=new Se,this.$b=this}function Ce(e){var t=new Set;return function e(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||n.buffer&&n.buffer.constructor==ArrayBuffer)return n;if(t.has(n))return null;var r=n.constructor==Array;if(n.constructor!=Object&&!r)return null;t.add(n);var i,a=r?[]:{};for(i in n)a[i]=e(n[i]);return r&&(a.length=n.length),a}}(e)}function xe(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function Re(e,t){var n=e.indexOf(t);-1<n&&e.splice(n,1)}function Le(e,t,n){if(n||(n=xe),e.length!=t.length)return!1;t=t.slice();for(var r={},i=(e=f(e)).next();!i.done;r={item:r.item},i=e.next()){if(r.item=i.value,-1==(i=t.findIndex(function(e){return function(t){return n(e.item,t)}}(r))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function Ie(){this.a=[]}function Pe(e,t){e.a.push(t.finally((function(){Re(e.a,t)})))}function je(e){ke.call(this),this.f=!1,this.g=new Ie,this.a=new Set,this.b=new Set,this.c=e||null}(r=ce.prototype).ha=null,r.fc=null,r.add=function(e,t){if(!this.ha&&(this.ha={},this.fc=0,this.a))for(var n=this.a.split("&"),r=0;r<n.length;r++){var i=n[r].indexOf("="),a=null;if(0<=i){var o=n[r].substring(0,i);a=n[r].substring(i+1)}else o=n[r];o=decodeURIComponent(o.replace(/\+/g," ")),a=a||"",this.add(o,decodeURIComponent(a.replace(/\+/g," ")))}return this.a=null,(n=this.ha.hasOwnProperty(e)&&this.ha[e])||(this.ha[e]=n=[]),n.push(t),this.fc++,this},r.toString=function(){if(this.a)return this.a;if(!this.ha)return"";var e,t=[];for(e in this.ha)for(var n=encodeURIComponent(e),r=this.ha[e],i=0;i<r.length;i++){var a=n;""!==r[i]&&(a+="="+encodeURIComponent(r[i])),t.push(a)}return this.a=t.join("&")},r.clone=function(){var e=new ce;if(e.a=this.a,this.ha){var t,n={};for(t in this.ha)n[t]=this.ha[t].concat();e.ha=n,e.fc=this.fc}return e},de.prototype.R=function(t){var n=this;this.stop();var r=!0,i=null;return this.a=function(){e.clearTimeout(i),r=!1},i=e.setTimeout((function(){r&&n.b()}),1e3*t),this},de.prototype.stop=function(){this.a&&(this.a(),this.a=null)},V("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,V("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(){},V("shaka.util.AbortableOperation",ve),ve.failed=ye,ve.aborted=be,ve.completed=_e,ve.notAbortable=Ae,ve.prototype.abort=function(){return this.a=!0,this.Zd()},ve.prototype.abort=ve.prototype.abort,ve.all=Ee,ve.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},ve.prototype.finally=ve.prototype.finally,ve.prototype.U=function(e,t){function n(){return i.reject(new me(2,7,7001)),r.abort()}var r=this,i=new ge;return this.promise.then((function(t){r.a?i.reject(new me(2,7,7001)):e?n=Te(e,t,i):i.resolve(t)}),(function(e){t?n=Te(t,e,i):i.reject(e)})),new ve(i,(function(){return n()}))},ve.prototype.chain=ve.prototype.U,we.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},we.prototype.stopImmediatePropagation=function(){this.a=!0},we.prototype.stopPropagation=function(){},(r=Se.prototype).push=function(e,t){this.a.hasOwnProperty(e)?this.a[e].push(t):this.a[e]=[t]},r.get=function(e){return(e=this.a[e])?e.slice():null},r.getAll=function(){var e,t=[];for(e in this.a)t.push.apply(t,this.a[e]);return t},r.remove=function(e,t){var n=this.a[e];if(n)for(var r=0;r<n.length;++r)n[r]==t&&(n.splice(r,1),--r)},r.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)||[],n=0;n<t.length;++n){e.target=this.$b,e.currentTarget=this.$b;var r=t[n];try{r.handleEvent?r.handleEvent(e):r.call(this,e)}catch(e){}if(e.a)break}return e.defaultPrevented},Ie.prototype.destroy=function(){var e=[];return this.a.forEach((function(t){t.promise.catch((function(){})),e.push(t.abort())})),this.a=[],Promise.all(e)},G(je,ke),V("shaka.net.NetworkingEngine",je),je.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4},je.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var Oe={};function De(e,t,n){n=n||3;var r=Oe[e];(!r||n>=r.priority)&&(Oe[e]={priority:n,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,n){ve.call(this,e,t),this.b=n}function Fe(){}function Be(){this.a=new Se}function Ke(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.a=function(e,t){if(null==t)return!1;if("boolean"==typeof t)return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter((function(e){return!n.has(e)})),function(e){var t=Ve;if(null==t){t=!1;try{var n={},r={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",r),Object.defineProperty(n,"capture",r),r=function(){},e.addEventListener("test",r,n),e.removeEventListener("test",r,n)}catch(e){t=!1}Ve=t}return t||!1}(e)?t:t.capture||!1}(e,r),this.target.addEventListener(t,n,this.a)}je.registerScheme=De,je.unregisterScheme=function(e){delete Oe[e]},je.prototype.Tf=function(e){this.a.add(e)},je.prototype.registerRequestFilter=je.prototype.Tf,je.prototype.vg=function(e){this.a.delete(e)},je.prototype.unregisterRequestFilter=je.prototype.vg,je.prototype.Ie=function(){this.a.clear()},je.prototype.clearAllRequestFilters=je.prototype.Ie,je.prototype.Uf=function(e){this.b.add(e)},je.prototype.registerResponseFilter=je.prototype.Uf,je.prototype.wg=function(e){this.b.delete(e)},je.prototype.unregisterResponseFilter=je.prototype.wg,je.prototype.Je=function(){this.b.clear()},je.prototype.clearAllResponseFilters=je.prototype.Je,je.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0}},je.makeRequest=Me,je.prototype.destroy=function(){return this.f=!0,this.a.clear(),this.b.clear(),this.g.destroy()},je.prototype.destroy=je.prototype.destroy,je.prototype.request=function(e,t){var n=this,r=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()}),r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?Ce(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},t.uris=Ce(t.uris);var a=(i=function(e,t,n){for(var r=_e(void 0),i={},a=(e=f(e.a)).next();!a.done;i={qd:i.qd},a=e.next())i.qd=a.value,r=r.U(function(e){return function(){return e.qd(t,n)}}(i));return r.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,n,r,i,a,o,s){var l=new Z(r.uris[a]),u=l.ta,c=!1;u||(u=(u=location.protocol).slice(0,-1),Q(l,u),r.uris[a]=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(r.uris[a],r,n,(function(e,r,i){t.c&&1==n&&(t.c(e,r),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 we("retry",{error:l instanceof me?l:null})),a=(a+1)%r.uris.length,e(t,n,r,i,a,l,s);throw l||o})):ye(new me(2,1,1e3,l))}(n,e,t,new he(t.retryParameters,!1),0,null,r)})),o=a.U((function(t){return function(e,t,n){for(var r=_e(void 0),i=(e=f(e.b)).next();!i.done;i=e.next())r=r.U(i.value.bind(null,t,n.response));return r.U((function(){return n}),(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)}))}(n,e,t)})),s=Date.now(),l=0;i.promise.then((function(){l=Date.now()-s}),(function(){}));var u=0;return a.promise.then((function(){u=Date.now()}),(function(){})),i=new Ue((i=o.U((function(t){var r=Date.now()-u,i=t.response;return i.timeMs+=l,i.timeMs+=r,t.qf||!n.c||i.fromCache||1!=e||n.c(i.timeMs,i.data.byteLength),i}),(function(e){throw e&&(e.severity=2),e}))).promise,i.Zd,r),Pe(this.g,i),i},je.prototype.request=je.prototype.request,je.NumBytesRemainingClass=Ne,_(Ue,ve),je.PendingRequest=Ue,Ue.all=Ee,Ue.notAbortable=Ae,Ue.completed=_e,Ue.aborted=be,Ue.failed=ye,V("shaka.util.IReleasable",Fe),Fe.prototype.release=function(){},V("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,n,r){this.a&&(e=new Ke(e,t,n,r),this.a.push(t,e))},Be.prototype.listen=Be.prototype.w,Be.prototype.da=function(e,t,n,r){var i=this;this.w(e,t,(function r(a){i.ea(e,t,r),n(a)}),r)},Be.prototype.listenOnce=Be.prototype.da,Be.prototype.ea=function(e,t,n){if(this.a)for(var r=this.a.get(t)||[],i=(r=f(r)).next();!i.done;i=r.next())(i=i.value).target!=e||n!=i.listener&&n||(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 Ve=void 0;function Ge(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,n){function r(e){new DataView(a.buffer).setUint32(o,e.byteLength,!0),o+=4,i(e)}function i(e){a.set(e,o),o+=e.byteLength}if(!n||!n.byteLength)throw new me(2,6,6015);t="string"==typeof t?new Uint8Array(ct(t,!0)):new Uint8Array(t);var a=new Uint8Array(8+e.byteLength+t.byteLength+n.byteLength),o=0;return i(new Uint8Array(e)),r(t),r(new Uint8Array(n)),a}function Ye(e,t){for(var n=[],r=f(e),i=r.next();!i.done;i=r.next())n.push(t(i.value));return n}function ze(e,t){for(var n=f(e),r=n.next();!r.done;r=n.next())if(!t(r.value))return!1;return!0}function We(e){var t=new Map;return Object.keys(e).forEach((function(n){t.set(n,e[n])})),t}function $e(e){var t={};return e.forEach((function(e,n){t[n]=e})),t}function qe(e,t){var n=e;return t&&(n+='; codecs="'+t+'"'),n}function Xe(e){var t=(e=e.split("."))[0];return e.pop(),[t,e.join(".")]}V("shaka.util.FairPlayUtils.defaultGetContentId",Ge),V("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""!=rt().canPlayType(e)}function et(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!nt("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 nt(e){return(navigator.userAgent||"").includes(e)}function rt(){return at||(it||(it=new fe((function(){at=null}))),(at=document.querySelector("video")||document.querySelector("audio"))||(at=document.createElement("video")),it.R(1),at)}var it=null,at=null;function ot(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,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new me(2,2,2004);if(e instanceof ArrayBuffer)var r=e;else(n=new Uint8Array(e.byteLength)).set(new Uint8Array(e)),r=n.buffer;e=Math.floor(e.byteLength/2),n=new Uint16Array(e),r=new DataView(r);for(var i=0;i<e;i++)n[i]=r.getUint16(2*i,t);return dt(n)}function lt(e){var t=new Uint8Array(e);if(239==t[0]&&187==t[1]&&191==t[2])return ot(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 n=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(n(0)&&n(1)&&n(2)&&n(3))return ot(e);throw new me(2,2,2003)}function ut(e){e=encodeURIComponent(e),e=unescape(e);for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t.buffer}function ct(e,t){for(var n=new Uint8Array(2*e.length),r=new DataView(n.buffer),i=0;i<e.length;++i)r.setUint16(2*i,e.charCodeAt(i),t);return n.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}},n={size:65536};0<n.size;(n={size:n.size}).size/=2)if(t(n.size)){ft=function(e){return function(t){for(var n="",r=0;r<t.length;r+=e.size)n+=String.fromCharCode.apply(null,t.subarray(r,r+e.size));return n}}(n);break}return ft(e)}V("shaka.util.StringUtils.fromUTF8",ot),V("shaka.util.StringUtils.fromUTF16",st),V("shaka.util.StringUtils.fromBytesAutoDetect",lt),V("shaka.util.StringUtils.toUTF8",ut),V("shaka.util.StringUtils.toUTF16",ct);var ft=null;V("shaka.util.StringUtils.resetFromCharCode",(function(){ft=null}));var ht={zc:function(t,n){var r=dt(t);return n=null==n||n,r=e.btoa(r).replace(/\+/g,"-").replace(/\//g,"_"),n?r:r.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(n){t.m.reject(n),e.onError(n)},this.pa=new Map,this.W=new Map,this.O=new fe((function(){return function(e){var t=e.pa,n=e.W;n.clear(),t.forEach((function(e,t){return n.set(t,e)})),(t=Array.from(n.values())).length&&t.every((function(e){return"expired"==e}))&&e.g(new me(2,6,6014)),e.B.qc($e(n))}(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,n){var r=t.hd,i=n.expiration;isNaN(i)&&(i=1/0),i!=r&&(e.B.onExpirationUpdated(n.sessionId,i),t.hd=i)}))}(t)})).Na(1),this.m.catch((function(){}))}function mt(e,t,n){return e.s=n,e.D=0<n.length,gt(e,t)}function gt(t,n){var r=function(t){if(0==(t=We(t.f.clearKeys)).size)return null;var n=[],r=[];t.forEach((function(e,t){var i=ht.Qc(t),a=ht.Qc(e);i={kty:"oct",kid:ht.zc(i,!1),k:ht.zc(a,!1)},n.push(i),r.push(i.kid)})),t=JSON.stringify({keys:n});var i=JSON.stringify({kids:r});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(r)for(var i=f(n),a=i.next();!a.done;a=i.next())a.value.drmInfos=[r];for((r=n.some((function(e){return 0<e.drmInfos.length})))||function(e,t){var n=[];t.forEach((function(e,t){n.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})}));for(var r=f(e),i=r.next();!i.done;i=r.next())i.value.drmInfos=n}(n,a=We(t.f.servers)),a=(i=f(n)).next();!a.done;a=i.next())for(var o=(a=f(a.value.drmInfos)).next();!o.done;o=a.next())jt(o.value,We(t.f.servers),We(t.f.advanced||{}));return(a=function(e,t){for(var n=new Set,r=f(t),i=r.next();!i.done;i=r.next()){var a=f(i.value.drmInfos);for(i=a.next();!i.done;i=a.next())n.add(i.value)}for(r=f(n),i=r.next();!i.done;i=r.next())jt(i.value,We(e.f.servers),We(e.f.advanced||{}));a=e.D?"required":"optional";var o=e.D?["persistent-license"]:["temporary"];for(r=new Map,n=f(n),i=n.next();!i.done;i=n.next())i=i.value,r.set(i.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:a,sessionTypes:o,label:i.keySystem,drmInfos:[]});for(n=f(t),i=n.next();!i.done;i=n.next()){i=i.value,a=i.audio,o=i.video;var s=a?qe(a.mimeType,a.codecs):"",l=o?qe(o.mimeType,o.codecs):"",u=f(i.drmInfos);for(i=u.next();!i.done;i=u.next()){i=i.value;var c=r.get(i.keySystem);c.drmInfos.push(i),i.distinctiveIdentifierRequired&&(c.distinctiveIdentifier="required"),i.persistentStateRequired&&(c.persistentState="required"),a&&c.audioCapabilities.push({robustness:i.audioRobustness||"",contentType:s}),o&&c.videoCapabilities.push({robustness:i.videoRobustness||"",contentType:l})}}return r}(t,n)).size?(a=Tt(t,a),r?a:a.catch((function(){}))):(t.S=!0,Promise.resolve())}function vt(e){return p((function t(){var n;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),w(t,e.l.setServerCertificate(e.a.serverCertificate),5);case 5:x(t,0);break;case 3:return n=R(t),t.return(Promise.reject(new me(2,6,6004,n.message)))}}))}))}function yt(e){var t=e.a?e.a.initData:[];return t.forEach((function(t){return St(e,t.initDataType,t.initData)})),e.s.forEach((function(t){return wt(e,t)})),t.length||e.s.length||e.m.resolve(),e.m}function bt(e,t,n){for(var r=e.b.values(),i=(r=f(r)).next();!i.done;i=r.next())if(ht.za(n,i.value.initData)&&!nt("Tizen 2"))return;St(e,t,n)}function _t(e){return e?e.keySystem:""}function At(e,t){return!!nt("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 n=f(t.values()),r=n.next();!r.done;r=n.next())0==(r=r.value).audioCapabilities.length&&delete r.audioCapabilities,0==r.videoCapabilities.length&&delete r.videoCapabilities;var i=n=new ge;return[!0,!1].forEach(function(e){var n=this;t.forEach((function(t,r){t.drmInfos.some((function(e){return!!e.licenseServerUri}))==e&&(i=i.catch(function(){if(!this.c)return navigator.requestMediaKeySystemAccess(r,[t])}.bind(n)))}))}.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 n=e.getConfiguration(),r=n.videoCapabilities||[],i=f(n.audioCapabilities||[]);for(n=i.next();!n.done;n=i.next())this.u.add(n.value.contentType);for(n=(r=f(r)).next();!n.done;n=r.next())this.u.add(n.value.contentType);r=e.keySystem,i=[];var a=[],o=[],s=[];return function(e,t,n,r,i){e.forEach((function(e){if(t.includes(e.licenseServerUri)||t.push(e.licenseServerUri),e.serverCertificate&&(n.some((function(t){return ht.za(t,e.serverCertificate)}))||n.push(e.serverCertificate)),e.initData&&e.initData.forEach((function(e){r.some((function(t){return!(!t.keyId||t.keyId!=e.keyId)||t.initDataType==e.initDataType&&ht.za(t.initData,e.initData)}))||r.push(e)})),e.keyIds)for(var a=0;a<e.keyIds.length;++a)i.includes(e.keyIds[a])||i.push(e.keyIds[a])}))}((n=t.get(e.keySystem)).drmInfos,i,a,o,s),this.a={keySystem:r,licenseServerUri:i[0],distinctiveIdentifierRequired:"required"==n.distinctiveIdentifier,persistentStateRequired:"required"==n.persistentState,audioRobustness:(n.audioCapabilities?n.audioCapabilities[0].robustness:"")||"",videoRobustness:(n.videoCapabilities?n.videoCapabilities[0].robustness:"")||"",serverCertificate:a[0],initData:o,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)),n.reject(),i}function wt(e,t){try{var n=e.l.createSession("persistent-license")}catch(t){var r=new me(2,6,6005,t.message);return e.g(r),Promise.reject(r)}e.i.w(n,"message",e.fe.bind(e)),e.i.w(n,"keystatuseschange",e.de.bind(e));var i={initData:null,loaded:!1,hd:1/0,ya:null};return e.b.set(n,i),n.load(t).then(function(e){return this.c?Promise.reject():e?(i.loaded=!0,Pt(this)&&this.m.resolve(),n):(this.b.delete(n),void this.g(new me(2,6,6013)))}.bind(e),function(e){this.c||(this.b.delete(n),this.g(new me(2,6,6005,e.message)))}.bind(e))}function St(e,t,n){try{var r=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(r,"message",e.fe.bind(e)),e.i.w(r,"keystatuseschange",e.de.bind(e)),e.b.set(r,{initData:n,loaded:!1,hd:1/0,ya:null});try{n=e.f.initDataTransform(n,e.a)}catch(n){return t=n,n instanceof me||(t=new me(2,6,6016,n)),void e.g(t)}r.generateRequest(t,n.buffer).catch((function(t){if(!e.c){if(e.b.delete(r),t.errorCode&&t.errorCode.systemCode){var n=t.errorCode.systemCode;0>n&&(n+=Math.pow(2,32)),n="0x"+n.toString(16)}e.g(new me(2,6,6006,t.message,t,n))}}))}function kt(e,t){if(_t(t).startsWith("com.apple.fps")){var n=t.serverCertificate;e=He(e,Ge(e),n)}return e}function Ct(e,t){var n=t.target,r=e.b.get(n),i=e.a.licenseServerUri,a=e.f.advanced[e.a.keySystem];"individualization-request"==t.messageType&&a&&a.individualizationServer&&(i=a.individualizationServer),(i=Me([i],e.f.retryParameters)).body=t.message,i.method="POST",i.licenseRequestType=t.messageType,i.sessionId=n.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 n=(t=(new DOMParser).parseFromString(t,"application/xml")).getElementsByTagName("HttpHeader"),r=0;r<n.length;++r)e.headers[n[r].querySelector("name").textContent]=n[r].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 o=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=ot(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()-o)/1e3,n.update(e.data).then(function(){var e=this;this.B.onEvent(new we("drmsessionupdate")),r&&(r.ya&&r.ya.resolve(),new fe((function(){r.loaded=!0,Pt(e)&&e.m.resolve()})).R(Ot))}.bind(this)))}.bind(e),function(e){this.c||(e=new me(2,6,6007,e),this.g(e),r&&r.ya&&r.ya.reject(e))}.bind(e)).catch(function(e){this.c||(e=new me(2,6,6008,e.message),this.g(e),r&&r.ya&&r.ya.reject(e))}.bind(e))}function xt(){var e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],t=[{videoCapabilities:e,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:e}],n=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 r(){var i,a,o;return M(r,(function(r){switch(r.j){case 1:return k(r,2),w(r,navigator.requestMediaKeySystemAccess(e,t),4);case 4:return i=r.o,o=!!(a=i.getConfiguration().sessionTypes)&&a.includes("persistent-license"),nt("Tizen 3")&&(o=!1),n.set(e,{persistentState:o}),w(r,i.createMediaKeys(),5);case 5:x(r,0);break;case 2:R(r),n.set(e,null),S(r)}}))}))}(e)})),Promise.all(e).then((function(){return $e(n)}))}function Rt(e,t){var n=t.audio,r=t.video;if(n&&n.encrypted&&!At(e,qe(n.mimeType,n.codecs))||r&&r.encrypted&&!At(e,qe(r.mimeType,r.codecs)))return!1;var i=_t(e.a);return 0==t.drmInfos.length||t.drmInfos.some((function(e){return e.keySystem==i}))}function Lt(e,t){if(!e.length)return t;if(!t.length)return e;for(var n=[],r=0;r<e.length;r++)for(var i=0;i<t.length;i++)if(e[r].keySystem==t[i].keySystem){var a=e[r];i=t[i];var o=[];o=(o=o.concat(a.initData||[])).concat(i.initData||[]);var s=[];s=(s=s.concat(a.keyIds)).concat(i.keyIds),n.push({keySystem:a.keySystem,licenseServerUri:a.licenseServerUri||i.licenseServerUri,distinctiveIdentifierRequired:a.distinctiveIdentifierRequired||i.distinctiveIdentifierRequired,persistentStateRequired:a.persistentStateRequired||i.persistentStateRequired,videoRobustness:a.videoRobustness||i.videoRobustness,audioRobustness:a.audioRobustness||i.audioRobustness,serverCertificate:a.serverCertificate||i.serverCertificate,initData:o,keyIds:s});break}return n}function It(e){return p((function t(){var n;return M(t,(function(t){switch(t.j){case 1:return n=Array.from(e.b.keys()),e.b.clear(),w(t,Promise.all(n.map((function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return k(t,2),w(t,Promise.all([e.close(),e.closed]),4);case 4:x(t,0);break;case 2:R(t),S(t)}}))}))}))),0)}}))}))}function Pt(e){return ze(e=e.b.values(),(function(e){return e.loaded}))}function jt(t,n,r){!t.keySystem||"org.w3.clearkey"==t.keySystem&&t.licenseServerUri||(n.size&&(n=n.get(t.keySystem)||"",t.licenseServerUri=n),t.keyIds||(t.keyIds=[]),(r=r.get(t.keySystem))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=r.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=r.persistentStateRequired),t.videoRobustness||(t.videoRobustness=r.videoRobustness),t.audioRobustness||(t.audioRobustness=r.audioRobustness),t.serverCertificate||(t.serverCertificate=r.serverCertificate)),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==t.keySystem&&(t.keySystem="com.chromecast.playready"))}V("shaka.util.Uint8ArrayUtils.toBase64",ht.zc),ht.Ba=function(t){t=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));for(var n=new Uint8Array(t.length),r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n},V("shaka.util.Uint8ArrayUtils.fromBase64",ht.Ba),ht.Qc=function(t){for(var n=new Uint8Array(t.length/2),r=0;r<t.length;r+=2)n[r/2]=e.parseInt(t.substr(r,2),16);return n},V("shaka.util.Uint8ArrayUtils.fromHex",ht.Qc),ht.Ac=function(e){for(var t="",n=0;n<e.length;++n){var r=e[n].toString(16);1==r.length&&(r="0"+r),t+=r}return t},V("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 n=0;n<e.length;++n)if(e[n]!=t[n])return!1;return!0},V("shaka.util.Uint8ArrayUtils.equal",ht.za),ht.concat=function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];for(var r=n=0;r<t.length;++r)n+=t[r].length;n=new Uint8Array(n);for(var i=r=0;i<t.length;++i)n.set(t[i],r),r+=t[i].length;return n},V("shaka.util.Uint8ArrayUtils.concat",ht.concat),(r=pt.prototype).destroy=function(){var e=this;return p((function t(){return M(t,(function(t){switch(t.j){case 1:return e.c?w(t,e.na,0):(e.c=!0,w(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,w(t,It(e),2);case 2:if(!e.h){t.A(3);break}return k(t,4),w(t,e.h.setMediaKeys(null),6);case 6:x(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,S(t)}}))}))}(e),4));case 4:e.na.resolve(),t.A(0)}}))}))},r.configure=function(e){this.f=e},r.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++)Ct(t,t.F[e]);t.oa=!0,t.F=[]})),"webkitCurrentPlaybackTargetIsWireless"in this.h&&this.i.w(this.h,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return It(t)})),e=(e=this.h.setMediaKeys(this.l)).catch((function(e){return Promise.reject(new me(2,6,6003,e.message))}));var n=vt(this);return Promise.all([e,n]).then((function(){if(t.c)return Promise.reject();yt(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)}))},r.Lb=function(){for(var e=1/0,t=this.b.keys(),n=(t=f(t)).next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},r.fe=function(e){this.h&&this.f.delayLicenseRequestUntilPlayed&&this.h.paused&&!this.oa?this.F.push(e):Ct(this,e)},r.de=function(e){e=e.target;var t=this.b.get(e),n=!1;e.keyStatuses.forEach(function(e,r){if("string"==typeof r){var i=r;r=e,e=i}if("com.microsoft.playready"==this.a.keySystem&&16==r.byteLength&&!nt("Tizen")&&!nt("VITIS")){var a=(i=new DataView(r)).getUint32(0,!0),o=i.getUint16(4,!0),s=i.getUint16(6,!0);i.setUint32(0,a,!1),i.setUint16(4,o,!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&&(n=!0),i=ht.Ac(new Uint8Array(r)),this.pa.set(i,e)}.bind(this));var r=e.expiration-Date.now();(0>r||n&&1e3>r)&&t&&!t.ya&&(this.b.delete(e),e.close().catch((function(){}))),Pt(this)&&(this.m.resolve(),this.O.R(Dt))};var Ot=5,Dt=.5;function Mt(){this.a=new muxjs.mp4.CaptionParser,this.g=[],this.f={}}function Nt(){}function Ut(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function Ft(e,t,n){return n=void 0===n?0:n,!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t+n>=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 n=0,r=e.length-1;0<=r&&e.end(r)>t;--r)n+=e.end(r)-Math.max(e.start(r),t);return n}function Kt(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});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 n=new Uint8Array(e);(n=this.a.parse(n,this.g,this.f))&&n.captions&&t(n.captions),this.a.clearParsedCaptions()},Mt.prototype.c=function(){this.a.resetCaptionStream()},Nt.prototype.init=function(){},Nt.prototype.b=function(){},Nt.prototype.c=function(){};var Vt={Ke:function(e,t){return e.reduce(function(e,t,n){return t.catch(e.bind(null,n))}.bind(null,t),Promise.reject())},Gc:function(e,t){return e.concat(t)},oc:function(){},Ia:function(e){return null!=e}};function Gt(e,t){if(0==t.length)return e;var n=t.map((function(e){return new Z(e)}));return e.map((function(e){return new Z(e)})).map((function(e){return n.map(e.resolve.bind(e))})).reduce(Vt.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,n){return!(!e.muxjs||"mp2t"!=t.toLowerCase().split(";")[0].split("/")[1])&&(n?MediaSource.isTypeSupported($t(n,t)):MediaSource.isTypeSupported($t("audio",t))||MediaSource.isTypeSupported($t("video",t)))}function $t(e,t){var n=t.replace(/mp2t/i,"mp4");"audio"==e&&(n=n.replace("video","audio"));var r=/avc1\.(66|77|100)\.(\d+)/.exec(n);if(r){var i="avc1.",a=r[1],o=Number(r[2]);i=("66"==a?i+"4200":"77"==a?i+"4d00":i+"6400")+(o>>4).toString(16),i+=(15&o).toString(16),n=n.replace(r[0],i)}return n}function qt(e,t,n){this.startTime=e,this.direction=tn,this.endTime=t,this.payload=n,this.region=new cn,this.position=null,this.positionAlign=Xt,this.size=100,this.textAlign=Jt,this.writingMode=nn,this.lineInterpretation=rn,this.line=null,this.lineHeight="",this.lineAlign=an,this.displayAlign=Qt,this.fontSize=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=sn,this.fontStyle=ln,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},V("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",en={BEFORE:"before",CENTER:"center",AFTER:Qt};qt.displayAlign=en;var tn="ltr";qt.direction={HORIZONTAL_LEFT_TO_RIGHT:tn,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var nn="horizontal-tb";qt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:nn,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var rn=0;qt.lineInterpretation={LINE_NUMBER:rn,PERCENTAGE:1};var an="start",on={CENTER:"center",START:an,END:"end"};qt.lineAlign=on;var sn=400;qt.fontWeight={NORMAL:sn,BOLD:700};var ln="normal",un={NORMAL:ln,ITALIC:"italic",OBLIQUE:"oblique"};function cn(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=dn,this.scroll=fn}qt.fontStyle=un,qt.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},V("shaka.text.CueRegion",cn);var dn=1;cn.units={PX:0,PERCENTAGE:dn,LINES:2};var fn="";function hn(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}cn.scrollMode={NONE:fn,UP:"up"};var pn={};function mn(t){return!!(pn[t]||e.muxjs&&"application/cea-608"==t)}function gn(e,t){"application/cea-608"!=t&&(e.g=new pn[t])}function vn(e,t,n,r,i){for(var a=n+" "+r,o=new Map,s=(t=f(t)).next();!s.done;s=t.next()){var l=s.value;s=l.stream,o.has(s)||o.set(s,new Map),o.get(s).has(a)||o.get(s).set(a,[]),l.startTime+=i,l.endTime+=i,l.startTime>=e.f&&l.startTime<e.h&&(l=new qt(l.startTime,l.endTime,l.text),o.get(s).get(a).push(l),s==e.l&&e.c.append([l]))}for(a=(i=f(o.keys())).next();!a.done;a=i.next())for(a=a.value,e.i.has(a)||e.i.set(a,new Map),s=(t=f(o.get(a).keys())).next();!s.done;s=t.next())s=s.value,l=o.get(a).get(s),e.i.get(a).set(s,l);e.a=null==e.a?Math.max(n,e.f):Math.min(e.a,Math.max(n,e.f)),e.b=Math.max(e.b,Math.min(r,e.h))}function yn(e,t,n){this.f=e,this.g=n,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=bn(t),this.h=t}V("shaka.text.TextEngine.registerParser",(function(e,t){pn[e]=t})),V("shaka.text.TextEngine.unregisterParser",(function(e){delete pn[e]})),hn.prototype.destroy=function(){return this.c=this.g=null,this.i.clear(),Promise.resolve()},hn.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)}},hn.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 bn=e.URL.createObjectURL;function _n(e){var t=qe(e.mimeType,e.codecs),n=function(e){var t=[e.mimeType];return Je.forEach((function(n,r){var i=e[r];i&&t.push(n+'="'+i+'"')})),t.join(";")}(e);return mn(t)||MediaSource.isTypeSupported(n)||Wt(t,e.type)}function An(e,t){e.a||(e.a=new hn(e.g)),gn(e.a,t)}function En(e){return!e.h||"ended"==e.h.readyState}function Tn(e,t){if("text"==t)var n=e.a.a;else n=!(n=Sn(e,t))||1==n.length&&1e-6>n.end(0)-n.start(0)?null:1==n.length&&0>n.start(0)?0:n.length?n.start(0):null;return n}function wn(e,t){return"text"==t?e.a.b:Ut(Sn(e,t))}function Sn(e,t){try{return e.b[t].buffered}catch(e){return null}}function kn(t,n,r,i,a,o){return"text"==n?function(e,t,n,r){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==n||null==r)this.g.parseInit(new Uint8Array(t));else{var e={periodStart:this.m,segmentStart:n,segmentEnd:r};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(n,this.f)),this.b=Math.min(r,this.h)}}.bind(e))}(t.a,r,i,a):t.l[n]?function(e,t){e.f=!0,e.b=new ge,e.g=[],e.c=[];var n=new Uint8Array(t);return e.a.push(n),e.a.flush(),e.f&&e.b.reject(new me(2,3,3018)),e.b}(t.l[n],r).then(function(e){return this.a||An(this,"text/vtt"),e.captions&&e.captions.length&&vn(this.a,e.captions,i,a,this.b.video.timestampOffset),Rn(this,n,this.re.bind(this,n,e.data.buffer))}.bind(t)):(o&&e.muxjs&&(t.a||An(t,"text/vtt"),null==i&&null==a?t.m.init(r):t.m.b(r,(function(e){e.length&&vn(t.a,e,i,a,t.b.video.timestampOffset)}))),Rn(t,n,t.re.bind(t,n,r)))}function Cn(e,t){var n=wn(e,"video")||0;!function(e,t,n){if(e.l=t,t=e.i.get(t))for(var r=f(t.keys()),i=r.next();!i.done;i=r.next())(i=t.get(i.value).filter((function(e){return e.endTime<=n})))&&e.c.append(i)}(e.a,t,n)}function xn(e,t){return"text"==t?e.a?(e.m.c(),e.a.remove(0,1/0)):Promise.resolve():Rn(e,t,e.se.bind(e,t,0,e.h.duration))}function Rn(e,t,n){if(e.u)return Promise.reject();if(n={start:n,p:new ge},e.c[t].push(n),1==e.c[t].length)try{n.start()}catch(r){"QuotaExceededError"==r.name?n.p.reject(new me(2,3,3017,t)):n.p.reject(new me(2,3,3015,r)),In(e,t)}return n.p}function Ln(e,t){if(e.u)return Promise.reject();var n,r=[];for(n in e.b){var i=new ge,a={start:function(e){e.resolve()}.bind(null,i),p:i};e.c[n].push(a),r.push(i),1==e.c[n].length&&a.start()}return Promise.all(r).then(function(){try{t()}catch(t){var e=Promise.reject(new me(2,3,3015,t))}for(var n in this.b)In(this,n);return e}.bind(e),function(e){throw e}.bind(e))}function In(e,t){e.c[t].shift();var n=e.c[t][0];if(n)try{n.start()}catch(r){n.p.reject(new me(2,3,3015,r)),In(e,t)}}function Pn(e,t){return e=On(e),t=On(t),e.split("-")[0]==t.split("-")[0]}function jn(e,t){e=On(e),t=On(t);var n=e.split("-"),r=t.split("-");return n[0]==r[0]&&1==n.length&&2==r.length}function On(e){var t=e.split("-");return e=t[0]||"",t=t[1]||"",e=e.toLowerCase(),e=Nn.get(e)||e,(t=t.toUpperCase())?e+"-"+t:e}function Dn(e){return e.language?On(e.language):e.audio&&e.audio.language?On(e.audio.language):e.video&&e.video.language?On(e.video.language):"und"}function Mn(e,t){for(var n=On(e),r=new Set,i=f(t),a=i.next();!a.done;a=i.next())r.add(On(a.value));for(a=(i=f(r)).next();!a.done;a=i.next())if((a=a.value)==n)return a;for(a=(i=f(r)).next();!a.done;a=i.next())if(jn(a=a.value,n))return a;for(a=(i=f(r)).next();!a.done;a=i.next()){var o=a=a.value,s=n;if(o=On(o),s=On(s),o=o.split("-"),s=s.split("-"),2==o.length&&2==s.length&&o[0]==s[0])return a}for(a=(r=f(r)).next();!a.done;a=r.next())if(jn(n,i=a.value))return i;return null}(r=yn.prototype).destroy=function(){var e=this;this.u=!0;var t,n=[];for(t in this.c){var r=this.c[t],i=r[0];for(this.c[t]=r.slice(0,1),i&&n.push(i.p.catch(Vt.oc)),i=1;i<r.length;++i)r[i].p.reject()}for(var a in this.a&&n.push(this.a.destroy()),this.g&&n.push(this.g.destroy()),this.l)n.push(this.l[a].destroy());return Promise.all(n).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={}}))},r.init=function(e,t){var n=this;return p((function r(){var i;return M(r,(function(r){switch(r.j){case 1:return i=Yt,w(r,n.s,2);case 2:e.forEach((function(e,r){var a=qe(e.mimeType,e.codecs);r==i.ra?An(n,a):(!t&&MediaSource.isTypeSupported(a)||!Wt(a,r)||(n.l[r]=new zt,a=$t(r,a)),a=n.h.addSourceBuffer(a),n.i.w(a,"error",n.lg.bind(n,r)),n.i.w(a,"updateend",n.xb.bind(n,r)),n.b[r]=a,n.c[r]=[])})),S(r)}}))}))},r.Sc=function(e){if(e.total=Kt(this.f.buffered),e.audio=Kt(Sn(this,"audio")),e.video=Kt(Sn(this,"video")),e.text=[],this.a){var t=this.a.a,n=this.a.b;null!=t&&null!=n&&e.text.push({start:t,end:n})}},r.remove=function(e,t,n){return"text"==e?this.a.remove(t,n):Rn(this,e,this.se.bind(this,e,t,n))},r.flush=function(e){return"text"==e?Promise.resolve():Rn(this,e,this.Pe.bind(this,e))},r.endOfStream=function(e){return Ln(this,function(){En(this)||(e?this.h.endOfStream(e):this.h.endOfStream())}.bind(this))},r.xa=function(e){return Ln(this,function(){this.h.duration=e}.bind(this))},r.Y=function(){return this.h.duration},r.re=function(e,t){this.b[e].appendBuffer(t)},r.se=function(e,t,n){n<=t?this.xb(e):this.b[e].remove(t,n)},r.Be=function(e){var t=this.b[e].appendWindowStart,n=this.b[e].appendWindowEnd;this.b[e].abort(),this.b[e].appendWindowStart=t,this.b[e].appendWindowEnd=n,this.xb(e)},r.Pe=function(e){this.f.currentTime-=.001,this.xb(e)},r.kg=function(e,t){0>t&&(t+=.001),this.b[e].timestampOffset=t,this.xb(e)},r.hg=function(e,t,n){this.b[e].appendWindowStart=0,this.b[e].appendWindowEnd=n,this.b[e].appendWindowStart=t,this.xb(e)},r.lg=function(e){this.c[e][0].p.reject(new me(2,3,3014,this.f.error?this.f.error.code:0))},r.xb=function(e){var t=this.c[e][0];t&&(t.p.resolve(),In(this,e))};var Nn=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"]]),Un={bd:function(e,t,n){function r(e,t,n){return e>=t&&e<=n}var i=e.video;return!(i&&i.width&&i.height&&(!r(i.width,t.minWidth,Math.min(t.maxWidth,n.width))||!r(i.height,t.minHeight,Math.min(t.maxHeight,n.height))||!r(i.width*i.height,t.minPixels,t.maxPixels))||e&&e.frameRate&&!r(e.frameRate,t.minFrameRate,t.maxFrameRate)||!r(e.bandwidth,t.minBandwidth,t.maxBandwidth))},Gd:function(e,t,n){var r=!1;return e.forEach((function(e){var i=e.allowedByApplication;e.allowedByApplication=Un.bd(e,t,n),i!=e.allowedByApplication&&(r=!0)})),r},filterNewPeriod:function(e,t,n,r){r.variants=r.variants.filter((function(r){if(e&&e.S&&!Rt(e,r))return!1;var i=r.audio;return r=r.video,!(i&&!_n(i)||r&&!_n(r)||i&&t&&!Un.Hd(i,t)||r&&n&&!Un.Hd(r,n))})),r.textStreams=r.textStreams.filter((function(e){return mn(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,n=e.video,r=t?t.codecs:null,i=n?n.codecs:null,a=[];i&&a.push(i),r&&a.push(r);var o=[];n&&o.push(n.mimeType),t&&o.push(t.mimeType),o=o[0]||null;var s=[];t&&s.push(t.kind),n&&s.push(n.kind),s=s[0]||null;var l=new Set;return t&&t.roles.forEach((function(e){return l.add(e)})),n&&n.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:o,codecs:a.join(", "),audioCodec:r,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},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.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=Un.yf++),e.__shaka_id},yf:0,sf:function(e){var t=Un.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=Un.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:Un.Wc(e),active:!1,type:"",bandwidth:0,language:On(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 Un.rb(e)}))},Nd:function(e,t){for(var n=e.filter((function(e){return e.audio&&e.audio.channelsCount})),r=new Map,i=(n=f(n)).next();!i.done;i=n.next()){var a=(i=i.value).audio.channelsCount;r.has(a)||r.set(a,[]),r.get(a).push(i)}return 0==(n=Array.from(r.keys())).length?e:(i=n.filter((function(e){return e<=t}))).length?r.get(Math.max.apply(null,i)):r.get(Math.min.apply(null,n))},Jb:function(e,t,n){var r=e,i=e.filter((function(e){return e.primary}));i.length&&(r=i);var a=r.length?r[0].language:"";if(r=r.filter((function(e){return e.language==a})),t){var o=Mn(On(t),e.map((function(e){return e.language})));o&&(r=e.filter((function(e){return On(e.language)==o})))}if(n){if((e=Un.Md(r,n)).length)return e}else if((e=r.filter((function(e){return 0==e.roles.length}))).length)return e;return(e=r.map((function(e){return e.roles})).reduce(Vt.Gc,[])).length?Un.Md(r,e[0]):r},Md:function(e,t){return e.filter((function(e){return e.roles.includes(t)}))},Qd:function(e,t,n){for(var r=0;r<n.length;r++)if(n[r].audio==e&&n[r].video==t)return n[r];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 Un.tf(e)?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:Un.wf(e)?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}};function Fn(){this.h=null,this.f=!1,this.b=new W,this.c=[],this.i=!1,this.a=this.g=null}function Bn(e,t){return e&&(t=t.filter((function(t){return Un.bd(t,e,{width:1/0,height:1/0})}))),t.sort((function(e,t){return e.bandwidth-t.bandwidth}))}function Kn(e,t){this.a=e,this.b=t}function Vn(e,t){var n=new Kn(2,6),r=Yn,i=r.a,a=n.b-i.b;(0<(n.a-i.a||a)?r.c:r.b)(r.a,n,e,t)}function Gn(e,t,n,r){q([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",r].join(" "))}function Hn(e,t,n,r){$([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",r].join(""))}V("shaka.abr.SimpleAbrManager",Fn),Fn.prototype.stop=function(){this.h=null,this.f=!1,this.c=[],this.g=null},Fn.prototype.stop=Fn.prototype.stop,Fn.prototype.init=function(e){this.h=e},Fn.prototype.init=Fn.prototype.init,Fn.prototype.chooseVariant=function(){var e=Bn(this.a.restrictions,this.c),t=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!e.length&&(e=[(e=Bn(null,this.c))[0]]);for(var n=e[0]||null,r=0;r<e.length;++r){var i=e[r],a=(e[r+1]||{bandwidth:1/0}).bandwidth/this.a.bandwidthUpgradeTarget;t>=i.bandwidth/this.a.bandwidthDowngradeTarget&&t<=a&&(n=i)}return this.g=Date.now(),n},Fn.prototype.chooseVariant=Fn.prototype.chooseVariant,Fn.prototype.enable=function(){this.f=!0},Fn.prototype.enable=Fn.prototype.enable,Fn.prototype.disable=function(){this.f=!1},Fn.prototype.disable=Fn.prototype.disable,Fn.prototype.segmentDownloaded=function(e,t){var n=this.b;if(!(16e3>t)){var r=8e3*t/e,i=e/1e3;n.a+=t,Y(n.b,i,r),Y(n.c,i,r)}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}n=this.chooseVariant(),this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate),this.h(n)}},Fn.prototype.segmentDownloaded=Fn.prototype.segmentDownloaded,Fn.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)},Fn.prototype.getBandwidthEstimate=Fn.prototype.getBandwidthEstimate,Fn.prototype.setVariants=function(e){this.c=e},Fn.prototype.setVariants=Fn.prototype.setVariants,Fn.prototype.configure=function(e){this.a=e},Fn.prototype.configure=Fn.prototype.configure,Kn.prototype.toString=function(){return"v"+this.a+"."+this.b};var Yn=null,zn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Wn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),$n=["loop","playbackRate"],qn=["pause","play"],Xn="abrstatuschanged adaptation buffering drmsessionupdate emsg error expirationupdated largegap loading manifestparsed onstatechange onstateidle streaming textchanged texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged".split(" "),Jn={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},Zn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Qn=[["getConfiguration","configure"]],er=[["isTextTrackVisible","setTextTrackVisibility"]],tr="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),nr=["attach","detach","load","unload"];function rr(e){return JSON.stringify(e,(function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof we){var n,r={};for(n in t){var i=t[n];i&&"object"==typeof i?"detail"==n&&(r[n]=i):n in Event||(r[n]=i)}return r}if(t instanceof TimeRanges)for(r={__type__:"TimeRanges",length:t.length,start:[],end:[]},n=0;n<t.length;++n)r.start.push(t.start(n)),r.end.push(t.end(n));else r=t instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return r}}))}function ir(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 ar(e,t,n,r,i,a){this.O=e,this.f=new fe(t),this.S=n,this.l=!1,this.F=r,this.K=i,this.B=a,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,pr.add(this)}var or=!1,sr=null;function lr(e){for(var t=f(pr),n=t.next();!n.done;n=t.next())ur(n.value,e)}function ur(e,t){var n=e.B();e.g=new ge,e.l=!0,e.kd(n,t)}function cr(e){for(var t=f(pr),n=t.next();!n.done;n=t.next())n=n.value,or="available"==e,n.f.yc()}function dr(e){var t=sr;t.removeUpdateListener(e.m),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.s)}function fr(e){for(var t in e.c){var n=e.c[t];delete e.c[t],n.reject(new me(1,7,7e3))}}function hr(e){e=rr(e),sr.sendMessage("urn:x-cast:com.google.shaka.v2",e,(function(){}),X)}(r=ar.prototype).destroy=function(){return pr.delete(this),fr(this),sr&&dr(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()},r.ga=function(){return this.b},r.nd=function(){return this.D},r.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,lr.bind(this),cr.bind(this),"origin_scoped"),chrome.cast.initialize(t,(function(){}),(function(){})),or&&this.f.R(.02),(t=sr)&&t.status!=chrome.cast.SessionStatus.STOPPED?ur(this,t):sr=null}},r.ud=function(e){this.i=e,this.b&&hr({type:"appData",appData:this.i})},r.cast=function(e){return this.h?or?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))},r.Kb=function(){this.b&&(fr(this),sr&&(dr(this),sr.stop((function(){}),(function(){})),sr=null))},r.get=function(e,t){if("video"==e){if(qn.includes(t))return this.le.bind(this,e,t)}else if("player"==e){if(Zn[t]&&!this.get("player","isLive")())return function(){};if(tr.includes(t))return this.le.bind(this,e,t);if(nr.includes(t))return this.Wf.bind(this,e,t);if(Jn[t])return this.ie.bind(this,e,t)}return this.ie(e,t)},r.set=function(e,t,n){this.a[e][t]=n,hr({type:"set",targetName:e,property:t,value:n})},r.kd=function(e,t){sr=t,t.addUpdateListener(this.m),t.addMessageListener("urn:x-cast:com.google.shaka.v2",this.s),this.ce(),hr({type:"init",initState:e,appData:this.i}),this.g.resolve()},r.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))},r.ie=function(e,t){return this.a[e][t]},r.le=function(e,t,n){for(var r=[],i=2;i<arguments.length;++i)r[i-2]=arguments[i];hr({type:"call",targetName:e,methodName:t,args:r})},r.Wf=function(e,t,n){for(var r=[],i=2;i<arguments.length;++i)r[i-2]=arguments[i];i=new ge;var a=this.u.toString();return this.u++,this.c[a]=i,hr({type:"asyncCall",targetName:e,methodName:t,args:r,id:a}),i},r.ce=function(){var e=!!sr&&"connected"==sr.status;if(this.b&&!e){for(var t in this.K(),this.a)this.a[t]={};fr(this)}this.D=(this.b=e)?sr.receiver.friendlyName:"",this.f.yc()},r.Ff=function(e,t){var n=ir(t);switch(n.type){case"event":var r=n.event;this.F(n.targetName,new we(r.type,r));break;case"update":for(var i in r=n.update)for(var a in n=this.a[i]||{},r[i])n[a]=r[i][a];this.l&&(this.S(),this.l=!1);break;case"asyncComplete":if(i=n.id,n=n.error,a=this.c[i],delete this.c[i],a)if(n){for(r in i=new me(n.severity,n.category,n.code),n)i[r]=n[r];a.reject(i)}else a.resolve()}};var pr=new Set;function mr(e,t,n){var r=this;ke.call(this),this.c=e,this.b=t,this.i=this.g=this.f=this.l=this.h=null,this.s=n,this.m=new Map,this.a=new ar(n,(function(){return yr(r)}),(function(){return br(r)}),(function(e,t){return Ar(r,e,t)}),(function(){return _r(r)}),(function(){return vr(r)})),function(e){for(var t in e.a.init(),e.i=new Be,zn.forEach(function(e){this.i.w(this.c,e,this.D.bind(this))}.bind(e)),Xn.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={},gr(e,(function(t){Object.defineProperty(e.l,t,{configurable:!1,enumerable:!0,get:function(){return function e(t,n){if(t.m.has(n)&&(n=t.m.get(n)),"addEventListener"==n)return t.g.addEventListener.bind(t.g);if("removeEventListener"==n)return t.g.removeEventListener.bind(t.g);if("getMediaElement"==n)return function(){return this.h}.bind(t);if("getSharedConfiguration"==n)return t.a.get("player","getConfiguration");if("getNetworkingEngine"==n)return t.b.Mb.bind(t.b);if(t.a.ga()){if("getManifest"==n||"drmInfo"==n)return function(){return q(n+"() does not work while casting!"),null};if("getManifestUri"==n)return Vn("getManifestUri",'Please use "getAssetUri" instead.'),e(t,"getAssetUri");if("attach"==n||"detach"==n)return function(){return q(n+"() does not work while casting!"),Promise.resolve()}}return t.a.ga()&&0==Object.keys(t.a.a.video).length&&Jn[n]||!t.a.ga()?t.b[n].bind(t.b):t.a.get("player",n)}(e,t)}})})),function(e){var t=new Map;gr(e,(function(n,r){if(t.has(r)){var i=t.get(r);n.length<i.length?e.m.set(n,i):e.m.set(i,n)}else t.set(r,n)}))}(e),e.f=new ke,e.f.$b=e.h,e.g=new ke,e.g.$b=e.l}(this)}function gr(e,t){function n(e){return"constructor"!=e&&"function"==typeof r[e]&&!i.has(e)}var r=e.b,i=new Set;for(a in r)n(a)&&(i.add(a),t(a,r[a]));for(var a=Object.getPrototypeOf(r),o=Object.getPrototypeOf({});a&&a!=o;){for(var s=f(Object.getOwnPropertyNames(a)),l=s.next();!l.done;l=s.next())n(l=l.value)&&(i.add(l),t(l,r[l]));a=Object.getPrototypeOf(a)}}function vr(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.b.hc(),startTime:null};return e.c.pause(),$n.forEach(function(e){t.video[e]=this.c[e]}.bind(e)),e.c.ended||(t.startTime=e.c.currentTime),Qn.forEach(function(e){var n=e[1];e=this.b[e[0]](),t.player[n]=e}.bind(e)),er.forEach(function(e){var n=e[1];e=this.b[e[0]](),t.playerAfterLoad[n]=e}.bind(e)),t}function yr(e){e.dispatchEvent(new we("caststatuschanged"))}function br(e){e.f.dispatchEvent(new we(e.h.paused?"pause":"play"))}function _r(e){Qn.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")(),n=e.a.get("video","ended"),r=Promise.resolve(),i=e.c.autoplay,a=null;n||(a=e.a.get("video","currentTime")),t&&(e.c.autoplay=!1,r=e.b.load(t,a));var o={};$n.forEach(function(e){o[e]=this.a.get("video",e)}.bind(e)),r.then((function(){e.c&&($n.forEach(function(e){this.c[e]=o[e]}.bind(e)),er.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 we("error",{detail:t}))}))}function Ar(e,t,n){e.a.ga()&&("video"==t?e.f.dispatchEvent(n):"player"==t&&e.g.dispatchEvent(n))}function Er(e,t,n,r){var i=this;ke.call(this),this.a=e,this.b=t,this.c=new Be,this.D={video:e,player:t},this.s=n||function(){},this.F=r||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(){wr(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(),zn.forEach(function(e){this.c.w(this.a,e,this.je.bind(this,"video"))}.bind(e)),Xn.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,Tr(this)}.bind(e)),e.c.w(e.a,"playing",function(){this.h=!1,Tr(this)}.bind(e)),e.c.w(e.a,"pause",function(){Tr(this)}.bind(e)),e.c.w(e.b,"unloading",function(){this.h=!0,Tr(this)}.bind(e)),e.c.w(e.a,"ended",function(){var e=this;new fe((function(){e.a&&e.a.ended&&(e.h=!0,Tr(e))})).R(5)}.bind(e))}(this)}function Tr(e){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new we("caststatuschanged")),Sr(this)||xr(this,0))}.bind(e))}function wr(e){e.B.R(.5);var t={video:{},player:{}};if(Wn.forEach(function(e){t.video[e]=this.a[e]}.bind(e)),e.b.V())for(var n in Zn)0==e.g%Zn[n]&&(t.player[n]=e.b[n]());for(var r in Jn)0==e.g%Jn[r]&&(t.player[r]=e.b[r]());(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),e.m&&(e.g+=1),Cr(e,{type:"update",update:t},e.f),Sr(e)}function Sr(e){return!(!e.l||!e.a.duration&&!e.b.V()||(kr(e),e.l=!1,0))}function kr(e){var t={contentId:e.b.hc(),streamType:e.b.V()?"LIVE":"BUFFERED",duration:e.a.duration,contentType:""};xr(e,0,t)}function Cr(e,t,n,r){e.u&&(e=rr(t),r?n.getCastChannel(r).send(e):n.broadcast(e))}function xr(e,t,n){var r=e.a.playbackRate,i=Rr;r={mediaSessionId:0,playbackRate:r,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}},n&&(r.media=n),Cr(e,{requestId:t,type:"MEDIA_STATUS",status:[r]},e.i)}e.__onGCastApiAvailable=function(e){if(e)for(var t=(e=f(pr)).next();!t.done;t=e.next())t.value.init()},G(mr,ke),V("shaka.cast.CastProxy",mr),mr.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)},mr.prototype.destroy=mr.prototype.destroy,mr.prototype.pf=function(){return this.h},mr.prototype.getVideo=mr.prototype.pf,mr.prototype.ff=function(){return this.l},mr.prototype.getPlayer=mr.prototype.ff,mr.prototype.Ee=function(){return this.a.h&&or},mr.prototype.canCast=mr.prototype.Ee,mr.prototype.ga=function(){return this.a.ga()},mr.prototype.isCasting=mr.prototype.ga,mr.prototype.nd=function(){return this.a.nd()},mr.prototype.receiverName=mr.prototype.nd,mr.prototype.cast=function(){var e=vr(this);return this.a.cast(e).then(function(){if(this.b)return this.b.Cd()}.bind(this))},mr.prototype.cast=mr.prototype.cast,mr.prototype.ud=function(e){this.a.ud(e)},mr.prototype.setAppData=mr.prototype.ud,mr.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))}},mr.prototype.suggestDisconnect=mr.prototype.sg,mr.prototype.He=function(e){var t=this;return p((function n(){return M(n,(function(n){switch(n.j){case 1:return e==t.s?n.return():(t.s=e,t.a.Kb(),w(n,t.a.destroy(),2));case 2:t.a=null,t.a=new ar(e,(function(){return yr(t)}),(function(){return br(t)}),(function(e,n){return Ar(t,e,n)}),(function(){return _r(t)}),(function(){return vr(t)})),t.a.init(),S(n)}}))}))},mr.prototype.changeReceiverId=mr.prototype.He,mr.prototype.Kb=function(){this.a.Kb()},mr.prototype.forceDisconnect=mr.prototype.Kb,mr.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)},mr.prototype.F=function(e,t){this.a.ga()?this.a.set("video",e,t):this.c[e]=t},mr.prototype.D=function(e){this.a.ga()||this.f.dispatchEvent(new we(e.type,e))},mr.prototype.u=function(e){this.a.ga()||this.g.dispatchEvent(e)},G(Er,ke),V("shaka.cast.CastReceiver",Er),Er.prototype.isConnected=function(){return this.u},Er.prototype.isConnected=Er.prototype.isConnected,Er.prototype.vf=function(){return this.h},Er.prototype.isIdle=Er.prototype.vf,Er.prototype.destroy=function(){var e=this;return p((function t(){var n;return M(t,(function(t){switch(t.j){case 1:return e.c&&(e.c.release(),e.c=null),n=[],e.b&&(n.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,w(t,Promise.all(n),2);case 2:cast.receiver.CastReceiverManager.getInstance().stop(),S(t)}}))}))},Er.prototype.destroy=Er.prototype.destroy,(r=Er.prototype).ee=function(){this.g=0,this.l=!0,this.u=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,Tr(this)},r.je=function(e,t){this.b&&(wr(this),Cr(this,{type:"event",targetName:e,event:t},this.f))},r.Oe=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Cr(this,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},this.f),Cr(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.f)},r.Kf=function(e){var t=ir(e.data);switch(t.type){case"init":this.g=0,this.m=!1,this.l=!0,function(e,t,n){for(var r in t.player)e.b[r](t.player[r]);e.s(n),n=Promise.resolve();var i=e.a.autoplay;t.manifest&&(e.a.autoplay=!1,n=e.b.load(t.manifest,t.startTime)),n.then((function(){if(e.b){for(var n in t.video)e.a[n]=t.video[n];for(var r in t.playerAfterLoad)e.b[r](t.playerAfterLoad[r]);e.a.autoplay=i,t.manifest&&(e.a.play(),xr(e,0))}}),(function(t){e.b.dispatchEvent(new we("error",{detail:t}))}))}(this,t.initState,t.appData),wr(this);break;case"appData":this.s(t.appData);break;case"set":var n=t.targetName,r=t.property;if(t=t.value,"video"==n){var i=cast.receiver.CastReceiverManager.getInstance();if("volume"==r){i.setSystemVolumeLevel(t);break}if("muted"==r){i.setSystemVolumeMuted(t);break}}this.D[n][r]=t;break;case"call":(n=this.D[t.targetName])[t.methodName].apply(n,t.args);break;case"asyncCall":n=t.targetName,r=t.methodName,"player"==n&&"load"==r&&(this.g=0,this.m=!1),i=t.id,e=e.senderId;var a=this.D[n];t=a[r].apply(a,t.args),"player"==n&&"load"==r&&(t=t.then(function(){this.l=!0}.bind(this))),t.then(this.oe.bind(this,e,i,null),this.oe.bind(this,e,i))}},r.Af=function(e){var t=ir(e.data);switch(t.type){case"PLAY":this.a.play(),xr(this,0);break;case"PAUSE":this.a.pause(),xr(this,0);break;case"SEEK":e=t.currentTime;var n=t.resumeState;null!=e&&(this.a.currentTime=Number(e)),n&&"PLAYBACK_START"==n?(this.a.play(),xr(this,0)):n&&"PLAYBACK_PAUSE"==n&&(this.a.pause(),xr(this,0));break;case"STOP":this.b.Cd().then(function(){this.b&&xr(this,0)}.bind(this));break;case"GET_STATUS":xr(this,Number(t.requestId));break;case"VOLUME":e=(n=t.volume).level,n=n.muted;var r=this.a.volume,i=this.a.muted;null!=e&&(this.a.volume=Number(e)),null!=n&&(this.a.muted=n),r==this.a.volume&&i==this.a.muted||xr(this,0);break;case"LOAD":this.g=0,this.l=this.m=!1,e=t.media,n=t.currentTime,r=this.F(e.contentId),i=t.autoplay||!0,this.s(e.customData),i&&(this.a.autoplay=!0),this.b.load(r,n).then(function(){this.b&&kr(this)}.bind(this)).catch(function(e){var n="LOAD_FAILED";7==e.category&&7e3==e.code&&(n="LOAD_CANCELLED"),Cr(this,{requestId:Number(t.requestId),type:n},this.i)}.bind(this));break;default:Cr(this,{requestId:Number(t.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.i)}},r.oe=function(e,t,n){this.b&&Cr(this,{type:"asyncComplete",id:t,error:n},this.f,e)};var Rr={IDLE:"IDLE",ze:"PLAYING",we:"BUFFERING",ye:"PAUSED"};function Lr(e,t){this.J=e,this.b=t==Ir,this.a=0}V("shaka.util.DataViewReader",Lr);var Ir=1;function Pr(){throw new me(2,3,3e3)}function jr(){this.c=[],this.b=[],this.a=!1}function Or(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 Dr(e){for(var t=null!=e.flags?12:8,n=e.reader.G();0<n&&!e.parser.a;--n)e.parser.sc(e.start+t,e.reader,e.partialOkay)}function Mr(e){return function(t){e(t.reader.Za(t.reader.J.byteLength-t.reader.ca()))}}function Nr(e){for(var t=0,n=0;n<e.length;n++)t=t<<8|e.charCodeAt(n);return t}function Ur(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function Fr(e){var t=this;this.a=[],this.b=[],this.data=[],(new jr).H("moov",Or).fa("pssh",(function(e){if(!(1<e.version)){var n=e.reader.J;if(n=new Uint8Array(n.buffer,n.byteOffset-12,e.size),t.data.push(n),t.a.push(ht.Ac(e.reader.Za(16))),0<e.version){n=e.reader.G();for(var r=0;r<n;++r){var i=ht.Ac(e.reader.Za(16));t.b.push(i)}}}})).parse(e)}Lr.Endianness={Bg:0,Dg:Ir},Lr.prototype.ua=function(){return this.a<this.J.byteLength},Lr.prototype.hasMoreData=Lr.prototype.ua,Lr.prototype.ca=function(){return this.a},Lr.prototype.getPosition=Lr.prototype.ca,Lr.prototype.Ve=function(){return this.J.byteLength},Lr.prototype.getLength=Lr.prototype.Ve,Lr.prototype.la=function(){try{var e=this.J.getUint8(this.a);return this.a+=1,e}catch(e){Pr()}},Lr.prototype.readUint8=Lr.prototype.la,Lr.prototype.Tb=function(){try{var e=this.J.getUint16(this.a,this.b);return this.a+=2,e}catch(e){Pr()}},Lr.prototype.readUint16=Lr.prototype.Tb,Lr.prototype.G=function(){try{var e=this.J.getUint32(this.a,this.b);return this.a+=4,e}catch(e){Pr()}},Lr.prototype.readUint32=Lr.prototype.G,Lr.prototype.ke=function(){try{var e=this.J.getInt32(this.a,this.b);return this.a+=4,e}catch(e){Pr()}},Lr.prototype.readInt32=Lr.prototype.ke,Lr.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){Pr()}if(2097151<t)throw new me(2,3,3001);return this.a+=8,t*Math.pow(2,32)+e},Lr.prototype.readUint64=Lr.prototype.Bb,Lr.prototype.Za=function(e){this.a+e>this.J.byteLength&&Pr();var t=new Uint8Array(this.J.buffer,this.J.byteOffset+this.a,e);return this.a+=e,t},Lr.prototype.readBytes=Lr.prototype.Za,Lr.prototype.M=function(e){this.a+e>this.J.byteLength&&Pr(),this.a+=e},Lr.prototype.skip=Lr.prototype.M,Lr.prototype.me=function(e){this.a<e&&Pr(),this.a-=e},Lr.prototype.rewind=Lr.prototype.me,Lr.prototype.seek=function(e){(0>e||e>this.J.byteLength)&&Pr(),this.a=e},Lr.prototype.seek=Lr.prototype.seek,Lr.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,ot(e)},Lr.prototype.readTerminatedString=Lr.prototype.md,V("shaka.util.Mp4Parser",jr),jr.prototype.H=function(e,t){var n=Nr(e);return this.c[n]=0,this.b[n]=t,this},jr.prototype.box=jr.prototype.H,jr.prototype.fa=function(e,t){var n=Nr(e);return this.c[n]=1,this.b[n]=t,this},jr.prototype.fullBox=jr.prototype.fa,jr.prototype.stop=function(){this.a=!0},jr.prototype.stop=jr.prototype.stop,jr.prototype.parse=function(e,t){var n=new Uint8Array(e);for(n=new Lr(new DataView(n.buffer,n.byteOffset,n.byteLength),0),this.a=!1;n.ua()&&!this.a;)this.sc(0,n,t)},jr.prototype.parse=jr.prototype.parse,jr.prototype.sc=function(e,t,n){var r=t.ca(),i=t.G(),a=t.G();switch(i){case 0:i=t.J.byteLength-r;break;case 1:i=t.Bb()}var o=this.b[a];if(o){var s=null,l=null;1==this.c[a]&&(s=(l=t.G())>>>24,l&=16777215),a=r+i,n&&a>t.J.byteLength&&(a=t.J.byteLength),a-=t.ca(),t=0<a?t.Za(a):new Uint8Array(0),o({parser:this,partialOkay:n||!1,version:s,flags:l,reader:t=new Lr(new DataView(t.buffer,t.byteOffset,t.byteLength),0),size:i,start:r+e})}else t.M(Math.min(r+i-t.ca(),t.J.byteLength-t.ca()))},jr.prototype.parseNext=jr.prototype.sc,jr.children=Or,jr.sampleDescription=Dr,jr.allData=Mr,jr.typeToString=Ur;var Br={gc:function(e,t){var n=Br.P(e,t);return 1!=n.length?null:n[0]},Oc:function(e,t,n){return 1!=(e=Br.Od(e,t,n)).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,n){return Array.prototype.filter.call(e.childNodes,(function(e){return e instanceof Element&&e.localName==n&&e.namespaceURI==t}))},getAttributeNS:function(e,t,n){return e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):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,n,r){r=void 0===r?null:r;var i=null;return null!=(e=e.getAttribute(t))&&(i=n(e)),null==i?r: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 n=new DOMParser;try{var r=n.parseFromString(e,"text/xml")}catch(e){}if(r&&r.documentElement.tagName==t)var i=r.documentElement;return i&&0<i.getElementsByTagName("parsererror").length?null:i},ge:function(e,t){try{var n=ot(e);return Br.he(n,t)}catch(e){}}},Kr=(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 Vr(e,t,n){var r=function(e){for(var t=[],n=(e=f(e)).next();!n.done;n=e.next())(n=Yr(n.value))&&t.push(n);return t}(e),i=null;e=[];var a=[],o=new Set(r.map((function(e){return e.keyId})));if(o.delete(null),1<o.size)throw new me(2,4,4010);if(n||(a=r.filter((function(e){return"urn:mpeg:dash:mp4protection:2011"!=e.ne||(i=e.init||i,!1)}))).length&&0==(e=function(e,t,n){for(var r=[],i=(n=f(n)).next();!i.done;i=n.next()){i=i.value;var a=Kr.get(i.ne);if(a){var o;if(o=Br.Oc(i.node,"urn:microsoft:playready","pro")){o=ht.Ba(o.textContent);var s=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),l=o.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(o,h),o=[{initData:d,initDataType:"cenc",keyId:i.keyId}]}else o=null;o=Ht(a,i.init||e||o),(a=Hr.get(a))&&(o.licenseServerUri=a(i)),r.push(o)}else for(i=f(i=t(i.node)||[]),a=i.next();!a.done;a=i.next())r.push(a.value)}return r}(i,t,a)).length&&(e=[Ht("",i)]),r.length&&(n||!a.length))for(e=[],n=(t=f(Kr.values())).next();!n.done;n=t.next())"org.w3.clearkey"!=(n=n.value)&&e.push(Ht(n,i));if(o=Array.from(o)[0]||null)for(n=(t=f(e)).next();!n.done;n=t.next())for(r=(n=f(n.value.initData)).next();!r.done;r=n.next())r.value.keyId=o;return{Kd:o,Fg:i,drmInfos:e,Pd:!0}}var Gr,Hr=(new Map).set("com.widevine.alpha",(function(e){return(e=Br.Oc(e.node,"urn:microsoft","laurl"))&&e.getAttribute("licenseUrl")||""})).set("com.microsoft.playready",(function(e){return(e=Br.Oc(e.node,"urn:microsoft:playready","pro"))&&(e=function(e){var t=0,n=new DataView(e).getUint32(t,!0);if(n!==e.byteLength)return[];t+=6,n=[];for(var r=new DataView(e);t<e.byteLength-1;){var i=r.getUint16(t,!0);t+=2;var a=r.getUint16(t,!0);t+=2;var o=new Uint8Array(e,t,a);n.push({type:i,value:o}),t+=a}return n}((e=ht.Ba(e.textContent)).buffer).filter((function(e){return 1===e.type}))[0])?(e=st(e.value,!0),(e=Br.he(e,"WRMHEADER"))?function(e){return(e=e.querySelector("DATA > LA_URL"))?e.textContent:""}(e):""):""}));function Yr(e){var t=e.getAttribute("schemeIdUri"),n=Br.getAttributeNS(e,"urn:mpeg:cenc:2013","default_KID"),r=Br.Od(e,"urn:mpeg:cenc:2013","pssh").map(Br.ic);if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new me(2,4,4009);var i=[];try{i=r.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:n,init:0<i.length?i:null}}function zr(t,n,r,i,a){var o={RepresentationID:n,Number:r,Bandwidth:i,Time:a};return t.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,(function(t,n,r,i){if("$$"==t)return"$";var a=o[n];if(null==a)return t;switch("RepresentationID"==n&&r&&(r=void 0),"Time"==n&&(a=Math.round(a)),i){case void 0:case"d":case"i":case"u":t=a.toString();break;case"o":t=a.toString(8);break;case"x":t=a.toString(16);break;case"X":t=a.toString(16).toUpperCase();break;default:t=a.toString()}return r=e.parseInt(r,10)||1,Array(Math.max(0,r-t.length)+1).join("0")+t}))}function Wr(e,t){var n=$r(e,t,"timescale"),r=1;n&&(r=Br.tc(n)||1),n=$r(e,t,"duration"),(n=Br.tc(n||""))&&(n/=r);var i=$r(e,t,"startNumber"),a=Number($r(e,t,"presentationTimeOffset"))||0,o=Br.yb(i||"");null!=i&&null!=o||(o=1);var s=qr(e,t,"SegmentTimeline");if(i=null,s){i=r;var l=e.T.duration||1/0;s=Br.P(s,"S");for(var u=[],c=0,d=0;d<s.length;++d){var f=s[d],h=Br.I(f,"t",Br.yb),p=Br.I(f,"d",Br.yb);if(f=Br.I(f,"r",Br.parseInt),null!=h&&(h-=a),!p)break;if(h=null!=h?h:c,0>(f=f||0))if(d+1<s.length){if(null==(f=Br.I(s[d+1],"t",Br.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:r,Z:n,ab:o,ma:a/r||0,Dd:a,N:i}}function $r(e,t,n){return[t(e.C),t(e.aa),t(e.ka)].filter(Vt.Ia).map((function(e){return e.getAttribute(n)})).reduce((function(e,t){return e||t}))}function qr(e,t,n){return[t(e.C),t(e.aa),t(e.ka)].filter(Vt.Ia).map((function(e){return Br.gc(e,n)})).reduce((function(e,t){return e||t}))}function Xr(e,t,n,r,i,a){if(a=void 0===a?0:a,Br.getAttributeNS(e,"http://www.w3.org/1999/xlink","href")){var o=function(e,t,n,r,i,a){for(var o=Br.getAttributeNS(e,"http://www.w3.org/1999/xlink","href"),s=Br.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<=a)return ye(new me(2,4,4028));if("onLoad"!=s)return ye(new me(2,4,4027));var c=Gt([r],[o]);return i.request(0,Me(c,t)).U((function(r){if(!(r=Br.ge(r.data,e.tagName)))return ye(new me(2,4,4001,o));for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);for(;r.childNodes.length;){var s=r.childNodes[0];r.removeChild(s),e.appendChild(s)}for(s=0;s<r.attributes.length;s++){var l=r.attributes[s].nodeName,u=r.getAttribute(l);e.setAttribute(l,u)}return Xr(e,t,n,c[0],i,a+1)}))}(e,t,n,r,i,a);return n&&(o=o.U(void 0,(function(){return Xr(e,t,n,r,i,a)}))),o}o=[];for(var s=0;s<e.childNodes.length;s++){var l=e.childNodes[s];l instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Br.getAttributeNS(l,"http://www.w3.org/1999/xlink","href")?(e.removeChild(l),--s):"SegmentTimeline"!=l.tagName&&o.push(Xr(l,t,n,r,i,a)))}return Ee(o).U((function(){return e}))}function Jr(e,t,n){this.c=e,this.b=t,this.a=n}function Zr(e,t,n,r,i,a){this.position=e,this.startTime=t,this.endTime=n,this.c=r,this.b=i,this.a=a}function Qr(e,t,n,r){var i,a=(new jr).fa("sidx",(function(e){i=function(e,t,n,r){var i=[];r.reader.M(4);var a=r.reader.G();if(0==a)throw new me(2,3,3005);if(0==r.version)var o=r.reader.G(),s=r.reader.G();else o=r.reader.Bb(),s=r.reader.Bb();r.reader.M(2);var l=r.reader.Tb();for(e=e+r.size+s,s=0;s<l;s++){var u=r.reader.G(),c=(2147483648&u)>>>31;u&=2147483647;var d=r.reader.G();if(r.reader.M(4),1==c)throw new me(2,3,3006);i.push(new Zr(i.length,o/a-t,(o+d)/a-t,(function(){return n}),e,e+u-1)),o+=d,e+=u}return r.parser.stop(),i}(t,r,n,e)}));if(e&&a.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 n=e.a[e.a.length-1];e.a[e.a.length-1]=new Zr(n.position,n.startTime,t,n.c,n.b,n.a)}}function ni(e){this.b=e,this.a=new Lr(e,0),Gr||(Gr=[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 ri(e){var t=ii(e);if(7<t.length)throw new me(2,3,3002);for(var n=0,r=0;r<t.length;r++)n=256*n+t[r];t=n,n=ii(e);e:{r=ht.za;for(var i=0;i<Gr.length;i++)if(r(n,Gr[i])){r=!0;break e}r=!1}if(r)n=e.b.byteLength-e.a.ca();else{if(8==n.length&&224&n[1])throw new me(2,3,3001);for(r=n[0]&(1<<8-n.length)-1,i=1;i<n.length;i++)r=256*r+n[i];n=r}return n=e.a.ca()+n<=e.b.byteLength?n:e.b.byteLength-e.a.ca(),r=new DataView(e.b.buffer,e.b.byteOffset+e.a.ca(),n),e.a.M(n),new ai(t,r)}function ii(e){var t,n=e.a.la();for(t=1;8>=t&&!(n&1<<8-t);t++);if(8<t)throw new me(2,3,3002);var r=new Uint8Array(t);for(r[0]=n,n=1;n<t;n++)r[n]=e.a.la();return r}function ai(e,t){this.id=e,this.a=t}function oi(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,n=0;n<e.a.byteLength;n++)t=256*t+e.a.getUint8(n);return t}function si(){}function li(e){var t=new ni(e.a);if(179!=(e=ri(t)).id)throw new me(2,3,3013);if(e=oi(e),183!=(t=ri(t)).id)throw new me(2,3,3012);t=new ni(t.a);for(var n=0;t.ua();){var r=ri(t);if(241==r.id){n=oi(r);break}}return{yg:e,Vf:n}}function ui(e,t){var n=qr(e,t,"Initialization");if(!n)return null;var r=e.C.qa,i=n.getAttribute("sourceURL");i&&(r=Gt(e.C.qa,[i])),i=0;var a=null;return(n=Br.I(n,"range",Br.uc))&&(i=n.start,a=n.end),new Jr((function(){return r}),i,a)}function ci(e,t,n,r,i,a,o,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(r,i,a),"webm"==o?f(n.c(),n.b,n.a):null];return f=null,Promise.all(e).then((function(e){var t=e[0];e=e[1]||null,t="mp4"==o?Qr(t,i,r,s):(new si).parse(t,e,r,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 n=ui(e,hi),r=function(e){return[e.C.La,e.aa.La,e.ka.La].filter(Vt.Ia).map((function(e){return Br.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=Br.I(t,"mediaRange",Br.uc,{start:0,end:null})).start,end:t.end}}))}(e),i=Wr(e,hi),a=i.ab;0==a&&(a=1);var o=0;if(i.Z?o=i.Z*(a-1):i.N&&0<i.N.length&&(o=i.N[0].start),!(r={Z:i.Z,startTime:o,ab:a,ma:i.ma,N:i.N,tb:r}).Z&&!r.N&&1<r.tb.length)throw new me(2,4,4002);if(!r.Z&&!e.T.duration&&!r.N&&1==r.tb.length)throw new me(2,4,4002);if(r.N&&0==r.N.length)throw new me(2,4,4002);return a=i=null,e.ka.id&&e.C.id&&(i=t[a=e.ka.id+","+e.C.id]),o=function(e,t,n,r){var i=r.tb.length;r.N&&r.N.length!=r.tb.length&&(i=Math.min(r.N.length,r.tb.length));for(var a=[],o=r.startTime,s=0;s<i;s++){var l,u=r.tb[s],c=Gt(n,[u.xf]);l=null!=r.Z?o+r.Z:r.N?r.N[s].end:o+e,a.push(new Zr(s+t,o,l,function(e){return e}.bind(null,c),u.start,u.end)),o=l}return a}(e.T.duration,r.ab,e.C.qa,r),i?(i.cd(o),a=e.presentationTimeline.Ob(),i.Lc(a-e.T.start)):(e.presentationTimeline.vb(o,e.T.start),i=new ei(o),a&&e.mb&&(t[a]=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:n,ma:r.ma}}function hi(e){return e.La}function pi(e,t,n,r){var i=function(e){var t=$r(e,mi,"initialization");if(!t)return null;var n=e.C.id,r=e.bandwidth||null,i=e.C.qa;return new Jr((function(){var e=zr(t,n,null,r,null);return Gt(i,[e])}),0,null)}(e),a=Wr(e,mi),o=$r(e,mi,"media"),s=$r(e,mi,"index");if(o=(a={Z:a.Z,timescale:a.timescale,ab:a.ab,ma:a.ma,Dd:a.Dd,N:a.N,ad:o,Qb:s}).Qb?1:0,o+=a.N?1:0,0==(o+=a.Z?1:0))throw new me(2,4,4002);if(1!=o&&(a.Qb&&(a.N=null),a.Z=null),!a.Qb&&!a.ad)throw new me(2,4,4002);if(a.Qb){if("mp4"!=(n=e.C.mimeType.split("/")[1])&&"webm"!=n)throw new me(2,4,4006);if("webm"==n&&!i)throw new me(2,4,4005);r=zr(a.Qb,e.C.id,null,e.bandwidth||null,null),e=ci(e,t,i,r=Gt(e.C.qa,[r]),0,null,n,a.ma)}else a.Z?(r||(e.presentationTimeline.ed(a.Z),e.presentationTimeline.fd(e.T.start)),e=function(e,t){var n=e.T.duration,r=t.Z,i=t.ab,a=t.timescale,o=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||n&&e>=n?null:Math.floor(e/r)},getSegmentReference:function(e){var t=e*r,c=t+r;return n&&(c=Math.min(c,n)),0>c||n&&t>=n?null:new Zr(e,t,c,(function(){var n=zr(o,l,e+i,s,t*a);return Gt(u,[n])}),0,null)}}}(e,a)):(o=t=null,e.ka.id&&e.C.id&&(t=n[o=e.ka.id+","+e.C.id]),s=function(e,t){for(var n=[],r=0;r<t.N.length;r++){var i=r+t.ab;n.push(new Zr(i,t.N[r].start,t.N[r].end,function(e,t,n,r,i,a){return Gt(r,[e=zr(e,t,i,n,a)]).map((function(e){return e.toString()}))}.bind(null,t.ad,e.C.id,e.bandwidth||null,e.C.qa,i,t.N[r].xg+t.Dd),0,null))}return n}(e,a),r=!e.mb||!e.T.Zc,t?(r&&ti(new ei(s),e.T.duration),t.cd(s),n=e.presentationTimeline.Ob(),t.Lc(n-e.T.start)):(e.presentationTimeline.vb(s,e.T.start),t=new ei(s),o&&e.mb&&(n[o]=t)),r&&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:a.ma}}function mi(e){return e.Wb}V("shaka.media.InitSegmentReference",Jr),Jr.prototype.Ic=function(){return this.c()},Jr.prototype.createUris=Jr.prototype.Ic,Jr.prototype.Uc=function(){return this.b},Jr.prototype.getStartByte=Jr.prototype.Uc,Jr.prototype.Tc=function(){return this.a},Jr.prototype.getEndByte=Jr.prototype.Tc,V("shaka.media.SegmentReference",Zr),Zr.prototype.ca=function(){return this.position},Zr.prototype.getPosition=Zr.prototype.ca,Zr.prototype.kc=function(){return this.startTime},Zr.prototype.getStartTime=Zr.prototype.kc,Zr.prototype.Te=function(){return this.endTime},Zr.prototype.getEndTime=Zr.prototype.Te,Zr.prototype.Ic=function(){return this.c()},Zr.prototype.createUris=Zr.prototype.Ic,Zr.prototype.Uc=function(){return this.b},Zr.prototype.getStartByte=Zr.prototype.Uc,Zr.prototype.Tc=function(){return this.a},Zr.prototype.getEndByte=Zr.prototype.Tc,V("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 n=this.a[t];if(e>=n.startTime&&e<n.endTime)return n.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=[],n=0,r=0;n<this.a.length&&r<e.length;){var i=this.a[n],a=e[r];i.startTime<a.startTime?(t.push(i),n++):(i.startTime>a.startTime?0==n&&t.push(a):(.1<Math.abs(i.endTime-a.endTime)?t.push(new Zr(i.position,a.startTime,a.endTime,a.c,a.b,a.a)):t.push(i),n++),r++)}for(;n<this.a.length;)t.push(this.a[n++]);if(t.length)for(n=t[t.length-1].position+1;r<e.length;)i=new Zr(n++,(i=e[r++]).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,ni.prototype.ua=function(){return this.a.ua()},si.prototype.parse=function(e,t,n,r){var i;if(440786851!=ri(t=new ni(new DataView(t))).id)throw new me(2,3,3008);var a=ri(t);if(408125543!=a.id)throw new me(2,3,3009);for(t=a.a.byteOffset,a=new ni(a.a),i=null;a.ua();){var o=ri(a);if(357149030==o.id){i=o;break}}if(!i)throw new me(2,3,3010);for(a=new ni(i.a),i=1e6,o=null;a.ua();){var s=ri(a);if(2807729==s.id)i=oi(s);else if(17545==s.id)if(4==(o=s).a.byteLength)o=o.a.getFloat32(0);else{if(8!=o.a.byteLength)throw new me(2,3,3003);o=o.a.getFloat64(0)}}if(null==o)throw new me(2,3,3011);if(i=o*(a=i/1e9),475249515!=(e=ri(new ni(new DataView(e)))).id)throw new me(2,3,3007);return function(e,t,n,r,i,a){function o(){return i}var s=[];e=new ni(e.a);for(var l=null,u=null;e.ua();){var c=ri(e);if(187==c.id){var d=li(c);d&&(c=n*d.yg,d=t+d.Vf,null!=l&&s.push(new Zr(s.length,l-a,c-a,o,u,d-1)),l=c,u=d)}}return null!=l&&s.push(new Zr(s.length,l-a,r-a,o,u,null)),s}(e,t,a,i,n,r)};var gi={zb:{},Sb:{},pd:function(e,t){gi.Sb[e]=t}};function vi(e,t,n){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===n||n}function yi(e,t,n,r){return e=Me(e,r),0==t&&null==n||(e.headers.Range=n?"bytes="+t+"-"+n:"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 n,r;return M(t,(function(t){switch(t.j){case 1:return n=0,k(t,2),w(t,_i(e),4);case 4:n=t.o,x(t,3);break;case 2:r=R(t),e.b&&(r.severity=1,e.b.onError(r));case 3:if(!e.b)return t.return();wi(e,n),S(t)}}))}))}(e)})),this.g=new Ie}function _i(e){var t=Date.now(),n=e.b.networkingEngine.request(0,Me(e.f,e.a.retryParameters));return Pe(e.g,n),n.promise.then((function(t){if(e.b)return t.uri&&!e.f.includes(t.uri)&&e.f.unshift(t.uri),function(e,t,n){if(!(t=Br.ge(t,"MPD")))throw new me(2,4,4001,n);return t=Xr(t,e.a.retryParameters,e.a.dash.xlinkFailGracefully,n,e.b.networkingEngine),Pe(e.g,t),t.promise.then((function(t){return function(e,t,n){return p((function r(){var i,a,o,s,l,u,c,d,f,h,p,m,g,v,y,b,_,A,E,T,k,C,x,R;return M(r,(function(r){switch(r.j){case 1:s=Vt,u=[n],0<(c=(l=Br).P(t,"Location").map(l.ic).filter(s.Ia)).length&&(d=Gt(u,c),u=e.f=d),f=l.P(t,"BaseURL").map(l.ic),h=Gt(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),v=l.I(t,"timeShiftBufferDepth",l.Ea),y=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 vi(g,null!=A?A:T,e.a.dash.autoCorrectDrift));for(var L={mb:"static"!=b,presentationTimeline:E,ka:null,T:null,aa:null,C:null,bandwidth:0,Vd:!1},I=h,P=Br.I(t,"mediaPresentationDuration",Br.Ea),j=[],O=0,D=Br.P(t,"Period"),M=0;M<D.length;M++){var N=D[M];O=Br.I(N,"start",Br.Ea,O);var U=Br.I(N,"duration",Br.Ea),F=null;if(M!=D.length-1){var B=Br.I(D[M+1],"start",Br.Ea);null!=B&&(F=B-O)}else null!=P&&(F=P-O);if(null==F&&(F=U),N=Ai(e,L,I,{start:O,duration:F,node:N,Zc:null==F||M==D.length-1}),j.push(N),U=L.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(j),null!=P?(i=j,a=P,o=!1):(i=j,a=O,o=!0),k=a,C=i,E.Xb("static"==b),"static"!=b&&o||E.xa(k||1/0),E.V()&&!isNaN(e.a.availabilityWindowOverride)&&(v=e.a.availabilityWindowOverride),null==v&&(v=1/0),E.xd(v),E.ed(y||1),e.c){r.A(0);break}if(e.c={presentationTimeline:E,periods:C,offlineSessionIds:[],minBufferTime:m||0},!E.ue()){r.A(0);break}return x=l.P(t,"UTCTiming"),w(r,function(e,t,n){n=n.map((function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}}));var r=e.a.dash.clockSyncUri;return!n.length&&r&&n.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),Vt.Ke(n,function(e){var n=e.scheme;switch(e=e.value,n){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 n=Date.parse(e),isNaN(n)?0:n-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",n),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,x),4);case 4:if(R=r.o,!e.b)return r.return();E.pe(R),S(r)}}))}))}(e,t,n)}))}(e,t.data,t.uri)})).then((function(){var n=(Date.now()-t)/1e3;return Y(e.u,1,n),n}))}function Ai(e,t,n,r){if(t.ka=Si(r.node,null,n),t.T=r,t.ka.id||(t.ka.id="__shaka_period_"+r.start),Br.P(r.node,"EventStream").forEach(e.Pf.bind(e,r.start,r.duration)),n=Br.P(r.node,"AdaptationSet").map(e.Nf.bind(e,t)).filter(Vt.Ia),t.mb){t=[];for(var i=f(n),a=i.next();!a.done;a=i.next())for(var o=(a=f(a.value.Yf)).next();!o.done;o=a.next())t.push(o.value);if(t.length!=new Set(t).size)throw new me(2,4,4018)}var s=n.filter((function(e){return!e.Bd}));if(n.filter((function(e){return e.Bd})).forEach((function(e){var t=e.streams[0],n=e.Bd;s.forEach((function(e){e.id==n&&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(n=e.a.disableAudio,i.length&&!n||(i=[null]),n=e.a.disableVideo,t.length&&!n||(t=[null]),n=[],a=0;a<i.length;a++)for(o=0;o<t.length;o++)Ti(e,i[a],t[o],n);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:r.start,textStreams:t,variants:n}}function Ei(e,t){return e.filter((function(e){return e.contentType==t}))}function Ti(e,t,n,r){if(t||n)if(t&&n){var i=t.drmInfos,a=n.drmInfos;if(!i.length||!a.length||0<Lt(i,a).length){a=Lt(t.drmInfos,n.drmInfos);for(var o=0;o<t.streams.length;o++)for(var s=0;s<n.streams.length;s++)i=(n.streams[s].bandwidth||0)+(t.streams[o].bandwidth||0),i={id:e.h++,language:t.language,primary:t.$c||n.$c,audio:t.streams[o],video:n.streams[s],bandwidth:i,drmInfos:a,allowedByApplication:!0,allowedByKeySystem:!0},r.push(i)}}else for(a=t||n,o=0;o<a.streams.length;o++)i=a.streams[o].bandwidth||0,i={id:e.h++,language:a.language||"und",primary:a.$c,audio:t?a.streams[o]:null,video:n?a.streams[o]:null,bandwidth:i,drmInfos:a.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},r.push(i)}function wi(e,t){0>e.s||e.i.R(Math.max(3,e.s-t,z(e.u)))}function Si(e,t,n){t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,gd:null,audioSamplingRate:null},n=n||t.qa;var r=Br.yb,i=Br.Me,a=Br.P(e,"BaseURL").map(Br.ic),o=e.getAttribute("contentType")||t.contentType,s=e.getAttribute("mimeType")||t.mimeType,l=e.getAttribute("codecs")||t.codecs;i=Br.I(e,"frameRate",i)||t.frameRate;for(var u=e.getAttribute("par")||t.pixelAspectRatio,c=Br.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 n=e[t],r=n.getAttribute("schemeIdUri");if(r&&(n=n.getAttribute("value")))switch(r){case"urn:mpeg:dash:outputChannelPositionList:2012":return n.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(r=parseInt(n,10)))continue;return r;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(r=parseInt(n,16)){for(e=0;r;)1&r&&++e,r>>=1;return e}}}return null}(c=Br.P(e,"AudioChannelConfiguration"))||t.gd,h=Br.I(e,"audioSamplingRate",r)||t.audioSamplingRate,o||(o=Ci(s,l)),{qa:Gt(n,a),Ub:Br.gc(e,"SegmentBase")||t.Ub,La:Br.gc(e,"SegmentList")||t.La,Wb:Br.gc(e,"SegmentTemplate")||t.Wb,width:Br.I(e,"width",r)||t.width,height:Br.I(e,"height",r)||t.height,contentType:o,mimeType:s,codecs:l,frameRate:i,pixelAspectRatio:u,emsgSchemeIdUris:d,id:e.getAttribute("id"),gd:c,audioSamplingRate:h}}function ki(e,t,n,r){return(t=Me(t=Gt(t,[n]),e.a.retryParameters)).method=r,t=e.b.networkingEngine.request(4,t),Pe(e.g,t),t.promise.then((function(e){if("HEAD"==r){if(!e.headers||!e.headers.date)return 0;e=e.headers.date}else e=ot(e.data);return e=Date.parse(e),isNaN(e)?0:e-Date.now()}))}function Ci(e,t){return mn(qe(e,t))?"text":e.split("/")[0]}function xi(e,t,n,r){this.b=e,this.type=t,this.a=n,this.segments=r||null}function Ri(e,t,n,r){this.id=e,this.name=t,this.a=n,this.value=void 0===r?null:r}function Li(e,t){this.name=e,this.value=t}function Ii(e,t,n){return(e=e.getAttribute(t))?e.value:n||null}function Pi(e,t){this.b=t,this.a=e}V("shaka.media.ManifestParser.registerParserByExtension",gi.pd),gi.Cb=function(e,t){gi.zb[e]=t},V("shaka.media.ManifestParser.registerParserByMime",gi.Cb),gi.Sf=function(){var e={};if(Ze()){for(var t in gi.zb)e[t]=!0;for(var n in gi.Sb)e[n]=!0}t={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var r=(n=f(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!r.done;r=n.next())e[r=r.value]=Ze()?!!gi.zb[r]:Qe(r);for(var i in t)e[i]=Ze()?!!gi.Sb[i]:Qe(t[i]);return e},gi.create=function(e,t,n,r){return p((function i(){var a,o;return M(i,(function(i){switch(i.j){case 1:return k(i,2),w(i,gi.Ue(e,t,n,r),4);case 4:return a=i.o,i.return(new a);case 2:throw(o=R(i)).severity=2,o}}))}))},gi.Ue=function(e,t,n,r){return p((function i(){var a,o,s,l,u;return M(i,(function(i){switch(i.j){case 1:if(a=gi,r&&(o=a.zb[r.toLowerCase()]))return i.return(o);if((s=a.getExtension(e))&&(l=a.Sb[s]))return i.return(l);if(r){i.A(2);break}return w(i,a.bf(e,t,n),3);case 3:if((r=i.o)&&(u=gi.zb[r]))return i.return(u);case 2:throw new me(2,4,4e3,e)}}))}))},gi.bf=function(e,t,n){return p((function r(){var i,a,o;return M(r,(function(r){switch(r.j){case 1:return(i=Me([e],n)).method="HEAD",w(r,t.request(0,i).promise,2);case 2:return a=r.o,o=a.headers["content-type"],r.return(o?o.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)},V("shaka.media.PresentationTimeline",vi),vi.prototype.Y=function(){return this.g},vi.prototype.getDuration=vi.prototype.Y,vi.prototype.$e=function(){return this.a},vi.prototype.getMaxSegmentDuration=vi.prototype.$e,vi.prototype.xa=function(e){this.g=e},vi.prototype.setDuration=vi.prototype.xa,vi.prototype.hf=function(){return this.f},vi.prototype.getPresentationStartTime=vi.prototype.hf,vi.prototype.pe=function(e){this.l=e},vi.prototype.setClockOffset=vi.prototype.pe,vi.prototype.Xb=function(e){this.m=e},vi.prototype.setStatic=vi.prototype.Xb,vi.prototype.xd=function(e){this.h=e},vi.prototype.setSegmentAvailabilityDuration=vi.prototype.xd,vi.prototype.ig=function(e){this.vc=e},vi.prototype.setDelay=vi.prototype.ig,vi.prototype.Se=function(){return this.vc},vi.prototype.getDelay=vi.prototype.Se,vi.prototype.vb=function(e,t){if(0!=e.length){var n=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,n),null!=this.f&&this.s&&(this.f=(Date.now()+this.l)/1e3-this.b-this.a)}},vi.prototype.notifySegments=vi.prototype.vb,vi.prototype.fd=function(e){this.c=null==this.c?e:Math.min(this.c,e)},vi.prototype.notifyMinSegmentStartTime=vi.prototype.fd,vi.prototype.ed=function(e){this.a=Math.max(this.a,e)},vi.prototype.notifyMaxSegmentDuration=vi.prototype.ed,vi.prototype.offset=function(e){null!=this.c&&(this.c+=e),null!=this.b&&(this.b+=e)},vi.prototype.offset=vi.prototype.offset,vi.prototype.V=function(){return 1/0==this.g&&!this.m},vi.prototype.isLive=vi.prototype.V,vi.prototype.Xa=function(){return 1/0!=this.g&&!this.m},vi.prototype.isInProgress=vi.prototype.Xa,vi.prototype.Ob=function(){if(1/0==this.h)return this.i;var e=this.pb()-this.h;return Math.max(this.i,e)},vi.prototype.getSegmentAvailabilityStart=vi.prototype.Ob,vi.prototype.qe=function(e){this.i=e},vi.prototype.setUserSeekStart=vi.prototype.qe,vi.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},vi.prototype.getSegmentAvailabilityEnd=vi.prototype.pb,vi.prototype.Nb=function(e){var t=Math.max(this.c,this.i);if(1/0==this.h)return t;var n=this.pb()-this.h;return e=Math.min(n+e,this.Ca()),Math.max(t,e)},vi.prototype.getSafeSeekRangeStart=vi.prototype.Nb,vi.prototype.ob=function(){return this.Nb(0)},vi.prototype.getSeekRangeStart=vi.prototype.ob,vi.prototype.Ca=function(){var e=this.V()||this.Xa()?this.vc:0;return Math.max(0,this.pb()-e)},vi.prototype.getSeekRangeEnd=vi.prototype.Ca,vi.prototype.ue=function(){return!(null==this.f||null!=this.b&&this.s)},vi.prototype.usingPresentationStartTime=vi.prototype.ue,V("shaka.dash.DashParser",bi),(r=bi.prototype).configure=function(e){this.a=e},r.start=function(e,t){var n=this;return p((function r(){var i;return M(r,(function(r){switch(r.j){case 1:return n.f=[e],n.b=t,w(r,_i(n),2);case 2:if(i=r.o,n.b&&wi(n,i),!n.b)throw new me(2,7,7001);return r.return(n.c)}}))}))},r.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()},r.update=function(){_i(this).catch(function(e){this.b&&this.b.onError(e)}.bind(this))},r.onExpirationUpdated=function(){},r.Nf=function(e,t){if(e.aa=Si(t,e.ka,null),"image"==e.aa.contentType)return null;var n=!1,r=Br.P(t,"Role"),i=r.map((function(e){return e.getAttribute("value")})).filter(Vt.Ia),a=void 0,o="text"==e.aa.contentType;o&&(a="subtitle");for(var s=0;s<r.length;s++){var l=r[s].getAttribute("schemeIdUri");if(null==l||"urn:mpeg:dash:role:2011"==l)switch(l=r[s].getAttribute("value"),l){case"main":n=!0;break;case"caption":case"subtitle":a=l}}var u=null,c=!1;Br.P(t,"EssentialProperty").forEach((function(e){"http://dashif.org/guidelines/trickmode"==e.getAttribute("schemeIdUri")?u=e.getAttribute("value"):c=!0})),s=Br.P(t,"Accessibility");var d=new Map;for(r={},l=(s=f(s)).next();!l.done;r={Ib:r.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?(r.Ib=1,null!=h?h.split(";").forEach(function(e){return function(t){if(t.includes("=")){var n=(t=t.split("="))[0].startsWith("CC")?t[0]:"CC"+t[0];t=t[1].split(",")[0].split(":").pop()}else n="CC"+e.Ib,e.Ib+=2;d.set(n,On(t))}}(r)):d.set("CC1","und")):"urn:mpeg:dash:role:2011"==l&&null!=h&&(i.push(h),"captions"==h&&(a="caption"))}if(c)return null;var p=Vr(r=Br.P(t,"ContentProtection"),this.a.dash.customScheme,this.a.dash.ignoreDrmInfo);if(r=On(t.getAttribute("lang")||"und"),s=t.getAttribute("label"),(l=Br.P(t,"Label"))&&l.length&&(l=l[0]).textContent&&(s=l.textContent),0==(i=(l=Br.P(t,"Representation")).map(this.Qf.bind(this,e,p,a,r,s,n,i,d)).filter((function(e){return!!e}))).length){if(this.a.dash.ignoreEmptyAdaptationSet||o)return null;throw new me(2,4,4003)}return e.aa.contentType&&"application"!=e.aa.contentType||(e.aa.contentType=Ci(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)}))})),o=l.map((function(e){return e.getAttribute("id")})).filter(Vt.Ia),{id:e.aa.id||"__fake__"+this.h++,contentType:e.aa.contentType,language:r,$c:n,streams:i,drmInfos:p.drmInfos,Bd:u,Yf:o}},r.Qf=function(e,t,n,r,i,a,o,s,l){if(e.C=Si(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=Br.I(l,"bandwidth",Br.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 n=Number($r(e,di,"presentationTimeOffset"))||0,r=$r(e,di,"timescale"),i=1;r&&(i=Br.tc(r)||1),n=n/i||0,r=ui(e,di);var a=e.C.contentType;if(i=e.C.mimeType.split("/")[1],"text"!=a&&"mp4"!=i&&"webm"!=i)throw new me(2,4,4006);if("webm"==i&&!r)throw new me(2,4,4005);a=qr(e,di,"RepresentationIndex");var o=$r(e,di,"indexRange"),s=e.C.qa;if(o=Br.uc(o||""),a){var l=a.getAttribute("sourceURL");l&&(s=Gt(e.C.qa,[l])),o=Br.I(a,"range",Br.uc,o)}if(!o)throw new me(2,4,4002);return{createSegmentIndex:(i=ci(e,t,r,s,o.start,o.end,i,n)).createSegmentIndex,findSegmentPosition:i.findSegmentPosition,getSegmentReference:i.getSegmentReference,initSegmentReference:r,ma:n}}(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 Zr(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,n,r){var i=Vr(e,t,r);if(n.Pd)e=1==n.drmInfos.length&&!n.drmInfos[0].keySystem,t=0==i.drmInfos.length,(0==n.drmInfos.length||e&&!t)&&(n.drmInfos=i.drmInfos),n.Pd=!1;else if(0<i.drmInfos.length&&(n.drmInfos=n.drmInfos.filter((function(e){return i.drmInfos.some((function(t){return t.keySystem==e.keySystem}))})),0==n.drmInfos.length))throw new me(2,4,4008);return i.Kd||n.Kd}(l=Br.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:n,encrypted:0<t.drmInfos.length,keyId:l,language:r,label:i,type:e.aa.contentType,primary:a,trickModeVideo:null,emsgSchemeIdUris:e.C.emsgSchemeIdUris,roles:o,channelsCount:e.C.gd,audioSamplingRate:e.C.audioSamplingRate,closedCaptions:s}},r.Pf=function(e,t,n){var r=Br.yb,i=n.getAttribute("schemeIdUri")||"",a=n.getAttribute("value")||"",o=Br.I(n,"timescale",r)||1;Br.P(n,"Event").forEach(function(n){var s=Br.I(n,"presentationTime",r)||0,l=Br.I(n,"duration",r)||0;l=(s=s/o+e)+l/o,null!=t&&(s=Math.min(s,e+t),l=Math.min(l,e+t)),n={schemeIdUri:i,value:a,startTime:s,endTime:l,id:n.getAttribute("id")||"",eventElement:n},this.b.onTimelineRegionAdded(n)}.bind(this))},r.Zf=function(e,t,n){return e=yi(e,t,n,this.a.retryParameters),e=this.b.networkingEngine.request(1,e),Pe(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 ji={nb:function(e,t){return e.filter((function(e){return e.name==t}))},Ta:function(e,t){var n=ji.nb(e,t);return n.length?n[0]:null},Pc:function(e,t,n){return e.filter((function(e){var r=e.getAttribute("TYPE");return e=e.getAttribute("GROUP-ID"),r.value==t&&e.value==n}))},Hc:function(e,t){return Gt([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 n=t.exec(e.b);return n=null==n?null:{position:n.index,length:n[0].length,ag:n},e.a==e.b.length||null==n||n.position!=e.a?null:(e.a+=n.length,n.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,n){var r=(t=(t=ot(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(r[0]))throw new me(2,4,4015);t=0;for(var i=1;i<r.length;i++)if(!ji.Yc(r[i])){var a=Ki(e,r[i]);if(--e.a,Vi.includes(a.name)){t=1;break}"EXT-X-STREAM-INF"==a.name&&(i+=1)}for(i=[],a=1;a<r.length;)if(ji.Yc(r[a]))a+=1;else{var o=Ki(e,r[a]);if(Gi.includes(o.name)){if(1!=t)throw new me(2,4,4017);return new xi(n,t,i,e=Bi(e,n,r=r.splice(a,r.length-a),i))}i.push(o),a+=1,"EXT-X-STREAM-INF"==o.name&&(o.a.push(new Li("URI",r[a])),a+=1)}return new xi(n,t,i)}function Bi(e,t,n,r){var i=[],a=[];return n.forEach((function(n){if(/^(#EXT)/.test(n))n=Ki(e,n),Vi.includes(n.name)?r.push(n):a.push(n);else{if(ji.Yc(n))return[];n=ji.Hc(t,n.trim()),i.push(new Pi(n,a)),a=[]}})),i}function Ki(e,t){var n=e.a++,r=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!r)throw new me(2,4,4016,t);var i,a=r[1],o=r[2];if(r=[],o){var s;(s=Mi(o=new Oi(o),/^([^,=]+)(?:,|$)/g))&&(i=s[1]);for(var l=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;s=Mi(o,l);)r.push(new Li(s[1],s[2]||s[3]))}return new Ri(n,a,r,i)}var Vi="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(" "),Gi="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 ye(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 n,r;return M(t,(function(t){switch(t.j){case 1:return e.f?(k(t,2),w(t,e.update(),4)):t.return();case 4:n=e.O,e.h.R(n),x(t,0);break;case 2:if(r=R(t),!e.f)return t.return();r.severity=1,e.f.onError(r),e.h.R(.1),S(t)}}))}))}(e)})),this.g=da,this.m=null,this.B=0,this.F=1/0,this.i=new Ie,this.K=[],this.l=new Map,this.W=!1}function zi(e,t){return p((function n(){var r,i,a,o,s,l,u,c,d,f;return M(n,(function(n){switch(n.j){case 1:return r=ji,i=fa,a=t.Ce,w(n,ua(e,Me([a],e.a.retryParameters),0),2);case 2:if(o=n.o,1!=(s=Fi(e.s,o.data,o.uri)).type)throw new me(2,4,4017);return u=(l=r.Ta(s.a,"EXT-X-MEDIA-SEQUENCE"))?Number(l.value):0,c=t.stream,w(n,ea(e,t.Bc,s,u,c.mimeType,c.codecs),3);case 3:d=n.o,t.Vb.a=d,f=d[d.length-1],r.Ta(s.a,"EXT-X-ENDLIST")&&(la(e,i.Qa),e.c.xa(f.endTime)),S(n)}}))}))}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,n,r,i){return{id:e.$++,language:t?t.language:"und",primary:!!t&&t.primary||!!n&&n.primary,audio:t,video:n,bandwidth:r,drmInfos:i,allowedByApplication:!0,allowedByKeySystem:!0}}function qi(e,t,n){return p((function r(){var i,a,o,s,l,u,c,d,f;return M(r,(function(r){switch(r.j){case 1:if(i=ra(t,"URI"),e.b.has(i))return r.return(e.b.get(i));if(a=ra(t,"TYPE").toLowerCase(),o=Yt,"subtitles"==a&&(a=o.ra),s=On(Ii(t,"LANGUAGE","und")),l=Ii(t,"NAME"),u=t.getAttribute("DEFAULT"),c=t.getAttribute("AUTOSELECT"),d=Ii(t,"CHANNELS"),"audio"==a)if(d){var h=d.split("/")[0];h=parseInt(h,10)}else h=null;else h=null;return w(r,Xi(e,i,n,a,s,!!u||!!c,l,h,null),2);case 2:return f=r.o,e.b.has(i)?r.return(e.b.get(i)):null==f?r.return(null):(e.D.set(t.id,f),e.b.set(i,f),r.return(f))}}))}))}function Xi(e,t,n,r,i,a,o,s,l){return p((function u(){var c,d,h,m,g,v,y,b,_,A,E,T,S,C,L,I,P,j,O,D,N,U,F,B,K,V;return M(u,(function(u){switch(u.j){case 1:return d=(c=ji).Hc(e.u,t),w(u,ua(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)})),v=!1,y=[],b=null;for(var G=f(g),H=G.next();!H.done;H=G.next())if(_=H.value,"NONE"!=(A=ra(_,"METHOD"))){if(v=!0,"AES-128"==A)return e.W=!0,u.return(null);E=ra(_,"KEYFORMAT"),(S=(T=ca[E])?T(_):null)&&(S.keyIds.length&&(b=S.keyIds[0]),y.push(S))}if(v&&!y.length)throw new me(2,4,4026);return function(e,t){var n=fa,r=ji.Ta(t.a,"EXT-X-PLAYLIST-TYPE"),i=ji.Ta(t.a,"EXT-X-ENDLIST");i=r&&"VOD"==r.value||i,r=r&&"EVENT"==r.value&&!i,r=!i&&!r,i?la(e,n.Qa):(la(e,r?n.Fd:n.xe),n=ia(t.a,"EXT-X-TARGETDURATION"),n=Number(n.value),e.B=Math.max(n,e.B),e.F=Math.min(n,e.F))}(e,m),C=function(e,t){if(1==t.length)return t[0];var n=na(e,t);if(null!=n)return n;throw new me(2,4,4025,t)}(r,n),w(u,function(e,t,n,r){return p((function i(){var a,o,s,l,u,c,d,f,h;return M(i,(function(i){switch(i.j){case 1:return a=Yt,o=r.segments[0].a,s=new Z(o),l=s.ja.split(".").pop(),u=sa[t],(c=u[l])?i.return(c):t==a.ra?n&&"vtt"!=n?i.return("application/mp4"):i.return("text/vtt"):((d=Me([o],e.a.retryParameters)).method="HEAD",w(i,ua(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,r,C,m),3);case 3:return L=u.o,oa.includes(L)&&(C=""),P=(I=c.Ta(m.a,"EXT-X-MEDIA-SEQUENCE"))?Number(I.value):0,k(u,4),w(u,ea(e,t,m,P,L,C),6);case 6:j=u.o,x(u,5);break;case 4:if(4035==(O=R(u)).code)return q("Skipping unsupported HLS stream",L,t),u.return(null);throw O;case 5:return D=j[0].startTime,N=j[j.length-1].endTime,U=N-D,F=new ei(j),B=Ji(m),K=void 0,"text"==r&&(K="subtitle"),V={id:e.$++,originalId:o,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:F.find.bind(F),getSegmentReference:F.get.bind(F),initSegmentReference:B,presentationTimeOffset:0,mimeType:L,codecs:C,kind:K,encrypted:v,keyId:b,language:i,label:o,type:r,primary:a,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:V,Vb:F,drmInfos:y,Bc:t,Ce:d,dd:D,Hg:N,duration:U})}}))}))}function Ji(e){var t=ji.nb(e.a,"EXT-X-MAP");if(!t.length)return null;if(1<t.length)throw new me(2,4,4020);var n=ra(t=t[0],"URI"),r=ji.Hc(e.b,n);return e=0,n=null,(t=Ii(t,"BYTERANGE"))&&(e=t.split("@"),t=Number(e[0]),n=(e=Number(e[1]))+t-1),new Jr((function(){return[r]}),e,n)}function Zi(e,t,n,r){var i=t.b,a=t.a;t=ia(i,"EXTINF").value.split(","),t=r+Number(t[0]);var o=0,s=null;return(i=ji.Ta(i,"EXT-X-BYTERANGE"))&&(o=i.value.split("@"),i=Number(o[0]),s=(o=o[1]?Number(o[1]):e.a+1)+i-1),new Zr(n,r,t,(function(){return[a]}),o,s)}function Qi(e){e.c&&(e.K.forEach((function(t){e.c.vb(t,0)})),e.K=[])}function ea(e,t,n,r,i,a){return p((function o(){var s,l,u,c,d,f,h,m,g,v;return M(o,(function(o){switch(o.j){case 1:return s=n.segments,l=[],u=s[0].a,c=Zi(null,s[0],r,0),d=Ji(n),w(o,function(e,t,n,r,i,a){return p((function o(){var s,l,u,c,d,f,h,p,m;return M(o,(function(o){switch(o.j){case 1:if(e.m&&(s=e.b.get(t),l=s.Vb,u=l.get(r.position)))return o.return(u.startTime);if(i=i.toLowerCase(),oa.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){o.A(2);break}return c=[ta(e,r)],n&&c.push(ta(e,n)),w(o,Promise.all(c),3);case 3:return d=o.o,f=d[0],h=d[1]||d[0],o.return(function(e,t,n,r){var i=0;if((new jr).H("moov",Or).H("trak",Or).H("mdia",Or).fa("mdhd",(function(e){e.reader.M(0==e.version?8:16),i=e.reader.G(),e.parser.stop()})).parse(r,!0),!i)throw new me(2,4,4030,e,t);var a=0,o=!1;if((new jr).H("moof",Or).H("traf",Or).fa("tfdt",(function(e){a=(0==e.version?e.reader.G():e.reader.Bb())/i,o=!0,e.parser.stop()})).parse(n,!0),!o)throw new me(2,4,4030,e,t);return a}(t,f.uri,f.data,h.data));case 2:if("video/mp2t"!=i){o.A(4);break}return w(o,ta(e,r),5);case 5:return p=o.o,o.return(function(e,t,n){function r(){throw new me(2,4,4030,e,t)}n=new Lr(new DataView(n),0);for(var i=0,a=0;;){if(i=n.ca(),71!=(a=n.la())&&r(),16384&n.Tb()||r(),0!=(a=(48&n.la())>>4)&&2!=a||r(),3==a&&(a=n.la(),n.M(a)),1==n.G()>>8)return n.M(3),0!=(i=n.la()>>6)&&1!=i||r(),0==n.la()&&r(),i=n.la(),a=n.Tb(),n=n.Tb(),(1073741824*((14&i)>>1)+((65534&a)<<14|(65534&n)>>1))/9e4;n.seek(i+188),71!=(a=n.la())&&(n.seek(i+192),a=n.la()),71!=a&&(n.seek(i+204),a=n.la()),71!=a&&r(),n.me(1)}}(t,p.uri,p.data));case 4:if("application/mp4"!=i&&!i.startsWith("text/")){o.A(6);break}return w(o,ta(e,r),7);case 7:return m=o.o,o.return(function(e,t,n){return mn(e=qe(e,t))?(gn(t=new hn(null),e),t.kc(n)):0}(i,a,m.data));case 6:throw new me(2,4,4030,t)}}))}))}(e,t,d,c,i,a),2);case 2:f=o.o,u.split("/").pop();for(var y=0;y<s.length;++y)h=s[y],m=l[l.length-1],g=0==y?f:m.endTime,v=Zi(m,h,r+y,g),l.push(v);return e.K.push(l),Qi(e),o.return(l)}}))}))}function ta(e,t){return p((function n(){var r,i,a,o,s,l;return M(n,(function(n){switch(n.j){case 1:return r=1,i=yi(t.c(),t.b,t.b+2048-1,e.a.retryParameters),a=yi(t.c(),t.b,t.a,e.a.retryParameters),k(n,2),w(n,ua(e,i,r),4);case 4:return o=n.o,n.return(o);case 2:if(7001==(s=R(n)).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]),w(n,ua(e,a,r),5);case 5:return l=n.o,n.return(l)}}))}))}function na(e,t){for(var n=aa[e],r=0;r<n.length;r++)for(var i=0;i<t.length;i++)if(n[r].test(t[i].trim()))return t[i].trim();return"text"==e?"":null}function ra(e,t){var n=e.getAttribute(t);if(!n)throw new me(2,4,4023,t);return n.value}function ia(e,t){var n=ji.Ta(e,t);if(!n)throw new me(2,4,4024,t);return n}V("shaka.net.DataUriPlugin",Hi),Hi.parse=function(t){var n=t.split(":");if(2>n.length||"data"!=n[0])throw new me(2,1,1004,t);if(2>(n=n.slice(1).join(":").split(",")).length)throw new me(2,1,1004,t);var r=n[0];n=e.decodeURIComponent(n.slice(1).join(","));var i=null;if(1<(r=r.split(";")).length&&(i=r[1]),"base64"==i)t=ht.Ba(n).buffer;else{if(i)throw new me(2,1,1005,t);t=ut(n)}return{data:t,contentType:r[0]}},De("data",Hi),V("shaka.hls.HlsParser",Yi),(r=Yi.prototype).configure=function(e){this.a=e},r.start=function(e,t){var n=this;return p((function r(){var i,a;return M(r,(function(r){switch(r.j){case 1:return n.f=t,w(r,ua(n,Me([e],n.a.retryParameters),0),2);case 2:return i=r.o,n.u=i.uri,w(r,function(e,t){return p((function n(){var r,i,a,o,s,l,u,c,d,h,m;return M(n,(function(n){switch(n.j){case 1:if(0!=(r=Fi(e.s,t,e.u)).type)throw new me(2,4,4022);return w(n,function(e,t){return p((function n(){var r,i,a,o,s,l,u,c,d,h,m,g;return M(n,(function(n){switch(n.j){case 1:return r=ji,i=Vt,a=t.a,o=r.nb(t.a,"EXT-X-MEDIA"),s=o.filter(function(e){return"SUBTITLES"==ra(e,"TYPE")}.bind(e)),l=s.map(function(e){var t=this;return p((function n(){var r;return M(n,(function(n){switch(n.j){case 1:return t.a.disableText?n.return(null):(k(n,2),w(n,function(e,t){return p((function n(){var r;return M(n,(function(n){switch(n.j){case 1:return ra(t,"TYPE"),w(n,qi(e,t,[]),2);case 2:return r=n.o,n.return(r.stream)}}))}))}(t,e),4));case 4:return n.return(n.o);case 2:if(r=R(n),t.a.hls.ignoreTextStreamFailures)return n.return(null);throw r}}))}))}.bind(e)),u=o.filter((function(e){return"CLOSED-CAPTIONS"==ra(e,"TYPE")})),function(e,t){for(var n=f(t),r=n.next();!r.done;r=n.next()){ra(r=r.value,"TYPE");var i=Ii(r,"LANGUAGE")||"und";i=On(i);var a=ra(r,"GROUP-ID");r=ra(r,"INSTREAM-ID"),e.l.get(a)||e.l.set(a,new Map),e.l.get(a).set(r,i)}}(e,u),w(n,Promise.all(l),2);case 2:return c=n.o,d=r.nb(a,"EXT-X-STREAM-INF"),h=d.map(function(e){return function(e,t,n){return p((function r(){var i,a,o,s,l,u,c,d,h,m,g,v,y,b,_,A,E,T,S,k,C,x,R,L,I,P,j;return M(r,(function(r){switch(r.j){case 1:return i=Yt,a=ji,o=Ii(t,"CODECS","avc1.42E01E,mp4a.40.2"),s=function(e){for(var t=new Set,n=[],r=(e=f(e)).next();!r.done;r=e.next()){var i=Xe(r=r.value)[0];t.has(i)||(n.push(r),t.add(i))}return n}(o.split(/\s*,\s*/)),l=t.getAttribute("RESOLUTION"),c=u=null,d=Ii(t,"FRAME-RATE"),h=Number(ra(t,"BANDWIDTH")),l&&(m=l.value.split("x"),u=m[0],c=m[1]),g=(g=(g=a.nb(n.a,"EXT-X-MEDIA")).filter((function(e){return"CLOSED-CAPTIONS"!=ra(e,"TYPE")}))).filter((function(e){var t=Ii(e,"URI")||"";return"SUBTITLES"==(Ii(e,"TYPE")||"")||""!=t})),v=Ii(t,"AUDIO"),y=Ii(t,"VIDEO"),v?g=a.Pc(g,"AUDIO",v):y&&(g=a.Pc(g,"VIDEO",y)),(b=na(i.ra,s))&&((_=Ii(t,"SUBTITLES"))&&(A=a.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)),S=[],k=[],w(r,Promise.all(T),2);case 2:if(x=(x=r.o).filter((function(e){return null!=e})),v?S=x:y&&(k=x),L=!1,S.length||k.length?S.length?(P=ra(t,"URI"),j=S[0].Bc,P==j?(R=i.Eb,L=!0):R=i.Pa):R=i.Eb:1==s.length?(I=na(i.Pa,s),R=l||d||I?i.Pa:i.Eb):(R=i.Pa,s=[s.join(",")]),L){r.A(3);break}return w(r,function(e,t,n,r){return p((function i(){var a,o,s,l,u;return M(i,(function(i){switch(i.j){case 1:return a=Yt,o=ra(t,"URI"),e.b.has(o)?i.return(e.b.get(o)):(s=Ii(t,"CLOSED-CAPTIONS"),l=null,r==a.Pa&&s&&"NONE"!=s&&(l=e.l.get(s)),w(i,Xi(e,o,n,r,"und",!1,null,null,l),2));case 2:return null==(u=i.o)?i.return(null):e.b.has(o)?i.return(e.b.get(o)):(e.b.set(o,u),i.return(u))}}))}))}(e,t,s,R),4);case 4:C=r.o;case 3:if(C)C.stream.type==i.Eb?S=[C]:k=[C];else if(null===C)return r.return([]);return k&&Wi(k),S&&Wi(S),r.return(function(e,t,n,r,i,a,o){n.forEach(function(e){(e=e.stream)&&(e.width=Number(i)||void 0,e.height=Number(a)||void 0,e.frameRate=Number(o)||void 0)}.bind(e));var s=!!e.a&&e.a.disableAudio;t.length&&!s||(t=[null]),s=!!e.a&&e.a.disableVideo,(!n.length||s)&&(n=[null]),s=[];for(var l=(t=f(t)).next();!l.done;l=t.next()){l=l.value;for(var u=f(n),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<Lt(p,m).length))continue;g=Lt(p,m)}else c?g=p:h&&(g=m);e.S.has(d)||(c=$i(e,c,h,r,g),s.push(c),e.S.add(d))}}return s}(e,S,k,h,u,c,d))}}))}))}(this,e,t)}.bind(e)),w(n,Promise.all(h),3);case 3:return m=n.o,g=(g=m.reduce(i.Gc,[])).filter((function(e){return null!=e})),n.return({startTime:0,variants:g,textStreams:c.filter((function(e){return null!=e}))})}}))}))}(e,r),2);case 2:if(i=n.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]),a=1/0,o=0,s=1/0;for(var g=f(e.b.values()),v=g.next();!v.done;v=g.next())l=v.value,a=Math.min(a,l.dd),o=Math.max(o,l.dd),"text"!=l.stream.type&&(s=Math.min(s,l.duration));if(e.g!=fa.Qa?(e.c=new vi(0,3*e.B),e.c.Xb(!1)):(e.c=new vi(null,0),e.c.Xb(!0)),Qi(e),e.g!=fa.Qa){for(e.O=e.F,u=fa,e.g==u.Fd&&(c=e.c.vc,isNaN(e.a.availabilityWindowOverride)||(c=e.a.availabilityWindowOverride),e.c.xd(c)),d=0;95443.7176888889<=o;)d+=95443.7176888889,o-=95443.7176888889;if(d)for(v=(g=f(e.b.values())).next();!v.done;v=g.next())95443.7176888889>(h=v.value).dd&&(h.stream.presentationTimeOffset=-d,h.Vb.offset(d))}else for(e.c.xa(s),e.c.offset(-a),v=(g=f(e.b.values())).next();!v.done;v=g.next())(m=v.value).stream.presentationTimeOffset=a,m.Vb.offset(-a),ti(m.Vb,s);e.m={presentationTimeline:e.c,periods:[i],offlineSessionIds:[],minBufferTime:0},S(n)}}))}))}(n,i.data),3);case 3:return 0<(a=n.O)&&n.h.R(a),r.return(n.m)}}))}))},r.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)},r.update=function(){if(this.g!=fa.Qa){for(var e=[],t=f(this.b.values()),n=t.next();!n.done;n=t.next())e.push(zi(this,n.value));return Promise.all(e)}},r.onExpirationUpdated=function(){};var aa={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},oa=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],sa={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 la(e,t){e.g=t,e.c&&e.c.Xb(e.g==fa.Qa),e.g!=fa.Qa||e.h.stop()}function ua(e,t,n){if(!e.i)throw new me(2,7,7001);return t=e.f.networkingEngine.request(n,t),Pe(e.i,t),t.promise}var ca={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=ra(e,"METHOD");return Vn("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=ra(e,"URI"),t=Hi.parse(t),t=Ht("com.widevine.alpha",[{initDataType:"cenc",initData:t=new Uint8Array(t.data)}]),(e=Ii(e,"KEYID"))&&(t.keyIds=[e.substr(2).toLowerCase()]),t):null}},da="VOD",fa={Qa:da,xe:"EVENT",Fd:"LIVE"};function ha(){this.a=new Map}function pa(e,t,n){ma(e,t).text=n}function ma(e,t){return e.a.has(t)||e.a.set(t,new ga),e.a.get(t)}function ga(){this.text=this.variant=null}function va(e,t){this.a=e,this.b=new Set([e]);for(var n=f(t=t||[]),r=n.next();!r.done;r=n.next())this.add(r.value)}function ya(e,t){var n;if(!(n=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(n=e.audio&&t.audio)){n=e.audio;var r=t.audio;n=!(n.channelsCount==r.channelsCount&&ba(n,r)&&_a(n.roles,r.roles))}return!n&&(n=e.video&&t.video)&&(n=!(ba(n=e.video,r=t.video)&&_a(n.roles,r.roles))),!n}function ba(e,t){if(e.mimeType!=t.mimeType)return!1;var n=e.codecs.split(",").map((function(e){return Xe(e)[0]})),r=t.codecs.split(",").map((function(e){return Xe(e)[0]}));if(n.length!=r.length)return!1;n.sort(),r.sort();for(var i=0;i<n.length;i++)if(n[i]!=r[i])return!1;return!0}function _a(e,t){var n=new Set(e),r=new Set(t);if(n.delete("main"),r.delete("main"),n.size!=r.size)return!1;for(var i=(n=f(n)).next();!i.done;i=n.next())if(!r.has(i.value))return!1;return!0}function Aa(e){this.a=e,this.b=new Ea(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,"")}function Ea(e,t,n,r,i){this.f=e,this.c=t,this.a=n,this.b=void 0===r?"":r,this.g=void 0===i?"":i}function Ta(){this.a=ka,this.b=(new Map).set(ka,2).set(Sa,1)}function wa(e,t,n){e.b.set(ka,n).set(Sa,t)}gi.pd("m3u8",Yi),gi.Cb("application/x-mpegurl",Yi),gi.Cb("application/vnd.apple.mpegurl",Yi),va.prototype.add=function(e){return!!ya(this.a,e)&&(this.b.add(e),!0)},va.prototype.values=function(){return this.b.values()},Aa.prototype.create=function(e){var t=this,n=e.filter((function(e){return ya(t.a,e)}));return n.length?new va(n[0],n):this.b.create(e)},Ea.prototype.create=function(e){var t=[];t=function(e,t){var n=Mn(On(t),e.map((function(e){return Dn(e)})));return n?e.filter((function(e){return n==Dn(e)})):[]}(e,this.f);var n=e.filter((function(e){return e.primary}));for(t=t.length?t:n.length?n:e,this.c&&(e=function(e,t,n){return e.filter((function(e){if(n){var r=e[n];return r&&r.roles.includes(t)}return r=e.audio,e=e.video,r&&0<=r.roles.indexOf(t)||e&&0<=e.roles.indexOf(t)}))}(t,this.c,this.g)).length&&(t=e),this.a&&(e=Un.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 va(t[0]),n=(t=f(t)).next();!n.done;n=t.next())n=n.value,ya(e.a,n)&&e.add(n);return e};var Sa=0,ka=1;function Ca(e,t){this.g=e,this.h=Ra(e),this.a=e.a.currentTime,this.f=Date.now()/1e3,this.b=!1,this.i=t,this.c=function(){}}function xa(e){this.a=e}function Ra(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 n=0;n<t.length;n++){var r=t.start(n),i=t.end(n);if(!(e<r||e>i-.5)){t=!0;break e}}t=!1}return t}function La(e,t,n,r,i){var a=this;this.a=e,this.u=t,this.s=n,this.l=i,this.f=new Be,this.i=!1,this.m=e.readyState,this.c=!1,this.b=r,this.h=!1,this.f.w(e,"waiting",(function(){return Ia(a)})),this.g=new fe((function(){Ia(a)})).Na(.25)}function Ia(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,n=e.a.currentTime,r=e.a.buffered;e:{if(r&&r.length&&!(1==r.length&&1e-6>r.end(0)-r.start(0)))for(var i=nt("Edge/")||nt("Trident/")||nt("Tizen")||nt("CrKey")?.5:.1,a=0;a<r.length;a++)if(r.start(a)>n&&(0==a||r.end(a-1)-n<=i)){i=a;break e}i=null}if(null==i)e.b&&(n=Ra(r=(e=e.b).g),i=r.a.currentTime,a=Date.now()/1e3,e.a==i&&e.h==n||(e.f=a,e.a=i,e.h=n,e.b=!1),(i=a-e.f)>=e.i&&n&&!e.b&&(e.c(e.a,i),e.b=!0,e.a=r.a.currentTime));else if(0!=i||e.h){a=r.start(i);var o=e.u.Ca();if(!(a>=o)){t=(o=a-n)<=t;var s=!1;.001>o||(t||e.c||(e.c=!0,(n=new we("largegap",{currentTime:n,gapSize:o})).cancelable=!0,e.l(n),e.s.jumpLargeGaps&&!n.defaultPrevented&&(s=!0)),!t&&!s)||(0!=i&&r.end(i-1),e.a.currentTime=a)}}}}}function Pa(e){var t=this;this.c=e,this.a=new Set,this.b=new fe((function(){ja(t,!1)})).Na(.25)}function ja(e,t){for(var n=f(e.a),r=n.next();!r.done;r=n.next())r.value.g(e.c.currentTime,t)}function Oa(e){for(var t=[],n=(e=f(e)).next();!n.done;n=e.next())for(var r=(n=f(n.value.variants)).next();!r.done;r=n.next())t.push(r.value);return t}function Da(e,t){for(var n=null,r=f(e),i=r.next();!i.done;i=r.next())t>=(i=i.value).startTime&&(n=i);return n}function Ma(e){this.c=e,this.a=null,this.b=function(){}}function Na(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 Ua(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 Fa(e,t,n){this.a=e,this.f=t,this.g=n,this.h=!1,this.b=new Be,this.c=new Ha(e),0<e.readyState?Va(this,n):Ka(this,n)}function Ba(e){return e.h?e.a.currentTime:e.g}function Ka(e,t){e.g=t,e.b.ea(e.a,"loadedmetadata"),e.b.da(e.a,"loadedmetadata",(function(){Va(e,t)}))}function Va(e,t){.001>Math.abs(e.a.currentTime-t)?Ga(e):(e.b.da(e.a,"seeking",(function(){Ga(e)})),Ya(e.c,0==e.a.currentTime?t:e.a.currentTime))}function Ga(e){e.h=!0,e.b.w(e.a,"seeking",(function(){return e.f()}))}function Ha(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 Ya(e,t){e.f=e.b.currentTime,e.g=t,e.c=e.h,e.b.currentTime=t,e.a.Na(.1)}function za(e){function t(){null==n.c?n.f=!0:(n.b.da(n.a,"seeking",(function(){n.f=!0})),n.a.currentTime=Math.max(0,n.a.currentTime+n.c))}var n=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 Wa(e,t,n,r,i,a){var o=this;this.b=e,this.a=t.presentationTimeline,this.B=t.minBufferTime||0,this.g=n,this.u=i,this.l=null,this.f=new La(e,t.presentationTimeline,n,function(e,t){if(!t.stallEnabled)return null;var n=t.stallSkip,r=new Ca(new xa(e),t.stallThreshold);return function(e,t){e.c=t}(r,(function(){e.currentTime+=n})),r}(e,n),a),this.c=new Fa(e,(function(){var e=o.f;e.i=!0,e.h=!1,e.c=!1;var t=Ba(o.c);return e=qa(o,t),.001<Math.abs(e-t)&&(t=(new Date).getTime()/1e3,!o.l||o.l<t-1)?(o.l=t,0<(t=o.c).a.readyState?Ya(t.c,e):Ka(t,e),e=void 0):(o.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),$a(e,Xa(e,t))}(this,r)),this.i=new fe((function(){if(0!=o.b.readyState&&!o.b.paused){var e=o.b.currentTime,t=o.a.ob(),n=o.a.Ca();3>n-t&&(t=n-3),e<t&&(e=qa(o,e),o.b.currentTime=e)}})).Na(.25)}function $a(e,t){var n=e.a.Y();return t>=n?n-e.g.durationBackoff:t}function qa(e,t){var n=Ft.bind(null,e.b.buffered),r=Math.max(e.B,e.g.rebufferingGoal),i=e.g.safeSeekOffset,a=e.a.ob(),o=e.a.Ca(),s=e.a.Y();3>o-a&&(a=o-3);var l=e.a.Nb(r),u=e.a.Nb(i);return r=e.a.Nb(r+i),t>=s?$a(e,t):t>o?o:t<a?n(u)?u:r:t>=l||n(t)?t:r}function Xa(e,t){var n=e.a.ob();return t<n||t>(n=e.a.Ca())?n:t}function Ja(){this.b=function(){},this.a=new Set}function Za(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:eo,Wa:function(e,n){return t.a(e,n)}},{eb:Qa,cb:eo,Wa:function(e,n){return t.a(e,n)}},{eb:to,cb:eo,Wa:function(e,n){return t.a(e,n)}},{eb:eo,cb:Qa,Wa:function(e,n){return t.b(e,n)}},{eb:eo,cb:to,Wa:function(e,n){return t.b(e,n)}},{eb:Qa,cb:to,Wa:function(e,n){return t.c(e,n)}},{eb:to,cb:Qa,Wa:function(e,n){return t.c(e,n)}}]}Ca.prototype.release=function(){this.g=null,this.c=function(){}},La.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},La.prototype.jd=function(){this.h=!0,Ia(this)},Pa.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()},Ma.prototype.release=function(){this.a=this.c=null,this.b=function(){}},Ma.prototype.g=function(e){var t=this.a,n=this.c.periods;t!=(e=Da(n,e)||n[0])&&this.b(e),this.a=e},Na.prototype.release=function(){this.b&&(this.b.stop(),this.b=null),this.a=null},Na.prototype.set=function(e){this.c=e,Ua(this)},Fa.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},Ha.prototype.release=function(){this.a&&(this.a.stop(),this.a=null),this.b=null},za.prototype.release=function(){this.b&&(this.b.release(),this.b=null),this.a=null},za.prototype.m=function(e){this.c=this.f?this.c:e},za.prototype.h=function(){return(this.f?this.a.currentTime:this.c)||0},za.prototype.s=function(){},Wa.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(){}},Wa.prototype.m=function(e){var t=this.c;0<t.a.readyState?Ya(t.c,e):Ka(t,e)},Wa.prototype.h=function(){var e=Ba(this.c);return 0<this.b.readyState&&!this.b.paused?Xa(this,e):e},Wa.prototype.s=function(){this.f.jd()},Ja.prototype.release=function(){this.b=function(){},this.a.clear()},Za.prototype.release=function(){this.h=null,this.f.clear(),this.a=function(){},this.b=function(){},this.c=function(){}},Za.prototype.g=function(e,t){for(var n=f(this.h.a),r=n.next();!r.done;r=n.next()){r=r.value;var i=this.f.get(r),a=e<r.startTime?Qa:e>r.endTime?to:eo;this.f.set(r,a);for(var o=f(this.i),s=o.next();!s.done;s=o.next())(s=s.value).eb==i&&s.cb==a&&s.Wa(r,t)}};var Qa=1,eo=2,to=3;function no(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 ro(e){return ao(e,"audio")}function io(e){return ao(e,"video")}function ao(e,t){var n=e.b.get(t);return n?n.Ka||n.stream:null}function oo(e,t){return p((function n(){var r,i,a,o,s,l,u,c,d;return M(n,(function(n){switch(n.j){case 1:return r=Yt,w(n,xn(e.a.L,r.ra),2);case 2:return e.B++,e.D=!1,i=e.B,a=e.a.L,o=new Map,s=new Set,o.set(r.ra,t),s.add(t),w(n,a.init(o,!1),3);case 3:return e.f?n.return():w(n,mo(e,s),4);case 4:if(e.f)return n.return();l=e.a.L.g.isTextVisible()||e.g.alwaysStreamText,e.B!=i||e.b.has(r.ra)||e.D||!l||(u=e.a.Ua(),c=Eo(e,u),d=ho(t,c,0),e.b.set(r.ra,d),ko(e,d,0)),S(n)}}))}))}function so(e,t){var n=e.b.get("video");if(n){var r=n.stream;if(r)if(t){var i=r.trickModeVideo;i&&!n.Ka&&(uo(e,i,!1,0,!1),n.Ka=r)}else(r=n.Ka)&&(n.Ka=null,uo(e,r,!0,0,!1))}}function lo(e,t,n,r){var i=!1;if(t.video){var a=uo(e,t.video,n,r,!1);i=i||a}return t.audio&&(e=uo(e,t.audio,n,r,!1),i=i||e),i}function uo(e,t,n,r,i){var a=e.b.get(t.type);if(!a&&"text"==t.type&&e.g.ignoreTextStreamFailures)return oo(e,t),!0;if(!a)return!1;var o=To(e,t),s=Array.from(e.b.values()).every((function(e){return e.ia==a.ia}));return n&&o!=a.ia&&s?(e.b.forEach((function(t){co(e,t)})),!0):(a.Ka&&(t.trickModeVideo?(a.Ka=t,t=t.trickModeVideo):a.Ka=null),!(!(s=e.h[o])||!s.Db||!(s=e.i.get(t.id))||!s.Db||a.stream==t&&!i||("text"==t.type&&An(e.a.L,qe(t.mimeType,t.codecs)),a.stream=t,a.nc=!0,function(e,t,n){if(!t.Rb)return!1;var r=e.a.Ua(),i=wn(e.a.L,t.type),a=yo(e,t,r,i,n);return n=a&&a.a?a.a-a.b:null,a&&!n&&(n=(a.endTime-a.kc())*t.stream.bandwidth/8),!isNaN(n)&&((a=t.stream.initSegmentReference)&&(n+=(a.a?a.a-a.b:null)||0),a=e.a.getBandwidthEstimate(),8*n/a<i-r-Math.max(e.c.minBufferTime||0,e.g.rebufferingGoal)||t.Rb.b.a>n)}(e,a,o)&&a.Rb.abort(),n&&(a.Ra?a.Cc=!0:a.Ja?(a.Oa=!0,a.dc=r,a.Cc=!0):(Co(a),So(e,a,!0,r).catch((function(t){e.a&&e.a.onError(t)})))),0)))}function co(e,t){t.Ra||t.Oa||(t.Ja?(t.Oa=!0,t.dc=0):null==Tn(e.a.L,t.type)?null==t.Ga&&ko(e,t,0):(Co(t),So(e,t,!1,0).catch((function(t){e.a&&e.a.onError(t)}))))}function fo(e,t,n,r,i){return p((function a(){var o,s,l,u,c,d,f;return M(a,(function(a){switch(a.j){case 1:return o=e.a.Ua(),s=Eo(e,o),l=Yt,u=new Map,c=new Set,t&&(u.set(l.Eb,t),c.add(t)),n&&(u.set(l.Pa,n),c.add(n)),r&&(u.set(l.ra,r),c.add(r)),d=e.a.L,f=e.g.forceTransmuxTS,w(a,d.init(u,f),2);case 2:return e.f?a.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),w(a,mo(e,c),3));case 3:if(e.f)return a.return();u.forEach((function(t,n){if(!e.b.has(n)){var r=ho(t,s,i);e.b.set(n,r),ko(e,r,0)}})),S(a)}}))}))}function ho(e,t,n){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:n||0,Rb:null}}function po(e,t){var n=e.h[t];if(n)return n.promise;n={promise:new ge,Db:!1},e.h[t]=n;for(var r=new Set,i=f(e.c.periods[t].variants),a=i.next();!a.done;a=i.next())(a=a.value).video&&r.add(a.video),a.video&&a.video.trickModeVideo&&r.add(a.video.trickModeVideo),a.audio&&r.add(a.audio);for(a=(i=f(e.c.periods[t].textStreams)).next();!a.done;a=i.next())r.add(a.value);return e.u=e.u.then(function(){if(!this.f)return mo(this,r)}.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)),n.promise}function mo(e,t){return p((function n(){var r,i,a,o,s,l,u;return M(n,(function(n){switch(n.j){case 1:r=[];for(var c=f(t),d=c.next();!d.done;d=c.next())i=d.value,(a=e.i.get(i.id))?r.push(a.promise):(e.i.set(i.id,{promise:new ge,Db:!1}),r.push(i.createSegmentIndex()));return k(n,2),w(n,Promise.all(r),4);case 4:if(e.f)return n.return();x(n,3);break;case 2:if(o=R(n),e.f)return n.return();for(d=(n=f(t)).next();!d.done;d=n.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 o;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);S(n)}}))}))}function go(e,t){if(!e.f&&!t.Ja&&null!=t.Ga&&!t.Ra)if(t.Ga=null,t.Oa)So(e,t,t.Cc,t.dc);else{try{var n=function(e,t){if(_o(t))return Cn(e.a.L,t.stream.originalId||""),null;var n=e.a.Ua(),r=vo(e,t,n),i=To(e,t.stream),a=Eo(e,r),o=function(e,t,n){return"text"==t?null==(e=e.a).b||e.b<n?0:e.b-Math.max(n,e.a):Bt(e=Sn(e,t),n)}(e.a.L,t.type,n),s=Math.max(e.c.minBufferTime||0,e.g.rebufferingGoal,e.g.bufferingGoal)*e.l;if(r>=e.c.presentationTimeline.Y())return t.endOfStream=!0,"video"==t.type&&(r=e.b.get("text"))&&"application/cea-608"==r.stream.mimeType&&(r.endOfStream=!0),null;if(t.endOfStream=!1,t.ia=a,a!=i)return null;if(o>=s)return.5;if(a=wn(e.a.L,t.type),!(a=yo(e,t,n,a,i)))return 1;var l=1/0;return Array.from(e.b.values()).forEach((function(t){_o(t)||(t=vo(e,t,n),l=Math.min(l,t))})),r>=l+e.c.presentationTimeline.a?1:(t.rd=0,function(e,t,n,r,i){var a=e.c.periods[r],o=t.stream,s=e.c.presentationTimeline.Y(),l=e.c.periods[r+1];r=function(e,t,n,r,i){return t.nc?(n=function(e,t,n,r,i){return"text"==t?(e.a.m=n,(e=e.a).f=r,e.h=i,Promise.resolve()):Promise.all([Rn(e,t,e.Be.bind(e,t)),Rn(e,t,e.kg.bind(e,t,n)),Rn(e,t,e.hg.bind(e,t,r,i))])}(e.a.L,t.type,e.c.periods[n].startTime-t.stream.presentationTimeOffset,r,i),t.stream.initSegmentReference?(e=wo(e,t,t.stream.initSegmentReference).then(function(e){if(!this.f)return kn(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([n,e])):n):Promise.resolve()}(e,t,r,Math.max(0,a.startTime-.1),l?l.startTime+.01:s),t.Ja=!0,t.nc=!1,s=wo(e,t,i),Promise.all([r,s]).then(function(e){if(!this.f&&!this.m)return function(e,t,n,r,i,a,o){var s=i.closedCaptions&&0<i.closedCaptions.size;return null!=i.emsgSchemeIdUris&&0<i.emsgSchemeIdUris.length&&(new jr).fa("emsg",e.K.bind(e,r,a,i.emsgSchemeIdUris)).parse(o),function(e,t,n){var r=Math.max(e.g.bufferBehind,e.c.presentationTimeline.a),i=Tn(e.a.L,t.type);return null==i||0>=(n=n-i-r)?Promise.resolve():e.a.L.remove(t.type,i,i+n).then(function(){}.bind(e))}(e,t,n).then(function(){if(!this.f)return kn(this.a.L,t.type,o,a.startTime+r.startTime,a.endTime+r.startTime,s)}.bind(e)).then(function(){if(!this.f)return t.sb=i,t.Da=a,Promise.resolve()}.bind(e))}(this,t,n,a,o,i,e[1])}.bind(e)).then(function(){this.f||this.m||(t.Ja=!1,t.od=!1,t.Oa||this.a.jd(),ko(this,t,0),function(e,t){if(!e.s){var n=Array.from(e.b.values());if(1==n.length&&"text"==n[0].type||(e.s=n.every((function(e){return"text"==e.type||!e.Oa&&!e.Ra&&e.Da}))),e.s){for(n=To(e,t),e.h[n]||po(e,n).then(function(){this.f||this.a.$d()}.bind(e)).catch(Vt.oc),n=0;n<e.c.periods.length;++n)po(e,n).catch(Vt.oc);e.a.Lf&&e.a.Lf()}}}(this,o))}.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,ko(this,t,0)):3017==e.code?function(e,t,n){if(!Array.from(e.b.values()).some((function(e){return e!=t&&e.od}))){var r=Math.round(100*e.l);if(20<r)e.l-=.2;else{if(!(4<r))return t.Pb=!0,e.m=!0,void e.a.onError(n);e.l-=.04}t.od=!0}ko(e,t,4)}(this,t,e):(t.Pb=!0,e.severity=2,xo(this,e)))}.bind(e))}(e,t,n,i,a),null)}(e,t);null!=n&&(ko(e,t,n),t.Pb=!1)}catch(t){return void xo(e,t)}n=Array.from(e.b.values()),function(e,t){var n=To(e,t.stream);if(t.ia!=n){var r=t.ia,i=Array.from(e.b.values());i.every((function(e){return e.ia==r||_o(e)}))&&i.every(Ao)&&po(e,r).then(function(){if(!this.f&&i.every(function(e){var t=Ao(e),n=To(this,e.stream);return!!_o(e)||t&&e.ia==r&&n!=r}.bind(this))){var e=this.c.periods[r],t=this.a.ae(e),n=new Map;t.variant&&t.variant.video&&n.set("video",t.variant.video),t.variant&&t.variant.audio&&n.set("audio",t.variant.audio),t.text&&n.set("text",t.text);for(var a=(t=f(this.b.keys())).next();!a.done;a=t.next())if(a=a.value,!n.has(a)&&"text"!=a)return void this.a.onError(new me(2,5,5005));for(a=(t=f(Array.from(n.keys()))).next();!a.done;a=t.next())if(a=a.value,!this.b.has(a)){if("text"!=a)return void this.a.onError(new me(2,5,5005));fo(this,null,null,n.get("text"),e.startTime),n.delete(a)}for(a=(t=f(Array.from(this.b.keys()))).next();!a.done;a=t.next()){a=a.value;var o=this.b.get(a),s=n.get(a);if(s){var l=_o(o);l&&(o.ia=r,o.rd=e.startTime),uo(this,s,!1,0,!1),l&&_o(o)||ko(this,this.b.get(a),0)}else this.b.delete(a)}this.a.$d()}}.bind(e)).catch(Vt.oc)}}(e,t),e.s&&n.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 vo(e,t,n){return t.sb&&t.Da?(n=To(e,t.sb),e.c.periods[n].startTime+t.Da.endTime):Math.max(n,t.rd)}function yo(e,t,n,r,i){if(t.Da&&t.stream==t.sb)return bo(e,t,i,t.Da.position+1);if(t.Da?(n=To(e,t.sb),n=t.stream.findSegmentPosition(Math.max(0,e.c.periods[n].startTime+t.Da.endTime-e.c.periods[i].startTime))):n=t.stream.findSegmentPosition(Math.max(0,(r||n)-e.c.periods[i].startTime)),null==n)return null;var a=null;return null==r&&(a=bo(e,t,i,Math.max(0,n-1))),a||bo(e,t,i,n)}function bo(e,t,n,r){return n=e.c.periods[n],(t=t.stream.getSegmentReference(r))?(e=(r=e.c.presentationTimeline).Ob(),r=r.pb(),n.startTime+t.endTime<e||n.startTime+t.startTime>r?null:t):null}function _o(e){return e&&"text"==e.type&&"application/cea-608"==e.stream.mimeType}function Ao(e){return!e.Ja&&null==e.Ga&&!e.Oa&&!e.Ra}function Eo(e,t){var n=Da(e.c.periods,t+1/15);return n?e.c.periods.indexOf(n):0}function To(e,t){for(var n=e.c.periods,r=0;r<n.length;r++){for(var i=n[r],a=new Set,o=f(i.variants),s=o.next();!s.done;s=o.next())(s=s.value).audio&&a.add(s.audio),s.video&&a.add(s.video),s.video&&s.video.trickModeVideo&&a.add(s.video.trickModeVideo);for(o=(i=f(i.textStreams)).next();!o.done;o=i.next())a.add(o.value);if(a.has(t))return r}return-1}function wo(e,t,n){return n=yi(n.c(),n.b,n.a,e.g.retryParameters),e=e.a.ub.request(1,n),t.Rb=e,e.promise.then((function(e){return t.Rb=null,e.data}))}function So(e,t,n,r){return p((function i(){var a,o,s;return M(i,(function(i){switch(i.j){case 1:return t.Oa=!1,t.Cc=!1,t.dc=0,t.Ra=!0,r?(o=e.a.Ua(),s=e.a.L.Y(),a=e.a.L.remove(t.type,o+r,s)):a=xn(e.a.L,t.type).then(function(){if(!this.f&&n)return this.a.L.flush(t.type)}.bind(e)),w(i,a,2);case 2:if(e.f)return i.return();t.sb=null,t.Da=null,t.Ra=!1,t.endOfStream=!1,ko(e,t,0),S(i)}}))}))}function ko(e,t,n){t.Ga=new de((function(){return p((function n(){var r;return M(n,(function(n){switch(n.j){case 1:return k(n,2),w(n,go(e,t),4);case 4:x(n,0);break;case 2:r=R(n),e.a&&e.a.onError(r),S(n)}}))}))})).R(n)}function Co(e){null!=e.Ga&&(e.Ga.stop(),e.Ga=null)}function xo(e,t){pe(e.F).then(function(){this.f||(this.a.onError(t),t.handled||this.g.failureCallback(t))}.bind(e))}function Ro(e,t,n,r,i,a){if(200<=n&&299>=n&&202!=n)return{uri:i||r,ld:r,data:t,headers:e,fromCache:!!e["x-shaka-from-cache"]};i=null;try{i=lt(t)}catch(e){}throw new me(401==n||403==n?2:1,1,1001,r,n,i,e,a)}function Lo(e,t,n,r){var i=new Lo.b;We(t.headers).forEach((function(e,t){i.append(t,e)}));var a=new Lo.a,o={Id:!1,te:!1};if(e=new ve(e=Lo.l(e,n,{body:t.body||void 0,headers:i,method:t.method,signal:a.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},o,r),(function(){return o.Id=!0,a.abort(),Promise.resolve()})),t=t.retryParameters.timeout){var s=new fe((function(){o.te=!0,a.abort()}));s.R(t/1e3),e.finally((function(){s.stop()}))}return e}function Io(e,t,n,r){var i=new Io.f,a=Date.now(),o=0;return new ve(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,n))},i.onload=function(t){for(var r=(t=t.target).getAllResponseHeaders().trim().split("\r\n"),i={},a=(r=f(r)).next();!a.done;a=r.next())i[(a=a.value.split(": "))[0].toLowerCase()]=a.slice(1).join(": ");try{var o=Ro(i,t.response,t.status,e,t.responseURL,n);s(o)}catch(e){l(e)}},i.onerror=function(t){l(new me(1,1,1002,e,t,n))},i.ontimeout=function(){l(new me(1,1,1003,e,n))},i.onprogress=function(e){var t=Date.now();(100<t-a||e.lengthComputable&&e.loaded==e.total)&&(r(t-a,e.loaded-o,e.total-e.loaded),o=e.loaded,a=t)},t.headers)i.setRequestHeader(u.toLowerCase(),t.headers[u]);i.send(t.body)})),(function(){return i.abort(),Promise.resolve()}))}function Po(){this.a=this.f=this.b=0,this.c=new Map,this.g=0}function jo(e,t,n){this.h=e,this.b=new Map,this.c=!1,this.g=t,this.f=n,this.a=new Po}function Oo(e,t,n,r,i,a){var o=function(e,t){e.b+=t;var n=e.g;return e.g++,e.c.set(n,t),n}(e.a,r);r=e.b.get(t)||Promise.resolve(),e.b.set(t,r.then((function(){return p((function t(){var r,s,l,u,c,d;return M(t,(function(t){switch(t.j){case 1:return w(t,function(e,t){return p((function n(){var r;return M(n,(function(n){switch(n.j){case 1:return w(n,e.h.request(1,t).promise,2);case 2:return r=n.o,n.return(r.data)}}))}))}(e,n),2);case 2:if(r=t.o,e.c)throw new me(2,9,7001);if(i)for(var f in s=new Uint8Array(r),(l=new Fr(s)).data)u=Number(f),c=l.data[u],d=l.a[u],e.f(c,d);return e.a.close(o,r.byteLength),f=e.a,e.g(0==f.b?0:f.f/f.b,e.a.a),t.return(a(r))}}))}))})))}function Do(e,t){var n=this;this.c=e,this.b=e.objectStore(t),this.a=new ge,e.onabort=function(e){e.preventDefault(),n.a.reject()},e.onerror=function(e){e.preventDefault(),n.a.reject()},e.oncomplete=function(){n.a.resolve()}}function Mo(e,t){return new Promise((function(n,r){var i=e.b.openCursor();i.onerror=r,i.onsuccess=function(e){if(!(e=e.target.result))return n();t(e.key,e.value,e),e.continue()}}))}function No(e){this.b=e,this.a=[]}function Uo(e,t){return Fo(e,t,"readwrite")}function Fo(e,t,n){var r=new Do(n=e.b.transaction([t],n),t);return e.a.push(r),r.promise().then((function(){Re(e.a,r)}),(function(){Re(e.a,r)})),r}function Bo(e,t,n){this.b=new No(e),this.c=t,this.a=n}function Ko(e){return Promise.reject(new me(2,9,9011,"Cannot add new value to "+e))}function Vo(e,t,n,r){t=(e=Uo(e.b,t)).store();for(var i={},a=(n=f(n)).next();!a.done;i={key:i.key},a=n.next())i.key=a.value,t.delete(i.key).onsuccess=function(e){return function(){return r(e.key)}}(i);return e.promise()}function Go(e,t,n){return p((function r(){var i,a,o,s,l,u,c;return M(r,(function(r){switch(r.j){case 1:for(i=Fo(e.b,t,"readonly"),a=i.store(),o={},s=[],l={},u=f(n),c=u.next();!c.done;l={request:l.request,key:l.key},c=u.next())l.key=c.value,l.request=a.get(l.key),l.request.onsuccess=function(e){return function(){null==e.request.result&&s.push(e.key),o[e.key]=e.request.result}}(l);return w(r,i.promise(),2);case 2:if(s.length)throw new me(2,9,9012,"Could not find values for "+s);return r.return(n.map((function(e){return o[e]})))}}))}))}function Ho(e){this.a=new No(e)}function Yo(){this.a=new Map}function zo(e,t,n){if(!(e=e.a.get(t)))throw new me(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new me(2,9,9013,"Could not find cell with name "+n);return t}function Wo(e,t){$o.set(e,t)}no.prototype.destroy=function(){for(var e=f(this.b.values()),t=e.next();!t.done;t=e.next())Co(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()},no.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)},no.prototype.start=function(){var e=this;return p((function t(){var n,r,i;return M(t,(function(t){switch(t.j){case 1:return n=e.a.Ua(),r=Eo(e,n),(i=e.a.ae(e.c.periods[r])).variant||i.text?w(t,fo(e,i.variant?i.variant.audio:null,i.variant?i.variant.video:null,i.text,n),2):t.return(new me(2,5,5005));case 2:if(e.f)return t.return();e.a&&e.a.Cf&&e.a.Cf(),S(t)}}))}))},no.prototype.K=function(e,t,n,r){var i=r.reader.md(),a=r.reader.md(),o=r.reader.G(),s=r.reader.G(),l=r.reader.G(),u=r.reader.G();r=r.reader.Za(r.reader.J.byteLength-r.reader.ca()),e=e.startTime+t.startTime+s/o,n.includes(i)&&("urn:mpeg:dash:event:2012"==i?this.a.Df():this.a.onEvent(new we("emsg",{detail:{startTime:e,endTime:e+l/o,schemeIdUri:i,value:a,timescale:o,presentationTimeDelta:s,eventDuration:l,id:u,messageData:r}})))},V("shaka.net.HttpFetchPlugin",Lo),Lo.l=function(e,t,n,r,i){return p((function a(){var o,s,l,u,c,d,f,h,m,g,v,y;return M(a,(function(a){switch(a.j){case 1:return o=Lo.g,s=Lo.c,d=c=0,f=Date.now(),k(a,2),w(a,o(e,n),4);case 4:return l=a.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 n(){var r,a;return M(n,(function(n){switch(n.j){case 1:return k(n,2),w(n,h.read(),4);case 4:r=n.o,x(n,3);break;case 2:return R(n),n.return();case 3:r.done||(c+=r.value.byteLength),(100<(a=Date.now())-f||r.done)&&(i(a-f,c-d,g-c),d=c,f=a),r.done?e.close():(e.enqueue(r.value),t()),S(n)}}))}))}()}}),w(a,l.arrayBuffer(),5);case 5:u=a.o,x(a,3);break;case 2:if(v=R(a),r.Id)throw new me(1,1,7001,e,t);if(r.te)throw new me(1,1,1003,e,t);throw new me(1,1,1002,e,v,t);case 3:return y={},l.headers.forEach((function(e,t){y[t.trim()]=e})),a.return(Ro(y,u,l.status,e,l.url,t))}}))}))},Lo.isSupported=function(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!(!e.fetch||!e.AbortController)},Lo.isSupported=Lo.isSupported,Lo.g=e.fetch,Lo.a=e.AbortController,Lo.c=e.ReadableStream,Lo.b=e.Headers,Lo.isSupported()&&(De("http",Lo,2),De("https",Lo,2)),V("shaka.net.HttpXHRPlugin",Io),Io.f=e.XMLHttpRequest,De("http",Io,1),De("https",Io,1),Po.prototype.close=function(e,t){if(this.c.has(e)){var n=this.c.get(e);this.c.delete(e),this.f+=n,this.a+=t}},jo.prototype.destroy=function(){return this.c=!0,Promise.all(this.b.values()).then((function(){}),(function(){}))},Do.prototype.abort=function(){try{this.c.abort()}catch(e){}return this.a.catch((function(){}))},Do.prototype.store=function(){return this.b},Do.prototype.promise=function(){return this.a},No.prototype.destroy=function(){return Promise.all(this.a.map((function(e){return e.abort()})))},(r=Bo.prototype).destroy=function(){return this.b.destroy()},r.hasFixedKeySpace=function(){return!0},r.addSegments=function(){return Ko(this.c)},r.removeSegments=function(e,t){return Vo(this,this.c,e,t)},r.getSegments=function(e){var t=this;return p((function n(){var r;return M(n,(function(n){switch(n.j){case 1:return w(n,Go(t,t.c,e),2);case 2:return r=n.o,n.return(r.map((function(e){return t.Jd(e)})))}}))}))},r.addManifests=function(){return Ko(this.a)},r.updateManifestExpiration=function(e,t){var n=Uo(this.b,this.a),r=n.store();return r.get(e).onsuccess=function(n){(n=n.target.result)&&(n.expiration=t,r.put(n,e))},n.promise()},r.removeManifests=function(e,t){return Vo(this,this.a,e,t)},r.getManifests=function(e){var t=this;return p((function n(){var r;return M(n,(function(n){switch(n.j){case 1:return w(n,Go(t,t.a,e),2);case 2:return r=n.o,n.return(r.map((function(e){return t.ec(e)})))}}))}))},r.getAllManifests=function(){var e=this;return p((function t(){var n,r;return M(t,(function(t){switch(t.j){case 1:return n=Fo(e.b,e.a,"readonly"),r=new Map,w(t,Mo(n,(function(t,n){r.set(t,e.ec(n))})),2);case 2:return w(t,n.promise(),3);case 3:return t.return(r)}}))}))},r.Jd=function(e){return e},r.ec=function(e){return e},r.add=function(e,t){var n=this;return p((function r(){var i,a,o,s;return M(r,(function(r){switch(r.j){case 1:i=Uo(n.b,e),a=i.store(),o=[];for(var l=f(t),u=l.next();!u.done;u=l.next())s=u.value,a.add(s).onsuccess=function(e){o.push(e.target.result)};return w(r,i.promise(),2);case 2:return r.return(o)}}))}))},Ho.prototype.destroy=function(){return this.a.destroy()},Ho.prototype.getAll=function(){var e=this;return p((function t(){var n,r;return M(t,(function(t){switch(t.j){case 1:return n=Fo(e.a,"session-ids","readonly"),r=[],w(t,Mo(n,(function(e,t){r.push(t)})),2);case 2:return w(t,n.promise(),3);case 3:return t.return(r)}}))}))},Ho.prototype.add=function(e){for(var t=Uo(this.a,"session-ids"),n=t.store(),r=(e=f(e)).next();!r.done;r=e.next())n.add(r.value);return t.promise()},Ho.prototype.remove=function(e){var t=this;return p((function n(){var r;return M(n,(function(n){switch(n.j){case 1:return w(n,Mo(r=Uo(t.a,"session-ids"),(function(t,n,r){0<=e.indexOf(n.sessionId)&&r.delete()})),2);case 2:return w(n,r.promise(),0)}}))}))},Yo.prototype.destroy=function(){for(var e=[],t=f(this.a.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.a.clear(),Promise.all(e)},Yo.prototype.init=function(){var e=this;$o.forEach((function(t,n){var r=t();r&&e.a.set(n,r)}));for(var t=[],n=f(this.a.values()),r=n.next();!r.done;r=n.next())t.push(r.value.init());return Promise.all(t)},Yo.prototype.erase=function(){var e=this;return p((function t(){var n,r;return M(t,(function(t){switch(t.j){case 1:return n=Array.from(e.a.values()),(r=0<n.length)||$o.forEach((function(e){(e=e())&&n.push(e)})),w(t,Promise.all(n.map((function(e){return e.erase()}))),2);case 2:if(!r)return w(t,Promise.all(n.map((function(e){return e.destroy()}))),0);t.A(0)}}))}))},V("shaka.offline.StorageMuxer.register",Wo),V("shaka.offline.StorageMuxer.unregister",(function(e){$o.delete(e)}));var $o=new Map;function qo(e){Bo.apply(this,arguments)}function Xo(e){return function(e){var t=e.streams.filter((function(e){return"audio"==e.contentType})),n=e.streams.filter((function(e){return"video"==e.contentType}));if(!t.every((function(e){return e.variantIds}))||!n.every((function(e){return e.variantIds}))){t.forEach((function(e){e.variantIds=[]})),n.forEach((function(e){e.variantIds=[]}));var r=0;if(n.length&&!t.length){var i=r++;n.forEach((function(e){e.variantIds.push(i)}))}if(!n.length&&t.length){var a=r++;t.forEach((function(e){e.variantIds.push(a)}))}n.length&&t.length&&t.forEach((function(e){n.forEach((function(t){var n=r++;e.variantIds.push(n),t.variantIds.push(n)}))}))}}(e),e.streams.forEach((function(){})),{startTime:e.startTime,streams:e.streams.map(Jo)}}function Jo(e){var t=e.initSegmentUri?Qo(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(Zo),variantIds:e.variantIds}}function Zo(e){var t=Qo(e.uri);return{startTime:e.startTime,endTime:e.endTime,dataKey:t}}function Qo(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,n,r){Bo.call(this,e,t,n),this.f=r}function ts(){this.g=this.c=this.b=this.a=this.f=null}function ns(e,t,n,r){this.a=e,this.g=t,this.f=n,this.c=r,this.b=["offline:",e,"/",t,"/",n,"/",r].join("")}function rs(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 n=e[2];if(!n)return null;var r=e[3];return r&&null!=t?new ns(t,n,r,Number(e[4])):null}function is(e,t){this.b=e,this.a=t}function as(e,t,n){var r=t.streams.filter((function(e){return"audio"==e.contentType})),i=t.streams.filter((function(e){return"video"==e.contentType}));return r=function(e,t,n){for(var r=new Set,i=f(t),a=i.next();!a.done;a=i.next()){var o=f(a.value.variantIds);for(a=o.next();!a.done;a=o.next())r.add(a.value)}for(i=f(n),a=i.next();!a.done;a=i.next())for(o=f(a.value.variantIds),a=o.next();!a.done;a=o.next())r.add(a.value);for(i=new Map,r=f(r),a=r.next();!a.done;a=r.next())a=a.value,i.set(a,{id:a,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});for(t=f(t),r=t.next();!r.done;r=t.next())for(r=r.value,a=os(e,r),o=f(r.variantIds),r=o.next();!r.done;r=o.next())(r=i.get(r.value)).language=a.language,r.primary=r.primary||a.primary,r.audio=a;for(n=f(n),t=n.next();!t.done;t=n.next())for(r=t.value,t=os(e,r),a=f(r.variantIds),r=a.next();!r.done;r=a.next())(r=i.get(r.value)).primary=r.primary||t.primary,r.video=t;return i}(e,r,i),i=t.streams.filter((function(e){return"text"==e.contentType})).map((function(t){return os(e,t)})),t.streams.forEach((function(r){r=r.segments.map((function(t,n){return ss(e,n,t)})),n.vb(r,t.startTime)})),{startTime:t.startTime,variants:Array.from(r.values()),textStreams:i}}function os(e,t){var n=t.segments.map((function(t,n){return ss(e,n,t)})),r=new ei(n);return n={id:t.id,originalId:t.originalId,createSegmentIndex:function(){return Promise.resolve()},findSegmentPosition:function(e){return r.find(e)},getSegmentReference:function(e){return r.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&&(n.initSegmentReference=function(e,t){var n=new ns("segment",e.b,e.a,t);return new Jr((function(){return[n.toString()]}),0,null)}(e,t.initSegmentKey)),n}function ss(e,t,n){var r=new ns("segment",e.b,e.a,n.dataKey);return new Zr(t,n.startTime,n.endTime,(function(){return[r.toString()]}),0,null)}function ls(){this.a=null}function us(e){var t=rs(e);return t&&"manifest"==t.a?us.h(e):t&&"segment"==t.a?us.i(t.key(),t):ye(new me(2,1,9004,e))}function cs(e,t,n){return p((function r(){var i,a,o,s,l,u;return M(r,(function(r){switch(r.j){case 1:i=[];for(var c=[],d=f(n),h=d.next();!h.done;h=d.next()){h=h.value;for(var m=!1,g=f(c),v=g.next();!v.done;v=g.next())if(ds((v=v.value).info,h)){v.sessionIds.push(h.sessionId),m=!0;break}m||c.push({info:h,sessionIds:[h.sessionId]})}a=f(c),o=a.next();case 2:if(o.done){r.A(4);break}return s=o.value,l=function(e,t,n){return p((function r(){var i,a;return M(r,(function(r){switch(r.j){case 1:return i=new pt({ub:t,onError:function(){},qc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),k(r,2),i.configure(e),w(r,function(e,t,n,r,i,a){var o=new Map;return o.set(t,{audioCapabilities:i,videoCapabilities:a,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t,drmInfos:[{keySystem:t,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:r,initData:null,keyIds:null}]}),Tt(e,o)}(i,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:x(r,3);break;case 2:return R(r),w(r,i.destroy(),5);case 5:return r.return([]);case 3:return k(r,6),w(r,vt(i),8);case 8:x(r,7);break;case 6:return R(r),w(r,i.destroy(),9);case 9:return r.return([]);case 7:return a=[],w(r,Promise.all(n.sessionIds.map((function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return k(t,2),w(t,function(e,t){return p((function n(){var r,i,a;return M(n,(function(n){switch(n.j){case 1:return w(n,wt(e,t),2);case 2:return(r=n.o)?(i=[],(a=e.b.get(r))&&(a.ya=new ge,i.push(a.ya)),i.push(r.remove()),w(n,Promise.all(i),0)):n.return()}}))}))}(i,e),4);case 4:a.push(e),x(t,0);break;case 2:R(t),S(t)}}))}))}))),10);case 10:return w(r,i.destroy(),11);case 11:return r.return(a)}}))}))}(e,t,s),w(r,l,5);case 5:u=r.o,i=i.concat(u),o=a.next(),r.A(2);break;case 4:return r.return(i)}}))}))}function ds(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&Le(e.audioCapabilities,t.audioCapabilities,n)&&Le(e.videoCapabilities,t.videoCapabilities,n)}function fs(e,t){var n={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},r=this;this.g=t,this.c=e,this.i=n,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 n=!1;else{e.a&&(e.a.va.Ya(),e.a=null);var r=(n=e.f.shift()).create(e.i);r?(n.va.wb(),e.a={node:r.node,payload:r.payload,Va:r.Va,va:n.va}):n.va.rc(),n=!0}return n?n=Promise.resolve():e.a?n=function(e){return p((function t(){var n,r;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),w(t,e.b.promise,4);case 4:e.b=null,e.c==e.a.node&&(e.a.va.pc(),e.a=null),x(t,0);break;case 2:return 7001==(n=R(t)).code?e.a.va.Ya():e.a.va.onError(n),e.a=null,e.b=null,r=e,w(t,e.g.handleError(e.i,n),5);case 5:r.c=t.o,S(t)}}))}))}(e):(e.g.Bf(e.c),e.h=new ge,n=e.h),w(t,n,1)}t.A(0)}}))}))}(r)}))}function hs(e,t){var n={wb:function(){},pc:function(){},Ya:function(){},onError:function(){},rc:function(){},Jg:function(){}};return e.f.push({create:t,va:n}),e.b&&e.b.abort(),ps(e),n}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 n=e.textTracks[t];n.mode="disabled","Shaka Player TextTrack"==n.label&&(this.a=n)}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 vs(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var r=e.cues,i=r.length-1;0<=i;i--){var a=r[i];a&&t(a)&&e.removeCue(a)}e.mode=n}function ys(e,t,n,r,i){var a,o=i in r,s=!0;for(a in t){var l=i+"."+a,u=o?r[i]:n[a];o||a in n?void 0===t[a]?void 0===u||o?delete e[a]:e[a]=Ce(u):u.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=Ce(u)),l=ys(e[a],t[a],u,r,l),s=s&&l):typeof t[a]!=typeof u||null==t[a]||"function"!=typeof t[a]&&t[a].constructor!=u.constructor?($("Invalid config, wrong type for "+l),s=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&q("Unexpected number of arguments for "+l),e[a]=t[a]):($("Invalid config, unrecognized key "+l),s=!1)}return s}function bs(e,t){for(var n={},r=n,i=0,a=0;!(0>(i=e.indexOf(".",i)));)0!=i&&"\\"==e[i-1]||(r[a=e.substring(a,i).replace(/\\\./g,".")]={},r=r[a],a=i+1),i+=1;return r[e.substring(a).replace(/\\\./g,".")]=t,n}function _s(){}function As(){var e=5e5,t=1/0;navigator.connection&&(e=1e6*navigator.connection.downlink,navigator.connection.saveData&&(t=360));var n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:kt,fairPlayTransform:!0},r={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};nt("Web0S")&&(i.stallEnabled=!1);var a={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},o={drm:n,manifest:r,streaming:i,offline:a,abrFactory:Fn,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 a.trackSelectionCallback=function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return t.return(function(e,t){var n=e.filter((function(e){return"variant"==e.type})),r=[],i=Mn(t,n.map((function(e){return e.language})));i&&(r=n.filter((function(e){return On(e.language)==i}))),0==r.length&&(r=n.filter((function(e){return e.primary}))),0==r.length&&(n.map((function(e){return e.language})),r=n);var a=r.filter((function(e){return e.height&&480>=e.height}));if(a.length&&(a.sort((function(e,t){return t.height-e.height})),r=a.filter((function(e){return e.height==a[0].height}))),n=[],r.length){var o=Math.floor(r.length/2);r.sort((function(e,t){return e.bandwidth-t.bandwidth})),n.push(r[o])}for(r=f(e),o=r.next();!o.done;o=r.next())"text"==(o=o.value).type&&n.push(o);return n}(e,o.preferredAudioLanguage))}}))}))},o}function Es(e,t,n){var r={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return ys(e,t,n||As(),r,"")}function Ts(){this.a=null,this.b=[]}function ws(e,t){if(null==e.a)e.a={timestamp:Date.now()/1e3,state:t,duration:0};else{var n=Date.now()/1e3;e.a.duration=n-e.a.timestamp,e.a.state!=t&&(e.b.push(e.a),e.a={timestamp:n,state:t,duration:0})}}function Ss(e,t){var n=0;e.a&&e.a.state==t&&(n+=e.a.duration);for(var r=f(e.b),i=r.next();!i.done;i=r.next())n+=(i=i.value).state==t?i.duration:0;return n}function ks(){this.b=this.c=null,this.a=[]}function Cs(){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 xs(t,n){var r=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 ha,this.c=Us(this),this.bc={width:1/0,height:1/0},this.u=null,this.Gb=new Ea(this.c.preferredAudioLanguage,this.c.preferredVariantRole,this.c.preferredAudioChannelCount),this.na=this.c.preferredTextLanguage,this.fb=this.c.preferredTextRole,n&&n(this),this.K=function(e){return new je((function(t,n){e.l&&e.l.segmentDownloaded(t,n)}))}(this),this.g.w(e,"online",(function(){r.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,n){return null==t.v&&(t.v=n.v,e.g.w(t.v,"error",(function(){var t=el(e);t&&e.Ma(t)}))),e.a=t.v,Promise.resolve()}(r,e,t))})),i.set(this.F,(function(e){return e.v&&(r.g.ea(e.v,"error"),e.v=null),r.a=null,Ae(e=Promise.resolve())})),i.set(this.Ha,(function(e){return Ae(Ps(r,e))})),i.set(this.hb,(function(t){return Ae(t=function(t,n){return p((function r(){var i,a,o,s;return M(r,(function(r){switch(r.j){case 1:return i=e.muxjs?new Mt:new Nt,a=t.c.textDisplayFactory,o=new a,t.Fc=a,w(r,(s=new yn(n.v,i,o)).s,2);case 2:t.D=s,S(r)}}))}))}(r,t))})),i.set(this.Mc,(function(e,t){return Ae(function(e,t,n){return p((function r(){var i,a,o,s;return M(r,(function(r){switch(r.j){case 1:if(t.Aa=n.Aa,t.mimeType=n.mimeType,t.uri=n.uri,i=t.uri,a=e.K,e.Fb=i,t.Aa){e.s=t.Aa(),r.A(2);break}return o=e,w(r,gi.create(i,a,e.c.manifest.retryParameters,t.mimeType),3);case 3:o.s=r.o;case 2:s=Ce(e.c.manifest),n.v&&"AUDIO"===n.v.nodeName&&(s.disableVideo=!0),e.s.configure(s),S(r)}}))}))}(r,e,t))})),i.set(this.Kc,(function(e){return function(e,t){var n=t.uri,r=e.K;e.Yb=new Ja,function(e,t){e.b=t}(e.Yb,(function(t){Qs(e,"timelineregionadded",t)}));var i={networkingEngine:r,filterNewPeriod:function(t){return e.Nc(t)},filterAllPeriods:function(t){return Fs(e,t)},onTimelineRegionAdded:function(t){var n=e.Yb;e:{for(var r=f(n.a),i=r.next();!i.done;i=r.next())if((i=i.value).schemeIdUri==t.schemeIdUri&&i.id==t.id&&i.startTime==t.startTime&&i.endTime==t.endTime){r=i;break e}r=null}null==r&&(n.a.add(t),n.b(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return e.Ma(t)}};return new ve(Promise.resolve().then((function(){return p((function t(){var r;return M(t,(function(t){switch(t.j){case 1:return r=e,w(t,e.s.start(n,i),2);case 2:if(r.b=t.o,e.dispatchEvent(new we("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),S(t)}}))}))})),(function(){return e.s.stop()}))}(r,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,n){nl(e,t,n)},onEvent:function(t){e.dispatchEvent(t)}}),e.h.configure(e.c.drm),w(t,mt(e.h,Oa(e.b.periods),e.b.offlineSessionIds),2);case 2:Fs(e,e.b.periods),S(t)}}))}))}(r))})),i.set(this.S,(function(e,t){return Ae(function(e,t,n){return p((function r(){var i,a,o,s,l,u,c,d,h;return M(r,(function(r){switch(r.j){case 1:return t.startTime=n.startTime,i=t.v,a=t.uri,e.Fb=a,e.u=new Cs,o=function(){return Gs(e)},s=function(){var t=e.a.playbackRate;0!=t&&e.W.set(t)},e.g.w(i,"playing",o),e.g.w(i,"pause",o),e.g.w(i,"ended",o),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 n=0;n<t.length;n++){for(var r=t[n],i=new Map,a=f(r.variants),o=a.next();!o.done;o=a.next())if((o=o.value).video&&o.video.closedCaptions)for(var s=f((o=o.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:o.closedCaptions.get(l),label:null,type:"text",primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:o.roles,channelsCount:null,audioSamplingRate:null,closedCaptions:null};i.set(l,u)}for(i=f(i.values()),a=i.next();!a.done;a=i.next())r.textStreams.push(a.value)}}(e,e.b.periods),e.Gb=new Ea(e.c.preferredAudioLanguage,e.c.preferredVariantRole,e.c.preferredAudioChannelCount),e.na=e.c.preferredTextLanguage,function(e,t,n){0<t&&(e.V()||e.qe(t)),n<e.Y()&&(e.V()||e.xa(n))}(e.b.presentationTimeline,e.c.playRangeStart,e.c.playRangeEnd),w(r,e.h.Hb(i),2);case 2:return e.l.init((function(t,n,r){n=void 0!==n&&n,r=void 0===r?0:r;e:{for(var i=f(e.b.periods),a=i.next();!a.done;a=i.next())if((a=a.value).variants.includes(t)){i=a;break e}i=null}Ms(e,i,t,!0),e.f&&lo(e.f,t,n,r)&&Ws(e)})),e.m=function(e,t){return new Wa(e.a,e.b,e.c.streaming,t,(function(){e.ib&&ja(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&&n>=t.a&&n<t.b:Ft(t=Sn(i,t),n,r)}var n=e.a.Ua(),r=e.g.smallGapLimit,i=Eo(e,n);if(ze(e.b.values(),(function(e){return e.ia==i})))for(var a=f(e.b.keys()),o=a.next();!o.done;o=a.next())t(o=o.value)||co(e,e.b.get(o));else ze(e.b.keys(),t)||e.b.forEach((function(t){co(e,t)}))}(e.f),e.B&&Os(e)}),(function(t){return e.dispatchEvent(t)}))}(e,t.startTime),e.ib=function(e){var t=new Ma(e.b);!function(e,t){e.b=t}(t,(function(){$s(e)}));var n=new Za(e.Yb);!function(e,t,n,r){e.a=t,e.b=n,e.c=r}(n,(function(t){Qs(e,"timelineregionenter",t)}),(function(t){Qs(e,"timelineregionexit",t)}),(function(t,n){n||(Qs(e,"timelineregionenter",t),Qs(e,"timelineregionexit",t))}));var r=new Pa(e.a);return r.a.add(t),r.a.add(n),r}(e),e.W=new Na({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),js(e,u),e.f=function(e){return new no(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 n="";return e.audio&&(n=Xe(e.audio.codecs)[0]),t+"-"+n}var n=e.b.periods.reduce((function(e,t){return e.concat(t.variants)}),[]);n=Un.Nd(n,e.c.preferredAudioChannelCount);var r=new Se;n.forEach((function(e){var n=t(e);r.push(n,e)}));var i=null,a=1/0;r.forEach((function(e,t){var n=0,r=0;t.forEach((function(e){n+=e.bandwidth||0,++r}));var o=n/r;o<a&&(i=e,a=o)})),e.b.periods.forEach((function(e){e.variants=e.variants.filter((function(e){return t(e)==i}))}))}(e),e.i=ml,e.dispatchEvent(new we("streaming")),w(r,e.f.start(),3);case 3:e.c.streaming.startAtSegmentBoundary&&(c=e.m.h(),d=function(e,t){function n(e,t){if(!e)return null;var n=e.findSegmentPosition(t-a.startTime);return null==n?null:(n=e.getSegmentReference(n))?n.startTime+a.startTime:null}var r=ro(e.f),i=io(e.f),a=ll(e);return r=n(r,t),null!=(i=n(i,t))&&null!=r?Math.max(i,r):null!=i?i:null!=r?r: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-n.zd})),S(r)}}))}))}(r,e,t))})),i.set(this.Rc,(function(e){return Ae(e=function(e,t){return p((function n(){var r,i;return M(n,(function(n){switch(n.j){case 1:return r=Yt,e.h=new pt({ub:e.K,onError:function(t){e.Ma(t)},qc:function(t){tl(e,t)},onExpirationUpdated:function(t,n){nl(e,t,n)},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:r.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},w(n,mt(e.h,[i],[]),2);case 2:return w(n,e.h.Hb(t.v),0)}}))}))}(r,e))})),i.set(this.jb,(function(e,t){return function(e,t,n){function r(){return Gs(e)}if(t.uri=n.uri,t.startTime=n.startTime,e.Fb=t.uri,e.u=new Cs,e.m=new za(t.v),null!=t.startTime&&e.m.m(t.startTime),e.W=new Na({jc:function(){return t.v.playbackRate},wd:function(e){t.v.playbackRate=e},Yd:function(e){t.v.currentTime+=e}}),js(e,e.c.streaming.rebufferingGoal),e.g.w(t.v,"playing",r),e.g.w(t.v,"pause",r),e.g.w(t.v,"ended",r),e.g.da(t.v,"loadeddata",(function(){e.u.b=Date.now()/1e3-n.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 we("streaming"));var a=new ge;return e.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?a.resolve():e.a.error?a.reject(el(e)):(e.g.da(e.a,"loadeddata",(function(){a.resolve()})),e.g.da(e.a,"error",(function(){a.reject(el(e))}))),new ve(a,(function(){return a.reject(new me(2,7,7001)),Promise.resolve()}))}(r,e,t)})),this.lb=new fs(this.F,{cf:function(e,t,n,i){var a=null;return e==r.F&&(a=n==r.F?r.F:r.O),e==r.O&&(a=n==r.F||t.v!=i.v?r.F:n==r.O?r.O:n==r.hb||n==r.S?r.hb:n==r.jb?r.Rc:null),e==r.hb&&(a=n==r.S&&t.v==i.v?r.Mc:r.Ha),e==r.Mc&&(a=dl(r.S,r.Kc,r.Ha,n,t,i)),e==r.Kc&&(a=dl(r.S,r.Ec,r.Ha,n,t,i)),e==r.Ec&&(a=dl(r.S,r.S,r.Ha,n,t,i)),e==r.Rc&&(a=n==r.jb&&t.v==i.v?r.jb:r.Ha),e!=r.S&&e!=r.jb||(a=r.Ha),e==r.Ha&&(a=i.v&&t.v==i.v?r.O:r.F),a},Le:function(e,t,n){return r.dispatchEvent(new we("onstatechange",{state:e.name})),i.get(e)(t,n)},handleError:function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return w(t,Ps(r,e),2);case 2:return t.return(e.v?r.O:r.F)}}))}))},Bf:function(e){r.dispatchEvent(new we("onstateidle",{state:e.name}))}}),t&&this.Hb(t,!0)}_(qo,Bo),qo.prototype.updateManifestExpiration=function(e,t){var n=Uo(this.b,this.a),r=n.store(),i=new ge;return r.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,r.put(n),i.resolve()):i.reject(new me(2,9,9012,"Could not find values for "+e))},n.promise().then((function(){return i}))},qo.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(Xo),sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata}},qo.prototype.Jd=function(e){return{data:e.data}},_(es,Bo),es.prototype.hasFixedKeySpace=function(){return this.f},es.prototype.addSegments=function(e){return this.f?Ko(this.c):this.add(this.c,e)},es.prototype.addManifests=function(e){return this.f?Ko(this.a):this.add(this.a,e)},es.prototype.ec=function(e){return null==e.expiration&&(e.expiration=1/0),e},(r=ts.prototype).init=function(){var t=this,n=new ge,r=e.indexedDB.open("shaka_offline_db",4);return r.onsuccess=function(e){e=e.target.result,t.f=e;var r=e.objectStoreNames;r=r.contains("manifest")&&r.contains("segment")?new qo(e,"segment","manifest"):null,t.a=r,r=(r=e.objectStoreNames).contains("manifest-v2")&&r.contains("segment-v2")?new es(e,"segment-v2","manifest-v2",!0):null,t.b=r,r=(r=e.objectStoreNames).contains("manifest-v3")&&r.contains("segment-v3")?new es(e,"segment-v3","manifest-v3",!1):null,t.c=r,e=e.objectStoreNames.contains("session-ids")?new Ho(e):null,t.g=e,n.resolve()},r.onupgradeneeded=function(e){e=e.target.result;for(var t=f(["segment-v3","manifest-v3","session-ids"]),n=t.next();!n.done;n=t.next())n=n.value,e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},r.onerror=function(e){n.reject(new me(2,9,9001,r.error)),e.preventDefault()},n},r.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 w(t,e.a.destroy(),2);case 2:if(!e.b){t.A(4);break}return w(t,e.b.destroy(),4);case 4:if(!e.c){t.A(6);break}return w(t,e.c.destroy(),6);case 6:if(!e.g){t.A(8);break}return w(t,e.g.destroy(),8);case 8:e.f&&e.f.close(),S(t)}}))}))},r.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},r.getEmeSessionCell=function(){return this.g},r.erase=function(){var t=this;return p((function n(){return M(n,(function(n){switch(n.j){case 1:if(!t.a){n.A(2);break}return w(n,t.a.destroy(),2);case 2:if(!t.b){n.A(4);break}return w(n,t.b.destroy(),4);case 4:if(!t.c){n.A(6);break}return w(n,t.c.destroy(),6);case 6:return t.f&&t.f.close(),w(n,function(){var t=new ge,n=e.indexedDB.deleteDatabase("shaka_offline_db");return n.onblocked=function(){},n.onsuccess=function(){t.resolve()},n.onerror=function(e){t.reject(new me(2,9,9001,n.error)),e.preventDefault()},t}(),8);case 8:return t.f=null,t.a=null,t.b=null,t.c=null,w(n,t.init(),0)}}))}))},Wo("idb",(function(){return e.indexedDB?new ts:null})),ns.prototype.wa=function(){return this.g},ns.prototype.ba=function(){return this.f},ns.prototype.key=function(){return this.c},ns.prototype.toString=function(){return this.b},(r=ls.prototype).configure=function(){},r.start=function(e){var t=this;return p((function n(){var r,i,a,o,s;return M(n,(function(n){switch(n.j){case 1:return r=rs(e),t.a=r,null==r||"manifest"!=r.a?n.return(Promise.reject(new me(2,1,9004,r))):(i=new Yo,C(n,2),w(n,i.init(),4));case 4:return w(n,zo(i,r.wa(),r.ba()),5);case 5:return w(n,n.o.getManifests([r.key()]),6);case 6:return a=n.o,o=a[0],s=new is(r.wa(),r.ba()),n.return(function(e,t){var n=new vi(null,0);n.xa(t.duration);var r=t.periods.map((function(t){return as(e,t,n)})),i=t.drmInfo?[t.drmInfo]:[];return t.drmInfo&&r.forEach((function(e){e.variants.forEach((function(e){e.drmInfos=i}))})),{presentationTimeline:n,minBufferTime:2,offlineSessionIds:t.sessionIds,periods:r}}(s,o));case 2:return L(n),w(n,i.destroy(),7);case 7:I(n,0)}}))}))},r.stop=function(){return Promise.resolve()},r.update=function(){},r.onExpirationUpdated=function(e,t){var n=this;return p((function r(){var i,a,o,s,l,u,c;return M(r,(function(r){switch(r.j){case 1:return i=n.a,a=new Yo,k(r,2,3),w(r,a.init(),5);case 5:return w(r,zo(a,i.wa(),i.ba()),6);case 6:return w(r,(o=r.o).getManifests([i.key()]),7);case 7:if(s=r.o,l=s[0],u=l.sessionIds.includes(e),c=null==l.expiration||l.expiration>t,!u||!c){r.A(3);break}return w(r,o.updateManifestExpiration(i.key(),t),3);case 3:return L(r),w(r,a.destroy(),10);case 10:I(r,0);break;case 2:R(r),r.A(3)}}))}))},gi.Cb("application/x-offline-manifest",ls),V("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 n=new Yo;return _e(void 0).U((function(){return n.init()})).U((function(){return zo(n,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 n.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),w(t,e.m,2);case 2:e.a&&e.a.va.Ya();for(var n=f(e.f),r=n.next();!r.done;r=n.next())r.value.va.Ya();e.a=null,e.f=[],e.g=null,S(t)}}))}))},V("shaka.text.SimpleTextDisplayer",ms),ms.prototype.remove=function(e,t){return!!this.a&&(vs(this.a,(function(n){return n.startTime<t&&n.endTime>e})),!0)},ms.prototype.remove=ms.prototype.remove,ms.prototype.append=function(e){for(var t=gs,n=[],r=0;r<e.length;r++){var i=t(e[r]);i&&n.push(i)}n.slice().sort((function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:n.indexOf(t)-n.indexOf(e)})).forEach(function(e){this.a.addCue(e)}.bind(this))},ms.prototype.append=ms.prototype.append,ms.prototype.destroy=function(){return this.a&&vs(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,V("shaka.util.ConfigUtils.mergeConfigObjects",ys),V("shaka.util.ConfigUtils.convertToConfigObject",bs),V("shaka.util.PlayerConfiguration",_s),_s.mergeConfigObjects=Es,G(xs,ke),V("shaka.Player",xs),xs.prototype.destroy=function(){var e=this;return p((function t(){var n;return M(t,(function(t){switch(t.j){case 1:return e.i==hl?t.return():(e.i=hl,n=hs(e.lb,(function(){return{node:e.F,payload:{Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},Va:!1}})),w(t,new Promise((function(t){n.wb=function(){},n.pc=function(){t(),e.dispatchEvent(new we("loaded"))},n.Ya=function(){t()},n.onError=function(){t()},n.rc=function(){t()}})),2));case 2:return w(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 w(t,e.K.destroy(),5);case 5:e.K=null,S(t)}}))}))},xs.prototype.destroy=xs.prototype.destroy,xs.version="v2.5.10";var Rs=["2","5"];Yn=new function(e){this.a=e,this.c=Gn,this.b=Hn}(new Kn(Number(Rs[0]),Number(Rs[1])));var Ls=["output-restricted","internal-error"],Is={};function Ps(e,t){return p((function n(){return M(n,(function(n){switch(n.j){case 1:if(e.i!=hl&&(e.i=pl),e.dispatchEvent(new we("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){n.A(2);break}return w(n,e.s.stop(),3);case 3:e.s=null;case 2:if(!e.l){n.A(4);break}return w(n,e.l.stop(),4);case 4:if(!e.f){n.A(6);break}return w(n,e.f.destroy(),7);case 7:e.f=null;case 6:if(e.m&&(e.m.release(),e.m=null),!e.D){n.A(8);break}return w(n,e.D.destroy(),9);case 9:e.D=null;case 8:if(!t.v||!t.v.src){n.A(10);break}return w(n,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){n.A(12);break}return w(n,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,Vs(e),S(n)}}))}))}function js(e,t){e.B=new Ta,e.B.a=Sa,wa(e.B,t,Math.min(.5,t/2)),Vs(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||En(e.D))t=!0;else{if(e.b.presentationTimeline.V()){var n=e.b.presentationTimeline.pb();if(Ut(e.a.buffered)>=n){t=!0;break e}}t=!1}break;default:t=!1}var r=Bt(e.a.buffered,e.a.currentTime),i=t,a=(n=e.B).b.get(n.a);t=n.a,r=i||r>=a?ka:Sa,n.a=r,t!=r&&Vs(e)}function Ds(e){if(e.s){var t=Ce(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 n=ro(e.f),r=io(e.f);t=ll(e),n=Un.Qd(n,r,t.variants),e.l&&n&&n.allowedByApplication&&n.allowedByKeySystem?Hs(e,t.variants):Ys(e,t)}if(e.D&&(t=e.c.textDisplayFactory,e.Fc!=t)){n=new t;var i=(r=e.D).g;r.g=n,i&&(n.setTextVisibility(i.isTextVisible()),i.destroy()),r.a&&(r.a.c=n),e.Fc=t,e.f&&(n=(t=e.f).b.get("text"))&&uo(t,n.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)),wa(e.B,t,Math.min(.5,t/2)))}function Ms(e,t,n,r){ma(e.$,t).variant=n,(e=e.u.c).c!=n&&(e.c=n,e.a.push({timestamp:Date.now()/1e3,id:n.id,type:"variant",fromAdaptation:r,bandwidth:n.bandwidth}))}function Ns(e,t,n,r){pa(e.$,t,n),(e=e.u.c).b!=n&&(e.b=n,e.a.push({timestamp:Date.now()/1e3,id:n.id,type:"text",fromAdaptation:r,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 n=e.f?ro(e.f):null,r=e.f?io(e.f):null;if(t.forEach(Un.filterNewPeriod.bind(null,e.h,n,r)),0==(n=function(e,t){var n=0;return e.forEach((function(e){n+=t(e)?1:0})),n}(t,(function(e){return e.variants.some(Un.rb)}))))throw new me(2,4,4032);if(n<t.length)throw new me(2,4,4011);t.forEach(function(e){Un.Gd(e.variants,this.c.restrictions,this.bc)&&this.f&&ll(this)==e&&$s(this),rl(this,e.variants)}.bind(e))}function Bs(e,t,n,r){return n=void 0!==n&&n,r=void 0===r?0:r,e.kb?(e.pa=t,e.Ud=n,e.Rd=r,!0):((t=lo(e.f,t,n,r))&&qs(e),t)}function Ks(e,t){if(e.kb)return e.oa=t,!0;var n=uo(e.f,t,!0,0,!1);return n&&Xs(e),n}function Vs(e){var t=e.Xc();if(e.u&&e.B&&e.m){var n=e.W;n.f=t,Ua(n),Gs(e)}e.dispatchEvent(new we("buffering",{buffering:t}))}function Gs(e){if(e.u&&e.B){var t=e.u.a;e.B.a==Sa?ws(t,"buffering"):e.a.paused?ws(t,"paused"):e.a.ended?ws(t,"ended"):ws(t,"playing")}}function Hs(e,t){try{rl(e,t)}catch(t){return e.Ma(t),null}var n=t.filter((function(e){return Un.rb(e)}));return n=e.Gb.create(n),e.l.setVariants(Array.from(n.values())),e.l.chooseVariant()}function Ys(e,t){var n=zs(e,t,!1),r=Un.Jb(t.textStreams,e.na,e.fb)[0]||null,i=!1;r&&(e.c.streaming.alwaysStreamText||e.mc())&&(Ns(e,t,r,!0),i=Ks(e,r)),(n||i)&&Ws(e)}function zs(e,t,n){n=void 0===n||n;var r=Hs(e,t.variants),i=!1;return r&&(Ms(e,t,r,!0),i=Bs(e,r,!0)),n&&i&&Ws(e),i}function Ws(e){il(e,new we("adaptation"))}function $s(e){il(e,new we("trackschanged"))}function qs(e){il(e,new we("variantchanged"))}function Xs(e){il(e,new we("textchanged"))}function Js(e){il(e,new we("texttrackvisibility"))}function Zs(e){il(e,new we("abrstatuschanged",{Ig:e.c.abr.enabled}))}function Qs(e,t,n){e.dispatchEvent(new we(t,{detail:{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement}}))}function el(e){if(!e.a.error)return null;var t=e.a.error.code;if(1==t)return null;var n=e.a.error.msExtendedCode;return n&&(0>n&&(n+=Math.pow(2,32)),n=n.toString(16)),new me(2,3,3016,t,n,e.a.error.message)}function tl(e,t){if(e.f){var n=ll(e),r=!1,i=Object.keys(t),a=1==i.length&&"00"==i[0];i.length&&e.b.periods.forEach((function(e){e.variants.forEach((function(e){Un.nf(e).forEach((function(n){var i=e.allowedByKeySystem;n.keyId&&(n=t[a?"00":n.keyId],e.allowedByKeySystem=!!n&&!Ls.includes(n)),i!=e.allowedByKeySystem&&(r=!0)}))}))})),i=ro(e.f);var o=io(e.f);(i=Un.Qd(i,o,n.variants))&&!i.allowedByKeySystem&&zs(e,n),r&&($s(e),Hs(e,n.variants))}}function nl(e,t,n){e.s&&e.s.onExpirationUpdated&&e.s.onExpirationUpdated(t,n),e.dispatchEvent(new we("expirationupdated"))}function rl(e,t){var n=e.h?$e(e.h.W):{},r=Object.keys(n);r=r.length&&"00"==r[0];for(var i=!1,a=!1,o=[],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=n[r?"00":d.keyId];h?Ls.includes(h)&&(s.includes(h)||s.push(h)):o.includes(d.keyId)||o.push(d.keyId)}u.allowedByApplication?u.allowedByKeySystem&&(i=!0):a=!0}if(!i)throw new me(2,4,4012,{hasAppRestrictions:a,missingKeys:o,restrictedKeyStatuses:s})}function il(e,t){p((function n(){return M(n,(function(n){switch(n.j){case 1:return w(n,Promise.resolve(),2);case 2:e.i!=hl&&e.dispatchEvent(t),S(n)}}))}))}function al(e){for(var t=new Set,n=(e=f(e)).next();!n.done;n=e.next())(n=n.value).language?t.add(On(n.language)):t.add("und");return t}function ol(e){for(var t=new Map,n=(e=f(e)).next();!n.done;n=e.next()){var r=n.value;n="und";var i=[];for(r.language&&(n=On(r.language)),(i="variant"==r.type?r.audioRoles:r.roles)&&i.length||(i=[""]),t.has(n)||t.set(n,new Set),i=(r=f(i)).next();!i.done;i=r.next())i=i.value,t.get(n).add(i)}var a=[];return t.forEach((function(e,t){for(var n=f(e),r=n.next();!r.done;r=n.next())a.push({language:t,role:r.value})})),a}function sl(e){return null==(e=ll(e))?[]:e.variants.filter((function(e){return Un.rb(e)}))}function ll(e){for(var t=e.m.h(),n=null,r=(e=f(e.b.periods)).next();!r.done;r=e.next())(r=r.value).startTime<=t&&(n=r);return n}function ul(e){var t=ll(e);return ma(e.$,t).variant}function cl(){return new me(2,7,7e3)}function dl(e,t,n,r,i,a){return r==e&&i.v==a.v&&i.uri==a.uri&&i.mimeType==a.mimeType&&i.Aa==a.Aa?t:n}function fl(e){return new Promise((function(t,n){e.Ya=function(){return n(cl())},e.pc=function(){return t()},e.onError=function(e){return n(e)},e.rc=function(){return n(cl())}}))}xs.registerSupportPlugin=function(e,t){Is[e]=t},xs.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"))},xs.probeSupport=function(){return xt().then((function(e){for(var t=gi.Sf(),n={},r=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=r.next();!i.done;i=r.next()){n[i=i.value]=Ze()?!!mn(i)||MediaSource.isTypeSupported(i)||Wt(i):Qe(i);var a=i.split(";")[0];n[a]=n[a]||n[i]}for(var o in e={manifest:t,media:n,drm:e},Is)e[o]=Is[o]();return e}))},xs.prototype.Hb=function(e,t){if(t=void 0===t||t,this.i==hl)return Promise.reject(cl());var n={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null};n.v=e,Ze()||(t=!1);var r=t?this.hb:this.O,i=hs(this.lb,(function(){return{node:r,payload:n,Va:!1}}));return i.wb=function(){},fl(i)},xs.prototype.attach=xs.prototype.Hb,xs.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)},xs.prototype.detach=xs.prototype.detach,xs.prototype.Cd=function(e){var t=this;if(e=void 0===e||e,this.i==hl)return Promise.reject(cl());Ze()||(e=!1);var n={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},r=hs(this.lb,(function(r){var i=r.v&&e?t.hb:r.v?t.O:t.F;return n.v=r.v,{node:i,payload:n,Va:!1}}));return r.wb=function(){},fl(r)},xs.prototype.unload=xs.prototype.Cd,xs.prototype.load=function(e,t,n){if(this.i==hl)return Promise.reject(cl());this.dispatchEvent(new we("loading"));var r={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null};r.uri=e,r.zd=Date.now()/1e3,n&&"string"!=typeof n&&(Vn("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),r.Aa=function(){return new n}),n&&"string"==typeof n&&(r.mimeType=n),void 0!==t&&(r.startTime=t);var i=function(e,t){if(t.Aa)return!1;if(!Ze())return!0;var n=t.mimeType,r=t.uri||"";return n||(n={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(r)]),!!n&&""!=(t.v||rt()).canPlayType(n)&&(!gi.isSupported(r,n)||et()&&e.c.streaming.useNativeHlsOnSafari)}(this,r)?this.jb:this.S,a=hs(this.lb,(function(e){return null==e.v?null:(r.v=e.v,{node:i,payload:r,Va:!0})}));return a.wb=function(){},new Promise((function(e,t){a.rc=function(){return t(new me(2,7,7002))},a.pc=function(){return e()},a.Ya=function(){return t(cl())},a.onError=function(e){return t(e)}}))},xs.prototype.load=xs.prototype.load,xs.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=bs(e,t));var n=Es(this.c,e,Us(this));return Ds(this),n},xs.prototype.configure=xs.prototype.configure,xs.prototype.getConfiguration=function(){var e=Us(this);return Es(e,this.c,Us(this)),e},xs.prototype.getConfiguration=xs.prototype.getConfiguration,xs.prototype.$f=function(){for(var e in this.c)delete this.c[e];Es(this.c,Us(this),Us(this)),Ds(this)},xs.prototype.resetConfiguration=xs.prototype.$f,xs.prototype.We=function(){return this.i},xs.prototype.getLoadMode=xs.prototype.We,xs.prototype.af=function(){return this.a},xs.prototype.getMediaElement=xs.prototype.af,xs.prototype.Mb=function(){return this.K},xs.prototype.getNetworkingEngine=xs.prototype.Mb,xs.prototype.hc=function(){return this.Fb},xs.prototype.getAssetUri=xs.prototype.hc,xs.prototype.Ze=function(){return Vn("getManifestUri",'Please use "getAssetUri" instead.'),this.hc()},xs.prototype.getManifestUri=xs.prototype.Ze,xs.prototype.V=function(){return this.b?this.b.presentationTimeline.V():!(!this.a||!this.a.src)&&1/0==this.a.duration},xs.prototype.isLive=xs.prototype.V,xs.prototype.Xa=function(){return!!this.b&&this.b.presentationTimeline.Xa()},xs.prototype.isInProgress=xs.prototype.Xa,xs.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)},xs.prototype.isAudioOnly=xs.prototype.uf,xs.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}},xs.prototype.seekRange=xs.prototype.bg,xs.prototype.keySystem=function(){return _t(this.drmInfo())},xs.prototype.keySystem=xs.prototype.keySystem,xs.prototype.drmInfo=function(){return this.h?this.h.a:null},xs.prototype.drmInfo=xs.prototype.drmInfo,xs.prototype.Lb=function(){return this.h?this.h.Lb():1/0},xs.prototype.getExpiration=xs.prototype.Lb,xs.prototype.Xc=function(){return!!this.B&&this.B.a==Sa},xs.prototype.isBuffering=xs.prototype.Xc,xs.prototype.ef=function(){if(this.W){var e=this.W;e=e.f?0:e.c}else e=0;return e},xs.prototype.getPlaybackRate=xs.prototype.ef,xs.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&&so(this.f,1<Math.abs(e)))},xs.prototype.trickPlay=xs.prototype.ug,xs.prototype.Ge=function(){this.i==gl&&this.W.set(1),this.i==ml&&(this.W.set(1),so(this.f,!1))},xs.prototype.cancelTrickPlay=xs.prototype.Ge,xs.prototype.Vc=function(){if(this.b&&this.m){for(var e=ul(this),t=[],n=f(sl(this)),r=n.next();!r.done;r=n.next()){r=r.value;var i=Un.Ed(r);i.active=r==e,t.push(i)}return t}return this.a&&this.a.audioTracks?Array.from(this.a.audioTracks).map((function(e){return Un.rf(e)})):[]},xs.prototype.getVariantTracks=xs.prototype.Vc,xs.prototype.qb=function(){if(this.b&&this.m){for(var e=function(e){var t=ll(e);if(null==t)return null;if(!ma(e.$,t).text){var n=Un.Jb(t.textStreams,e.na,e.fb);n.length&&pa(e.$,t,n[0])}return ma(e.$,t).text}(this),t=[],n=f(function(e){var t=ll(e);return null==t?[]:t.textStreams.filter((function(t){return!e.ac.has(t)}))}(this)),r=n.next();!r.done;r=n.next()){r=r.value;var i=Un.xc(r);i.active=r==e,t.push(i)}return t}return this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).map((function(e){return Un.sf(e)})):[]},xs.prototype.getTextTracks=xs.prototype.qb,xs.prototype.td=function(e){if(this.b&&this.f){var t=ll(this),n=t.textStreams.find((function(t){return t.id==e.id}));n&&(Ns(this,t,n,!1),Ks(this,n),this.na=n.language)}else if(this.a&&this.a.src&&this.a.textTracks){for(n=(t=f(t=Array.from(this.a.textTracks))).next();!n.done;n=t.next())n=n.value,Un.Wc(n)==e.id?n.mode=this.gb?"showing":"hidden":n.mode="disabled";Xs(this)}},xs.prototype.selectTextTrack=xs.prototype.td,xs.prototype.dg=function(){Vn("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])},xs.prototype.selectEmbeddedTextTrack=xs.prototype.dg,xs.prototype.zg=function(){Vn("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},xs.prototype.usingEmbeddedTextTrack=xs.prototype.zg,xs.prototype.fg=function(e,t,n){if(n=void 0===n?0:n,this.b&&this.f){var r=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=r.variants.find((function(t){return t.id==e.id}));i&&Un.rb(i)&&(Ms(this,r,i,!1),Bs(this,i,t,n),this.Gb=new Aa(i),Hs(this,r.variants))}else if(this.a&&this.a.audioTracks){for(n=(t=f(t=Array.from(this.a.audioTracks))).next();!n.done;n=t.next())n=n.value,Un.Wc(n)==e.id&&(n.enabled=!0);qs(this)}},xs.prototype.selectVariantTrack=xs.prototype.fg,xs.prototype.Re=function(){return ol(this.Vc())},xs.prototype.getAudioLanguagesAndRoles=xs.prototype.Re,xs.prototype.mf=function(){return ol(this.qb())},xs.prototype.getTextLanguagesAndRoles=xs.prototype.mf,xs.prototype.Qe=function(){return Array.from(al(this.Vc()))},xs.prototype.getAudioLanguages=xs.prototype.Qe,xs.prototype.lf=function(){return Array.from(al(this.qb()))},xs.prototype.getTextLanguages=xs.prototype.lf,xs.prototype.cg=function(e,t){if(this.b&&this.m){var n=ll(this);this.Gb=new Ea(e,t||"",0,"","audio"),zs(this,n)}else if(this.a&&this.a.audioTracks){for(var r=(n=f(n=Array.from(this.a.audioTracks))).next();!r.done;r=n.next())(r=r.value).language==e&&(r.enabled=!0);qs(this)}},xs.prototype.selectAudioLanguage=xs.prototype.cg,xs.prototype.eg=function(e,t){if(this.b&&this.m){var n=ll(this);this.na=e,this.fb=t||"";var r=Un.Jb(n.textStreams,this.na,this.fb)[0]||null;r&&(Ns(this,n,r,!1),(this.c.streaming.alwaysStreamText||this.mc())&&Ks(this,r))}else(n=this.qb().filter((function(t){return t.language==e}))[0])&&this.td(n)},xs.prototype.selectTextLanguage=xs.prototype.eg,xs.prototype.gg=function(e){if(this.b&&this.m){for(var t=ll(this),n=null,r=f(sl(this)),i=r.next();!i.done;i=r.next())if((i=i.value).audio.label==e){n=i;break}null!=n&&(this.Gb=new Ea(n.language,"",0,e),zs(this,t))}},xs.prototype.selectVariantsByLabel=xs.prototype.gg,xs.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},xs.prototype.isTextTrackVisible=xs.prototype.mc,xs.prototype.jg=function(e){var t=this;return p((function n(){var r,i,a,o;return M(n,(function(n){switch(n.j){case 1:if(t.gb==(r=!!e))return n.return();if(t.gb=r,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=r?"showing":"hidden");n.A(2);break}if(t.D.g.setTextVisibility(r),t.c.streaming.alwaysStreamText){n.A(2);break}if(!r){(s=t.f).D=!0,(l=s.b.get("text"))&&(Co(l),s.b.delete("text")),n.A(2);break}if(a=ll(t),!(0<(o=Un.Jb(a.textStreams,t.na,t.fb)).length)){n.A(2);break}return w(n,oo(t.f,o[0]),2);case 2:Js(t),S(n)}}))}))},xs.prototype.setTextTrackVisibility=xs.prototype.jg,xs.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},xs.prototype.getPlayheadTimeAsDate=xs.prototype.gf,xs.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},xs.prototype.getPresentationStartTimeAsDate=xs.prototype.jf,xs.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},xs.prototype.getBufferedInfo=xs.prototype.Sc,xs.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:[]};Gs(this);var e=this.a;if(e.getVideoPlaybackQuality){e=e.getVideoPlaybackQuality();var t=this.u,n=Number(e.totalVideoFrames);t.m=Number(e.droppedVideoFrames),t.l=n,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,n=e.video.height||NaN,t.u=e.video.width||NaN,t.g=n),e=this.l.getBandwidthEstimate(),this.u.f=e);var r=this.u;e=r.u,t=r.g,n=r.s;for(var i=r.l,a=r.m,o=r.i,s=r.f,l=r.b,u=Ss(r.a,"playing"),c=Ss(r.a,"paused"),d=Ss(r.a,"buffering"),h=r.h,p=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],r=f(e.b),i=r.next();!i.done;i=r.next())n.push(t(i.value));return e.a&&n.push(t(e.a)),n}(r.a),m=[],g=(r=f(r.c.a)).next();!g.done;g=r.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:n,decodedFrames:i,droppedFrames:a,corruptedFrames:o,estimatedBandwidth:s,loadLatency:l,playTime:u,pauseTime:c,bufferingTime:d,licenseTime:h,stateHistory:p,switchHistory:m}},xs.prototype.getStats=xs.prototype.getStats,xs.prototype.addTextTrack=function(e,t,n,r,i,a){var o=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(o.i==gl)throw Error("State error!");if(o.i!=ml)throw Error("State error!");if(l=ll(o),u=Yt,c=o.b.periods.indexOf(l),f=(d=c+1)>=o.b.periods.length?o.b.presentationTimeline.Y():o.b.periods[d].startTime,1/0==(h=f-l.startTime))throw new me(1,4,4033);return p=new Zr(1,0,h,(function(){return[e]}),0,null),m={id:o.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:r,codecs:i||"",kind:n,encrypted:!1,keyId:null,language:t,label:a||null,type:u.ra,primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},o.ac.add(m),l.textStreams.push(m),w(s,oo(o.f,m),2);case 2:return(g=ao(o.f,"text"))&&pa(o.$,l,g),o.ac.delete(m),Ys(o,l),$s(o),s.return(Un.xc(m))}}))}))},xs.prototype.addTextTrack=xs.prototype.addTextTrack,xs.prototype.vd=function(e,t){this.bc.width=e,this.bc.height=t},xs.prototype.setMaxHardwareResolution=xs.prototype.vd,xs.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()),n=t.next();!n.done;n=t.next())(n=n.value).Pb&&(n.Pb=!1,ko(e,n,.1));e=!0}}else e=!1;return e},xs.prototype.retryStreaming=xs.prototype.sd,xs.prototype.Xe=function(){return this.b},xs.prototype.getManifest=xs.prototype.Xe,xs.prototype.Ye=function(){return this.s?this.s.constructor:null},xs.prototype.getManifestParserFactory=xs.prototype.Ye,(r=xs.prototype).Nc=function(e){var t=this.f?ro(this.f):null,n=this.f?io(this.f):null;if(Un.filterNewPeriod(this.h,t,n,e),!(t=e.variants).some(Un.rb))throw new me(2,4,4011);if(rl(this,e.variants),Un.Gd(t,this.c.restrictions,this.bc)&&this.f&&ll(this)==e&&$s(this),e=this.h?this.h.a:null)for(n=(t=f(t)).next();!n.done;n=t.next())for(var r=(n=f(n.value.drmInfos)).next();!r.done;r=n.next())if((r=r.value).keySystem==e.keySystem)for(var i=(r=f(r.initData||[])).next();!i.done;i=r.next())i=i.value,bt(this.h,i.initDataType,i.initData)},r.zf=function(e){try{this.kb=!0,this.l.disable(),Zs(this);var t=Hs(this,e.variants),n=Un.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)&&(n=this.oa),this.oa=null),t&&Ms(this,e,t,!0),n&&Ns(this,e,n,!0);var r=this.f,i=r.b.get("video");if(i)var a=r.c.periods[i.ia];else{var o=r.b.get("audio");a=o?r.c.periods[o.ia]:null}var s=t?t.audio:null;if(!a&&n){var l;if(l=s){e=n;var u=On(this.c.preferredTextLanguage),c=On(s.language),d=On(e.language);l=Pn(d,u)&&!Pn(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:n}:{variant:t,text:null}}catch(e){return this.Ma(e),{variant:null,text:null}}},r.Fe=function(){this.kb=!1,this.c.abr.enabled&&(this.l.enable(),Zs(this)),this.pa&&(lo(this.f,this.pa,this.Ud,this.Rd),qs(this),this.pa=null),this.oa&&(uo(this.f,this.oa,!0,0,!1),Xs(this),this.oa=null)},r.Ef=function(){this.s&&this.s.update&&this.s.update()},r.Jf=function(){this.m&&this.m.s()},r.Ma=function(e){if(this.i!=hl){var t=new we("error",{detail:e});this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)}};var hl=0,pl=1,ml=2,gl=3;function vl(e,t){var n=as(new is(e.wa(),e.ba()),t.periods[0],new vi(null,0)),r=t.appMetadata||{};return n=yl(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:r}}function yl(e){for(var t=[],n=Un.df(e.variants),r=(n=f(n)).next();!r.done;r=n.next())t.push(Un.Ed(r.value));for(n=(e=f(e.textStreams)).next();!n.done;n=e.next())t.push(Un.xc(n.value));return t}function bl(){this.a={}}function _l(e,t){var n=t.audio,r=t.video;if(n&&!r&&(e.a[n.id]=n.bandwidth||t.bandwidth),!n&&r&&(e.a[r.id]=r.bandwidth||t.bandwidth),n&&r){var i=n.bandwidth||393216,a=r.bandwidth||t.bandwidth-i;0>=a&&(a=t.bandwidth),e.a[n.id]=i,e.a[r.id]=a}}function Al(e,t){var n=e.a[t];return null==n&&(n=0),n}function El(e){this.a=!1,this.b=new ge,this.c=e}function Tl(e){var t=new Sl;e.periods.forEach((function(e,n){var r=Cl(e.variants);if(0==n)for(var i=(r=f(r.a)).next();!i.done;i=r.next())t.add(i.value);else!function(e,t){e.a=e.a.filter((function(e){return kl(t,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 kl(t,new wl(e))}))}function wl(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 Sl(){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 Cl(e){for(var t=new Sl,n=(e=f(e)).next();!n.done;n=e.next())t.add(new wl(n.value));return t}function xl(e){var t=this;if(e&&e.constructor!=xs)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 je),this.f=!1,this.c=[],this.g=[];var n=!e;this.h=new El((function(){return p((function e(){var r;return M(e,(function(e){switch(e.j){case 1:return r=function(){},w(e,Promise.all(t.g.map((function(e){return e.then(r,r)}))),2);case 2:if(!n){e.A(3);break}return w(e,t.b.destroy(),3);case 3:t.a=null,t.b=null,S(e)}}))}))}))}function Rl(){if(Ze())e:{for(var e=f($o.values()),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function Ll(e,t){for(var n=[],r=f(e.periods),i=r.next();!i.done;i=r.next())for(var a=(i=f(i.value.streams)).next();!a.done;a=i.next())a=a.value,t&&"video"==a.contentType?n.push({contentType:qe(a.mimeType,a.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=a.contentType||n.push({contentType:qe(a.mimeType,a.codecs),robustness:e.drmInfo.audioRobustness});return n}function Il(e,t,n){return p((function r(){return M(r,(function(r){switch(r.j){case 1:return w(r,function(e,t,n,r){return p((function i(){var a,o,s;return M(i,(function(i){switch(i.j){case 1:return r.drmInfo?(a=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()}(n),o=r.sessionIds.map((function(e){return{sessionId:e,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:Ll(r,!1),videoCapabilities:Ll(r,!0)}})),w(i,cs(t,e,o),2)):i.return();case 2:return s=i.o,w(i,a.remove(s),3);case 3:return w(i,a.add(o.filter((function(e){return-1==s.indexOf(e.sessionId)}))),0)}}))}))}(e.b,e.a.drm,n,t),0)}}))}))}function Pl(e,t,n,r){function i(){s+=1,e.a.offline.progressCallback(l,s/o)}var a=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}(r),o=a.length+1,s=0,l=vl(n,r);return Promise.all([t.removeSegments(a,i),t.removeManifests([n.key()],i)])}function jl(e,t,n,r,i,a){var o={id:a.id,originalId:a.originalId,primary:a.primary,presentationTimeOffset:a.presentationTimeOffset||0,contentType:a.type,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,kind:a.kind,language:a.language,label:a.label,width:a.width||null,height:a.height||null,initSegmentKey:null,encrypted:a.encrypted,keyId:a.keyId,segments:[],variantIds:[]};i=i.presentationTimeline.Ob();var s=a.id,l=a.initSegmentReference;return l&&(l=yi(l.c(),l.b,l.a,e.a.streaming.retryParameters),Oo(t,s,l,.5*Al(r,a.id),!0,(function(t){return p((function r(){var i;return M(r,(function(r){switch(r.j){case 1:return w(r,n.addSegments([{data:t}]),2);case 2:i=r.o,e.c.push(i[0]),o.initSegmentKey=i[0],S(r)}}))}))}))),function(e,t,n){for(var r=null==(t=e.findSegmentPosition(t))?null:e.getSegmentReference(t);r;)n(r),r=e.getSegmentReference(++t)}(a,i,(function(i){var l=yi(i.c(),i.b,i.a,e.a.streaming.retryParameters);Oo(t,s,l,function(e,t,n){return n=n.endTime-n.startTime,Al(e,t)*n}(r,a.id,i),!1,(function(t){return p((function r(){var a;return M(r,(function(r){switch(r.j){case 1:return w(r,n.addSegments([{data:t}]),2);case 2:a=r.o,e.c.push(a[0]),o.segments.push({startTime:i.startTime,endTime:i.endTime,dataKey:a[0]}),S(r)}}))}))}))})),o}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 n(){return M(n,(function(n){switch(n.j){case 1:return e.g.push(t),C(n,2),w(n,t,4);case 4:return n.return(n.o);case 2:L(n),Re(e.g,t),I(n,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 n=f(t),r=n.next();!r.done;r=n.next())for(var i=(r=f(t)).next();!i.done;i=r.next());for(n=(t=f(e)).next();!n.done;n=t.next())for(r=(n=f(e)).next();!r.done;r=n.next());}xs.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()})))},Sl.prototype.add=function(e){kl(this,e)||this.a.push(e)},V("shaka.offline.Storage",xl),xl.support=Rl,xl.prototype.destroy=function(){return this.h.destroy()},xl.prototype.destroy=xl.prototype.destroy,xl.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=bs(e,t));var n=e,r=!1;return null!=n.trackSelectionCallback&&(r=!0,n.offline=n.offline||{},n.offline.trackSelectionCallback=n.trackSelectionCallback,delete n.trackSelectionCallback),null!=n.progressCallback&&(r=!0,n.offline=n.offline||{},n.offline.progressCallback=n.progressCallback,delete n.progressCallback),null!=n.usePersistentLicense&&(r=!0,n.offline=n.offline||{},n.offline.usePersistentLicense=n.usePersistentLicense,delete n.usePersistentLicense),r&&Vn("Storage.configure with OfflineConfig","Please configure storage with a player configuration."),Es(this.a,e)},xl.prototype.configure=xl.prototype.configure,xl.prototype.getConfiguration=function(){var e=As();return Es(e,this.a,As()),e},xl.prototype.getConfiguration=xl.prototype.getConfiguration,xl.prototype.Mb=function(){return this.b},xl.prototype.getNetworkingEngine=xl.prototype.Mb,xl.prototype.store=function(e,t,n){var r=this;return Ml(this,function(e,t,n,r){return p((function i(){var a,o,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,w(i,function(e,t,n){return p((function r(){var i,a,o,s,l,u;return M(r,(function(r){switch(r.j){case 1:return i=null,a=e.b,o={networkingEngine:a,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){i=e}},w(r,n(),2);case 2:return(s=r.o).configure(e.a.manifest),Ol(e),C(r,3),w(r,s.start(t,o),5);case 5:return l=r.o,Ol(e),u=function(e){for(var t=new Set,n=(e=f(e.periods)).next();!n.done;n=e.next()){for(var r=f((n=n.value).textStreams),i=r.next();!i.done;i=r.next())t.add(i.value);for(n=f(n.variants),r=n.next();!r.done;r=n.next())(r=r.value).audio&&t.add(r.audio),r.video&&t.add(r.video)}return t}(l),w(r,Promise.all(Ye(u,(function(e){return e.createSegmentIndex()}))),6);case 6:if(Ol(e),i)throw i;return r.return(l);case 3:return L(r),w(r,s.stop(),7);case 7:I(r,0)}}))}))}(e,t,r),2));case 2:if(a=i.o,Ol(e),a.presentationTimeline.V()||a.presentationTimeline.Xa())throw new me(2,9,9005,t);return o=null,s=new Yo,u=l=null,k(i,3,4),w(i,function(e,t,n){return p((function r(){var i,a,o;return M(r,(function(r){switch(r.j){case 1:return i=new pt({ub:e.b,onError:n,qc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),a=Oa(t.periods),o=e.a,i.configure(o.drm),w(r,function(e,t,n){return e.s=[],e.D=n,gt(e,t)}(i,a,o.offline.usePersistentLicense),2);case 2:return w(r,vt(i),3);case 3:return w(r,yt(i),4);case 4:return r.return(i)}}))}))}(e,a,(function(e){u=u||e})),6);case 6:if(o=i.o,Ol(e),u)throw u;return w(i,function(e,t,n){return p((function r(){var i;return M(r,(function(r){switch(r.j){case 1:return i={width:1/0,height:1/0},function(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 Un.bd(e,t,n)}))}(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&&_n(e.audio)),e.video&&(t=t&&_n(e.video)),t}))}(t),function(e,t){for(var n=f(e.periods),r=n.next();!r.done;r=n.next())(r=r.value).variants=r.variants.filter((function(e){return Rt(t,e)}))}(t,n),Tl(t),w(r,function(e,t){return p((function n(){var r,i,a,o;return M(n,(function(n){switch(n.j){case 1:r=null,i=f(e.periods),a=i.next();case 2:if(a.done){n.A(0);break}return o=a.value,r&&(o.variants=o.variants.filter((function(e){return kl(r,new wl(e))}))),w(n,t(o),5);case 5:r=Cl(o.variants),a=i.next(),n.A(2)}}))}))}(t,(function(t){return p((function n(){var r,i,a,o,s,l,u,c;return M(n,(function(n){switch(n.j){case 1:r=Un,i=[];for(var d=f(t.variants),h=d.next();!h.done;h=d.next())a=h.value,i.push(r.Ed(a));for(h=(d=f(t.textStreams)).next();!h.done;h=d.next())o=h.value,i.push(r.xc(o));return w(n,e.a.offline.trackSelectionCallback(i),2);case 2:for(s=n.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)})),S(n)}}))}))})),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),S(r)}}))}))}(e,a,o),7);case 7:return w(i,s.init(),8);case 8:return Ol(e),w(i,function(e){var t=null;if(e.a.forEach((function(e,n){e.getCells().forEach((function(e,r){e.hasFixedKeySpace()||t||(t={path:{wa:n,ba:r},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),w(i,function(e,t,n,r,i,a){return p((function o(){var s,l,u,c,d,h,m,g,v,y;return M(o,(function(o){switch(o.j){case 1:return s=function(e,t,n){var r=null==t.expiration?1/0:t.expiration;return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.Y(),size:0,expiration:r,tracks:t=yl(t.periods[0]),appMetadata:n}}(i,r,a),l=r.periods.some((function(e){return e.variants.some((function(e){return e.drmInfos&&e.drmInfos.length}))})),u=r.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=n.a,d=Ul.get(h.keySystem)),m=new jo(e.b,(function(t,n){s.size=n,e.a.offline.progressCallback(s,t)}),(function(t,r){c&&e.a.offline.usePersistentLicense&&d==r&&bt(n,"cenc",t)})),C(o,2),v=g=function(e,t,n,r,i,a,o){var s=new bl,l=i.periods.map((function(r){return function(e,t,n,r,i,a){for(var o=f(a.variants),s=o.next();!s.done;s=o.next())_l(r,s.value);for(o=f(a.textStreams),s=o.next();!s.done;s=o.next())r.a[s.value.id]=52;o=function(e){for(var t=new Set,n=f(e.textStreams),r=n.next();!r.done;r=n.next())t.add(r.value);for(e=f(e.variants),n=e.next();!n.done;n=e.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video);return t}(a);var l=new Map;for(o=f(o),s=o.next();!s.done;s=o.next()){s=s.value;var u=jl(e,t,n,r,i,s);l.set(s.id,u)}return a.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:a.startTime,streams:Array.from(l.values())}}(e,t,n,s,i,r)})),u=r.a,c=e.a.offline.usePersistentLicense;return u&&c&&(u.initData=[]),{originalManifestUri:a,duration:i.presentationTimeline.Y(),size:0,expiration:r.Lb(),periods:l,sessionIds:c?Et(r):[],drmInfo:u,appMetadata:o}}(e,m,t,n,r,i,a),w(o,function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return w(t,Promise.all(e.b.values()),2);case 2:return t.return(e.a.a)}}))}))}(m),4);case 4:if(v.size=o.o,g.expiration=n.Lb(),y=Et(n),g.sessionIds=e.a.offline.usePersistentLicense?y:[],l&&e.a.offline.usePersistentLicense&&!y.length)throw new me(2,9,9007);return o.return(g);case 2:return L(o),w(o,m.destroy(),5);case 5:I(o,0)}}))}))}(e,l.ba,o,a,t,n),10);case 10:if(c=i.o,Ol(e),u)throw u;return w(i,l.ba.addManifests([c]),11);case 11:return d=i.o,Ol(e),h=new ns("manifest",l.path.wa,l.path.ba,d[0]),i.return(vl(h,c));case 4:return L(i),e.f=!1,e.c=[],w(i,s.destroy(),12);case 12:if(!o){i.A(13);break}return w(i,o.destroy(),13);case 13:I(i,0);break;case 3:if(m=R(i),!l){i.A(15);break}return w(i,l.ba.removeSegments(e.c,(function(){})),15);case 15:throw u||m}}))}))}(this,e,t||{},(function(){return p((function t(){var i,a;return M(t,(function(t){switch(t.j){case 1:return n&&"string"!=typeof n?(Vn("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),i=n,t.return(new i)):w(t,gi.create(e,r.b,r.a.manifest.retryParameters,n),2);case 2:return a=t.o,t.return(a)}}))}))})))},xl.prototype.store=xl.prototype.store,xl.prototype.kf=function(){return this.f},xl.prototype.getStoreInProgress=xl.prototype.kf,xl.prototype.remove=function(e){return Ml(this,function(e,t){return p((function n(){var r,i,a,o,s,l;return M(n,(function(n){switch(n.j){case 1:return Dl(),null==(r=rs(t))||"manifest"!=r.a?n.return(Promise.reject(new me(2,9,9004,t))):(i=r,a=new Yo,C(n,2),w(n,a.init(),4));case 4:return w(n,zo(a,i.wa(),i.ba()),5);case 5:return w(n,(o=n.o).getManifests([i.key()]),6);case 6:return s=n.o,l=s[0],w(n,Promise.all([Il(e,l,a),Pl(e,o,i,l)]),2);case 2:return L(n),w(n,a.destroy(),8);case 8:I(n,0)}}))}))}(this,e))},xl.prototype.remove=xl.prototype.remove,xl.prototype.Xf=function(){return Ml(this,function(e){return p((function t(){var n,r,i,a,o,s,l,u,c;return M(t,(function(t){switch(t.j){case 1:return Dl(),n=e.b,r=e.a.drm,i=new Yo,a=!1,C(t,2),w(t,i.init(),4);case 4:for(o=[],function(e,t){e.a.forEach((function(e){t(e.getEmeSessionCell())}))}(i,(function(e){return o.push(e)})),s=Promise.resolve(),l={},u=f(o),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,o;return M(t,(function(t){switch(t.j){case 1:return w(t,e.wc.getAll(),2);case 2:return i=t.o,w(t,cs(r,n,i),3);case 3:return o=t.o,w(t,e.wc.remove(o),4);case 4:o.length!=i.length&&(a=!0),S(t)}}))}))}}(l));return w(t,s,2);case 2:return L(t),w(t,i.destroy(),6);case 6:I(t,3);break;case 3:return t.return(!a)}}))}))}(this))},xl.prototype.removeEmeSessions=xl.prototype.Xf,xl.prototype.list=function(){return Ml(this,p((function e(){var t,n,r;return M(e,(function(e){switch(e.j){case 1:return Dl(),t=[],n=new Yo,C(e,2),w(e,n.init(),4);case 4:return r=Promise.resolve(),function(e,t){e.a.forEach((function(e,n){e.getCells().forEach((function(e,r){t({wa:n,ba:r},e)}))}))}(n,(function(e,n){r=r.then((function(){return p((function r(){return M(r,(function(r){switch(r.j){case 1:return w(r,n.getAllManifests(),2);case 2:r.o.forEach((function(n,r){var i=vl(new ns("manifest",e.wa,e.ba,r),n);t.push(i)})),S(r)}}))}))}))})),w(e,r,2);case 2:return L(e),w(e,n.destroy(),6);case 6:I(e,3);break;case 3:return e.return(t)}}))})))},xl.prototype.list=xl.prototype.list,xl.deleteAll=function(){return p((function e(){var t;return M(e,(function(e){switch(e.j){case 1:return t=new Yo,C(e,2),w(e,t.erase(),2);case 2:return L(e),w(e,t.destroy(),5);case 5:I(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");Is.offline=Rl,V("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 Vl(e,t){for(var n={priority:t=t||0,De:e},r=0;r<Kl.length;r++)if(Kl[r].priority<t)return void Kl.splice(r,0,n);Kl.push(n)}function Gl(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"==typeof Event)var n=new Event(t,e);else(n=document.createEvent("Event")).initEvent(t,e.bubbles,e.cancelable);e.target.dispatchEvent(n)}function Hl(e,t,n){if("input"==e)switch(this.type){case"range":e="change"}HTMLInputElement.prototype.originalAddEventListener.call(this,e,t,n)}function Yl(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(t){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];return(n=e.apply(this,n)).abort=function(){},n}}function zl(e,t){try{var n=new Wl(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function Wl(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(var n=f(t),r=n.next();!r.done;r=n.next()){var i=r.value;if("required"==i.persistentState)r=null;else{r={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label};var a=!1,o=!1;if(i.audioCapabilities)for(var s=f(i.audioCapabilities),l=s.next();!l.done;l=s.next())if((l=l.value).contentType){a=!0;var u=l.contentType.split(";")[0];WebKitMediaKeys.isTypeSupported(this.keySystem,u)&&(r.audioCapabilities.push(l),o=!0)}if(i.videoCapabilities)for(l=(i=f(i.videoCapabilities)).next();!l.done;l=i.next())(s=l.value).contentType&&(a=!0,l=s.contentType.split(";")[0],WebKitMediaKeys.isTypeSupported(this.keySystem,l)&&(r.videoCapabilities.push(s),o=!0));a||(o=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),r=o?r:null}if(r)return void(this.a=r)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}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 n=e.keyStatuses;n.size=null==t?0:1,n.a=t,e.dispatchEvent(new we("keystatuseschange"))}function eu(){this.size=0,this.a=void 0}function tu(e,t){try{var n=new nu(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function nu(e,t){this.keySystem=e;for(var n=!1,r=0;r<t.length;++r){var i=t[r],a={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label},o=!1;if(i.audioCapabilities)for(var s=0;s<i.audioCapabilities.length;++s){var l=i.audioCapabilities[s];if(l.contentType){o=!0;var u=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,u)&&(a.audioCapabilities.push(l),n=!0)}}if(i.videoCapabilities)for(s=0;s<i.videoCapabilities.length;++s)(l=i.videoCapabilities[s]).contentType&&(o=!0,u=l.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,u)&&(a.videoCapabilities.push(l),n=!0));if(o||(n=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),"required"==i.persistentState&&(n=!1),n)return void(this.a=a)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function ru(e){var t=this.mediaKeys;return t&&t!=e&&au(t,null),delete this.mediaKeys,(this.mediaKeys=e)?au(e,this):Promise.resolve()}function iu(e){this.a=new MSMediaKeys(e),this.b=new Be}function au(e,t){if(e.b.$a(),!t)return Promise.resolve();e.b.w(t,"msneedkey",su);var n=e;try{return 1<=t.readyState?t.msSetMediaKeys(e.a):t.addEventListener("loadedmetadata",(function e(){t.msSetMediaKeys(n.a),t.removeEventListener("loadedmetadata",e)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function ou(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 Fr(e);if(1>=t.data.length)return e;e=[];for(var n={},r=(t=f(t.data)).next();!r.done;n={lc:n.lc},r=t.next())n.lc=r.value,e.some(function(e){return function(t){return ht.za(t,e.lc)}}(n))||e.push(n.lc);return ht.concat.apply(ht,e instanceof Array?e:function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(f(e)))}(e.initData),this.dispatchEvent(t)}}function lu(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.a=t,e.dispatchEvent(new we("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.")}V("shaka.polyfill.register",Vl),Vl((function(){wc()}),-1),Vl((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",Gl),document.addEventListener("webkitfullscreenerror",Gl),document.addEventListener("mozfullscreenchange",Gl),document.addEventListener("mozfullscreenerror",Gl),document.addEventListener("MSFullscreenChange",Gl),document.addEventListener("MSFullscreenError",Gl)}})),Vl((function(){var t=!1;if(nt("CrKey"))t=!0;else try{e.indexedDB&&(t=!1)}catch(e){t=!0}t&&delete e.indexedDB})),Vl((function(){nt("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Hl)})),Vl((function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})})),Vl((function(){})),Vl((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(n){for(var r=n.split(/ *; */),i=r[0],a={},o=1;o<r.length;++o){var s=r[o].split("="),l=s[0];s=s[1].replace(/"(.*)"/,"$1"),a[l]=s}if(!(r=a.codecs))return e(n);var u=!1,c=!1;for(var d in n=r.split(",").filter((function(e){return t.test(e)&&(c=!0),/^(hev|hvc)1\.2/.test(e)&&(u=!0),!0})),c&&(u=!1),a.codecs=n.join(","),u&&(a.eotf="smpte2084"),a)i+="; "+d+'="'+a[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,n){return e.call(this,t,n-.001)}}()):Yl()):nt("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)},G(Jl,ke),(r=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},r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},r.update=function(e){this.c=new ge;try{this.b.update(new Uint8Array(e))}catch(e){this.c.reject(e)}return this.c},r.close=function(){try{this.b.close(),this.closed.resolve(),this.f.$a()}catch(e){this.closed.reject(e)}return this.closed},r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},r.og=function(e){this.a&&(this.a.resolve(),this.a=null),this.dispatchEvent(new we("message",{messageType:null==this.keyStatuses.a?"license-request":"license-renewal",message:e.message.buffer}))},r.mg=function(){this.c&&(Ql(this,"usable"),this.c.resolve(),this.c=null)},r.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")}},(r=eu.prototype).forEach=function(e){this.a&&e(this.a,Fl)},r.get=function(e){if(this.has(e))return this.a},r.has=function(e){var t=Fl;return!(!this.a||!ht.za(new Uint8Array(e),new Uint8Array(t)))},r.entries=function(){},r.keys=function(){},r.values=function(){},Vl((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)})),nu.prototype.createMediaKeys=function(){var e=new iu(this.keySystem);return Promise.resolve(e)},nu.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 ou(this.a,e)},iu.prototype.setServerCertificate=function(){return Promise.resolve(!1)},G(ou,ke),(r=ou.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},r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},r.update=function(e){this.b=new ge;try{this.c.update(new Uint8Array(e))}catch(e){this.b.reject(e)}return this.b},r.close=function(){try{this.c.close(),this.closed.resolve(),this.f.$a()}catch(e){this.closed.reject(e)}return this.closed},r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},r.If=function(e){this.a&&(this.a.resolve(),this.a=null),this.dispatchEvent(new we("message",{messageType:null==this.keyStatuses.a?"license-request":"license-renewal",message:e.message.buffer}))},r.Gf=function(){this.a?(lu(this,"usable"),this.a.resolve(),this.a=null):this.b&&(lu(this,"usable"),this.b.resolve(),this.b=null)},r.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")}},(r=uu.prototype).forEach=function(e){this.a&&e(this.a,Bl)},r.get=function(e){if(this.has(e))return this.a},r.has=function(e){var t=Bl;return!(!this.a||!ht.za(new Uint8Array(e),new Uint8Array(t)))},r.entries=function(){},r.keys=function(){},r.values=function(){},Vl((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=ru,e.MediaKeys=iu,e.MediaKeySystemAccess=nu,navigator.requestMediaKeySystemAccess=tu)})),fu.prototype.createSession=function(){},fu.prototype.setServerCertificate=function(){},hu.prototype.getConfiguration=function(){},hu.prototype.createMediaKeys=function(){},Vl((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 vu(e,t){try{var n=new bu(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function yu(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 n=!1;"org.w3.clearkey"==e&&(this.a="webkit-org.w3.clearkey",n=!1);var r=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video");for(var a=0;a<t.length;++a){var o=t[a],s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:o.initDataTypes,sessionTypes:["temporary"],label:o.label},l=!1;if(o.audioCapabilities)for(var u=0;u<o.audioCapabilities.length;++u){var c=o.audioCapabilities[u];if(c.contentType){l=!0;var d=c.contentType.split(";")[0];i.canPlayType(d,this.a)&&(s.audioCapabilities.push(c),r=!0)}}if(o.videoCapabilities)for(u=0;u<o.videoCapabilities.length;++u)(c=o.videoCapabilities[u]).contentType&&(l=!0,i.canPlayType(c.contentType,this.a)&&(s.videoCapabilities.push(c),r=!0));if(l||(r=i.canPlayType("video/mp4",this.a)||i.canPlayType("video/webm",this.a)),"required"==o.persistentState&&(n?(s.persistentState="required",s.sessionTypes=["persistent-license"]):r=!1),r)return void(this.b=s)}throw n="Unsupported keySystem","org.w3.clearkey"!=e&&"com.widevine.alpha"!=e||(n="None of the requested configurations were supported."),(n=Error(n)).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}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 n=mu;t&&(e.a.w(t,n+"needkey",e.Mf.bind(e)),e.a.w(t,n+"keymessage",e.rg.bind(e)),e.a.w(t,n+"keyadded",e.pg.bind(e)),e.a.w(t,n+"keyerror",e.qg.bind(e)))}function Eu(e,t){var n=e.f[t];return n||((n=e.c.shift())?(n.sessionId=t,e.f[t]=n):null)}function Tu(e,t,n){ke.call(this),this.f=e,this.h=!1,this.a=this.b=null,this.c=t,this.g=n,this.sessionId="",this.expiration=NaN,this.closed=new ge,this.keyStatuses=new ku}function wu(e,t,n){if(e.h)return Promise.reject(Error("The session is already initialized."));e.h=!0;try{if("persistent-license"==e.g)if(n)var r=new Uint8Array(ut("LOAD_SESSION|"+n));else{var i=ut("PERSISTENT|"),a=new Uint8Array(i.byteLength+t.byteLength);a.set(new Uint8Array(i),0),a.set(new Uint8Array(t),i.byteLength),r=a}else r=new Uint8Array(t)}catch(e){return Promise.reject(e)}e.b=new ge;var o=gu("generateKeyRequest");try{e.f[o](e.c,r)}catch(t){if("InvalidStateError"!=t.name)return e.b=null,Promise.reject(t);new fe((function(){try{e.f[o](e.c,r)}catch(t){e.b.reject(t),e.b=null}})).R(.01)}return e.b}function Su(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.a=t,e.dispatchEvent(new we("keystatuseschange"))}function ku(){this.size=0,this.a=void 0}function Cu(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 xu(){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 Lu(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function Iu(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function Pu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function ju(t,n,r){return new e.TextTrackCue(t,n,r)}function Ou(t,n,r){return new e.TextTrackCue(t+"-"+n+"-"+r,t,n,r)}function Du(){}bu.prototype.createMediaKeys=function(){var e=new _u(this.a);return Promise.resolve(e)},bu.prototype.getConfiguration=function(){return this.b},(r=_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},r.setServerCertificate=function(){return Promise.resolve(!1)},r.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)},r.rg=function(e){var t=Eu(this,e.sessionId);t&&(e=new we("message",{messageType:null==t.keyStatuses.a?"licenserequest":"licenserenewal",message:e.message}),t.b&&(t.b.resolve(),t.b=null),t.dispatchEvent(e))},r.pg=function(e){(e=Eu(this,e.sessionId))&&(Su(e,"usable"),e.a&&e.a.resolve(),e.a=null)},r.qg=function(e){var t=Eu(this,e.sessionId);t&&t.handleError(e)},G(Tu,ke),(r=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?Su(this,"output-restricted"):Su(this,1==t?"expired":"internal-error"))},r.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 n=ot(t),r=JSON.parse(n);"oct"!=r.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null),n=ht.Ba(r.keys[0].k),r=ht.Ba(r.keys[0].kid)}else n=new Uint8Array(t),r=null;var i=gu("addKey");try{this.f[i](this.c,n,r,this.sessionId)}catch(e){this.a.reject(e),this.a=null}}},r.generateRequest=function(e,t){return wu(this,t,null)},r.load=function(e){return"persistent-license"==this.g?wu(this,null,e):Promise.reject(Error("Not a persistent session."))},r.update=function(e){var t=new ge;return this.yd(t,e),t},r.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},r.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()},(r=ku.prototype).forEach=function(e){this.a&&e(this.a,pu)},r.get=function(e){if(this.has(e))return this.a},r.has=function(e){var t=pu;return!(!this.a||!ht.za(new Uint8Array(e),new Uint8Array(t)))},r.entries=function(){},r.keys=function(){},r.values=function(){},Vl((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=vu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=yu,e.MediaKeys=_u,e.MediaKeySystemAccess=bu}})),Vl((function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=xu,Object.defineProperty(t,"disablePictureInPicture",{get:Lu,set:Iu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Ru,document.addEventListener("webkitpresentationmodechanged",Cu,!0))}})),Vl((function(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch((function(){})),e}}})),Vl((function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in t&&(t.getVideoPlaybackQuality=Pu)}})),Vl((function(){if(!e.VTTCue&&e.TextTrackCue){var t=TextTrackCue.length;if(3==t)e.VTTCue=ju;else if(6==t)e.VTTCue=Ou;else{try{var n=!!ju(1,2,"")}catch(e){n=!1}n&&(e.VTTCue=ju)}}})),V("shaka.text.TtmlTextParser",Du),Du.prototype.parseInit=function(){},Du.prototype.parseInit=Du.prototype.parseInit,Du.prototype.parseMedia=function(e,t){var n=ot(e),r=[],i=new DOMParser,a=null;if(""==n)return r;try{a=i.parseFromString(n,"text/xml")}catch(e){throw new me(2,2,2005,"Failed to parse TTML.")}if(a){if(n=a.getElementsByTagName("parsererror")[0])throw new me(2,2,2005,n.textContent);if(!(i=a.getElementsByTagName("tt")[0]))throw new me(2,2,2005,"TTML does not contain <tt> tag.");var o=Br.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","frameRate"),s=Br.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","subFrameRate"),l=Br.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier"),u=Br.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","tickRate");if(a=i.getAttribute("xml:space")||"default",n=i.getAttribute("tts:extent"),"default"!=a&&"preserve"!=a)throw new me(2,2,2005,"Invalid xml:space value: "+a);a="default"==a,o=new ic(o,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,v=n,y=new cn,b=m.getAttribute("xml:id");b?(y.id=b,b=null,v&&(b=Uu.exec(v)||Bu.exec(v)),v=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))&&(y.width=null!=v?100*Number(h[1])/v:Number(h[1]),y.height=null!=b?100*Number(h[2])/b:Number(h[2]),y.widthUnits=p||null!=v?dn:0,y.heightUnits=p||null!=b?dn:0),(m=Qu(m,g,"origin"))&&null!=(h=(p=Uu.exec(m))||Bu.exec(m))&&(y.viewportAnchorX=null!=b?100*Number(h[1])/b:Number(h[1]),y.viewportAnchorY=null!=v?100*Number(h[2])/v:Number(h[2]),y.viewportAnchorUnits=p||null!=v?dn:0)):y=null,y&&c.push(y)}for(n=(n=i.getElementsByTagName("body")[0])?Array.from(n.querySelectorAll("[begin]")):[],i=(n=f(n)).next();!i.done;i=n.next())(i=Xu(i.value,t.periodStart,o,s,l,u,c,a,!1))&&r.push(i)}return r},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+)?$/,Vu=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Gu=/^(?:(\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:an,center:"center",right:"end",start:an,end:"end"},$u={left:"line-left",center:"center",right:"line-right"};function qu(e){var t=[];if(!e)return t;for(var n=f(e.childNodes),r=n.next();!r.done;r=n.next())(r=r.value).nodeType==Node.ELEMENT_NODE&&"br"!==r.nodeName&&(r=qu(r),t=t.concat(r));return t.length||t.push(e),t}function Xu(e,t,n,r,i,a,o,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=nc(e.getAttribute("begin"),n),c=nc(e.getAttribute("end"),n);var d=nc(e.getAttribute("dur"),n);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,n){for(var r="",i=f(t.childNodes),a=i.next();!a.done;a=i.next())"br"==(a=a.value).nodeName&&t.childNodes[0]!==a?r+="\n":a.childNodes&&0<a.childNodes.length?r+=e(a,n):r+=n?a=(a=a.textContent.trim()).replace(/\s+/g," "):a.textContent;return r}(e,s);else for(var h=f(e.childNodes),p=h.next();!p.done;p=h.next())(p=Xu(p.value,t,n,r,i,a,o,s,!0))&&l.push(p);if((t=new qt(u,c,d)).nestedCues=l,(a=tc(e,"region",a,"")[0])&&a.getAttribute("xml:id")){var m=a.getAttribute("xml:id");t.region=o.filter((function(e){return e.id==m}))[0]}return function(e,t,n,r,i){"rtl"==Zu(t,n,i,"direction")&&(e.direction="rtl");var a=Zu(t,n,i,"writingMode");if("tb"==a||"tblr"==a?e.writingMode="vertical-lr":"tbrl"==a?e.writingMode="vertical-rl":"rltb"==a||"rl"==a?e.direction="rtl":a&&(e.direction=tn),(a=Zu(t,n,i,"textAlign"))?(e.positionAlign=$u[a],e.lineAlign=Wu[a],e.textAlign=Zt[a.toUpperCase()]):e.textAlign="start",(a=Zu(t,n,i,"displayAlign"))&&(e.displayAlign=en[a.toUpperCase()]),(a=Zu(t,n,i,"color"))&&(e.color=a),(a=Zu(t,n,i,"backgroundColor"))&&(e.backgroundColor=a),(a=Zu(t,n,i,"fontFamily"))&&(e.fontFamily=a),(a=Zu(t,n,i,"fontWeight"))&&"bold"==a&&(e.fontWeight=700),(a=Zu(t,n,i,"wrapOption"))&&"noWrap"==a&&(e.wrapLine=!1),(a=Zu(t,n,i,"lineHeight"))&&a.match(Fu)&&(e.lineHeight=a),(a=Zu(t,n,i,"fontSize"))&&a.match(Fu)&&(e.fontSize=a),(a=Zu(t,n,i,"fontStyle"))&&(e.fontStyle=un[a.toUpperCase()]),r){a=r.getAttribute("imagetype");var o=r.getAttribute("encoding");r=r.textContent.trim(),"PNG"==a&&"Base64"==o&&r&&(e.backgroundImage="data:image/png;base64,"+r)}(n=Qu(n,i,"textDecoration"))&&Ju(e,n),(t=ec(t,i,"textDecoration"))&&Ju(e,t)}(t,e,a,r=tc(e,"smpte:backgroundImage",r,"#")[0],i),t}function Ju(e,t){for(var n=t.split(" "),r=0;r<n.length;r++)switch(n[r]){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,n,r){return(e=ec(e,n,r))?e:Qu(t,n,r)}function Qu(e,t,n){for(var r=qu(e),i=0;i<r.length;i++){var a=Br.getAttributeNS(r[i],"http://www.w3.org/ns/ttml#styling",n);if(a)return a}return(e=tc(e,"style",t,"")[0])?Br.getAttributeNS(e,"http://www.w3.org/ns/ttml#styling",n):null}function ec(e,t,n){var r=Br.getAttributeNS(e,"http://www.w3.org/ns/ttml#styling",n);if(r)return r;for(e=tc(e,"style",t,""),t=null,r=0;r<e.length;r++){var i=Br.getAttributeNS(e[r],"http://www.w3.org/ns/ttml#styling",n);i&&(t=i)}return t}function tc(e,t,n,r){var i=[];if(!e||1>n.length)return i;var a=e;for(e=null;a&&!(e=a.getAttribute(t))&&(a=a.parentNode)instanceof Element;);if(t=e)for(e=(t=f(t=t.split(" "))).next();!e.done;e=t.next()){e=e.value;for(var o=(a=f(n)).next();!o.done;o=a.next())if(r+(o=o.value).getAttribute("xml:id")==e){i.push(o);break}}return i}function nc(e,t){var n=null;if(Ku.test(e)){n=Ku.exec(e);var r=Number(n[1]),i=Number(n[2]),a=Number(n[3]),o=Number(n[4]);n=(a+=(o+=(Number(n[5])||0)/t.b)/t.frameRate)+60*i+3600*r}else Vu.test(e)?n=rc(Vu,e):Gu.test(e)?n=rc(Gu,e):Hu.test(e)?(n=Hu.exec(e),n=Number(n[1])/t.frameRate):Yu.test(e)?(n=Yu.exec(e),n=Number(n[1])/t.a):zu.test(e)&&(n=rc(zu,e));return n}function rc(e,t){var n=e.exec(t);return null==n||""==n[0]?null:(Number(n[4])||0)/1e3+(Number(n[3])||0)+60*(Number(n[2])||0)+3600*(Number(n[1])||0)}function ic(e,t,n,r){this.frameRate=Number(e)||30,this.b=Number(t)||1,this.a=Number(r),0==this.a&&(this.a=e?this.frameRate*this.b:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}function ac(){this.a=new Du}function oc(){}function sc(e,t,n){var r;(r=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=r[1],e.textAlign="middle"==t?Jt:Zt[t.toUpperCase()]):(r=/^vertical:(lr|rl)$/.exec(t))?e.writingMode="lr"==r[1]?"vertical-lr":"vertical-rl":(r=/^size:([\d.]+)%$/.exec(t))?e.size=Number(r[1]):(r=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(t))?(e.position=Number(r[1]),r[2]&&(t=r[2],e.positionAlign="line-left"==t||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center")):(r=/^region:(.*)$/.exec(t))?(t=function(e,t){var n=e.filter((function(e){return e.id==t}));return n.length?n[0]:null}(n,r[1]))&&(e.region=t):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=on[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=rn,e.line=Number(n[1]),n[2]&&(e.lineAlign=on[n[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]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function uc(){this.a=null}function cc(e,t,n){var r,i,a;return(new jr).H("payl",Mr((function(e){r=ot(e)}))).H("iden",Mr((function(e){i=ot(e)}))).H("sttg",Mr((function(e){a=ot(e)}))).parse(e),r?function(e,t,n,r,i){if(e=new qt(r,i,e),t&&(e.id=t),n)for(t=new Oi(n),n=Ni(t);n;)sc(e,n,[]),Di(t),n=Ni(t);return e}(r,i,a,t,n):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 In).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 In).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 In).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 In).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 Ln(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"==Fn(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": +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 n=this;return p((function r(){var i;return M(r,(function(r){switch(r.j){case 1:return console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),w(r,Mu.call(n,e,t),2);case 2:return Ec(i=r.o)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Mu,r.return(i)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=pc,r.return(pc.call(n,e,t)))}}))}))}function pc(e,t){var n=this;return p((function r(){var i,a,o,s,l,u,c,d;return M(r,(function(r){switch(r.j){case 1:console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),i=Ac(e),a=[];for(var h=f(t),p=h.next();!p.done;p=h.next())o=p.value,s=mc(o.videoCapabilities,i),l=mc(o.audioCapabilities,i),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!l.length||((u=Object.assign({},o)).videoCapabilities=s,u.audioCapabilities=l,a.push(u));if(!a.length)throw(c=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",c.code=DOMException.NOT_SUPPORTED_ERR,c;return w(r,Mu.call(n,e,a),2);case 2:return d=r.o,r.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 vc(){navigator.mediaCapabilities?(Nu=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=yc):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function yc(e){var t=this;return p((function n(){var r;return M(n,(function(n){switch(n.j){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),w(n,Nu.call(t,e),2);case 2:return r=n.o,e.keySystemConfiguration?Ec(r.keySystemAccess)?(console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Nu,n.return(r)):(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=bc,n.return(bc.call(t,e))):n.return(r)}}))}))}function bc(e){var t=this;return p((function n(){var r,i,a,o,s,l,u;return M(n,(function(n){switch(n.j){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),r=null,e.keySystemConfiguration&&(i=e.keySystemConfiguration,a=i.keySystem,o=i.audio&&i.audio.encryptionScheme,s=i.video&&i.video.encryptionScheme,r=Ac(a),l={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},o&&o!=r||s&&s!=r)?n.return(l):w(n,Nu.call(t,e),2);case 2:return(u=n.o).keySystemAccess&&(u.keySystemAccess=new _c(u.keySystemAccess,r)),n.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 wc(){fc(),vc()}pn["application/ttml+xml"]=Du,V("shaka.text.Mp4TtmlParser",ac),ac.prototype.parseInit=function(e){var t=!1;if((new jr).H("moov",Or).H("trak",Or).H("mdia",Or).H("minf",Or).H("stbl",Or).fa("stsd",Dr).H("stpp",(function(e){t=!0,e.parser.stop()})).parse(e),!t)throw new me(2,2,2007)},ac.prototype.parseInit=ac.prototype.parseInit,ac.prototype.parseMedia=function(e,t){var n=!1,r=[];if((new jr).H("mdat",Mr(function(e){n=!0,r=r.concat(this.a.parseMedia(e,t))}.bind(this))).parse(e),!n)throw new me(2,2,2007);return r},ac.prototype.parseMedia=ac.prototype.parseMedia,pn['application/mp4; codecs="stpp"']=ac,pn['application/mp4; codecs="stpp.ttml.im1t"']=ac,pn['application/mp4; codecs="stpp.TTML.im1t"']=ac,V("shaka.text.VttTextParser",oc),oc.prototype.parseInit=function(){},oc.prototype.parseInit=oc.prototype.parseInit,oc.prototype.parseMedia=function(e,t){var n=ot(e);if(n=(n=n.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m),!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new me(2,2,2e3);var r=t.segmentStart;if(null==r&&(r=0,n[0].includes("X-TIMESTAMP-MAP"))){var i=n[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),a=n[0].match(/MPEGTS:(\d+)/m);if(i&&a){if(null==(r=lc(new Oi(i[1]))))throw new me(2,2,2e3);r=t.periodStart+(Number(a[1])/9e4-r)}}a=[];var o=n[0].split("\n");for(i=1;i<o.length;i++)if(/^Region:/.test(o[i])){var s=new Oi(o[i]),l=new cn;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)}a.push(l)}for(i=[],s=1;s<n.length;s++){if(u=o=n[s].split("\n"),d=r,o=a,1==u.length&&!u[0]||/^NOTE($|[ \t])/.test(u[0])||"STYLE"==u[0])o=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,o),Di(c),d=Ni(c);null!=l&&(u.id=l),o=u}o&&i.push(o)}return i},oc.prototype.parseMedia=oc.prototype.parseMedia,pn["text/vtt"]=oc,pn['text/vtt; codecs="vtt"']=oc,V("shaka.text.Mp4VttParser",uc),uc.prototype.parseInit=function(e){var t=!1;if((new jr).H("moov",Or).H("trak",Or).H("mdia",Or).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",Or).H("stbl",Or).fa("stsd",Dr).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 n=this;if(!this.a)throw new me(2,2,2008);var r,i=0,a=[],o=[],s=!1,l=!1,u=!1,c=null;if((new jr).H("moof",Or).H("traf",Or).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,n=e.flags,r=(e=e.reader).G();1&n&&e.M(4),4&n&&e.M(4);for(var i=[],o=0;o<r;o++){var s={duration:null,sampleSize:null,Ad:null};256&n&&(s.duration=e.G()),512&n&&(s.sampleSize=e.G()),1024&n&&e.M(4),2048&n&&(s.Ad=0==t?e.G():e.ke()),i.push(s)}a=i})).H("mdat",Mr((function(e){u=!0,r=e}))).parse(e),!u&&!s&&!l)throw new me(2,2,2008);var d=i,f=new Lr(new DataView(r.buffer,r.byteOffset,r.byteLength),0);return a.forEach((function(e){var r=e.duration||c,a=e.Ad?i+e.Ad:d;d=a+(r||0);var s=0;do{var l=f.G();s+=l;var u=null;"vttc"==Ur(f.G())?8<l&&(u=f.Za(l-8)):f.M(l-8),r&&u&&o.push(cc(u,t.periodStart+a/n.a,t.periodStart+d/n.a))}while(e.sampleSize&&s<e.sampleSize)})),o.filter(Vt.Ia)},uc.prototype.parseMedia=uc.prototype.parseMedia,pn['application/mp4; codecs="wvtt"']=uc,V("shaka.util.Dom.createHTMLElement",(function(e){return document.createElement(e)})),V("shaka.util.Dom.createVideoElement",(function(){var e=document.createElement("video");return e.muted=!0,e.width=600,e.height=400,e})),V("shaka.util.Dom.asHTMLElement",(function(e){return e})),V("shaka.util.Dom.asHTMLMediaElement",(function(e){return e})),V("shaka.util.Dom.removeAllChildren",(function(e){for(;e.firstChild;)e.removeChild(e.firstChild)})),V("EmeEncryptionSchemePolyfill",dc),dc.install=fc,V("McEncryptionSchemePolyfill",gc),gc.install=vc,_c.prototype.getConfiguration=function(){var e=this.b.getConfiguration();if(e.videoCapabilities)for(var t=f(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.a;if(e.audioCapabilities)for(n=(t=f(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.a;return e},_c.prototype.createMediaKeys=function(){return this.b.createMediaKeys()},V("EncryptionSchemePolyfills",Tc),Tc.install=wc,n.Ne&&(n.Ne=Tc)}.call(i,r,r),i.shaka)t[a]=i.shaka[a]}()}).call(this,n(/*! ./../../webpack/buildin/global.js */"./node_modules/webpack/buildin/global.js"),n(/*! ./../../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": +/*! no static exports found */function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},"./node_modules/webpack/buildin/module.js": /*!***********************************!*\ !*** (webpack)/buildin/module.js ***! \***********************************/ @@ -1423,11 +1116,11 @@ function dc(){}function fc(){Mu?console.debug("EmeEncryptionSchemePolyfill: Alre /*!*******************************************!*\ !*** ./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(){var e=this.shakaPlayerInstance.getManifest();return e?e.presentationTimeline:null}},{key:"bandwidthEstimate",get:function(){if(this.shakaPlayerInstance)return this.shakaPlayerInstance.getStats().estimatedBandwidth}}],[{key:"canPlay",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";l.default.polyfill.installAll();var r=l.default.Player.isBrowserSupported(),n=e.split("?")[0].match(/.*\.(.*)$/)||[];return r&&("mpd"===n[1]||t.indexOf("application/dash+xml")>-1)}},{key:"Events",get:function(){return{SHAKA_READY:"shaka:ready"}}}]),o(t,[{key:"getProgramDateTime",value:function(){var e=this.presentationTimeline;return e?new Date(1e3*(e.getPresentationStartTime()+this.seekRange.start)):null}},{key:"_updateDvr",value:function(e){this.trigger(a.Events.PLAYBACK_DVR,e),this.trigger(a.Events.PLAYBACK_STATS_ADD,{dvr:e})}},{key:"seek",value:function(e){e<0&&(a.Log.warn("Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point."),e=this._duration),this.dvrEnabled&&this._updateDvr(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=this.getProgramDateTime();if(e){var t={current:this.getCurrentTime(),total:this.getDuration(),firstFragDateTime:e};this._lastTimeUpdate&&t.current===this._lastTimeUpdate.current&&t.total===this._lastTimeUpdate.total||(this._lastTimeUpdate=t,this.trigger(a.Events.PLAYBACK_TIMEUPDATE,t,this.name))}}}},{key:"_onBuffering",value:function(e){if(!this._stopped){var t=e.buffering?a.Events.PLAYBACK_BUFFERING:a.Events.PLAYBACK_BUFFERFULL;this.trigger(t)}}},{key:"_loaded",value:function(){this._onShakaReady(),this._startToSendStats(),this._fillLevels(),this._checkForClosedCaptions()}},{key:"_fillLevels",value:function(){0===this._levels.length&&(this._levels=this.videoTracks.slice(0).reverse(),this.trigger(a.Events.PLAYBACK_LEVELS_AVAILABLE,this.levels))}},{key:"_startToSendStats",value:function(){var e=this,t=this._options.shakaSendStatsInterval||3e4;this.sendStatsId=setInterval((function(){return e._sendStats()}),t)}},{key:"_sendStats",value:function(){this.trigger(a.Events.PLAYBACK_STATS_ADD,this._player.getStats())}},{key:"_setupError",value:function(e){this._onError(e)}},{key:"_onError",value:function(e){var r={shakaError:e,videoError:this.el.error},n=r.shakaError.detail||r.shakaError,o=n.category,s=n.code,u=n.severity;if(r.videoError||!s&&!o)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_onError",this).call(this);var c={code:o+"_"+s,description:"Category: "+o+", code: "+s+", severity: "+u,level:u===l.default.util.Error.Severity.CRITICAL?a.PlayerError.Levels.FATAL:a.PlayerError.Levels.WARN,raw:e},d=this.createError(c);a.Log.error("Shaka error event:",d),this.trigger(a.Events.PLAYBACK_ERROR,d)}},{key:"_onAdaptation",value:function(){var e=this.videoTracks.filter((function(e){return!0===e.active}))[0];this._fillLevels(),this._sendStats(),this._pendingAdaptationEvent&&(this.trigger(a.Events.PLAYBACK_LEVEL_SWITCH_END),this._pendingAdaptationEvent=!1),a.Log.debug("an adaptation has happened:",e),this.highDefinition=e.height>=720,this.trigger(a.Events.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(a.Events.PLAYBACK_BITRATE,{bandwidth:e.bandwidth,width:e.width,height:e.height,language:e.language,level:e.id,bitrate:e.videoBandwidth})}},{key:"_updateSettings",value:function(){"vod"===this.getPlaybackType()?this.settings.left=["playpause","position","duration"]:this.dvrEnabled?this.settings.left=["playpause"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(a.Events.PLAYBACK_SETTINGSUPDATE)}},{key:"_destroy",value:function(){this._isShakaReadyState=!1,a.Log.debug("shaka was destroyed")}},{key:"isReady",get:function(){return this._isShakaReadyState}},{key:"textTracks",get:function(){return this.isReady&&this._player.getTextTracks()}},{key:"audioLanguages",get:function(){return this.isReady&&this._player.getAudioLanguages()}},{key:"audioTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter((function(e){return e.mimeType.startsWith("audio/")}))}},{key:"videoTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter((function(e){return e.mimeType.startsWith("video/")}))}},{key:"closedCaptionsTracks",get:function(){var e=0;return(this.textTracks||[]).filter((function(e){return"subtitle"===e.kind})).map((function(t){return{id:e++,name:t.label||t.language,track:t}}))}},{key:"closedCaptionsTrackId",get:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"closedCaptionsTrackId",this)},set:function(e){if(this._player){var t=this.closedCaptionsTracks,r=void 0;if(-1!==e){if(!(r=t.find((function(t){return t.id===e}))))return void a.Log.warn('Track id "'+e+'" not found');if(this._shakaTTVisible&&!0===r.track.active)return void a.Log.info('Track id "'+e+'" already showing')}r?(this._player.selectTextTrack(r.track),this._player.setTextTrackVisibility(!0),this._enableShakaTextTrack(!0)):(this._player.setTextTrackVisibility(!1),this._enableShakaTextTrack(!1)),this._ccTrackId=e,this.trigger(a.Events.PLAYBACK_SUBTITLE_CHANGED,{id:e})}}}]),t}(a.HTML5Video);t.default=d,e.exports=t.default},clappr: +/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(r):void 0},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(/*! clappr */"clappr"),s=n(/*! shaka-player */"./node_modules/shaka-player/dist/shaka-player.compiled.js"),l=(r=s)&&r.__esModule?r:{default:r};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 n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=c(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r)));return a._levels=[],a._pendingAdaptationEvent=!1,a._isShakaReadyState=!1,a._minDvrSize=void 0===a.options.shakaMinimumDvrSize?60:a.options.shakaMinimumDvrSize,a}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),a(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 n=-1===this._currentLevelId;this.trigger(o.Events.PLAYBACK_LEVEL_SWITCH_START),n?(this._player.configure({abr:{enabled:!0}}),this.trigger(o.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(){var e=this.shakaPlayerInstance.getManifest();return e?e.presentationTimeline:null}},{key:"bandwidthEstimate",get:function(){if(this.shakaPlayerInstance)return this.shakaPlayerInstance.getStats().estimatedBandwidth}}],[{key:"canPlay",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";l.default.polyfill.installAll();var n=l.default.Player.isBrowserSupported(),r=e.split("?")[0].match(/.*\.(.*)$/)||[];return n&&("mpd"===r[1]||t.indexOf("application/dash+xml")>-1)}},{key:"Events",get:function(){return{SHAKA_READY:"shaka:ready"}}}]),a(t,[{key:"getProgramDateTime",value:function(){var e=this.presentationTimeline;return e?new Date(1e3*(e.getPresentationStartTime()+this.seekRange.start)):null}},{key:"_updateDvr",value:function(e){this.trigger(o.Events.PLAYBACK_DVR,e),this.trigger(o.Events.PLAYBACK_STATS_ADD,{dvr:e})}},{key:"seek",value:function(e){e<0&&(o.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(o.Events.PLAYBACK_READY,this.name)}},{key:"error",value:function(e){o.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(){o.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(o.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(),o.Log.error("shaka could not be destroyed")})):this._destroy(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"_setup",value:function(){var e=this;this._isShakaReadyState=!1,this._ccIsSetup=!1,this._player=this._createPlayer(),this._options.shakaConfiguration&&this._player.configure(this._options.shakaConfiguration),this._options.shakaOnBeforeLoad&&this._options.shakaOnBeforeLoad(this._player),this._player.load(this._options.src).then((function(){return e._loaded()})).catch((function(t){return e._setupError(t)}))}},{key:"_createPlayer",value:function(){var e=new l.default.Player(this.el);return e.addEventListener("error",this._onError.bind(this)),e.addEventListener("adaptation",this._onAdaptation.bind(this)),e.addEventListener("buffering",this._onBuffering.bind(this)),e}},{key:"_onTimeUpdate",value:function(){if(this.shakaPlayerInstance){var e=this.getProgramDateTime();if(e){var t={current:this.getCurrentTime(),total:this.getDuration(),firstFragDateTime:e};this._lastTimeUpdate&&t.current===this._lastTimeUpdate.current&&t.total===this._lastTimeUpdate.total||(this._lastTimeUpdate=t,this.trigger(o.Events.PLAYBACK_TIMEUPDATE,t,this.name))}}}},{key:"_onBuffering",value:function(e){if(!this._stopped){var t=e.buffering?o.Events.PLAYBACK_BUFFERING:o.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(o.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(o.Events.PLAYBACK_STATS_ADD,this._player.getStats())}},{key:"_setupError",value:function(e){this._onError(e)}},{key:"_onError",value:function(e){var n={shakaError:e,videoError:this.el.error},r=n.shakaError.detail||n.shakaError,a=r.category,s=r.code,u=r.severity;if(n.videoError||!s&&!a)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_onError",this).call(this);var c={code:a+"_"+s,description:"Category: "+a+", code: "+s+", severity: "+u,level:u===l.default.util.Error.Severity.CRITICAL?o.PlayerError.Levels.FATAL:o.PlayerError.Levels.WARN,raw:e},d=this.createError(c);o.Log.error("Shaka error event:",d),this.trigger(o.Events.PLAYBACK_ERROR,d)}},{key:"_onAdaptation",value:function(){var e=this.videoTracks.filter((function(e){return!0===e.active}))[0];this._fillLevels(),this._sendStats(),this._pendingAdaptationEvent&&(this.trigger(o.Events.PLAYBACK_LEVEL_SWITCH_END),this._pendingAdaptationEvent=!1),o.Log.debug("an adaptation has happened:",e),this.highDefinition=e.height>=720,this.trigger(o.Events.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(o.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(o.Events.PLAYBACK_SETTINGSUPDATE)}},{key:"_destroy",value:function(){this._isShakaReadyState=!1,o.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,n=void 0;if(-1!==e){if(!(n=t.find((function(t){return t.id===e}))))return void o.Log.warn('Track id "'+e+'" not found');if(this._shakaTTVisible&&!0===n.track.active)return void o.Log.info('Track id "'+e+'" already showing')}n?(this._player.selectTextTrack(n.track),this._player.setTextTrackVisibility(!0),this._enableShakaTextTrack(!0)):(this._player.setTextTrackVisibility(!1),this._enableShakaTextTrack(!1)),this._ccTrackId=e,this.trigger(o.Events.PLAYBACK_SUBTITLE_CHANGED,{id:e})}}}]),t}(o.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],C=k||A(m),x=m?T?A("entries"):C: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,C=function(){return k.call(this)}),n&&!y||!f&&!S&&w[d]||a(w,d,C),s[t]=C,s[E]=h,m)if(v={values:T?C:A("values"),keys:g?C:A("keys"),entries:x},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),C=r(37),x=r(2),R=r(20),L=k.f,j=x.f,P=w.f,I=n.Symbol,O=n.JSON,D=O&&O.stringify,M=h("_hidden"),N=h("toPrimitive"),F={}.propertyIsEnumerable,U=c("symbol-registry"),B=c("symbols"),K=c("op-symbols"),G=Object.prototype,V="function"==typeof I&&!!C.f,H=n.QObject,Y=!H||!H.prototype||!H.prototype.findChild,z=o&&u((function(){return 7!=S(j({},"a",{get:function(){return j(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=L(G,t);n&&delete G[t],j(e,t,r),n&&e!==G&&j(G,t,n)}:j,W=function(e){var t=B[e]=S(I.prototype);return t._k=e,t},$=V&&"symbol"==typeof I.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof I},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)||j(e,M,T(1,{})),e[M][t]=!0),z(e,t,r)):j(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=F.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=L(e,t);return!r||!i(B,t)||i(e,M)&&e[M][t]||(r.enumerable=!0),r}},Q=function(e){for(var t,r=P(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=P(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((I=function(){if(this instanceof I)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,x.f=q,r(38).f=w.f=Q,r(27).f=J,C.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:I});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(U,e+="")?U[e]:U[e]=I(e)},keyFor:function(e){if(!$(e))throw TypeError(e+" is not a symbol!");for(var t in U)if(U[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(){C.f(1)}));a(a.S+a.F*oe,"Object",{getOwnPropertySymbols:function(e){return C.f(_(e))}}),O&&a(a.S+a.F*(!V||u((function(){var e=I();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)}}),I.prototype[N]||r(5)(I.prototype,N,I.prototype.valueOf),d(I,"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": +/*! no static exports found */function(t,n){t.exports=e}})},e.exports=r(n(0))},function(e,t,n){var r;"undefined"!=typeof self&&self,r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="<%=baseUrl%>/",n(n.s=40)}([function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(10),i=n(29),a=n(15),o=Object.defineProperty;t.f=n(3)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(11)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(2),i=n(12);e.exports=n(3)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(56),i=n(17);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(22)("wks"),i=n(14),a=n(0).Symbol,o="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=r},function(e,t,n){var r=n(0),i=n(1),a=n(28),o=n(5),s=n(4),l=function(e,t,n){var u,c,d,f=e&l.F,h=e&l.G,p=e&l.S,m=e&l.P,g=e&l.B,v=e&l.W,y=h?i:i[t]||(i[t]={}),b=y.prototype,_=h?r:p?r[t]:(r[t]||{}).prototype;for(u in h&&(n=t),n)(c=!f&&_&&void 0!==_[u])&&s(y,u)||(d=c?_[u]:n[u],y[u]=h&&"function"!=typeof _[u]?n[u]:g&&c?a(d,r):v&&_[u]==d?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):m&&"function"==typeof d?a(Function.call,d):d,m&&((y.virtual||(y.virtual={}))[u]=d,e&l.R&&b&&!b[u]&&o(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,n){var r=n(6);e.exports=function(e){if(!r(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 n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(6);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(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,n){var r=n(10),i=n(55),a=n(23),o=n(21)("IE_PROTO"),s=function(){},l=function(){var e,t=n(30)("iframe"),r=a.length;for(t.style.display="none",n(60).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;r--;)delete l.prototype[a[r]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[o]=e):n=l(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(34),i=n(23);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(22)("keys"),i=n(14);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(1),i=n(0),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(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,n){var r=n(2).f,i=n(4),a=n(8)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){t.f=n(8)},function(e,t,n){var r=n(0),i=n(1),a=n(13),o=n(25),s=n(2).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:o.f(e)})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(48);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){e.exports=!n(3)&&!n(11)((function(){return 7!=Object.defineProperty(n(30)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(6),i=n(0).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(50)),i=o(n(66)),a="function"==typeof i.default&&"symbol"==typeof r.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 o(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof i.default&&"symbol"===a(r.default)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":a(e)}},function(e,t,n){"use strict";var r=n(13),i=n(9),a=n(33),o=n(5),s=n(18),l=n(54),u=n(24),c=n(61),d=n(8)("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,p,m,g,v){l(n,t,p);var y,b,_,A=function(e){if(!f&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",T="values"==m,w=!1,S=e.prototype,k=S[d]||S["@@iterator"]||m&&S[m],C=k||A(m),x=m?T?A("entries"):C:void 0,R="Array"==t&&S.entries||k;if(R&&(_=c(R.call(new e)))!==Object.prototype&&_.next&&(u(_,E,!0),r||"function"==typeof _[d]||o(_,d,h)),T&&k&&"values"!==k.name&&(w=!0,C=function(){return k.call(this)}),r&&!v||!f&&!w&&S[d]||o(S,d,C),s[t]=C,s[E]=h,m)if(y={values:T?C:A("values"),keys:g?C:A("keys"),entries:x},v)for(b in y)b in S||a(S,b,y[b]);else i(i.P+i.F*(f||w),t,y);return y}},function(e,t,n){e.exports=n(5)},function(e,t,n){var r=n(4),i=n(7),a=n(57)(!1),o=n(21)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),l=0,u=[];for(n in s)n!=o&&r(s,n)&&u.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~a(u,n)||u.push(n));return u}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(17);e.exports=function(e){return Object(r(e))}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(34),i=n(23).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(27),i=n(12),a=n(7),o=n(15),s=n(4),l=n(29),u=Object.getOwnPropertyDescriptor;t.f=n(3)?u:function(e,t){if(e=a(e),t=o(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(41),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},function(e,t,n){"use strict";(function(r){Object.defineProperty(t,"__esModule",{value:!0});var i=d(n(43)),a=d(n(44)),o=d(n(49)),s=d(n(76)),l=n(84),u=d(n(85)),c=d(n(86));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(){return(0,i.default)(this,t),(0,o.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(),r.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 n=this.core.options&&this.core.options.levelSelectorConfig&&this.core.options.levelSelectorConfig.onLevelsAvailable;if(n){if("function"!=typeof n)throw new TypeError("onLevelsAvailable must be a function");e=n(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,n=t?this.core.options.levelSelectorConfig.labels:{};if(e||t){var r=void 0,i=void 0;for(var a in this.levels)i=n[(r=this.levels[a]).id],e?r.label=e(r,i):i&&(r.label=i)}}},t.prototype.findLevelBy=function(e){var t=void 0;return this.levels.forEach((function(n){n.id===e&&(t=n)})),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(n){n.language!=t&&e.levelElement(n.id).addClass("hidden")})))},(0,a.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,n(42))},function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();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(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.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 n=1;n<arguments.length;n++)t[n-1]=arguments[n];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,n){"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,n){"use strict";t.__esModule=!0;var r,i=n(45),a=(r=i)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,a.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t,n){e.exports={default:n(46),__esModule:!0}},function(e,t,n){n(47);var r=n(1).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},function(e,t,n){var r=n(9);r(r.S+r.F*!n(3),"Object",{defineProperty:n(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,n){"use strict";t.__esModule=!0;var r,i=n(31),a=(r=i)&&r.__esModule?r:{default:r};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,a.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){e.exports={default:n(51),__esModule:!0}},function(e,t,n){n(52),n(62),e.exports=n(25).f("iterator")},function(e,t,n){"use strict";var r=n(53)(!0);n(32)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(16),i=n(17);e.exports=function(e){return function(t,n){var a,o,s=String(i(t)),l=r(n),u=s.length;return l<0||l>=u?e?"":void 0:(a=s.charCodeAt(l))<55296||a>56319||l+1===u||(o=s.charCodeAt(l+1))<56320||o>57343?e?s.charAt(l):a:e?s.slice(l,l+2):o-56320+(a-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(19),i=n(12),a=n(24),o={};n(5)(o,n(8)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(o,{next:i(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var r=n(2),i=n(10),a=n(20);e.exports=n(3)?Object.defineProperties:function(e,t){i(e);for(var n,o=a(t),s=o.length,l=0;s>l;)r.f(e,n=o[l++],t[n]);return e}},function(e,t,n){var r=n(35);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(7),i=n(58),a=n(59);e.exports=function(e){return function(t,n,o){var s,l=r(t),u=i(l.length),c=a(o,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var r=n(16),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(16),i=Math.max,a=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):a(e,t)}},function(e,t,n){var r=n(0).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(4),i=n(36),a=n(21)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,n){n(63);for(var r=n(0),i=n(5),a=n(18),o=n(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=r[u],d=c&&c.prototype;d&&!d[o]&&i(d,o,u),a[u]=a.Array}},function(e,t,n){"use strict";var r=n(64),i=n(65),a=n(18),o=n(7);e.exports=n(32)(Array,"Array",(function(e,t){this._t=o(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(67),__esModule:!0}},function(e,t,n){n(68),n(73),n(74),n(75),e.exports=n(1).Symbol},function(e,t,n){"use strict";var r=n(0),i=n(4),a=n(3),o=n(9),s=n(33),l=n(69).KEY,u=n(11),c=n(22),d=n(24),f=n(14),h=n(8),p=n(25),m=n(26),g=n(70),v=n(71),y=n(10),b=n(6),_=n(36),A=n(7),E=n(15),T=n(12),w=n(19),S=n(72),k=n(39),C=n(37),x=n(2),R=n(20),L=k.f,I=x.f,P=S.f,j=r.Symbol,O=r.JSON,D=O&&O.stringify,M=h("_hidden"),N=h("toPrimitive"),U={}.propertyIsEnumerable,F=c("symbol-registry"),B=c("symbols"),K=c("op-symbols"),V=Object.prototype,G="function"==typeof j&&!!C.f,H=r.QObject,Y=!H||!H.prototype||!H.prototype.findChild,z=a&&u((function(){return 7!=w(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=L(V,t);r&&delete V[t],I(e,t,n),r&&e!==V&&I(V,t,r)}:I,W=function(e){var t=B[e]=w(j.prototype);return t._k=e,t},$=G&&"symbol"==typeof j.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof j},q=function(e,t,n){return e===V&&q(K,t,n),y(e),t=E(t,!0),y(n),i(B,t)?(n.enumerable?(i(e,M)&&e[M][t]&&(e[M][t]=!1),n=w(n,{enumerable:T(0,!1)})):(i(e,M)||I(e,M,T(1,{})),e[M][t]=!0),z(e,t,n)):I(e,t,n)},X=function(e,t){y(e);for(var n,r=g(t=A(t)),i=0,a=r.length;a>i;)q(e,n=r[i++],t[n]);return e},J=function(e){var t=U.call(this,e=E(e,!0));return!(this===V&&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!==V||!i(B,t)||i(K,t)){var n=L(e,t);return!n||!i(B,t)||i(e,M)&&e[M][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=P(A(e)),r=[],a=0;n.length>a;)i(B,t=n[a++])||t==M||t==l||r.push(t);return r},ee=function(e){for(var t,n=e===V,r=P(n?K:A(e)),a=[],o=0;r.length>o;)!i(B,t=r[o++])||n&&!i(V,t)||a.push(B[t]);return a};G||(s((j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===V&&t.call(K,n),i(this,M)&&i(this[M],e)&&(this[M][e]=!1),z(this,e,T(1,n))};return a&&Y&&z(V,e,{configurable:!0,set:t}),W(e)}).prototype,"toString",(function(){return this._k})),k.f=Z,x.f=q,n(38).f=S.f=Q,n(27).f=J,C.f=ee,a&&!n(13)&&s(V,"propertyIsEnumerable",J,!0),p.f=function(e){return W(h(e))}),o(o.G+o.W+o.F*!G,{Symbol:j});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)h(te[ne++]);for(var re=R(h.store),ie=0;re.length>ie;)m(re[ie++]);o(o.S+o.F*!G,"Symbol",{for:function(e){return i(F,e+="")?F[e]:F[e]=j(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}}),o(o.S+o.F*!G,"Object",{create:function(e,t){return void 0===t?w(e):X(w(e),t)},defineProperty:q,defineProperties:X,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:ee});var ae=u((function(){C.f(1)}));o(o.S+o.F*ae,"Object",{getOwnPropertySymbols:function(e){return C.f(_(e))}}),O&&o(o.S+o.F*(!G||u((function(){var e=j();return"[null]"!=D([e])||"{}"!=D({a:e})||"{}"!=D(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(b(t)||void 0!==e)&&!$(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!$(t))return t}),r[1]=t,D.apply(O,r)}}),j.prototype[N]||n(5)(j.prototype,N,j.prototype.valueOf),d(j,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},function(e,t,n){var r=n(14)("meta"),i=n(6),a=n(4),o=n(2).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(11)((function(){return l(Object.preventExtensions({}))})),c=function(e){o(e,r,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!a(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return u&&d.NEED&&l(e)&&!a(e,r)&&c(e),e}}},function(e,t,n){var r=n(20),i=n(37),a=n(27);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var o,s=n(e),l=a.f,u=0;s.length>u;)l.call(e,o=s[u++])&&t.push(o);return t}},function(e,t,n){var r=n(35);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(7),i=n(38).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?function(e){try{return i(e)}catch(e){return o.slice()}}(e):i(r(e))}},function(e,t){},function(e,t,n){n(26)("asyncIterator")},function(e,t,n){n(26)("observable")},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(77)),i=o(n(81)),a=o(n(31));function o(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,a.default)(t)));e.prototype=(0,i.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t,n){e.exports={default:n(78),__esModule:!0}},function(e,t,n){n(79),e.exports=n(1).Object.setPrototypeOf},function(e,t,n){var r=n(9);r(r.S,"Object",{setPrototypeOf:n(80).set})},function(e,t,n){var r=n(6),i=n(10),a=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(28)(Function.call,n(39).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:a}},function(e,t,n){e.exports={default:n(82),__esModule:!0}},function(e,t,n){n(83);var r=n(1).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(9);r(r.S,"Object",{create:n(19)})},function(t,n){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,n){var r=n(87);"string"==typeof r&&(r=[[e.i,r,""]]),n(89)(r,{singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(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 n=function(e,t){var n,r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var a=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),o=i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}));return[r].concat(o).concat([a]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var a=this[i][0];"number"==typeof a&&(r[a]=!0)}for(i=0;i<e.length;i++){var o=e[i];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),t.push(o))}},t}},function(e,t){var n={},r=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}},i=r((function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())})),a=r((function(){return document.head||document.getElementsByTagName("head")[0]})),o=null,s=0;function l(e,t){for(var r=0;r<e.length;r++){var i=e[r],a=n[i.id];if(a){a.refs++;for(var o=0;o<a.parts.length;o++)a.parts[o](i.parts[o]);for(;o<i.parts.length;o++)a.parts.push(d(i.parts[o],t))}else{var s=[];for(o=0;o<i.parts.length;o++)s.push(d(i.parts[o],t));n[i.id]={id:i.id,refs:1,parts:s}}}}function u(e){for(var t=[],n={},r=0;r<e.length;r++){var i=e[r],a=i[0],o={css:i[1],media:i[2],sourceMap:i[3]};n[a]?n[a].parts.push(o):t.push(n[a]={id:a,parts:[o]})}return t}function c(){var e=document.createElement("style"),t=a();return e.type="text/css",t.appendChild(e),e}function d(e,t){var n,r,i,l,u;if(t.singleton){var d=s++;n=o||(o=c()),r=p.bind(null,n,d,!1),i=p.bind(null,n,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=a(),l.rel="stylesheet",u.appendChild(l),n=l,r=g.bind(null,n),i=function(){n.parentNode.removeChild(n),n.href&&URL.revokeObjectURL(n.href)}):(n=c(),r=m.bind(null,n),i=function(){n.parentNode.removeChild(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(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 r=u(e);return l(r,t),function(e){for(var i=[],a=0;a<r.length;a++){var o=r[a];(s=n[o.id]).refs--,i.push(s)}for(e&&l(u(e),t),a=0;a<i.length;a++){var s;if(0===(s=i[a]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete n[s.id]}}}};var f,h=(f=[],function(e,t){return f[e]=t,f.filter(Boolean).join("\n")});function p(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=h(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function m(e,t){var n=t.css,r=t.media;if(t.sourceMap,r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function g(e,t){var n=t.css,r=(t.media,t.sourceMap);r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(i),a&&URL.revokeObjectURL(a)}}])},e.exports=r(n(0))},function(module,exports,__webpack_require__){var factory;window,factory=function(__WEBPACK_EXTERNAL_MODULE_clappr__){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./src/main.js")}({"./node_modules/css-loader/dist/runtime/api.js": /*!*****************************************************!*\ !*** ./node_modules/css-loader/dist/runtime/api.js ***! \*****************************************************/ @@ -1447,5 +1140,5 @@ function dc(){}function fc(){Mu?console.debug("EmeEncryptionSchemePolyfill: Alre /*!******************************************************************************************!*\ !*** 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};n(i,o);e.exports=i.locals||{}},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}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]{height:40px}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar]{height:2px;background-color:#ccc}.player-poster[data-poster] .play-wrapper[data-poster] svg path{fill:#ccc}.spinner-three-bounce[data-spinner]>div{background-color:#ccc}.clappr-watermark[data-watermark]{transition:opacity 0.5s ease-out;width:8%;min-width:50px;max-width:100px}.clappr-watermark[data-watermark].clappr-watermark-hide{opacity:0}.clappr-watermark[data-watermark-top-left]{top:0px;left:15px;text-align:left}@media (min-width: 768px){.clappr-watermark[data-watermark-top-left]{top:10px;left:30px}}\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";r.r(t),r.d(t,"Player",(function(){return L})),r.d(t,"Mediator",(function(){return n.Mediator})),r.d(t,"Events",(function(){return n.Events})),r.d(t,"Browser",(function(){return n.Browser})),r.d(t,"PlayerInfo",(function(){return n.PlayerInfo})),r.d(t,"MediaControl",(function(){return n.MediaControl})),r.d(t,"ContainerPlugin",(function(){return n.ContainerPlugin})),r.d(t,"UIContainerPlugin",(function(){return n.UIContainerPlugin})),r.d(t,"CorePlugin",(function(){return n.CorePlugin})),r.d(t,"UICorePlugin",(function(){return n.UICorePlugin})),r.d(t,"Playback",(function(){return n.Playback})),r.d(t,"Container",(function(){return n.Container})),r.d(t,"Core",(function(){return n.Core})),r.d(t,"PlayerError",(function(){return n.PlayerError})),r.d(t,"Loader",(function(){return n.Loader})),r.d(t,"BaseObject",(function(){return n.BaseObject})),r.d(t,"UIObject",(function(){return n.UIObject})),r.d(t,"Utils",(function(){return n.Utils})),r.d(t,"BaseFlashPlayback",(function(){return n.BaseFlashPlayback})),r.d(t,"Flash",(function(){return n.Flash})),r.d(t,"FlasHLS",(function(){return n.FlasHLS})),r.d(t,"HLS",(function(){return n.HLS})),r.d(t,"HTML5Audio",(function(){return n.HTML5Audio})),r.d(t,"HTML5Video",(function(){return n.HTML5Video})),r.d(t,"HTMLImg",(function(){return n.HTMLImg})),r.d(t,"NoOp",(function(){return n.NoOp})),r.d(t,"ClickToPausePlugin",(function(){return n.ClickToPausePlugin})),r.d(t,"DVRControls",(function(){return n.DVRControls})),r.d(t,"Favicon",(function(){return n.Favicon})),r.d(t,"Log",(function(){return n.Log})),r.d(t,"Poster",(function(){return n.Poster})),r.d(t,"SpinnerThreeBouncePlugin",(function(){return n.SpinnerThreeBouncePlugin})),r.d(t,"WaterMarkPlugin",(function(){return n.WaterMarkPlugin})),r.d(t,"Styler",(function(){return n.Styler})),r.d(t,"Vendor",(function(){return n.Vendor})),r.d(t,"version",(function(){return n.version})),r.d(t,"template",(function(){return n.template})),r.d(t,"$",(function(){return n.$}));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);r(4);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){var t=function(){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}}();return function(){var r,n=v(e);if(t){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return y(this,r)}}function y(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 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)}(r,e);var t=g(r);function r(){var e;f(this,r);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).timeout=1,e.max_timeout=10,e}return p(r,[{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(r,[{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(e){var t=i.a.$;this.hide();var r=e&&e.title||"Oh no, we encountered an error",n=e&&e.subtitle||"Please reload the page";this._err=t("<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 o=t("<div>").css({position:"absolute",width:"100%","padding-bottom":"5%",bottom:0}).append(t("<h2>").text(r).css({"font-size":"2em"})).append(t("<p>").text(n).css({"font-size":"1.2em",margin:"15px"}));this._err.append(o),this.container&&this.container.$el.prepend(this._err)}},{key:"onError",value:function(e){var t=this;if(this.container){var r=this.options.errorPlugin.onError,n=null;r&&"function"==typeof r&&(n=r(e,(function(){t.hide(),t.container.getPlugin("click_to_pause").enable()}))),this.show(n),this.container.getPlugin("click_to_pause").disable()}}}]),r}(i.a.ContainerPlugin),_=function(e){return function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};new Headers;return fetch("https://media.ccc.de/graphql",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({operationName:e,query:t,variables:r})}).then((function(e){var t=e.body.getReader(),r="",n=new TextDecoder("utf-8");return t.read().then((function e(i){var o=i.done,a=i.value;return o?JSON.parse(r):(r+=n.decode(a),t.read().then(e))}))}))}("LectureBySlug",'\n query LectureBySlug {\n lectureBySlug(slug: "'.concat(e,'") {\n originalLanguage\n videos {\n label\n url\n mimeType\n }\n }\n }\n ')).then((function(e){if(!e.data.lectureBySlug)throw new Error("Lecture could not be found");return e.data.lectureBySlug.videos.map((function(e){var t=e.label,r=e.url;return{label:t,mimeType:e.mimeType,source:r}}))}))};function A(e){return(A="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 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)}}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return w(this,r)}}function w(e,t){return!t||"object"!==A(t)&&"function"!=typeof t?k(e):t}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=function(e,t){return"dash_shaka_playback"==e.origin&&(e.raw.code==t||e.raw.detail&&e.raw.detail.code==t)},R=function(e,t){return"hls"==e.origin&&e.raw.response.code==t},L=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&&T(e,t)}(s,e);var t,r,i,o=S(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=o.call(this)).timeout=5,t.maxTimeout=15,t._playerPromise=t._getConfig(e).then((function(e){return t._options=e,t._player=new n.Player(t._options),t._player.core&&t._player.core.isReady?t._addEventListeners():t.listenToOnce(t._player,n.Events.PLAYER_READY,t._addEventListeners.bind(k(t))),t._player})),t}return t=s,(r=[{key:"attachTo",value:function(){var e=arguments;this._playerPromise.then((function(t){t.attachTo.apply(t,e)}))}},{key:"_getConfig",value:function(e){var t=[c.a,l.a,a.a,b];e.plugins&&e.plugins.length&&(t=t.concat(e.plugins),console.log("loading plugins"),t.forEach((function(e){return console.log(e.name,e.type)})));var r,n,i,o,s,u,d,f=Promise.resolve({});return e.vocStream?(n=e.vocStream,i=e.audioOnly,o=e.preferredAudioLanguage,s=this._handleError.bind(this),u="MediaSource"in window,d={levelSelectorConfig:{labelCallback:function(e){var t=e.videoBandwidth||e.level.bitrate;return t<=1e5?"Slides":t<=8e5?"SD":"HD"},title:"Quality"},disableErrorScreen:!0,errorPlugin:{onError:s}},-1==navigator.userAgent.indexOf("Firefox")&&u&&MediaSource.isTypeSupported('video/webm; codecs="vp9,opus"')?(d.source={source:"//cdn.c3voc.de/dash/".concat(n,"/manifest.mpd")},d.shakaConfiguration={preferredAudioLanguage:o,abr:{defaultBandwidthEstimate:1e6},streaming:{jumpLargeGaps:!0},manifest:{dash:{defaultPresentationDelay:3,ignoreSuggestedPresentationDelay:!0}}}):i||!u&&""==document.createElement("video").canPlayType("application/vnd.apple.mpegURL")?d.source=i?{source:"//cdn.c3voc.de/".concat(n,"_native.mp3"),mimeType:"audio/mp3"}:{source:"//cdn.c3voc.de/".concat(n,"_native_hd.webm"),mimeType:"video/webm"}:d.source={source:"//cdn.c3voc.de/hls/".concat(n,"/native_hd.m3u8"),mimeType:"application/vnd.apple.mpegURL"},f=Promise.resolve(d)):e.vocLecture&&(r=e.vocLecture,f=_(r).then((function(e){return{sources:e,levelSelectorConfig:{labelCallback:function(e,t){console.log("labelCallback",arguments);var r=e.videoBandwidth||e.level.bitrate;return r<=1e5?"Slides":r<=8e5?"SD":"HD"},title:"Quality"}}})).catch((function(e){return console.log("Failed to fetch media sources",e),{playbackNotSupportedMessage:"".concat(e.message)}}))),f.then((function(r){return Object.assign({width:"100%",height:"100%",hideMediaControlDelay:1e3,position:"top-left",watermark:"data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3Csvg%0A%20%20%20xmlns%3Adc%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%22%0A%20%20%20xmlns%3Acc%3D%22http%3A%2F%2Fcreativecommons.org%2Fns%23%22%0A%20%20%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%0A%20%20%20xmlns%3Asvg%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20%20id%3D%22svg4568%22%0A%20%20%20version%3D%221.1%22%0A%20%20%20viewBox%3D%220%200%2026.458318%2026.458333%22%0A%20%20%20height%3D%22100%22%0A%20%20%20width%3D%22100%22%3E%0A%20%20%3Cmetadata%0A%20%20%20%20%20id%3D%22metadata4574%22%3E%0A%20%20%20%20%3Crdf%3ARDF%3E%0A%20%20%20%20%20%20%3Ccc%3AWork%0A%20%20%20%20%20%20%20%20%20rdf%3Aabout%3D%22%22%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Aformat%3Eimage%2Fsvg%2Bxml%3C%2Fdc%3Aformat%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atype%0A%20%20%20%20%20%20%20%20%20%20%20rdf%3Aresource%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Fdcmitype%2FStillImage%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atitle%3E%3C%2Fdc%3Atitle%3E%0A%20%20%20%20%20%20%3C%2Fcc%3AWork%3E%0A%20%20%20%20%3C%2Frdf%3ARDF%3E%0A%20%20%3C%2Fmetadata%3E%0A%20%20%3Cdefs%0A%20%20%20%20%20id%3D%22defs4572%22%20%2F%3E%0A%20%20%3Cpath%0A%20%20%20%20%20style%3D%22fill%3A%23ffffff%3Bfill-opacity%3A0.8627451%3Bstroke-width%3A0.79176539%22%0A%20%20%20%20%20id%3D%22path4566%22%0A%20%20%20%20%20d%3D%22m%2012.91039%2C7.1445417%20c%20-5.6690402%2C0%20-10.2660306%2C4.5961993%20-10.2660306%2C10.2652403%20a%2010.265238%2C10.265238%200%200%200%200.6706253%2C3.63816%20c%200.1504354%2C-0.393506%200.3230402%2C-0.777512%200.539984%2C-1.138557%200.1108472%2C-0.18369%200.2327789%2C-0.361837%200.313539%2C-0.559779%200.081551%2C-0.197941%200.1187648%2C-0.42201%200.057007%2C-0.627078%20A%201.0783844%2C1.0783844%200%200%200%204.0513264%2C18.402655%20C%203.9784841%2C18.305267%203.8993075%2C18.212631%203.833591%2C18.109702%20A%201.3159141%2C1.3159141%200%200%201%203.6316909%2C17.222924%201.1876481%2C1.1876481%200%200%201%204.0909148%2C16.441452%20c%200.2216944%2C-0.164688%200.5027709%2C-0.23753%200.7798889%2C-0.228028%20a%201.3911318%2C1.3911318%200%200%201%200.2739508%2C0.03801%20c%200.3578779%2C0.08709%200.6745841%2C0.311164%200.9089467%2C0.593824%200.2913696%2C0.353919%200.462391%2C0.799683%200.5043546%2C1.25574%20a%202.8297696%2C2.8297696%200%200%201%20-0.2177355%2C1.34046%20C%206.0236142%2C20.197593%205.42979%2C20.807252%205.1012074%2C21.557847%204.8335907%2C22.171464%204.7567894%2C22.854758%204.7924189%2C23.5238%20c%200.00554%2C0.06096%200.014251%2C0.122723%200.019794%2C0.185272%20a%2010.265238%2C10.265238%200%200%200%202.866191%2C2.517815%2013.958824%2C13.958824%200%200%201%20-0.1029298%2C-1.670626%20c%200.00161%2C-0.443389%200.023751%2C-0.886777%200.067304%2C-1.326206%20C%207.3735785%2C23.043191%207.1281312%2C22.826248%206.9539421%2C22.54913%206.6435705%2C22.058235%206.5849797%2C21.434324%206.712454%2C20.867421%206.8391365%2C20.299724%207.1400069%2C19.782702%207.5018439%2C19.327437%20A%206.2018984%2C6.2018984%200%200%201%209.7464993%2C17.567343%208.1591425%2C8.1591425%200%200%201%209.6752356%2C17.46758%203.8432293%2C3.8432293%200%200%201%209.1194163%2C15.744698%20c%20-0.047503%2C-0.615201%200.050669%2C-1.230403%200.091055%2C-1.844814%200.02929%2C-0.429928%200.031672%2C-0.859064%200.055423%2C-1.288201%200.030084%2C-0.496437%200.090261%2C-0.993667%200.2296124%2C-1.471101%20a%201.8685664%2C1.8685664%200%200%201%200.21061%2C-0.498812%201.1084716%2C1.1084716%200%200%201%200.4703083%2C-0.406968%20c%200.216945%2C-0.0855%200.403801%2C-0.104512%200.614411%2C-0.06888%200.174189%2C0.03642%200.3365%2C0.123516%200.478227%2C0.232779%200.142518%2C0.109264%200.26524%2C0.240698%200.380047%2C0.377673%20a%205.7783039%2C5.7783039%200%200%201%200.823436%2C1.280285%202.8266025%2C2.8266025%200%200%201%200.863024%2C0%205.7695944%2C5.7695944%200%200%201%200.823436%2C-1.279493%202.5415669%2C2.5415669%200%200%201%200.380047%2C-0.376881%20c%200.142518%2C-0.110847%200.303246%2C-0.196358%200.478227%2C-0.23357%20a%201.0039585%2C1.0039585%200%200%201%200.617577%2C0.06809%201.1100551%2C1.1100551%200%200%201%200.4711%2C0.409343%20c%200.09818%2C0.150436%200.159936%2C0.323041%200.21061%2C0.495645%200.138558%2C0.476643%200.199525%2C0.973872%200.229612%2C1.469517%200.02375%2C0.429928%200.02612%2C0.860649%200.05542%2C1.288995%200.0396%2C0.615201%200.138559%2C1.230403%200.09185%2C1.844813%20a%203.844021%2C3.844021%200%200%201%20-0.558194%2C1.724465%20c%20-0.02375%2C0.0396%20-0.05542%2C0.076%20-0.08154%2C0.114805%200.195565%2C0.220111%200.473476%2C0.406176%200.711006%2C0.486144%20a%201.5486932%2C1.5486932%200%200%200%200.831353%2C0.03484%201.3064129%2C1.3064129%200%200%200%200.42201%2C-0.17894%200.99208205%2C0.99208205%200%200%200%200.314331%2C-0.330957%20c%200.09343%2C-0.166272%200.131433%2C-0.356295%200.152019%2C-0.543944%200.05305%2C-0.482977%200%2C-0.96912%20-0.0396%2C-1.452889%20-0.02692%2C-0.313539%20-0.04909%2C-0.633412%200.02138%2C-0.939826%200.0475%2C-0.205858%200.140142%2C-0.410133%200.295328%2C-0.554235%20a%200.87569253%2C0.87569253%200%200%201%200.36817%2C-0.2019%201.0387963%2C1.0387963%200%200%201%200.419637%2C-0.02375%20c%200.30087%2C0.04514%200.582739%2C0.216942%200.750593%2C0.470308%200.09502%2C0.142517%200.153603%2C0.308788%200.18844%2C0.478226%200.03484%2C0.168646%200.0475%2C0.340459%200.05701%2C0.513064%200.03167%2C0.601741%200.03167%2C1.205067%200.01426%2C1.808392%20-0.01426%2C0.526524%20-0.04355%2C1.0673%20-0.253366%2C1.549486%20-0.271575%2C0.619159%20-0.817101%2C1.08155%20-1.405383%2C1.414092%20a%205.5835296%2C5.5835296%200%200%201%20-1.257323%2C0.512272%20c%200.38163%2C1.219319%200.580363%2C2.56532%200.580363%2C3.93349%20a%2013.935071%2C13.935071%200%200%201%20-0.106901%2C1.682498%2010.264446%2C10.264446%200%200%200%205.054631%2C-8.829768%20c%200%2C-5.669041%20-4.59699%2C-10.2652391%20-10.265238%2C-10.2652391%20z%20M%2010.037865%2C19.798537%20v%201.174188%20a%201.488519%2C1.488519%200%200%201%200.857482%2C0.286619%201.3760882%2C1.3760882%200%200%201%200.440222%2C0.538402%20c%200.0966%2C0.213775%200.131432%2C0.456056%200.09184%2C0.687252%20a%201.1821057%2C1.1821057%200%200%201%20-0.262867%2C0.560568%201.3040376%2C1.3040376%200%200%201%20-0.502772%2C0.36263%201.3760882%2C1.3760882%200%200%201%20-0.623119%2C0.0966%20v%202.953287%20l%206.145683%2C-3.33175%20-6.145683%2C-3.328583%20z%22%20%2F%3E%0A%3C%2Fsvg%3E",watermarkLink:"https://c3voc.de",levelSelectorConfig:{labelCallback:function(e){var t="unknown";return e.height?t=e.height:e.level&&e.level.height&&(t=e.level.height),t+"p"},title:"Quality"},audioTrackSelectorConfig:{title:"Language"}},r,e,{plugins:t})}))}},{key:"_containerChanged",value:function(){this.stopListening(),this._addEventListeners()}},{key:"_addEventListeners",value:function(){var e=this._player.core;this._container=e.activeContainer,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),this.listenTo(this._container,n.Events.CONTAINER_STATE_BUFFERFULL,this._handleBufferFull),this.listenTo(this._container,n.Events.CONTAINER_MEDIACONTROL_HIDE,this._handleMediaControlHide),this.listenTo(this._container,n.Events.CONTAINER_MEDIACONTROL_SHOW,this._handleMediaControlShow)}},{key:"_handleMediaControlHide",value:function(){this._container.$el.find(".clappr-watermark[data-watermark]").addClass("clappr-watermark-hide")}},{key:"_handleMediaControlShow",value:function(){this._container.$el.find(".clappr-watermark[data-watermark]").removeClass("clappr-watermark-hide")}},{key:"_getTimeout",value:function(){var e=.6*this.timeout+.4*this.timeout*Math.random();return this.timeout=Math.min(2*this.timeout,this.maxTimeout),e}},{key:"_resetTimeout",value:function(){this.timeout=5}},{key:"_handleError",value:function(e,t){this._recovery?clearTimeout(this._recovery.timeout):this._player.stop();var r=this._getTimeout();return console.log("got error",e,"retrying in ".concat(Math.round(r),"s")),this._recovery={clearOverlay:t,state:"restarting",timeout:setTimeout(this._waitForMedia.bind(this),1e3*r)},x(e,1001)||R(e,404)?{title:"Stream is offline",subtitle:"We will be right back"}:x(e,1002)||R(0)?{title:"A network error ocurred",subtitle:"Please check your internet connection"}:{title:"Oh no, an unknown error occured",subtitle:"Please try reloading the page"}}},{key:"_handlePlay",value:function(){this._recovery&&(console.log("soft recovery: play"),this._recovery.clearOverlay(),clearTimeout(this._recovery.timeout),this._recovery=null),this._resetTimeout()}},{key:"_handleStop",value:function(e){this._recovery&&this._container&&(console.log("soft recovery: stop"),this._container.playback.play.call(this._container.playback))}},{key:"_handleBufferFull",value:function(){if(this._recovery){console.log("seeking to end for recovery");var e=Math.max(this._player.getDuration()-6,0);this._player.seek(e)}}},{key:"_handleMediaCheck",value:function(e){if(e)console.log("try playing again, media should be available"),this._player.play();else{var t=this._getTimeout();console.log("test for media failed, retrying in ~".concat(Math.round(t),"s")),setTimeout(this._waitForMedia.bind(this),1e3*t)}}},{key:"_waitForMedia",value:function(){var e=this._player.options.source;e&&e.source&&(e=e.source),"string"==typeof e?function(e,t){if(!t||"function"!=typeof t)throw new Error("Excepted function, got '".concat(t,"'"));var r=new XMLHttpRequest;r.onreadystatechange=function(){this.readyState===XMLHttpRequest.HEADERS_RECEIVED&&(200===this.status?t(!0):t(!1),r.abort())},r.open("GET",e,!0),r.send(null)}(e,this._handleMediaCheck.bind(this)):this.reset()}},{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({source:this._player.options.source,autoPlay:!0}),e||this._player.unmute()}}])&&E(t.prototype,r),i&&E(t,i),s}(n.BaseObject)}])})); +/*! 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,n){var r=n(5),i=n(6);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={insert:"head",singleton:!1};r(i,a);e.exports=i.locals||{}},function(e,t,n){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},a=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function s(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},r=[],i=0;i<e.length;i++){var a=e[i],l=t.base?a[0]+t.base:a[0],u=n[l]||0,c="".concat(l," ").concat(u);n[l]=u+1;var d=s(c),f={css:a[1],media:a[2],sourceMap:a[3]};-1!==d?(o[d].references++,o[d].updater(f)):o.push({identifier:c,updater:g(f,t),references:1}),r.push(c)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=a(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var c,d=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function f(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=d(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function h(e,t,n){var r=n.css,i=n.media,a=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,m=0;function g(e,t){var n,r,i;if(t.singleton){var a=m++;n=p||(p=u(t)),r=f.bind(null,n,a,!1),i=f.bind(null,n,a,!0)}else n=u(t),r=h.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=s(n[r]);o[i].references--}for(var a=l(e,t),u=0;u<n.length;u++){var c=s(n[u]);0===o[c].references&&(o[c].updater(),o.splice(c,1))}n=a}}}},function(e,t,n){(t=n(7)(!1)).push([e.i,"button.media-control-button[data-hd-indicator]{display:none !important}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]{height:40px}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar]{height:2px;background-color:#ccc}.player-poster[data-poster] .play-wrapper[data-poster] svg path{fill:#ccc}.spinner-three-bounce[data-spinner]>div{background-color:#ccc}.clappr-watermark[data-watermark]{transition:opacity .5s ease-out;width:8%;min-width:50px;max-width:100px}.clappr-watermark[data-watermark].clappr-watermark-hide{opacity:0}.clappr-watermark[data-watermark-top-left]{top:0px;left:15px;text-align:left}@media(min-width: 768px){.clappr-watermark[data-watermark-top-left]{top:10px;left:30px}}",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(o=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),a=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(a).concat([i]).join("\n")}var o,s,l;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(i[o]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){"use strict";n.r(t),n.d(t,"Player",(function(){return I})),n.d(t,"Mediator",(function(){return r.Mediator})),n.d(t,"Events",(function(){return r.Events})),n.d(t,"Browser",(function(){return r.Browser})),n.d(t,"PlayerInfo",(function(){return r.PlayerInfo})),n.d(t,"MediaControl",(function(){return r.MediaControl})),n.d(t,"ContainerPlugin",(function(){return r.ContainerPlugin})),n.d(t,"UIContainerPlugin",(function(){return r.UIContainerPlugin})),n.d(t,"CorePlugin",(function(){return r.CorePlugin})),n.d(t,"UICorePlugin",(function(){return r.UICorePlugin})),n.d(t,"Playback",(function(){return r.Playback})),n.d(t,"Container",(function(){return r.Container})),n.d(t,"Core",(function(){return r.Core})),n.d(t,"PlayerError",(function(){return r.PlayerError})),n.d(t,"Loader",(function(){return r.Loader})),n.d(t,"BaseObject",(function(){return r.BaseObject})),n.d(t,"UIObject",(function(){return r.UIObject})),n.d(t,"Utils",(function(){return r.Utils})),n.d(t,"BaseFlashPlayback",(function(){return r.BaseFlashPlayback})),n.d(t,"Flash",(function(){return r.Flash})),n.d(t,"FlasHLS",(function(){return r.FlasHLS})),n.d(t,"HLS",(function(){return r.HLS})),n.d(t,"HTML5Audio",(function(){return r.HTML5Audio})),n.d(t,"HTML5Video",(function(){return r.HTML5Video})),n.d(t,"HTMLImg",(function(){return r.HTMLImg})),n.d(t,"NoOp",(function(){return r.NoOp})),n.d(t,"ClickToPausePlugin",(function(){return r.ClickToPausePlugin})),n.d(t,"DVRControls",(function(){return r.DVRControls})),n.d(t,"Favicon",(function(){return r.Favicon})),n.d(t,"Log",(function(){return r.Log})),n.d(t,"Poster",(function(){return r.Poster})),n.d(t,"SpinnerThreeBouncePlugin",(function(){return r.SpinnerThreeBouncePlugin})),n.d(t,"WaterMarkPlugin",(function(){return r.WaterMarkPlugin})),n.d(t,"Styler",(function(){return r.Styler})),n.d(t,"Vendor",(function(){return r.Vendor})),n.d(t,"version",(function(){return r.version})),n.d(t,"template",(function(){return r.template})),n.d(t,"$",(function(){return r.$}));var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2),l=n.n(s),u=n(3),c=n.n(u);n(4);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 n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),e}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){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}}();return function(){var n,r=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(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(e){return(y=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=g(n);function n(){var e;f(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[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(e){var t=i.a.$;this.hide();var n=e&&e.title||"Oh no, we encountered an error",r=e&&e.subtitle||"Please reload the page";this._err=t("<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 a=t("<div>").css({position:"absolute",width:"100%","padding-bottom":"5%",bottom:0}).append(t("<h2>").text(n).css({"font-size":"2em"})).append(t("<p>").text(r).css({"font-size":"1.2em",margin:"15px"}));this._err.append(a),this.container&&this.container.$el.prepend(this._err)}},{key:"onError",value:function(e){var t=this;if(this.container){var n=this.options.errorPlugin.onError,r=null;n&&"function"==typeof n&&(r=n(e,(function(){t.hide(),t.container.getPlugin("click_to_pause").enable()}))),this.show(r),this.container.getPlugin("click_to_pause").disable()}}}]),n}(i.a.ContainerPlugin);function _(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&null!=e[n]&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}var A=function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(new Headers,t.replace(/\s+/g," ")),i=_({query:r,operation:e,variables:JSON.stringify(n)});return fetch("https://media.ccc.de/graphql?".concat(i),{method:"GET",headers:{Accept:"application/json"}}).then((function(e){var t=e.body.getReader(),n="",r=new TextDecoder("utf-8");return t.read().then((function e(i){var a=i.done,o=i.value;return a?JSON.parse(n):(n+=r.decode(o),t.read().then(e))}))}))}("LectureBySlug","\n query LectureBySlug($slug: ID!) {\n lecture: lectureBySlug(slug: $slug) {\n originalLanguage\n timelens { thumbnailsUrl, timelineUrl }\n videos { label, source: url, mimeType }\n images { posterUrl }\n relive\n playerConfig\n }\n }\n ",{slug:e}).then((function(e){if(!e.data.lecture)throw new Error("Lecture could not be found");return e.data.lecture}))};function E(e){return(E="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 T(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){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}}();return function(){var n,r=x(e);if(t){var i=x(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return k(this,n)}}function k(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?C(e):t}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var R=function(e,t){return"dash_shaka_playback"==e.origin&&(e.raw.code==t||e.raw.detail&&e.raw.detail.code==t)},L=function(e,t){return"hls"==e.origin&&e.raw.response.code==t},I=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&&w(e,t)}(s,e);var t,n,i,a=S(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this)).timeout=5,t.maxTimeout=15,t._playerPromise=t._getConfig(e).then((function(e){return t._options=e,t._player=new r.Player(t._options),t._player.core&&t._player.core.isReady?t._addEventListeners():t.listenToOnce(t._player,r.Events.PLAYER_READY,t._addEventListeners.bind(C(t))),t._player})),t}return t=s,(n=[{key:"attachTo",value:function(){var e=arguments;this._playerPromise.then((function(t){t.attachTo.apply(t,e)}))}},{key:"_getConfig",value:function(e){var t=[c.a,l.a,o.a,b];e.plugins&&e.plugins.length&&(t=t.concat(e.plugins),console.log("loading plugins"),t.forEach((function(e){return console.log(e.name,e.type)})));var n,r,i,a,s,u,d,f,h=Promise.resolve({});return e.vocStream?(r=e.vocStream,i=e.audioOnly,a=e.h264Only,s=e.preferredAudioLanguage,u=this._handleError.bind(this),d="MediaSource"in window,f={poster:"//cdn.c3voc.de/thumbnail/".concat(r,"/poster.jpeg"),levelSelectorConfig:{labelCallback:function(e){var t=e.videoBandwidth||e.level.bitrate;return t<=1e5?"Slides":t<=8e5?"SD":t<=5e6?"HD":"Source"},title:"Quality"},disableErrorScreen:!0,errorPlugin:{onError:u}},-1==navigator.userAgent.indexOf("Firefox")&&!a&&d&&MediaSource.isTypeSupported('video/webm; codecs="vp9,opus"')?(f.source={source:"//cdn.c3voc.de/dash/".concat(r,"/manifest.mpd")},f.shakaConfiguration={preferredAudioLanguage:s,abr:{defaultBandwidthEstimate:1e6},streaming:{jumpLargeGaps:!0},manifest:{dash:{defaultPresentationDelay:3,ignoreSuggestedPresentationDelay:!0}}}):i||!d&&""==document.createElement("video").canPlayType("application/vnd.apple.mpegURL")?f.source=i?{source:"//cdn.c3voc.de/".concat(r,"_native.mp3"),mimeType:"audio/mp3"}:{source:"//cdn.c3voc.de/".concat(r,"_native_hd.webm"),mimeType:"video/webm"}:f.source={source:"//cdn.c3voc.de/hls/".concat(r,"/native_hd.m3u8"),mimeType:"application/vnd.apple.mpegURL"},h=Promise.resolve(f)):e.vocLecture&&(n=e.vocLecture,h=A(n).then((function(e){var t,n,r,i;return{sources:e.videos||(null===(t=e.relive)||void 0===t?void 0:t.playlistCut)||(null===(n=e.relive)||void 0===n?void 0:n.playlist),poster:null===(r=e.images)||void 0===r?void 0:r.posterUrl,timelens:e.timelens,playback:{externalTracks:null===(i=e.playerConfig)||void 0===i?void 0:i.subtitles},levelSelectorConfig:{labelCallback:function(e,t){console.log("labelCallback",arguments);var n=e.videoBandwidth||e.level.bitrate;return n<=1e5?"Slides":n<=8e5?"SD":"HD"},title:"Quality"}}})).catch((function(e){return console.log("Failed to fetch media sources",e),{playbackNotSupportedMessage:"".concat(e.message)}}))),h.then((function(n){return Object.assign({width:"100%",height:"100%",hideMediaControlDelay:1e3,position:"top-left",watermark:"data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3Csvg%0A%20%20%20xmlns%3Adc%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%22%0A%20%20%20xmlns%3Acc%3D%22http%3A%2F%2Fcreativecommons.org%2Fns%23%22%0A%20%20%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%0A%20%20%20xmlns%3Asvg%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20%20id%3D%22svg4568%22%0A%20%20%20version%3D%221.1%22%0A%20%20%20viewBox%3D%220%200%2026.458318%2026.458333%22%0A%20%20%20height%3D%22100%22%0A%20%20%20width%3D%22100%22%3E%0A%20%20%3Cmetadata%0A%20%20%20%20%20id%3D%22metadata4574%22%3E%0A%20%20%20%20%3Crdf%3ARDF%3E%0A%20%20%20%20%20%20%3Ccc%3AWork%0A%20%20%20%20%20%20%20%20%20rdf%3Aabout%3D%22%22%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Aformat%3Eimage%2Fsvg%2Bxml%3C%2Fdc%3Aformat%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atype%0A%20%20%20%20%20%20%20%20%20%20%20rdf%3Aresource%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Fdcmitype%2FStillImage%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atitle%3E%3C%2Fdc%3Atitle%3E%0A%20%20%20%20%20%20%3C%2Fcc%3AWork%3E%0A%20%20%20%20%3C%2Frdf%3ARDF%3E%0A%20%20%3C%2Fmetadata%3E%0A%20%20%3Cdefs%0A%20%20%20%20%20id%3D%22defs4572%22%20%2F%3E%0A%20%20%3Cpath%0A%20%20%20%20%20style%3D%22fill%3A%23ffffff%3Bfill-opacity%3A0.8627451%3Bstroke-width%3A0.79176539%22%0A%20%20%20%20%20id%3D%22path4566%22%0A%20%20%20%20%20d%3D%22m%2012.91039%2C7.1445417%20c%20-5.6690402%2C0%20-10.2660306%2C4.5961993%20-10.2660306%2C10.2652403%20a%2010.265238%2C10.265238%200%200%200%200.6706253%2C3.63816%20c%200.1504354%2C-0.393506%200.3230402%2C-0.777512%200.539984%2C-1.138557%200.1108472%2C-0.18369%200.2327789%2C-0.361837%200.313539%2C-0.559779%200.081551%2C-0.197941%200.1187648%2C-0.42201%200.057007%2C-0.627078%20A%201.0783844%2C1.0783844%200%200%200%204.0513264%2C18.402655%20C%203.9784841%2C18.305267%203.8993075%2C18.212631%203.833591%2C18.109702%20A%201.3159141%2C1.3159141%200%200%201%203.6316909%2C17.222924%201.1876481%2C1.1876481%200%200%201%204.0909148%2C16.441452%20c%200.2216944%2C-0.164688%200.5027709%2C-0.23753%200.7798889%2C-0.228028%20a%201.3911318%2C1.3911318%200%200%201%200.2739508%2C0.03801%20c%200.3578779%2C0.08709%200.6745841%2C0.311164%200.9089467%2C0.593824%200.2913696%2C0.353919%200.462391%2C0.799683%200.5043546%2C1.25574%20a%202.8297696%2C2.8297696%200%200%201%20-0.2177355%2C1.34046%20C%206.0236142%2C20.197593%205.42979%2C20.807252%205.1012074%2C21.557847%204.8335907%2C22.171464%204.7567894%2C22.854758%204.7924189%2C23.5238%20c%200.00554%2C0.06096%200.014251%2C0.122723%200.019794%2C0.185272%20a%2010.265238%2C10.265238%200%200%200%202.866191%2C2.517815%2013.958824%2C13.958824%200%200%201%20-0.1029298%2C-1.670626%20c%200.00161%2C-0.443389%200.023751%2C-0.886777%200.067304%2C-1.326206%20C%207.3735785%2C23.043191%207.1281312%2C22.826248%206.9539421%2C22.54913%206.6435705%2C22.058235%206.5849797%2C21.434324%206.712454%2C20.867421%206.8391365%2C20.299724%207.1400069%2C19.782702%207.5018439%2C19.327437%20A%206.2018984%2C6.2018984%200%200%201%209.7464993%2C17.567343%208.1591425%2C8.1591425%200%200%201%209.6752356%2C17.46758%203.8432293%2C3.8432293%200%200%201%209.1194163%2C15.744698%20c%20-0.047503%2C-0.615201%200.050669%2C-1.230403%200.091055%2C-1.844814%200.02929%2C-0.429928%200.031672%2C-0.859064%200.055423%2C-1.288201%200.030084%2C-0.496437%200.090261%2C-0.993667%200.2296124%2C-1.471101%20a%201.8685664%2C1.8685664%200%200%201%200.21061%2C-0.498812%201.1084716%2C1.1084716%200%200%201%200.4703083%2C-0.406968%20c%200.216945%2C-0.0855%200.403801%2C-0.104512%200.614411%2C-0.06888%200.174189%2C0.03642%200.3365%2C0.123516%200.478227%2C0.232779%200.142518%2C0.109264%200.26524%2C0.240698%200.380047%2C0.377673%20a%205.7783039%2C5.7783039%200%200%201%200.823436%2C1.280285%202.8266025%2C2.8266025%200%200%201%200.863024%2C0%205.7695944%2C5.7695944%200%200%201%200.823436%2C-1.279493%202.5415669%2C2.5415669%200%200%201%200.380047%2C-0.376881%20c%200.142518%2C-0.110847%200.303246%2C-0.196358%200.478227%2C-0.23357%20a%201.0039585%2C1.0039585%200%200%201%200.617577%2C0.06809%201.1100551%2C1.1100551%200%200%201%200.4711%2C0.409343%20c%200.09818%2C0.150436%200.159936%2C0.323041%200.21061%2C0.495645%200.138558%2C0.476643%200.199525%2C0.973872%200.229612%2C1.469517%200.02375%2C0.429928%200.02612%2C0.860649%200.05542%2C1.288995%200.0396%2C0.615201%200.138559%2C1.230403%200.09185%2C1.844813%20a%203.844021%2C3.844021%200%200%201%20-0.558194%2C1.724465%20c%20-0.02375%2C0.0396%20-0.05542%2C0.076%20-0.08154%2C0.114805%200.195565%2C0.220111%200.473476%2C0.406176%200.711006%2C0.486144%20a%201.5486932%2C1.5486932%200%200%200%200.831353%2C0.03484%201.3064129%2C1.3064129%200%200%200%200.42201%2C-0.17894%200.99208205%2C0.99208205%200%200%200%200.314331%2C-0.330957%20c%200.09343%2C-0.166272%200.131433%2C-0.356295%200.152019%2C-0.543944%200.05305%2C-0.482977%200%2C-0.96912%20-0.0396%2C-1.452889%20-0.02692%2C-0.313539%20-0.04909%2C-0.633412%200.02138%2C-0.939826%200.0475%2C-0.205858%200.140142%2C-0.410133%200.295328%2C-0.554235%20a%200.87569253%2C0.87569253%200%200%201%200.36817%2C-0.2019%201.0387963%2C1.0387963%200%200%201%200.419637%2C-0.02375%20c%200.30087%2C0.04514%200.582739%2C0.216942%200.750593%2C0.470308%200.09502%2C0.142517%200.153603%2C0.308788%200.18844%2C0.478226%200.03484%2C0.168646%200.0475%2C0.340459%200.05701%2C0.513064%200.03167%2C0.601741%200.03167%2C1.205067%200.01426%2C1.808392%20-0.01426%2C0.526524%20-0.04355%2C1.0673%20-0.253366%2C1.549486%20-0.271575%2C0.619159%20-0.817101%2C1.08155%20-1.405383%2C1.414092%20a%205.5835296%2C5.5835296%200%200%201%20-1.257323%2C0.512272%20c%200.38163%2C1.219319%200.580363%2C2.56532%200.580363%2C3.93349%20a%2013.935071%2C13.935071%200%200%201%20-0.106901%2C1.682498%2010.264446%2C10.264446%200%200%200%205.054631%2C-8.829768%20c%200%2C-5.669041%20-4.59699%2C-10.2652391%20-10.265238%2C-10.2652391%20z%20M%2010.037865%2C19.798537%20v%201.174188%20a%201.488519%2C1.488519%200%200%201%200.857482%2C0.286619%201.3760882%2C1.3760882%200%200%201%200.440222%2C0.538402%20c%200.0966%2C0.213775%200.131432%2C0.456056%200.09184%2C0.687252%20a%201.1821057%2C1.1821057%200%200%201%20-0.262867%2C0.560568%201.3040376%2C1.3040376%200%200%201%20-0.502772%2C0.36263%201.3760882%2C1.3760882%200%200%201%20-0.623119%2C0.0966%20v%202.953287%20l%206.145683%2C-3.33175%20-6.145683%2C-3.328583%20z%22%20%2F%3E%0A%3C%2Fsvg%3E",watermarkLink:"https://c3voc.de",levelSelectorConfig:{labelCallback:function(e){var t="unknown";return e.height?t=e.height:e.level&&e.level.height&&(t=e.level.height),t+"p"},title:"Quality"},audioTrackSelectorConfig:{title:"Language"}},n,e,{plugins:t})}))}},{key:"_containerChanged",value:function(){this.stopListening(),this._addEventListeners()}},{key:"_addEventListeners",value:function(){var e=this._player.core;this._container=e.activeContainer,this.listenTo(this._player,r.Events.PLAYER_PLAY,this._handlePlay),this.listenTo(this._player,r.Events.PLAYER_STOP,this._handleStop),this.listenTo(e,r.Events.CORE_ACTIVE_CONTAINER_CHANGED,this._containerChanged),this.listenTo(this._container,r.Events.CONTAINER_STATE_BUFFERFULL,this._handleBufferFull),this.listenTo(this._container,r.Events.CONTAINER_MEDIACONTROL_HIDE,this._handleMediaControlHide),this.listenTo(this._container,r.Events.CONTAINER_MEDIACONTROL_SHOW,this._handleMediaControlShow)}},{key:"_handleMediaControlHide",value:function(){this._container.$el.find(".clappr-watermark[data-watermark]").addClass("clappr-watermark-hide")}},{key:"_handleMediaControlShow",value:function(){this._container.$el.find(".clappr-watermark[data-watermark]").removeClass("clappr-watermark-hide")}},{key:"_getTimeout",value:function(){var e=.6*this.timeout+.4*this.timeout*Math.random();return this.timeout=Math.min(2*this.timeout,this.maxTimeout),e}},{key:"_resetTimeout",value:function(){this.timeout=5}},{key:"_handleError",value:function(e,t){this._recovery?clearTimeout(this._recovery.timeout):this._player.stop();var n=this._getTimeout();return console.log("got error",e,"retrying in ".concat(Math.round(n),"s")),this._recovery={clearOverlay:t,state:"restarting",timeout:setTimeout(this._waitForMedia.bind(this),1e3*n)},R(e,1001)||L(e,404)?{title:"Stream is offline",subtitle:"We will be right back"}:R(e,1002)||L(0)?{title:"A network error ocurred",subtitle:"Please check your internet connection"}:{title:"Oh no, an unknown error occured",subtitle:"Please try reloading the page"}}},{key:"_handlePlay",value:function(){this._recovery&&(console.log("soft recovery: play"),this._recovery.clearOverlay(),clearTimeout(this._recovery.timeout),this._recovery=null),this._resetTimeout()}},{key:"_handleStop",value:function(e){this._recovery&&this._container&&(console.log("soft recovery: stop"),this._container.playback.play.call(this._container.playback))}},{key:"_handleBufferFull",value:function(){if(this._recovery&&"live"==this._container.playback.getPlaybackType()){console.log("seeking to end for recovery");var e=Math.max(this._player.getDuration()-6,0);this._player.seek(e)}}},{key:"_handleMediaCheck",value:function(e){if(e)console.log("try playing again, media should be available"),this._player.play();else{var t=this._getTimeout();console.log("test for media failed, retrying in ~".concat(Math.round(t),"s")),setTimeout(this._waitForMedia.bind(this),1e3*t)}}},{key:"_waitForMedia",value:function(){var e=this._player.options.source;e&&e.source&&(e=e.source),"string"==typeof e?function(e,t){if(!t||"function"!=typeof t)throw new Error("Excepted function, got '".concat(t,"'"));var n=new XMLHttpRequest;n.onreadystatechange=function(){this.readyState===XMLHttpRequest.HEADERS_RECEIVED&&(200===this.status?t(!0):t(!1),n.abort())},n.open("GET",e,!0),n.send(null)}(e,this._handleMediaCheck.bind(this)):this.reset()}},{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({source:this._player.options.source,autoPlay:!0}),e||this._player.unmute()}}])&&T(t.prototype,n),i&&T(t,i),s}(r.BaseObject)}])})); //# sourceMappingURL=player.js.map
\ No newline at end of file |