@clickview/lite 0.75.0 → 0.75.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- /*! For license information please see 7252-941e7573cf-lite.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[7252],{30050:(t,e,n)=>{n.d(e,{Z:()=>f});var r=n(76032);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function u(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a=function(){return!!t})()}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},c.apply(null,arguments)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}var f=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=l(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,a()?Reflect.construct(e,n||[],l(t).constructor):e.apply(t,n))}(this,e,[t,n])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(e,t),n=e,u=[{key:"createEl",value:function(){return r.Z.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(t){var n,r,o,i=this;(n=e,r=this,"function"==typeof(o=c(l(1&3?n.prototype:n),"handleClick",r))?function(t){return o.apply(r,t)}:o)([t]),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame(function(){i.player_.getChild("collapserator").getChild("cogButton").pressButton()})}}],u&&i(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(r.Z.getComponent("MenuItem"))},78651:(t,e,n)=>{n.d(e,{W:()=>i});var r=n(86777),o=n(76032).Z.getComponent("Menu"),i=o.prototype.createEl;o.prototype.createEl=function(){var t=i.call(this);return this.simpleBar=new r.Z(this.contentEl(),{autoHide:!1}),t};var u=o.prototype.contentEl;o.prototype.contentEl=function(){return this.simpleBar?this.simpleBar.getContentElement():u.call(this)};var a=o.prototype.dispose;o.prototype.dispose=function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),a.call(this)};var c=o.prototype.addItem;o.prototype.addItem=function(t){c.call(this,t),this.simpleBar.recalculate()};var l=o.prototype.lockShowing;o.prototype.lockShowing=function(){l.call(this),this.simpleBar.recalculate()},o.prototype.recalculateScrollBar=function(){this.simpleBar.recalculate()};var s=o.prototype.handleBlur;o.prototype.handleBlur=function(t){var e=t.relatedTarget||document.activeElement;this.el().contains(e)||s.call(this,t)}},61384:(t,e,n)=>{n.d(e,{C:()=>g,Z:()=>m});var r=n(76032),o=n(95569);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,l(r.key),r)}}function c(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function s(t,e,n){return e=h(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function p(t,e,n,r){var o=y(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},y.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function b(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var d=r.Z.getComponent("MenuItem"),m=function(t){function e(t,n){var r;return u(this,e),(r=s(this,e,[t,n])).onChange=(0,o.Ds)(r.onChange,100,!1,r),r.bindEventListeners(),r}return b(e,t),c(e,[{key:"createEl",value:function(){var t=this.localize("Search");return p(e,"createEl",this,3)(["li",{className:"vjs-menu-item cv-search-input-menu-item-container ".concat(this.options_.className||"").trim(),innerHTML:'\n <div class="cv-search-input-menu-item">\n <span class="cv-search-icon">\n <svg viewBox="0 0 24 24">\n <path d="M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"/>\n </svg>\n </span><input placeholder="'.concat(t,'" type="text" autocomplete="off" spellcheck="false" aria-label="').concat(t,'" />\n </div>\n ')}])}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var t=this,e=this.$("input");this.onChange=this.onChange.bind(this),e.addEventListener("keyup",this.onChange),e.addEventListener("blur",function(e){t.options_.menuButton.menu.handleBlur(e)})}},{key:"onChange",value:function(t){var e=t.target;this.options_.search(e.value)}}])}(d);r.Z.registerComponent("SearchInputMenuItem",m);var g=function(t){function e(){return u(this,e),s(this,e,arguments)}return b(e,t),c(e,[{key:"createEl",value:function(t,n,r){return p(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:"vjs-menu-item cv-no-results"}),r])}},{key:"setLabel",value:function(t){var e=this.$(".vjs-menu-item-text");e&&(e.innerHTML=t)}}])}(d);r.Z.registerComponent("NoMatchingResultsMenuItem",g)},30364:(t,e,n)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t){var e="function"==typeof Map?new Map:void 0;return o=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(i())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&u(o,n.prototype),o}(t,arguments,a(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,t)},o(t)}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(i=function(){return!!t})()}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.d(e,{M:()=>c});var c=function(t){function e(t,n){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,n){return e=a(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,i()?Reflect.construct(e,n||[],a(t).constructor):e.apply(t,n))}(this,e,[(null==n?void 0:n.title)||"Ajax error"])).url=t,o.response=n,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(o(Error))},87252:(t,e,n)=>{n.d(e,{r:()=>Lp});var r=n(76032);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}function a(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}function l(t,e,n){return e=y(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,s()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!t})()}function f(t,e,n,r){var o=p(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},p.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}var v=function(t){function e(t,n){return i(this,e),l(this,e,[t,n])}return h(e,t),a(e,[{key:"handleClick",value:function(t){var n=this;f(e,"handleClick",this,3)([t]),this.requestAnimationFrame(function(){n.options_.item.showCollapsibleMenu()})}},{key:"createEl",value:function(t,n,o){if(!this.options_.item)return f(e,"createEl",this,3)([t,n,o]);var i=this.options_.item.getCollabsibleName(),u=this.options_.item.getCollabsibleValue(),a=this.options_.item.className,c='<span class="vjs-menu-item-text">'.concat(i,"</span>");this.valueHolder_=r.Z.dom.createEl("span",{innerHTML:u});var l=f(e,"createEl",this,3)([t,{className:"vjs-menu-item cv-cog-menu-item ".concat(u?"cv-has-cog-value":""," ").concat(a||"").trim(),innerHTML:c},o]);return l.appendChild(this.valueHolder_),l}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}])}(r.Z.getComponent("MenuItem")),d=function(t){function e(t,n){var r;return i(this,e),(r=l(this,e,[t,n])).controlText("Settings"),r}return h(e,t),a(e,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(f(e,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(f(e,"buildCSSClass",this,3)([]))}},{key:"pressButton",value:function(){this.player_.options_.deferMenus?this.player_.deferMenusPlugin().deferMenu():(this.menu.children_.forEach(function(t){t.updateCollapsibleValue&&t.updateCollapsibleValue()}),f(e,"pressButton",this,3)([]))}},{key:"createItems",value:function(){for(var t,e=this,n=[],r=0;r<this.options_.items.length;r++){var o=this.options_.items[r];o.isCollabsible&&o.showInCollabsibleMenu()&&o.isCollapsed&&n.push(new v(this.player_,{item:o}))}return(null===(t=this.additionalItems)||void 0===t?void 0:t.length)&&this.additionalItems.forEach(function(t){var r,o=new t.ctor(e.player_,Object.assign(Object.assign({},e.options_),null!==(r=t.options)&&void 0!==r?r:{}));n.splice(t.index,0,o)}),n}},{key:"update",value:function(){f(e,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(t){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some(function(e){return e.name===t.name})||(this.additionalItems.push(t),this.update())}}])}(r.Z.getComponent("MenuButton"));r.Z.registerComponent("cogButton",d);var m=n(30050);function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=C(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},w.apply(null,arguments)}function O(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function j(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,P(r.key),r)}}function S(t,e,n){return e&&j(t.prototype,e),n&&j(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function P(t){var e=function(t){if("object"!=g(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==g(e)?e:e+""}function _(t,e,n){return e=C(e),function(t,e){if(e&&("object"==g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,k()?Reflect.construct(e,n||[],C(t).constructor):e.apply(t,n))}function k(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(k=function(){return!!t})()}function C(t){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},C(t)}function T(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&E(t,e)}function E(t,e){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},E(t,e)}var R=r.Z.getComponent("MenuItem"),x=r.Z.getComponent("MenuButton"),B=["large","medium","small"],L=function(t){function e(t,n){return O(this,e),_(this,e,[t,n])}return T(e,t),S(e,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}])}(R),M=function(t){function e(t,n){var r;return O(this,e),(r=_(this,e,[t,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.player_.ready(function(){r.update()}),r}return T(e,t),S(e,[{key:"createItems",value:function(){var t=this,e=this.player_.textTrackSettings;if(e){var n=e.getSizeSetting(),r=[new m.Z(this.player_,{label:"Caption Text Size",onClickBack:function(){t.requestAnimationFrame(function(){t.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()})}})];return B.map(function(e){r.push(new L(t.player_,{label:e.charAt(0).toUpperCase()+e.substring(1),selectable:!0,multiSelectable:!1,selected:e===n,value:e}))}),r}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,n=this,"function"==typeof(r=w(C(1&3?t.prototype:t),"buildWrapperCSSClass",n))?function(t){return r.apply(n,t)}:r)([]));var t,n,r}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){x.prototype.handleClick.apply(this)}}])}(x);r.Z.registerComponent("SubtitleSizeButton",M);var D=n(10463),Z=n(61384);function I(t){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I(t)}function F(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,A(r.key),r)}}function A(t){var e=function(t){if("object"!=I(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=I(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==I(e)?e:e+""}function N(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(N=function(){return!!t})()}function z(t){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},z(t)}function V(t,e){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},V(t,e)}var H=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=z(e),function(t,e){if(e&&("object"==I(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,N()?Reflect.construct(e,n||[],z(t).constructor):e.apply(t,n))}(this,e,[t,n])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&V(t,e)}(e,t),n=e,(r=[{key:"update",value:function(t,e){var n=this;if(null==t?void 0:t.length){var r=[],o=0;t.forEach(function(t){var i=n.options_.label.substr(o,t);i&&r.push(i),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(t,e)),r.push("</span>"),o=t+e}),r.push(this.options_.label.substring(o,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(r.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&F(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("MenuItem"));function U(t){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(t)}function G(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,q(r.key),r)}}function q(t){var e=function(t){if("object"!=U(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==U(e)?e:e+""}function W(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(W=function(){return!!t})()}function Q(t,e,n,r){var o=K($(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function K(){return K="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=$(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},K.apply(null,arguments)}function $(t){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$(t)}function X(t,e){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},X(t,e)}var J=r.Z.getComponent("MenuButton"),Y=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=$(e),function(t,e){if(e&&("object"==U(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,W()?Reflect.construct(e,n||[],$(t).constructor):e.apply(t,n))}(this,e,[t,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(r),r.search=r.search.bind(r),r.player_.textTracks().addEventListener("selectedlanguagechange",r.update),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&X(t,e)}(e,t),n=e,(r=[{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.update),t.addEventListener("loadeddata",this.update),this.player_.one("dispose",function(){t.removeEventListener("loadeddata",e.update)})}},{key:"createItems",value:function(){var t,e=D.O.getCurrentTextTrack(this.player_);if(e){if(null===(t=e.cues)||void 0===t?void 0:t.length){for(var n=[new Z.Z(this.player_,{menuButton:this,search:this.search})],r=0;r<e.cues.length;r++){var o=e.cues[r];n.push(new H(this.player_,{cue:o,label:o.text,selected:!1,multiSelectable:!1}))}var i=new Z.C(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return i.hide(),n.push(i),n}this.bindTrackEvents(e)}}},{key:"search",value:function(t){var e;t=t.trim();var n=D.O.getCurrentTextTrack(this.player_);if(null===(e=null==n?void 0:n.cues)||void 0===e?void 0:e.length){var r=this.findMatches(t,n);this.toggleItemVisibility(t,r),this.toggleNoResults(t,r)}}},{key:"findMatches",value:function(t,e){var n={};if(!t)return n;for(var r=new RegExp(t,"gi"),o=0;o<e.cues.length;o++){for(var i=e.cues[o].text,u=[],a=void 0;a=r.exec(i);)u.push(a.index);u.length&&(n[o]=u)}return n}},{key:"toggleItemVisibility",value:function(t,e){this.menu.children_.slice(1,this.menu.children_.length-1).forEach(function(n,r){!t||e[r]?n.show():n.hide(),n.update(e[r],t.length)})}},{key:"toggleNoResults",value:function(t,e){var n=this.menu.children_[this.menu.children_.length-1];!t||Object.keys(e).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(Q(e,"buildWrapperCSSClass",this,3)([]))}},{key:"update",value:function(){Q(e,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){Q(e,"pressButton",this,3)([]);var t=this.menu.children_[0];(null==t?void 0:t.focus)&&(null==t||t.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){J.prototype.handleClick.apply(this)}}])&&G(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(J);function tt(t){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(t)}function et(){return et="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ct(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},et.apply(null,arguments)}function nt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,it(r.key),r)}}function ot(t,e,n){return e&&rt(t.prototype,e),n&&rt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function it(t){var e=function(t){if("object"!=tt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=tt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==tt(e)?e:e+""}function ut(t,e,n){return e=ct(e),function(t,e){if(e&&("object"==tt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,at()?Reflect.construct(e,n||[],ct(t).constructor):e.apply(t,n))}function at(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(at=function(){return!!t})()}function ct(t){return ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ct(t)}function lt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&st(t,e)}function st(t,e){return st=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},st(t,e)}r.Z.registerComponent("subtitleSearchButton",Y);var ft=r.Z.getComponent("MenuItem"),pt=r.Z.getComponent("MenuButton"),yt=[{label:"Play / Pause",type:"play-pause"},{label:"Volume",type:"volume"},{label:"Mute",type:"mute"},{label:"Toggle fullscreen",type:"fullscreen"},{label:"Exit fullscreen",type:"exit-fullscreen"},{label:"Toggle theatre mode",type:"theatre-mode"}],ht=function(t){function e(t,n){return nt(this,e),ut(this,e,[t,n])}return lt(e,t),ot(e,[{key:"createEl",value:function(){return r.Z.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(t){switch(t){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">&uArr;</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">&dArr;</span>';case"mute":return'<span class="cv-keyboard-button cv-single-key">m</span>';case"fullscreen":return'<span class="cv-keyboard-button cv-single-key">f</span>';case"exit-fullscreen":return'<span class="cv-keyboard-button cv-single-key">esc</span>';case"theatre-mode":return'<span class="cv-keyboard-button cv-single-key">t</span>'}return""}}])}(ft),bt=function(t){function e(){var t;return nt(this,e),(t=ut(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return lt(e,t),ot(e,[{key:"createItems",value:function(){var t=this,e=[];return e.push(new m.Z(this.player_,{label:"Keyboard Shortcuts"})),yt.forEach(function(n){e.push(new ht(t.player_,n))}),e}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat((t=e,n=this,"function"==typeof(r=et(ct(1&3?t.prototype:t),"buildWrapperCSSClass",n))?function(t){return r.apply(n,t)}:r)([]));var t,n,r}},{key:"getCollabsibleName",value:function(){return"Keyboard Shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!this.player_.options_.mobile}},{key:"showCollapsibleMenu",value:function(){pt.prototype.handleClick.apply(this)}}])}(pt);function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function dt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,mt(r.key),r)}}function mt(t){var e=function(t){if("object"!=vt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=vt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vt(e)?e:e+""}function gt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(gt=function(){return!!t})()}function wt(t,e,n,r){var o=Ot(jt(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function Ot(){return Ot="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=jt(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ot.apply(null,arguments)}function jt(t){return jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jt(t)}function St(t,e){return St=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},St(t,e)}r.Z.registerComponent("KeyboardShortcutsButton",bt);var Pt="cv-collapsed",_t=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=jt(e),function(t,e){if(e&&("object"==vt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,gt()?Reflect.construct(e,n||[],jt(t).constructor):e.apply(t,n))}(this,e,[t,n])).addChild("cogButton",{items:r.children_},r.children_.length-1),r.update=r.update.bind(r),r.player_.on("cv-updatecog",r.update),r.player_.on("playerresize",r.update),r.player_.one("play",r.update),r.player_.on("dispose",function(){r.player_.off("cv-updatecog",r.update),r.player_.off("playerresize",r.update),r.player_.off("play",r.update)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&St(t,e)}(e,t),n=e,(r=[{key:"toggleHidden",value:function(t){for(var e=0;e<this.children_.length;e++){var n=this.children_[e];n.isCollabsible&&(n.alwaysCollapsed||t?(n.isCollapsed=!0,n.addClass(Pt)):(n.isCollapsed=!1,n.removeClass(Pt)))}this.getChild("cogButton").update()}},{key:"update",value:function(){var t=this.player_.isFullscreen(),e=this.player_.whiteboardModePlugin().side,n=this.player_.el().getBoundingClientRect(),r=!t||"left"!==e&&"right"!==e?n.width:n.height;if(r){this.addClass("cv-collapsorator-ready");var o=r<(!t||"left"!==e&&"right"!==e&&"top"!==e?600:1200);this.player_.options_.deferMenus&&(o=!0),this.toggleHidden(o)}}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(wt(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,n,r){return wt(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])&&dt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));r.Z.registerComponent("collapserator",_t);var kt=["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"],Ct=n(57900),Tt=n(17562),Et=n(65858),Rt=n(50873),xt=n(870);function Bt(t){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bt(t)}function Lt(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return Mt(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(Mt(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,Mt(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,Mt(f,"constructor",l),Mt(l,"constructor",c),c.displayName="GeneratorFunction",Mt(l,o,"GeneratorFunction"),Mt(f),Mt(f,o,"Generator"),Mt(f,r,function(){return this}),Mt(f,"toString",function(){return"[object Generator]"}),(Lt=function(){return{w:i,m:p}})()}function Mt(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}Mt=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){Mt(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},Mt(t,e,n,r)}function Dt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Zt(r.key),r)}}function Zt(t){var e=function(t){if("object"!=Bt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Bt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bt(e)?e:e+""}var It,Ft=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.initialize()},(e=[{key:"logStream",value:function(){var t="v:".concat(this.options.videoId);Ct.SG.cacheExists(t)||(this.collectionApiClient.log({type:Et.Vw.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:Et.eq.V3}),Ct.SG&&Ct.SG.cacheSet(t,null,300))}},{key:"logVideoProgress",value:function(t){var e=this,n=this.getAnalyticsData();this.collectionApiClient.log(t.map(function(t){return{type:Et.Vw.StreamProgress,actionContext:e.getActionContext(),data:Object.assign(Object.assign({},n),{progress:t}),eventVersion:Et.eq.V2}}))}},{key:"logUserAction",value:function(t,e){var n=Object.assign(Object.assign({},this.getAnalyticsData()),t),r=Object.assign(Object.assign({},this.getActionContext()),e);this.collectionApiClient.log({type:e.actionType,data:n,actionContext:r,eventVersion:e.eventVersion||Et.eq.V2})}},{key:"getAnalyticsData",value:function(){var t=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(t.video.shareId=this.options.shareId);var e=this.getEntityType();return e===Et.py.Interactive?t.interactive={id:+this.options.mediaId}:e===Et.py.Clip&&(t.clip={id:+this.options.mediaId}),t}},{key:"initialize",value:function(){this.setupCollectionApiClient(),xt.Y.lockWindowSession(),this.options.player.one("dispose",function(){return xt.Y.unlockWindowSession()})}},{key:"setupCollectionApiClient",value:function(){var t=this;this.collectionApiClient=new Tt.q({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return t.getCurrentUser()},shouldLog:Rt.k.shouldLog,formatData:Rt.k.formatData})}},{key:"getCurrentUser",value:function(){return t=this,e=void 0,n=void 0,r=Lt().m(function t(){return Lt().w(function(t){for(;;)if(0===t.n)return t.a(2,{id:this.options.userId,customerId:this.options.customerId,sessionId:this.options.authSessionId})},t,this)}),new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())});var t,e,n,r}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?Et.MC.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return Et.py.Video;case"MasterInteractive":return Et.py.Interactive;case"MasterClip":return Et.py.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return Et.LZ.Player;case"interactive-player":return Et.LZ.InteractivePlayer;case"create-clip-player":return Et.LZ.CreateClipPlayer}}}])&&Dt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),At=n(51415),Nt=n(19389),zt=n.n(Nt);function Vt(t){return Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vt(t)}function Ht(t,e,n){return(e=function(t){var e=function(t){if("object"!=Vt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Vt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ut(t){t.paused()?t.play():t.pause()}function Gt(t,e){t.currentTime(t.currentTime()+e)}function qt(t,e){t.volume(t.volume()+e)}var Wt,Qt=(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(It={},"f",function(t){document[t.fsApi_.fullscreenEnabled]&&(t.isFullscreen()?t.exitFullscreen():t.requestFullscreen())}),"m",function(t){var e=t.volume(),n=t.lastVolume_();if(0===e){var r=n<.1?.1:n;t.volume(r),t.muted(!1)}else t.muted(!t.muted())}),"k",Ut),"space",Ut),"t",function(t){var e=t.theatreModePlugin().getTheatreMode();t.theatreModePlugin().toggleTheatreMode(!e,{shouldLog:!0})}),"left",function(t){return Gt(t,-5)}),"right",function(t){return Gt(t,5)}),"j",function(t){return Gt(t,-10)}),"l",function(t){return Gt(t,10)}),"up",function(t){return qt(t,.05)}),Ht(It,"down",function(t){return qt(t,-.05)})),Kt=n(30364);!function(t){t.PhysicallyChapteredVideo="physically-chaptered-video"}(Wt||(Wt={}));var $t=n(83765);function Xt(t){return Xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xt(t)}function Jt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Yt(r.key),r)}}function Yt(t){var e=function(t){if("object"!=Xt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Xt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xt(e)?e:e+""}function te(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(te=function(){return!!t})()}function ee(){return ee="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ne(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ee.apply(null,arguments)}function ne(t){return ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ne(t)}function re(t,e){return re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},re(t,e)}n(74978);var oe=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=ne(e),function(t,e){if(e&&("object"==Xt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,te()?Reflect.construct(e,n||[],ne(t).constructor):e.apply(t,n))}(this,e,[t])).options=n,r.configureMenuDimensions=r.configureMenuDimensions.bind(r),r.initialize(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&re(t,e)}(e,t),n=e,r=[{key:"initialize",value:function(){this.player.ready(this.configureMenuDimensions),this.player.one("play",this.configureMenuDimensions),this.player.on("resize",this.configureMenuDimensions),this.player.on("fullscreenchange",this.configureMenuDimensions),this.player.on("resizemenus",this.configureMenuDimensions),this.player.on("ready",this.configureMenuDimensions)}},{key:"dispose",value:function(){var t,n,r;this.player.off("resize",this.configureMenuDimensions),this.player.off("fullscreenchange",this.configureMenuDimensions),this.player.off("resizemenus",this.configureMenuDimensions),this.player.off("ready",this.configureMenuDimensions),(t=e,n=this,"function"==typeof(r=ee(ne(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([])}},{key:"configureMenuDimensions",value:function(){var t=this,e=function(e){if(!t.options.mobile){var n=t.player.getChild("collapserator"),r=n.getChild("volumePanel"),o=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:e},o),t.player.trigger("volumechange")}},n=this.player.isFullscreen();if(n&&!this.options.mobile){var r=this.player.whiteboardModePlugin().side;if(e("top"!==r),"left"===r||"right"===r||"top"===r){var o=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach(function(t){t.style.paddingTop=null,t.style.marginBottom=null,t.style.width="calc(".concat(o,"px - 4em)")})}}n||e(!0);var i=this.player.currentWidth(),u=this.player.currentHeight()/i*100,a=this.player.el().querySelector(".cv-collapsorator"),c=this.player.el().querySelectorAll(".vjs-menu"),l=a&&a.offsetHeight;l?("CreateClipSeekBar"===this.options.seekBarName&&(l+=22),c&&c.length&&c.forEach(function(e){!n&&t.options.overflowControls?e.style.paddingTop="80%":e.style.paddingTop="calc(".concat(u,"% - ").concat(l,"px)"),e.style.marginBottom="".concat(l,"px"),e.style.width=null,e.querySelector(".vjs-menu-content")&&(i<=450?t.player.addClass("cv-player-small"):t.player.removeClass("cv-player-small"))})):this.player.one("play",this.configureMenuDimensions)}}],r&&Jt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));r.Z.registerPlugin("configureMenuDimensionsPlugin",oe);var ie=n(42892);function ue(t){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ue(t)}function ae(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ce(r.key),r)}}function ce(t){var e=function(t){if("object"!=ue(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ue(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ue(e)?e:e+""}function le(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(le=function(){return!!t})()}function se(){return se="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=fe(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},se.apply(null,arguments)}function fe(t){return fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fe(t)}function pe(t,e){return pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pe(t,e)}var ye=r.Z.getPlugin("plugin"),he="cvplayer-volume",be="cvplayer-mute",ve=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=fe(e),function(t,e){if(e&&("object"==ue(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,le()?Reflect.construct(e,n||[],fe(t).constructor):e.apply(t,n))}(this,e,[t])).enabled=!0,n.player.ready(function(){return n.initialize()}),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pe(t,e)}(e,t),n=e,r=[{key:"initialize",value:function(){this.player.options_.mobile?this.removeVolumeControl():ie.S.hasLocalStorage()&&(this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var t=ie.S.get(he),e=ie.S.get(be);t&&this.player.volume(+t),e&&this.player.muted("true"===e)}},{key:"saveVolumeState",value:function(){this.enabled&&(ie.S.set(he,this.player.volume().toString()),ie.S.set(be,this.player.muted().toString()))}},{key:"removeVolumeControl",value:function(){this.player.volume(1);var t=this.player.getChild("collapserator"),e=t.getChild("volumePanel");t.removeChild(e)}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1}},{key:"dispose",value:function(){var t,n,r;this.player.off("volumechange",this.saveVolumeState),(t=e,n=this,"function"==typeof(r=se(fe(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([])}}],r&&ae(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ye);function de(t){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},de(t)}function me(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ge(r.key),r)}}function ge(t){var e=function(t){if("object"!=de(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=de(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==de(e)?e:e+""}function we(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(we=function(){return!!t})()}function Oe(t){return Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Oe(t)}function je(t,e){return je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},je(t,e)}r.Z.registerPlugin("persistVolumePlugin",ve);var Se=r.Z.getPlugin("plugin"),Pe="cvplayer-playback-rate",_e=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Oe(e),function(t,e){if(e&&("object"==de(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,we()?Reflect.construct(e,n||[],Oe(t).constructor):e.apply(t,n))}(this,e,[t])).options=n,r.player.dataLoaded(function(){return r.initialize()}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&je(t,e)}(e,t),n=e,(r=[{key:"initialize",value:function(){var t,e=this;if(ie.S.hasLocalStorage()){this.savePlaybackRate=this.savePlaybackRate.bind(this),this.player.on("ratechange",this.savePlaybackRate),this.one("dispose",function(){e.player.off("ratechange",e.savePlaybackRate)});var n=+ie.S.get(Pe);(null===(t=this.player.options_.playbackRates)||void 0===t?void 0:t.some(function(t){return t===n}))&&this.player.playbackRate(n)}}},{key:"savePlaybackRate",value:function(){var t,e=this.player.playbackRate().toString();ie.S.set(Pe,e),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({rate:e},{actionType:Et.Vw.Select,workflowPhase:Et.eu.Complete,descriptor:Et.UX.ChangeSpeed,entity:Et.py.PlaybackSpeed,eventVersion:Et.eq.V3})}}])&&me(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Se);function ke(t){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ke(t)}function Ce(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Te(r.key),r)}}function Te(t){var e=function(t){if("object"!=ke(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ke(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ke(e)?e:e+""}function Ee(t,e){if(e&&("object"==ke(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Re(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Re=function(){return!!t})()}function xe(t){return xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xe(t)}function Be(t,e){return Be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Be(t,e)}r.Z.registerPlugin("persistPlaybackRatePlugin",_e);var Le=function(t){function e(t){var n,r,o,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),r=this,i=[t],o=xe(o=e),(n=Ee(r,Re()?Reflect.construct(o,i||[],xe(r).constructor):o.apply(r,i))).fullscreenBecauseOfRotate=!1,n.player.supportsFullScreen()?(n.onRotate=n.onRotate.bind(n),n.onFullscreenChange=n.onFullscreenChange.bind(n),n.player.ready(function(){return n.initialize()}),n):Ee(n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Be(t,e)}(e,t),n=e,(r=[{key:"initialize",value:function(){this.player.on("fullscreenchange",this.onFullscreenChange),window.addEventListener("orientationchange",this.onRotate)}},{key:"dispose",value:function(){this.player.off("fullscreenchange",this.onFullscreenChange),window.removeEventListener("orientationchange",this.onRotate)}},{key:"onFullscreenChange",value:function(){this.player.isFullscreen()||(this.fullscreenBecauseOfRotate=!1)}},{key:"onRotate",value:function(){var t=this.getAngle();90===t||-90===t||270===t?(this.player.requestFullscreen(),this.fullscreenBecauseOfRotate=!0):this.fullscreenBecauseOfRotate&&this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"getAngle",value:function(){var t,e;return"number"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.angle)?window.screen.orientation.angle:0}}])&&Ce(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));r.Z.registerPlugin("fullscreenOnRotatePlugin",Le);var Me="\n <svg viewBox='0 0 434 71'>\n <g>\n <path fill='#FFFFFF' d='M114.44 56.57l3.5 3.5a32.87 32.87 0 0 1-25.16 11.26c-19.63 0-33.62-15.54-33.62-35.16C59.16 16.55 73.16 1 92.78 1a32.31 32.31 0 0 1 24.19 10.4l-3.6 3.3a27.32 27.32 0 0 0-20.59-8.74c-16.91 0-28.39 13.5-28.39 30.21s11.48 30.21 28.39 30.21a28.08 28.08 0 0 0 21.66-9.81zM126.64 1h4.55v70.22h-4.73L126.64 1zm17.3 10.6a3.7 3.7 0 1 1 0 7.4 3.7 3.7 0 0 1 0-7.4zm-2.41 15.07h4.81v44.56h-4.81V26.67zm48 33.15l3.33 3.15a21.8 21.8 0 0 1-17.31 8.61c-12.59 0-21.76-10-21.76-22.22 0-12.22 9.17-22.22 21.76-22.22a21.84 21.84 0 0 1 16.85 8l-3.43 3.06a17.15 17.15 0 0 0-13.42-6.3c-10.09 0-16.76 8.15-16.76 17.5s6.67 17.5 16.76 17.5a17.38 17.38 0 0 0 13.98-7.08zm14.99-9.33v20.74h-4.73V1.01h4.73v47.75l20.74-19.02h6.64l-21.56 19.84L234 71.23h-7.01l-22.47-20.74z'/>\n <path fill='#F8981D' d='M304.09 19.4a5.56 5.56 0 1 1 0-11.12 5.56 5.56 0 0 1 0 11.12zm-5.56 7.27h11.11v44.56h-11.11V26.67zm61.42 22.15c0 .81 0 2.42-.09 4h-31.75c.8 3.77 5.2 8.61 11.93 8.61a17.11 17.11 0 0 0 11.66-4.31l5.38 8.16a27.23 27.23 0 0 1-17 6.1c-12.92 0-22.88-9.87-22.88-22.34s9.06-22.33 21.35-22.33c11.62-.04 21.4 9.02 21.4 22.11zm-10.77-3.76c-.18-3.68-3.58-8.62-10.67-8.62-6.91 0-10.05 4.85-10.4 8.62h21.07zM385.92 71h-6.42l-19.64-44.37h13.97l9.16 23.98 9.72-23.98h8.31l9.63 23.98 9.16-23.98h13.97L414.24 71h-6.52l-10.85-23.7L385.92 71zm-120.22.35h-6L226.11 1.01h17.01l19.42 44.18 18.08-44.18h16.91L265.7 71.35zM0 1l41 35L0 71V1z'/>\n </g>\n </svg>\n",De=n(95569);function Ze(t){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(t)}function Ie(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Fe(r.key),r)}}function Fe(t){var e=function(t){if("object"!=Ze(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ze(e)?e:e+""}function Ae(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ae=function(){return!!t})()}function Ne(t){return Ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ne(t)}function ze(t,e){return ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ze(t,e)}var Ve=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Ne(e),function(t,e){if(e&&("object"==Ze(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ae()?Reflect.construct(e,n||[],Ne(t).constructor):e.apply(t,n))}(this,e,[t,n])).update=(0,De.P2)(r.update.bind(r),1e3),t.on("timeupdate",r.update),t.one("dispose",function(){t.off("timeupdate",r.update),r.el_.removeEventListener("click",r.pause)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ze(t,e)}(e,t),n=e,(o=[{key:"update",value:function(){var t=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(t)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var t={innerHTML:Me,className:this.buildCSSClass()},e={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=r.Z.dom.createEl("a",t,e);return this.createControlTextEl(n),n.addEventListener("click",this.pause.bind(this)),n}},{key:"pause",value:function(){this.player_.pause()}}])&&Ie(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Button"));function He(t){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},He(t)}function Ue(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ge(r.key),r)}}function Ge(t){var e=function(t){if("object"!=He(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=He(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==He(e)?e:e+""}function qe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(qe=function(){return!!t})()}function We(t){return We=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},We(t)}function Qe(t,e){return Qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qe(t,e)}Ve.prototype.controlText_="Open in ClickView",r.Z.registerComponent("OpenExternallyButton",Ve);var Ke=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=We(e),function(t,e){if(e&&("object"==He(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,qe()?Reflect.construct(e,n||[],We(t).constructor):e.apply(t,n))}(this,e,[t,n])).options=n,t.ready(function(){return r.onReady()}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qe(t,e)}(e,t),n=e,(r=[{key:"onReady",value:function(){var t=this.player.getChild("collapserator"),e=t.getChild("customControlSpacer"),n=t.children_.indexOf(e);t.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&Ue(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function $e(t){return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$e(t)}function Xe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Je(r.key),r)}}function Je(t){var e=function(t){if("object"!=$e(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=$e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$e(e)?e:e+""}function Ye(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ye=function(){return!!t})()}function tn(t,e,n,r){var o=en(nn(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function en(){return en="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=nn(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},en.apply(null,arguments)}function nn(t){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nn(t)}function rn(t,e){return rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},rn(t,e)}r.Z.registerPlugin("openExternallyPlugin",Ke);var on=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=nn(e),function(t,e){if(e&&("object"==$e(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ye()?Reflect.construct(e,n||[],nn(t).constructor):e.apply(t,n))}(this,e,[t,n])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rn(t,e)}(e,t),n=e,(r=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(tn(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,n,r){return tn(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"setUi",value:function(t,e){var n=this,r=t>0,o=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(o,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*t,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(function(){n.removeText()},e)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&Xe(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("component"));function un(t){return un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},un(t)}function an(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,cn(r.key),r)}}function cn(t){var e=function(t){if("object"!=un(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=un(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==un(e)?e:e+""}function ln(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ln=function(){return!!t})()}function sn(){return sn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=fn(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},sn.apply(null,arguments)}function fn(t){return fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fn(t)}function pn(t,e){return pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pn(t,e)}r.Z.registerComponent("TouchControls",on);var yn=r.Z.getPlugin("plugin"),hn=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=fn(e),function(t,e){if(e&&("object"==un(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ln()?Reflect.construct(e,n||[],fn(t).constructor):e.apply(t,n))}(this,e,[t])).doubleTouchCount=0,n.seekStartTime=0,n.directionModifier=0,n.bindFunctions(),n.player.ready(function(){return n.initialize()}),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pn(t,e)}(e,t),n=e,r=[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this),this.unBindEventListeners=this.unBindEventListeners.bind(this)}},{key:"initialize",value:function(){var t=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",function(){t.player.off("ready",t.reBindEventListeners)}),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.tech.on("touchstart",this.onTouchStart),this.tech.on("touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&"Html5"===this.tech.name()&&(this.tech.off("touchstart",this.onTouchStart),this.tech.off("touchend",this.onTouchEnd))}},{key:"dispose",value:function(){var t,n,r;(t=e,n=this,"function"==typeof(r=sn(fn(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([]),this.unBindEventListeners()}},{key:"onTouchStart",value:function(t){this.touchStartTime=t.timeStamp,this.userActive=this.player.userActive()}},{key:"onTouchEnd",value:function(t){var e=this;if(t.changedTouches.length){if(t.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(t),void(this.lastTouchTime=t.timeStamp);this.resetProperties(),this.lastTouchTime=t.timeStamp,t.timeStamp-this.touchStartTime<300&&window.setTimeout(function(){e.doubleTouchCount||(e.player.paused()?e.player.play():e.userActive&&e.player.pause())},300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(t){var e=this.player.el().getBoundingClientRect(),n=e.left+e.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),t.changedTouches[0].pageX<n?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}],r&&an(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(yn);function bn(t){return bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bn(t)}function vn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,dn(r.key),r)}}function dn(t){var e=function(t){if("object"!=bn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bn(e)?e:e+""}r.Z.registerPlugin("touchControls",hn);var mn=function(){return t=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=n.id,this.plugin=e,this.source=n,this.enabled=this.enabled.bind(this)},(e=[{key:"enabled",value:function(t){return void 0===t?this.plugin.currentSource===this.source:(t&&this.plugin.setSource(this.source.id),t)}}])&&vn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function gn(t){return gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gn(t)}function wn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,On(r.key),r)}}function On(t){var e=function(t){if("object"!=gn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=gn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gn(e)?e:e+""}function jn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(jn=function(){return!!t})()}function Sn(t){return Sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Sn(t)}function Pn(t,e){return Pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pn(t,e)}var _n=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Sn(e),function(t,e){if(e&&("object"==gn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,jn()?Reflect.construct(e,n||[],Sn(t).constructor):e.apply(t,n))}(this,e,[t])).options_=n,r.player.ready(function(){return r.initialize()}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pn(t,e)}(e,t),n=e,r=[{key:"initialize",value:function(){var t=this;this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources),this.onQualityChange=this.onQualityChange.bind(this),this.qualityLevels.on("change",this.onQualityChange),this.player.one("dispose",function(){t.qualityLevels.off("change",t.onQualityChange)})}},{key:"currentSource",get:function(){return this._currentSource}},{key:"onQualityChange",value:function(){var t=this.qualityLevels[this.qualityLevels.selectedIndex];this.player.trigger("cv-quality-change",t.id)}},{key:"setSource",value:function(t){var e=this,n=this.getSourceById(t);if(null===n)return this.currentSource;var r=this.player.currentTime(),o=!this.player.paused();this._currentSource=n;var i=this.player.playbackRate(),u=this.player.hasStarted();return this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",function(){e.player.playbackRate(i),e.player.currentTime()!==r&&e.player.currentTime(r),o&&e.player.play(),u&&e.player.hasStarted(!0)}),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(t){return this.sources.find(function(e){return e.id===t})}},{key:"repopulateSources",value:function(t){for(var e=null;this.qualityLevels.length;)this.qualityLevels[0].enabled&&(e=this.qualityLevels[0].id),this.qualityLevels.removeQualityLevel(this.qualityLevels[0]);this.sources=[],this.populateSources(t,e)}},{key:"sortSources",value:function(t){return t.sort(function(t,e){return t.id===e.id?0:+t.id>+e.id?-1:1})}},{key:"populateSources",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=null;(t=this.sortSources(t)).forEach(function(t){e.qualityLevels.addQualityLevel(new mn(e,t)),e.sources.push(t),e.trigger({event:"addsource",source:t}),null===n?t.default&&(r=t):t.id===n&&(r=t)}),null===r&&(r=this.sources[0]),null!==r&&this.setSource(r.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(t){for(var e=this.qualityLevels,n=-1,r=0;r<e.length;r++)if(e[r].id===t.id){n=r;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:"change"})}}],r&&wn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function kn(t){return kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kn(t)}function Cn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Tn(r.key),r)}}function Tn(t){var e=function(t){if("object"!=kn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=kn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kn(e)?e:e+""}r.Z.registerPlugin("progressiveFiles",_n);var En=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(t,e){var n=t.getQualityLevelById(e);if(n||(n=this.getNextBestQuality(t,e)),!n)return null;for(var r=0;r<t.length;r++){var o=t[r];o.enabled=n.id===o.id}return n}},{key:"getNextBestQuality",value:function(t,e){var n=this.getKnownProfiles(),r=n.indexOf(e);if(r>=0){for(var o=r+1;o<n.length;o++){var i=n[o],u=t.getQualityLevelById(i);if(u)return u}for(var a=r-1;a>0;a--){var c=n[a],l=t.getQualityLevelById(c);if(l)return l}}return null}}],null&&Cn(t.prototype,null),e&&Cn(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Rn(t){return Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rn(t)}function xn(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return Bn(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(Bn(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,Bn(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,Bn(f,"constructor",l),Bn(l,"constructor",c),c.displayName="GeneratorFunction",Bn(l,o,"GeneratorFunction"),Bn(f),Bn(f,o,"Generator"),Bn(f,r,function(){return this}),Bn(f,"toString",function(){return"[object Generator]"}),(xn=function(){return{w:i,m:p}})()}function Bn(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}Bn=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){Bn(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},Bn(t,e,n,r)}function Ln(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Mn(r.key),r)}}function Mn(t){var e=function(t){if("object"!=Rn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Rn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Rn(e)?e:e+""}var Dn=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e.name,this.playbackProfile=e.playbackProfile,this.address=new URL(e.httpsAddress)},(e=[{key:"getUrl",value:function(t){return t?this.address+"cache?file="+encodeURIComponent(t):null}},{key:"ping",value:function(){return t=this,e=void 0,n=void 0,r=xn().m(function t(){var e,n,r,o;return xn().w(function(t){for(;;)switch(t.n){case 0:return e=new AbortController,n=setTimeout(function(){return e.abort()},1e3),t.p=1,t.n=2,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:e.signal});case 2:return r=t.v,t.n=3,r.text();case 3:return o=t.v,clearTimeout(n),t.a(2,"PONG"===o);case 4:return t.p=4,t.v,t.a(2,!1)}},t,this,[[1,4]])}),new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())});var t,e,n,r}}])&&Ln(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Zn(t){return Zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zn(t)}function In(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return Fn(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(Fn(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,Fn(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,Fn(f,"constructor",l),Fn(l,"constructor",c),c.displayName="GeneratorFunction",Fn(l,o,"GeneratorFunction"),Fn(f),Fn(f,o,"Generator"),Fn(f,r,function(){return this}),Fn(f,"toString",function(){return"[object Generator]"}),(In=function(){return{w:i,m:p}})()}function Fn(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}Fn=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){Fn(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},Fn(t,e,n,r)}function An(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Nn(r.key),r)}}function Nn(t){var e=function(t){if("object"!=Zn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Zn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Zn(e)?e:e+""}var zn=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.player=e,this.logger=r.Z.log.createLogger("localcache")},(e=[{key:"setSource",value:function(t,e){return n=this,r=void 0,o=void 0,i=In().m(function n(){var r;return In().w(function(n){for(;;)switch(n.n){case 0:if(!this.player.localCache||void 0===(null==t?void 0:t.src)){n.n=2;break}return n.n=1,this.player.localCache().getActiveLocalCache();case 1:null!==(r=n.v)&&(this.logger.debug("Using Local Cache",r),t.src=r.getUrl(t.src));case 2:e(null,t);case 3:return n.a(2)}},n,this)}),new(o||(o=Promise))(function(t,e){function u(t){try{c(i.next(t))}catch(t){e(t)}}function a(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o(function(t){t(n)})).then(u,a)}c((i=i.apply(n,r||[])).next())});var n,r,o,i}}])&&An(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Vn(t){return Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vn(t)}function Hn(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return Un(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(Un(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,Un(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,Un(f,"constructor",l),Un(l,"constructor",c),c.displayName="GeneratorFunction",Un(l,o,"GeneratorFunction"),Un(f),Un(f,o,"Generator"),Un(f,r,function(){return this}),Un(f,"toString",function(){return"[object Generator]"}),(Hn=function(){return{w:i,m:p}})()}function Un(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}Un=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){Un(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},Un(t,e,n,r)}function Gn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,qn(r.key),r)}}function qn(t){var e=function(t){if("object"!=Vn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Vn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vn(e)?e:e+""}function Wn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Wn=function(){return!!t})()}function Qn(){return Qn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Kn(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Qn.apply(null,arguments)}function Kn(t){return Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Kn(t)}function $n(t,e){return $n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$n(t,e)}r.Z.use("*",function(t){return new zn(t)});var Xn='<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.9"><g id="Local-Cache" transform="translate(2.000000, 2.000000)"><rect id="Rectangle" fill="#FFFFFF" x="0" y="2.4" width="18.8" height="15.2"></rect><ellipse id="Oval" fill="#FFFFFF" cx="9.4" cy="2.4" rx="9.4" ry="2.4"></ellipse><ellipse id="Oval-Copy" fill="#FFFFFF" cx="9.4" cy="17.6" rx="9.4" ry="2.4"></ellipse><g id="Logo/Circle" transform="translate(2.500000, 3.000000)"><circle id="Oval" fill="#FFFFFF" cx="7" cy="7" r="7"></circle><polygon id="Fill-1" fill="#F8981D" points="4.66666667 2.33333333 4.66666667 11.4245258 10.0383286 6.87866667"></polygon></g></g></g></svg>',Jn=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Kn(e),function(t,e){if(e&&("object"==Vn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Wn()?Reflect.construct(e,n||[],Kn(t).constructor):e.apply(t,n))}(this,e,[t,n])).hide(),r.onLocalCacheChange=r.onLocalCacheChange.bind(r),t.ready(function(){r.initialize()}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$n(t,e)}(e,t),n=e,r=[{key:"createEl",value:function(){return(t=e,n=this,"function"==typeof(r=Qn(Kn(1&3?t.prototype:t),"createEl",n))?function(t){return r.apply(n,t)}:r)(["div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(Xn,"</div>")},{title:"Streaming from ClickView Local Cache"}]);var t,n,r}},{key:"initialize",value:function(){var t=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",function(){t.localCachePlugin.off("localcachechanged",t.onLocalCacheChange)}),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return t=this,e=void 0,n=void 0,r=Hn().m(function t(){return Hn().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.localCachePlugin.getActiveLocalCache();case 1:t.v?this.show():this.hide();case 2:return t.a(2)}},t,this)}),new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())});var t,e,n,r}}],r&&Gn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function Yn(t){return Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(t)}function tr(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return er(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(er(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,er(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,er(f,"constructor",l),er(l,"constructor",c),c.displayName="GeneratorFunction",er(l,o,"GeneratorFunction"),er(f),er(f,o,"Generator"),er(f,r,function(){return this}),er(f,"toString",function(){return"[object Generator]"}),(tr=function(){return{w:i,m:p}})()}function er(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}er=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){er(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},er(t,e,n,r)}function nr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,rr(r.key),r)}}function rr(t){var e=function(t){if("object"!=Yn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Yn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Yn(e)?e:e+""}function or(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(or=function(){return!!t})()}function ir(){return ir="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ur(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ir.apply(null,arguments)}function ur(t){return ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ur(t)}function ar(t,e){return ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ar(t,e)}r.Z.registerComponent("localCacheIndicator",Jn);var cr=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())})},lr=function(t){function e(t,n){var o;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,n){return e=ur(e),function(t,e){if(e&&("object"==Yn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,or()?Reflect.construct(e,n||[],ur(t).constructor):e.apply(t,n))}(this,e,[t])).logger_=r.Z.log.createLogger("localcache"),void 0===n)throw Error("no options defined");return o.localCaches_=n.localCacheAddresses.map(function(t){return new Dn(t)}),o.player.ready(function(){o.initialize(),n.enabled&&o.enable()}),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ar(t,e)}(e,t),n=e,o=[{key:"isEnabled",get:function(){return this.enabled_}},{key:"enable",value:function(){this.enabled_=!0,this.resetActiveLocalCache()}},{key:"disable",value:function(){this.enabled_=!1}},{key:"getActiveLocalCache",value:function(){return this.enabled_?this.activeLocalCache_:null}},{key:"resetActiveLocalCache",value:function(){this.clearActiveLocalCache(),this.activeLocalCache_=this.getActiveLocalCacheInternal()}},{key:"clearActiveLocalCache",value:function(){this.activeLocalCache_&&(this.activeLocalCache_=null,this.onLocalCacheChange(null))}},{key:"removeLocalCache",value:function(t){this.localCaches_=this.localCaches_.filter(function(e){return e!==t})}},{key:"dispose",value:function(){var t,n,r;(t=e,n=this,"function"==typeof(r=ir(ur(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([])}},{key:"initialize",value:function(){this.player.controlBar.addChild("localCacheIndicator")}},{key:"handleNetworkError",value:function(){return cr(this,void 0,void 0,tr().m(function t(){var e;return tr().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.getActiveLocalCache();case 1:if(!(e=t.v)){t.n=3;break}return t.n=2,e.ping();case 2:t.v&&this.removeLocalCache(e);case 3:return this.resetActiveLocalCache(),t.n=4,this.getActiveLocalCache();case 4:return this.resetSource(),t.a(2,!0)}},t,this)}))}},{key:"resetSource",value:function(){for(var t=this.player.qualityLevels(),e=0;e<t.length;e++)t[e].enabled&&(t[e].enabled=!0)}},{key:"getActiveLocalCacheInternal",value:function(){return cr(this,void 0,void 0,tr().m(function t(){var e,n,r,o=this;return tr().w(function(t){for(;;)switch(t.n){case 0:return e=[],n=function(t){return cr(o,void 0,void 0,tr().m(function n(){return tr().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,t.ping();case 1:if(!n.v){n.n=2;break}e.push(t);case 2:return n.a(2)}},n)}))},t.n=1,Promise.all(this.localCaches_.map(function(t){return n(t)}));case 1:if(!(e.length>0)){t.n=2;break}return r=e[0],this.onLocalCacheChange(r),t.a(2,r);case 2:return t.a(2,null)}},t,this)}))}},{key:"onLocalCacheChange",value:function(t){this.logger_.debug("Local Cache changed",t),this.trigger("localcachechanged",{localCache:t});var e=!1;t&&t.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",t.playbackProfile),En.enableProfileOrNextBest(this.player.qualityLevels(),t.playbackProfile),e=!0),e||this.player.src(this.player.src())}}],o&&nr(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getPlugin("plugin"));function sr(t){return sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sr(t)}function fr(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return pr(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(pr(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,pr(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,pr(f,"constructor",l),pr(l,"constructor",c),c.displayName="GeneratorFunction",pr(l,o,"GeneratorFunction"),pr(f),pr(f,o,"Generator"),pr(f,r,function(){return this}),pr(f,"toString",function(){return"[object Generator]"}),(fr=function(){return{w:i,m:p}})()}function pr(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}pr=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){pr(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},pr(t,e,n,r)}function yr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,hr(r.key),r)}}function hr(t){var e=function(t){if("object"!=sr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=sr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==sr(e)?e:e+""}function br(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(br=function(){return!!t})()}function vr(){return vr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=dr(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},vr.apply(null,arguments)}function dr(t){return dr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},dr(t)}function mr(t,e){return mr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mr(t,e)}r.Z.registerPlugin("localCache",lr);var gr=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())})},wr=function(t){function e(t,n){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,n){return e=dr(e),function(t,e){if(e&&("object"==sr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,br()?Reflect.construct(e,n||[],dr(t).constructor):e.apply(t,n))}(this,e,[t])).playerApi=n.playerApi,o.fileToken=n.fileToken,o.logger=r.Z.log.createLogger("video-signature-expiry-plugin"),o.bindErrorHandlers(),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mr(t,e)}(e,t),n=e,o=[{key:"bindErrorHandlers",value:function(){this.onError=this.onError.bind(this),this.player.on("error",this.onError)}},{key:"dispose",value:function(){var t,n,r;this.player.off("error",this.onError),(t=e,n=this,"function"==typeof(r=vr(dr(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([])}},{key:"onError",value:function(){return gr(this,void 0,void 0,fr().m(function t(){var e,n=this;return fr().w(function(t){for(;;)switch(t.n){case 0:if((e=this.player.error().code)===MediaError.MEDIA_ERR_NETWORK||e===MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED){t.n=1;break}return t.a(2);case 1:return t.n=2,this.player.localCache().getActiveLocalCache();case 2:if(!t.v){t.n=3;break}return this.callErrorHandler(function(){return n.player.localCache().handleNetworkError()}),t.a(2);case 3:this.callErrorHandler(function(){return n.handleVideoSignatureExpiry()});case 4:return t.a(2)}},t,this)}))}},{key:"handleVideoSignatureExpiry",value:function(){return gr(this,void 0,void 0,fr().m(function t(){var e,n;return fr().w(function(t){for(;;)switch(t.n){case 0:if(this.playerApi&&this.fileToken){t.n=1;break}return t.a(2,!1);case 1:if(!(this.refetchedSourcesTimestamp+9e5>Date.now())){t.n=2;break}return t.a(2,!1);case 2:return this.refetchedSourcesTimestamp=Date.now(),e=null,t.p=3,this.logger.debug("Detected expired mp4 urls, attempting to refetch"),n="".concat(this.playerApi.origin,"/api/files?fileToken=").concat(this.fileToken),t.n=4,At.e.get(n);case 4:e=t.v,t.n=6;break;case 5:return t.p=5,t.v,this.logger.error("Failed to refetch expired mp4 urls"),t.a(2,!1);case 6:return this.logger.debug("Mp4 urls successfully refetched"),this.player.progressiveFiles().repopulateSources(e.progressive.map(function(t){return{id:t.profile,mimeType:t.mimeType,url:t.url}})),this.fileToken=e.fileToken,t.a(2,!0)}},t,this,[[3,5]])}))}},{key:"callErrorHandler",value:function(t){return gr(this,void 0,void 0,fr().m(function e(){var n,r,o,i,u=this;return fr().w(function(e){for(;;)switch(e.n){case 0:return n=this.player.currentTime(),r=!this.player.paused(),o=this.player.playbackRate(),i=function(){u.player.playbackRate(o),u.player.currentTime(n),r&&u.player.play(),u.player.error(null)},this.player.one("loadedmetadata",i),e.n=1,t();case 1:if(!e.v){e.n=2;break}return e.a(2);case 2:this.player.off("loadedmetadata",i);case 3:return e.a(2)}},e,this)}))}}],o&&yr(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getPlugin("plugin"));function Or(t){return Or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Or(t)}function jr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Sr(r.key),r)}}function Sr(t){var e=function(t){if("object"!=Or(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Or(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Or(e)?e:e+""}function Pr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Pr=function(){return!!t})()}function _r(t){return _r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_r(t)}function kr(t,e){return kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},kr(t,e)}r.Z.registerPlugin("handleNetworkErrors",wr);var Cr=r.Z.getPlugin("plugin"),Tr="cvplayer-show-subtitles",Er="cvplayer-selected-language",Rr="cvplayer-subtitle-size",xr=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=_r(e),function(t,e){if(e&&("object"==Or(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Pr()?Reflect.construct(e,n||[],_r(t).constructor):e.apply(t,n))}(this,e,[t])).options=n,r.initialize(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kr(t,e)}(e,t),n=e,(r=[{key:"initialize",value:function(){this.applyUserPreferences=this.applyUserPreferences.bind(this),this.player.textTracks().length&&(this.bindEventListeners(),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var t=!!this.options.showSubtitles,e=this.safeGet(Tr);if("true"===e&&(t=!0),"false"===e&&(t=!1),t){var n=this.guessWhichTrack();n&&(n.mode="showing")}else this.hideSubtitles();var r=this.safeGet(Rr);r||(r=this.options.subtitleSize),this.player.options_.mobile&&(r="medium"),r&&this.player.textTrackSettings.setSizeSetting(r)}},{key:"safeGet",value:function(t){if(ie.S.hasLocalStorage())return ie.S.get(t)}},{key:"onSelectedLanguageChange",value:function(){for(var t,e,n=this.player.textTracks(),r=0;r<n.length;r++){var o=n[r];if("showing"===o.mode)return ie.S.set(Tr,"true"),ie.S.set(Er,o.language),void(null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({language:o.language},{actionType:Et.Vw.Select,entity:Et.py.Subtitle,workflowPhase:Et.eu.Complete,descriptor:Et.DL.On}))}ie.S.set(Tr,"false"),ie.S.remove(Er),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({language:""},{actionType:Et.Vw.Select,entity:Et.py.Subtitle,workflowPhase:Et.eu.Complete,descriptor:Et.DL.Off,eventVersion:Et.eq.V3})}},{key:"bindEventListeners",value:function(){var t=this;ie.S.hasLocalStorage()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",function(){t.player.off("cv:languageselected",t.onSelectedLanguageChange),t.player.off("changesubtitlesize",t.onChangeSubtitleSize)}))}},{key:"onChangeSubtitleSize",value:function(){var t=this.player.textTrackSettings.getSizeSetting();ie.S.set(Rr,t)}},{key:"guessWhichTrack",value:function(){for(var t,e,n=this.safeGet(Er)||window.navigator.language,r=this.getLanguageParts(n),o=r.language,i=r.country,u=this.player.textTracks(),a=0;a<u.length;a++){var c=u[a],l=this.getLanguageParts(c.language),s=l.language,f=l.country;if(s===o&&(t=c,f||(e=c),f===i))return t}return e||t||null}},{key:"getLanguageParts",value:function(t){var e=t.toLowerCase().split("-");return{language:e[0],country:e[1]}}},{key:"hideSubtitles",value:function(){for(var t=this.player.textTracks(),e=0;e<t.length;e++)t[e].mode="hidden"}},{key:"previewModeSubtitles",value:function(){var t=this.guessWhichTrack();t&&(t.mode="showing"),this.player.off("changesubtitlesize",this.onChangeSubtitleSize),this.player.textTrackSettings.setSizeSetting("large"),this.player.on("changesubtitlesize",this.onChangeSubtitleSize)}}])&&jr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Cr);function Br(t){return Br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Br(t)}function Lr(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return Mr(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(Mr(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,Mr(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,Mr(f,"constructor",l),Mr(l,"constructor",c),c.displayName="GeneratorFunction",Mr(l,o,"GeneratorFunction"),Mr(f),Mr(f,o,"Generator"),Mr(f,r,function(){return this}),Mr(f,"toString",function(){return"[object Generator]"}),(Lr=function(){return{w:i,m:p}})()}function Mr(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}Mr=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){Mr(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},Mr(t,e,n,r)}function Dr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Zr(r.key),r)}}function Zr(t){var e=function(t){if("object"!=Br(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Br(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Br(e)?e:e+""}function Ir(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ir=function(){return!!t})()}function Fr(t){return Fr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fr(t)}function Ar(t,e){return Ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ar(t,e)}r.Z.registerPlugin("persistSubtitleSettingsPlugin",xr);var Nr=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())})},zr=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Fr(e),function(t,e){if(e&&("object"==Br(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ir()?Reflect.construct(e,n||[],Fr(t).constructor):e.apply(t,n))}(this,e,[t])).options=n,r.player.ready(function(){return r.initialize()}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ar(t,e)}(e,t),n=e,(r=[{key:"initialize",value:function(){return Nr(this,void 0,void 0,Lr().m(function t(){var e,n,r,o,i=this;return Lr().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.getActiveLocalCache();case 1:if(e=t.v,(n=e?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(n="1080"),ie.S.hasLocalStorage()&&(r=ie.S.get(this.getStorageKey(!!e)))&&(n=r),o=this.player.qualityLevels(),(null==e?void 0:e.playbackProfile)||En.enableProfileOrNextBest(o,n),ie.S.hasLocalStorage()){t.n=2;break}return t.a(2);case 2:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),o.on("change",this.onQualityLevelsChange),this.on("dispose",function(){o.off("change",i.onQualityLevelsChange)});case 3:return t.a(2)}},t,this)}))}},{key:"onQualityLevelsChange",value:function(){var t;return Nr(this,void 0,void 0,Lr().m(function e(){var n,r,o;return Lr().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.isLocalCacheActive();case 1:n=e.v,r=this.player.qualityLevels(),o=r[r.selectedIndex],ie.S.set(this.getStorageKey(n),o.id),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({quality:o.id},{actionType:Et.Vw.Select,workflowPhase:Et.eu.Complete,descriptor:Et.UX.ChangeResolution,entity:Et.py.Resolution,eventVersion:Et.eq.V3});case 2:return e.a(2)}},e,this)}))}},{key:"isLocalCacheActive",value:function(){return Nr(this,void 0,void 0,Lr().m(function t(){return Lr().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.player.localCache().getActiveLocalCache();case 1:return t.a(2,!!t.v)}},t,this)}))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(t){return t?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&Dr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function Vr(t){return Vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vr(t)}function Hr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ur(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Wr(r.key),r)}}function qr(t,e,n){return e&&Gr(t.prototype,e),n&&Gr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Wr(t){var e=function(t){if("object"!=Vr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Vr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vr(e)?e:e+""}function Qr(t,e,n){return e=$r(e),function(t,e){if(e&&("object"==Vr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Kr()?Reflect.construct(e,n||[],$r(t).constructor):e.apply(t,n))}function Kr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Kr=function(){return!!t})()}function $r(t){return $r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$r(t)}function Xr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jr(t,e)}function Jr(t,e){return Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jr(t,e)}r.Z.registerPlugin("persistQualitySettingsPlugin",zr);var Yr=r.Z.getComponent("Component"),to=function(t){function e(t,n){return Ur(this,e),Qr(this,e,[t,n])}return Xr(e,t),qr(e,[{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var t=this.options_.event,e=this.player_.duration(),n=(t.end.time-t.start.time)/e;this.el_.style.width=100*n+"%";var r=t.start.time/e;this.el_.style.left=100*r+"%"}}])}(Yr),eo=function(t){function e(){var t;return Ur(this,e),(t=Qr(this,e,arguments)).events_=[],t}return Xr(e,t),qr(e,[{key:"update",value:function(){for(var t=this,e=this.children(),n=e.length;n>0;n--)this.removeChild(e[n]);this.events_.forEach(function(e){var n=new to(t.player(),{event:e});t.addChild(n),n.update()})}},{key:"addEvents",value:function(t){var e,n;(e=this.events_).push.apply(e,function(t){if(Array.isArray(t))return Hr(t)}(n=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return Hr(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hr(t,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),this.update()}},{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-progress-reporter-display"})}}])}(Yr);function no(t){return no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},no(t)}function ro(t,e,n){return(e=io(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,io(r.key),r)}}function io(t){var e=function(t){if("object"!=no(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=no(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==no(e)?e:e+""}function uo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(uo=function(){return!!t})()}function ao(t){return ao=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ao(t)}function co(t,e){return co=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},co(t,e)}var lo=r.Z.getPlugin("plugin"),so="play",fo="playing",po="pause",yo="seekstart",ho="ended",bo="pausedseek",vo=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=ao(e),function(t,e){if(e&&("object"==no(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,uo()?Reflect.construct(e,n||[],ao(t).constructor):e.apply(t,n))}(this,e,[t,n])).eventBuffer=[],r.latestTime=0,r.lastPlayingTime=0,r.isPlaying=!1,r.isSeeking=!1,r.hasEnded=!1,r.shouldLogPlayOnTimeUpdate=!1,r.options=n,r.player.ready(function(){return r.initialize()}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&co(t,e)}(e,t),n=e,r=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval(),this.addEasterEgg()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var t=this,e=ro(ro(ro(ro(ro(ro({},so,function(){return t.onPlay()}),po,function(){return t.onPause()}),"timeupdate",function(){return t.onTimeUpdate()}),"seeking",function(){return t.onSeeking()}),ho,function(){return t.onEnded()}),fo,function(){return t.onPlaying()}),n=Object.keys(e);n.forEach(function(n){return t.player.on(n,e[n])}),this.one("dispose",function(){n.forEach(function(n){return t.player.off(n,e[n])})})}},{key:"startInterval",value:function(){var t=this,e=this.options.interval||5e3;this.interval=window.setInterval(function(){return t.flushBuffer()},e),this.player.one("dispose",function(){return window.clearInterval(t.interval)})}},{key:"addEasterEgg",value:function(){var t,e,n=this,r="",o=function(e){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(r+=e.key)&&n.addDisplay(),window.clearTimeout(t),t=window.setTimeout(function(){r=""},500)},i=!1,u=function(){i=!0,e=window.setTimeout(function(){i&&n.addDisplay()},1e4)};function a(){i=!1,window.clearTimeout(e)}this.player.el().addEventListener("keyup",o);var c=this.player.getChild("Collapserator").getChild("PlayToggle");c.on("touchstart",u),c.on("touchend",a),this.player.one("dispose",function(){var t,e;null===(e=null===(t=n.player)||void 0===t?void 0:t.el())||void 0===e||e.removeEventListener("keyup",o),c.off("touchstart",u),c.off("touchend",a)})}},{key:"addDisplay",value:function(){var t=this;this.progressReporterDisplay||(this.progressReporterDisplay=new eo(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",function(){t.progressReporterDisplay=void 0}))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent("seekend"),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(so)}},{key:"onPause",value:function(){var t=this;this.isSeeking||(this.pauseTimeout=window.setTimeout(function(){t.isPlaying=!1,t.logEvent(po),delete t.pauseTimeout},50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(so)),this.isPlaying&&!this.isSeeking&&this.logEvent(fo)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(bo),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(yo))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(ho)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(t){if(this.player){var e=this.player.currentTime();t===yo&&(e=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:e,type:t})}}},{key:"shouldUseCarriedOverTime",value:function(t){return this.lastPlayingTime&&(t===fo||t===so)}},{key:"shouldSaveCarriedOverTime",value:function(t){return t===fo||t===po}},{key:"shouldClearCarriedOverTime",value:function(t){return t===ho||t===bo}},{key:"flushBuffer",value:function(){for(var t,e,n=[],r={};this.eventBuffer.length;){var o=this.eventBuffer.shift();this.shouldClearCarriedOverTime(o.type)?delete this.lastPlayingTime:r.start?o.type===fo&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(o.type)&&(this.lastPlayingTime=o.time),r.end=o,n.push(r),r={}):(this.shouldUseCarriedOverTime(o.type)&&(o.time=this.lastPlayingTime,delete this.lastPlayingTime),r.start=o)}this.eventBuffer=[],n.length&&this.validateEvents(n)&&(this.options.onFlush(n),null===(t=this.player)||void 0===t||t.trigger("progressflush"),null===(e=this.progressReporterDisplay)||void 0===e||e.addEvents(n))}},{key:"validateEvents",value:function(t){var e=0;t.forEach(function(t){e+=t.end.time-t.start.time});var n=this.options.interval||5e3;return n/=1e3,n+=.5,n*=this.player.playbackRate(),e<n}}],r&&oo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(lo);function mo(t){return mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mo(t)}function go(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,wo(r.key),r)}}function wo(t){var e=function(t){if("object"!=mo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=mo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mo(e)?e:e+""}function Oo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Oo=function(){return!!t})()}function jo(t){return jo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jo(t)}function So(t,e){return So=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},So(t,e)}r.Z.registerPlugin("progressReporterPlugin",vo);var Po=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=jo(e),function(t,e){if(e&&("object"==mo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Oo()?Reflect.construct(e,n||[],jo(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&So(t,e)}(e,t),n=e,(o=[{key:"createEl",value:function(){return r.Z.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&go(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component")),_o=["top","left","right","bottom"],ko={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};function Co(t){return Co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Co(t)}function To(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Eo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,xo(r.key),r)}}function Ro(t,e,n){return e&&Eo(t.prototype,e),n&&Eo(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function xo(t){var e=function(t){if("object"!=Co(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Co(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Co(e)?e:e+""}function Bo(t,e,n){return e=Do(e),function(t,e){if(e&&("object"==Co(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Lo()?Reflect.construct(e,n||[],Do(t).constructor):e.apply(t,n))}function Lo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Lo=function(){return!!t})()}function Mo(){return Mo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Do(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Mo.apply(null,arguments)}function Do(t){return Do=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Do(t)}function Zo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Io(t,e)}function Io(t,e){return Io=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Io(t,e)}var Fo=r.Z.getComponent("Component"),Ao=function(t){function e(t,n){var r;return To(this,e),(r=Bo(this,e,[t,n])).bindEventListeners(),r}return Zo(e,t),Ro(e,[{key:"createEl",value:function(){return(t=e,n=this,"function"==typeof(r=Mo(Do(1&3?t.prototype:t),"createEl",n))?function(t){return r.apply(n,t)}:r)(["div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)}]);var t,n,r}},{key:"bindEventListeners",value:function(){var t=this,e=this.el(),n=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move",t.addClass("cv-drag-over")},r=function(e){e.preventDefault(),t.removeClass("cv-drag-over"),t.player_.whiteboardModePlugin().setWhiteboardMode(t.options_.side)},o=function(){t.removeClass("cv-drag-over")};e.addEventListener("dragover",n),e.addEventListener("drop",r),e.addEventListener("dragleave",o),this.on("dispose",function(){e.removeEventListener("dragover",n),e.removeEventListener("drop",r),e.removeEventListener("dragleave",o)})}}])}(Fo),No=function(t){function e(t,n){var r;return To(this,e),(r=Bo(this,e,[t,n])).addChildren(),r}return Zo(e,t),Ro(e,[{key:"addChildren",value:function(){var t=this;_o.forEach(function(e){t.addChild(new Ao(t.player_,{side:e}))})}}])}(Fo);function zo(t){return zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zo(t)}function Vo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ho(r.key),r)}}function Ho(t){var e=function(t){if("object"!=zo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=zo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zo(e)?e:e+""}function Uo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Uo=function(){return!!t})()}function Go(t){return Go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Go(t)}function qo(t,e){return qo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qo(t,e)}var Wo=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=Go(e),function(t,e){if(e&&("object"==zo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Uo()?Reflect.construct(e,n||[],Go(t).constructor):e.apply(t,n))}(this,e,[t,n])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qo(t,e)}(e,t),n=e,(r=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Vo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("MenuItem"));function Qo(t){return Qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qo(t)}function Ko(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,$o(r.key),r)}}function $o(t){var e=function(t){if("object"!=Qo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qo(e)?e:e+""}function Xo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Xo=function(){return!!t})()}function Jo(){return Jo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Yo(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Jo.apply(null,arguments)}function Yo(t){return Yo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Yo(t)}function ti(t,e){return ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ti(t,e)}var ei=r.Z.getComponent("MenuButton"),ni=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=Yo(e),function(t,e){if(e&&("object"==Qo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Xo()?Reflect.construct(e,n||[],Yo(t).constructor):e.apply(t,n))}(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ti(t,e)}(e,t),n=e,r=[{key:"createItems",value:function(){var t=this,e=this.player_.whiteboardModePlugin().side,n=[new m.Z(this.player_,{label:"Video Controls"})];return _o.forEach(function(r){n.push(new Wo(t.player_,{side:r,label:ko[r],selectable:!0,multiSelectable:!1,selected:r===e}))}),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,n=this,"function"==typeof(r=Jo(Yo(1&3?t.prototype:t),"buildWrapperCSSClass",n))?function(t){return r.apply(n,t)}:r)([]));var t,n,r}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.whiteboardModePlugin().side;return ko[t]}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.whiteboardModePlugin().isEnabled()&&this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){ei.prototype.handleClick.apply(this)}}],r&&Ko(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ei);function ri(t){return ri="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ri(t)}function oi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ii(r.key),r)}}function ii(t){var e=function(t){if("object"!=ri(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ri(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ri(e)?e:e+""}function ui(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ui=function(){return!!t})()}function ai(t){return ai=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ai(t)}function ci(t,e){return ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ci(t,e)}var li="cv-whiteboard-side",si=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=ai(e),function(t,e){if(e&&("object"==ri(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ui()?Reflect.construct(e,n||[],ai(t).constructor):e.apply(t,n))}(this,e,[t])).side="bottom",n.enabled=!0,n.player.ready(function(){n.initialize()}),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ci(t,e)}(e,t),n=e,o=[{key:"initialize",value:function(){if(!this.player.options_.mobile){if(ie.S.hasLocalStorage()){var t=ie.S.get(li);t&&(this.side=t)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}}},{key:"initCollapserator",value:function(){var t,e,n=this;if(!(null===(e=(t=this.player).viewTranscriptPlugin)||void 0===e?void 0:e.call(t).isTranscriptOn())){var r=this.player.getChild("collapserator");this.dragHandle=new Po(this.player),this.button=new ni(this.player),r.addChild(this.dragHandle),r.addChild(this.button),this.player.trigger("cv-updatecog");var o=function(){n.player.isFullscreen()&&r.el().setAttribute("draggable","true")},i=function(){n.player.isFullscreen()&&r.el().setAttribute("draggable","false")},u=function(t){n.player.isFullscreen()&&(n.player.addClass("cv-dragging"),t.dataTransfer.setData("text/plain","handle"))},a=function(){n.player.isFullscreen()&&(n.player.removeClass("cv-dragging"),r.el().setAttribute("draggable","false"))};this.dragHandle.el().addEventListener("mousedown",o),this.dragHandle.el().addEventListener("mouseup",i),r.el().addEventListener("dragstart",u),r.el().addEventListener("dragend",a),this.on("dispose",function(){n.dragHandle.el().removeEventListener("mousedown",o),n.dragHandle.el().removeEventListener("mouseup",i),r.el().removeEventListener("dragstart",u),r.el().removeEventListener("dragend",a)})}}},{key:"initDragTargets",value:function(){this.player.addChild(new No(this.player))}},{key:"initFullscreenListener",value:function(){var t=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.player.on("cv-transcript-toggle",this.update),this.one("dispose",function(){t.player.off("fullscreenchange",t.update)})}},{key:"setWhiteboardMode",value:function(t){this.side=t,this.button.update(),ie.S.hasLocalStorage()&&ie.S.set(li,t),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"setEnabled",value:function(t){this.enabled=t,this.update()}},{key:"isEnabled",value:function(){return this.enabled}},{key:"getSide",value:function(){return this.isEnabled()?this.side:"bottom"}},{key:"update",value:function(){var t,e;if(this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),r.Z.dom.removeClass(window.document.documentElement,"cv-whiteboard-html-font-size"),this.player.trigger("resizemenus"),this.player.trigger("cv-updatecog"),this.isEnabled()){null===(e=this.dragHandle)||void 0===e||e.show();var n=this.getSide();this.player.isFullscreen()&&"bottom"!==n&&(this.player.addClass("cv-whiteboard-".concat(n)),r.Z.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}else null===(t=this.dragHandle)||void 0===t||t.hide()}}],o&&oi(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getPlugin("plugin"));function fi(t){return fi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fi(t)}function pi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,yi(r.key),r)}}function yi(t){var e=function(t){if("object"!=fi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=fi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fi(e)?e:e+""}function hi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(hi=function(){return!!t})()}function bi(t){return bi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bi(t)}function vi(t,e){return vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vi(t,e)}r.Z.registerPlugin("whiteboardModePlugin",si);var di=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=bi(e),function(t,e){if(e&&("object"==fi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,hi()?Reflect.construct(e,n||[],bi(t).constructor):e.apply(t,n))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vi(t,e)}(e,t),n=e,(r=[{key:"deferMenu",value:function(){var t={subtitles:this.buildSubtitles(),qualities:this.buildQualities(),playbackSpeeds:this.buildPlaybackSpeeds()};this.player.trigger("cv-defer-menus",t)}},{key:"buildSubtitles",value:function(){for(var t=[],e=!1,n=this.player.textTracks(),r=0;r<n.length;r++){var o=n[r],i="showing"===o.mode;t.unshift({id:o.label,name:o.label,selected:i}),i&&(e=!0)}return t.push({id:null,name:"Off",selected:!e}),t}},{key:"buildQualities",value:function(){for(var t=[],e=this.player.qualityLevels(),n=0;n<e.length;n++){var r=e[n];t.push({id:r.id,name:r.id+"p",selected:r.enabled})}return t}},{key:"buildPlaybackSpeeds",value:function(){var t=this.player.playbackRate();return this.player.options_.playbackRates.map(function(e){return{id:e,name:e+"x"+(1===e?" (Normal)":""),selected:t===e}})}}])&&pi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function mi(t){return mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mi(t)}function gi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,wi(r.key),r)}}function wi(t){var e=function(t){if("object"!=mi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=mi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mi(e)?e:e+""}function Oi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Oi=function(){return!!t})()}function ji(t){return ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ji(t)}function Si(t,e){return Si=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Si(t,e)}r.Z.registerPlugin("deferMenusPlugin",di),n(98863);var Pi=r.Z.getComponent("Button"),_i="cv-muted",ki=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=ji(e),function(t,e){if(e&&("object"==mi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Oi()?Reflect.construct(e,n||[],ji(t).constructor):e.apply(t,n))}(this,e,[t])).update(),n.update=n.update.bind(n),t.on("volumechange",n.update),t.on("dispose",function(){return t.off("volumechange",n.update)}),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Si(t,e)}(e,t),n=e,(r=[{key:"handleClick",value:function(){this.player_.muted(!this.player_.muted()),this.update()}},{key:"update",value:function(){this.player_.muted()?this.addClass(_i):this.removeClass(_i)}},{key:"buildCSSClass",value:function(){return"cv-mute-button cv-muted"}}])&&gi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Pi);function Ci(t){return Ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ci(t)}function Ti(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ei(r.key),r)}}function Ei(t){var e=function(t){if("object"!=Ci(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ci(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ci(e)?e:e+""}function Ri(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ri=function(){return!!t})()}function xi(){return xi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Bi(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},xi.apply(null,arguments)}function Bi(t){return Bi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Bi(t)}function Li(t,e){return Li=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Li(t,e)}r.Z.registerComponent("muteButton",ki),ki.prototype.controlText_="Mute";var Mi,Di=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Bi(e),function(t,e){if(e&&("object"==Ci(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ri()?Reflect.construct(e,n||[],Bi(t).constructor):e.apply(t,n))}(this,e,[t,n]))._onClickHandler=n.onClickHandler,r.bindEventListeners(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Li(t,e)}(e,t),n=e,o=[{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-player-overlay"})}},{key:"handleClick",value:function(t){"function"==typeof this._onClickHandler&&(t.stopImmediatePropagation(),this._onClickHandler())}},{key:"dispose",value:function(){var t,n,r;this.off("click",this.handleClick),(t=e,n=this,"function"==typeof(r=xi(Bi(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([])}},{key:"bindEventListeners",value:function(){this.on("click",this.handleClick)}}],o&&Ti(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function Zi(t){return Zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zi(t)}function Ii(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Fi(r.key),r)}}function Fi(t){var e=function(t){if("object"!=Zi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Zi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Zi(e)?e:e+""}function Ai(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ai=function(){return!!t})()}function Ni(t){return Ni=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ni(t)}function zi(t,e){return zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zi(t,e)}r.Z.registerComponent("playerOverlay",Di),function(t){t.Default="play",t.Hover="hover"}(Mi||(Mi={}));var Vi=r.Z.getPlugin("plugin"),Hi="cv-preview-mode",Ui=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=Ni(e),function(t,e){if(e&&("object"==Zi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ai()?Reflect.construct(e,n||[],Ni(t).constructor):e.apply(t,n))}(this,e,[t])).buttonAdded=!1,n.mode=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zi(t,e)}(e,t),n=e,(r=[{key:"getMode",value:function(){return this.mode}},{key:"setPlayerMode",value:function(t,e){var n=this.mode;if(this.mode=t,t===Mi.Hover)return this.buttonAdded||this.addButtons(e),this.player.addClass(Hi),this.enableSubtites(),this.mute(),this.removeActivityTimeout(),void this.player.trigger("resize");n===Mi.Hover&&(this.player.removeClass(Hi),this.disableSubtitles(),this.unmute(),this.restoreActivityTimeout(),this.player.trigger("resize"))}},{key:"addButtons",value:function(t){var e=new ki(this.player),n=new Di(this.player,{onClickHandler:t});this.player.addChild(e),this.player.addChild(n),this.buttonAdded=!0}},{key:"enableSubtites",value:function(){var t=this;this.player.dataLoaded(function(){return t.player.persistSubtitleSettingsPlugin().previewModeSubtitles()})}},{key:"disableSubtitles",value:function(){var t=this;this.player.dataLoaded(function(){return t.player.persistSubtitleSettingsPlugin().applyUserPreferences()})}},{key:"mute",value:function(){var t=this;this.player.ready(function(){t.player.persistVolumePlugin().disable(),t.player.muted(!0)})}},{key:"unmute",value:function(){var t=this;this.player.ready(function(){t.player.persistVolumePlugin().applyUserPreferences(),t.player.persistVolumePlugin().enable()})}},{key:"removeActivityTimeout",value:function(){this.player.cache_.inactivityTimeout=this.player.options_.inactivityTimeout,this.player.options_.inactivityTimeout=0}},{key:"restoreActivityTimeout",value:function(){this.player.options_.inactivityTimeout=this.player.cache_.inactivityTimeout}}])&&Ii(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Vi);function Gi(t){return Gi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gi(t)}function qi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ki(r.key),r)}}function Qi(t,e,n){return e&&Wi(t.prototype,e),n&&Wi(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ki(t){var e=function(t){if("object"!=Gi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Gi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Gi(e)?e:e+""}function $i(t,e,n){return e=Ji(e),function(t,e){if(e&&("object"==Gi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Xi()?Reflect.construct(e,n||[],Ji(t).constructor):e.apply(t,n))}function Xi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Xi=function(){return!!t})()}function Ji(t){return Ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ji(t)}function Yi(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tu(t,e)}function tu(t,e){return tu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tu(t,e)}r.Z.registerPlugin("playerModePlugin",Ui);var eu=r.Z.getComponent("Component"),nu=r.Z.getComponent("ClickableComponent"),ru=function(t){function e(){return qi(this,e),$i(this,e,arguments)}return Yi(e,t),Qi(e,[{key:"createEl",value:function(){return eu.prototype.createEl.call(this,"span",{className:"cv-favourite-button-svg",innerHTML:"<span class='cv-favourite-heart'>".concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Heart-Filled" d="m18.833 5.9735c-0.78916-0.95022-1.8839-1.4735-3.0826-1.4735-1.6859 0-2.7532 1.0685-3.3517 1.9648-0.15528 0.2326-0.28738 0.46582-0.39828 0.68529-0.11091-0.21946-0.24297-0.45269-0.39828-0.68529-0.5985-0.89636-1.6658-1.9648-3.3517-1.9648-1.1987 0-2.2935 0.52333-3.0827 1.4735-0.75275 0.90644-1.1673 2.1204-1.1673 3.4183 0 1.4128 0.51978 2.7268 1.6358 4.1353 0.99741 1.2588 2.4323 2.5564 4.0939 4.0589 0.61916 0.5599 1.2594 1.1389 1.9411 1.7718l0.02047 0.01903c0.08837 0.08211 0.19856 0.12313 0.30875 0.12313s0.22038-0.04105 0.30875-0.12313l0.02047-0.01903c0.68166-0.63289 1.3219-1.2119 1.9412-1.7719 1.6615-1.5024 3.0964-2.8 4.0938-4.0588 1.116-1.4085 1.6358-2.7225 1.6358-4.1353 0-1.2979-0.41459-2.5119-1.1674-3.4183z"/>\n </svg>\n',"</span><span class='cv-favourite-outline'>").concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Shape" d="m18.959 5.9741c-0.76992-0.92705-1.9357-1.5351-3.1052-1.5351-1.6448 0-2.8808 0.74937-3.4647 1.6238-0.15149 0.22693-0.28074 0.55125-0.38894 0.76537-0.10821-0.21411-0.23718-0.53844-0.38871-0.76537-0.58391-0.87451-1.8205-1.6238-3.4653-1.6238-1.1695 0-2.2376 0.60808-3.0075 1.5351-0.7344 0.88434-1.1388 1.9712-1.1388 3.2374 0 1.3784 0.50711 3.0509 1.5959 4.4251 0.97309 1.2281 2.373 2.4941 3.9941 3.9599 0.60406 0.54625 1.2285 1.1104 1.8936 1.7278l0.01997 0.01934c0.08622 0.08011 0.38931 0.21727 0.49681 0.21727 0.1075 0 0.40992-0.13796 0.49614-0.21804l0.0201-0.0178c0.66504-0.61746 1.2897-1.1824 1.8939-1.7287 1.621-1.4658 3.0209-2.7317 3.994-3.9598 1.0888-1.3742 1.5955-3.0467 1.5955-4.4251 0-1.2663-0.30646-2.3531-1.0409-3.2374zm-5.337 10.688c-0.51948 0.47226-1.0567 0.95549-1.6218 1.4768-0.56507-0.52124-1.101-1.0059-1.6219-1.4769-3.1725-2.8689-5.2684-4.7641-5.2684-7.2556 0-1.0298 0.32333-1.9863 0.91044-2.6933 0.59385-0.71497 1.4183-1.1088 2.3213-1.1088 1.254 0 2.0645 0.81976 2.5237 1.5074 0.41187 0.61679 0.62678 1.2385 0.70006 1.4772 0.06131 0.19978 0.23683 0.33499 0.43482 0.33499s0.37351-0.1352 0.43482-0.33499c0.07329-0.23867 0.28821-0.86044 0.70006-1.4773 0.45914-0.68766 1.2698-1.5074 2.5237-1.5074 0.90309 0 1.7274 0.39377 2.3213 1.1088 0.58714 0.70695 0.91047 1.6634 0.91047 2.6933 0 2.4914-2.1035 4.3783-5.2685 7.2557z" stroke-width=".97562"/>\n </svg>\n',"</span>")})}}])}(eu),ou=function(t){function e(t,n){var r;return qi(this,e),(r=$i(this,e,[t,n])).isFavourited=n.isFavourited,r.renderIcon(),r.update(),r}return Yi(e,t),Qi(e,[{key:"renderIcon",value:function(){this.icon&&this.removeChild(this.icon),this.icon=new ru(this.player_),this.addChild(this.icon)}},{key:"update",value:function(){this.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"createEl",value:function(t,e,n){e=Object.assign({innerHTML:"",className:"cv-favourite-button"},e),n=Object.assign({type:"button"},n);var r=eu.prototype.createEl.call(this,"button",e,n);return this.createControlTextEl(r),r}},{key:"handleClick",value:function(){this.isFavourited=!this.isFavourited,this.update(),this.options_.onClick&&this.options_.onClick(this.isFavourited)}}])}(nu);function iu(t){return iu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},iu(t)}function uu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,au(r.key),r)}}function au(t){var e=function(t){if("object"!=iu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=iu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==iu(e)?e:e+""}function cu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(cu=function(){return!!t})()}function lu(t){return lu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lu(t)}function su(t,e){return su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},su(t,e)}ou.prototype.controlText_="Favourite";var fu=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=lu(e),function(t,e){if(e&&("object"==iu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,cu()?Reflect.construct(e,n||[],lu(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&su(t,e)}(e,t),n=e,(r=[{key:"setFavourite",value:function(t,e){if(!this.initialized){var n=new ou(this.player,{isFavourited:t,onClick:e});this.player.addChild(n),this.initialized=!0}}}])&&uu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function pu(t){return pu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pu(t)}function yu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,hu(r.key),r)}}function hu(t){var e=function(t){if("object"!=pu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=pu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pu(e)?e:e+""}function bu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(bu=function(){return!!t})()}function vu(t){return vu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vu(t)}function du(t,e){return du=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},du(t,e)}r.Z.registerPlugin("favouritePlugin",fu),n(6088),n(78651);var mu=r.Z.getComponent("Menu"),gu=r.Z.getComponent("Component"),wu=r.Z.getComponent("MenuButton"),Ou=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=vu(e),function(t,e){if(e&&("object"==pu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,bu()?Reflect.construct(e,n||[],vu(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&du(t,e)}(e,t),n=e,(o=[{key:"createMenu",value:function(){var t,e=new mu(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=r.Z.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(t=this.options_.title,"string"!=typeof t?t:t.replace(/./,function(t){return t.toUpperCase()})),tabIndex:-1});this.hideThreshold_+=1;var o=new gu(this.player_,{el:n});e.addItem(o)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e}}])&&yu(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(wu),ju=wu.prototype.pressButton;wu.prototype.pressButton=function(){ju.call(this),this.inactivityTimeout=this.player_.cache_.inactivityTimeout,this.player_.cache_.inactivityTimeout=0,this.player_.options_.inactivityTimeout=0};var Su=wu.prototype.unpressButton;function Pu(t){return Pu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pu(t)}function _u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ku(r.key),r)}}function ku(t){var e=function(t){if("object"!=Pu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pu(e)?e:e+""}function Cu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Cu=function(){return!!t})()}function Tu(t,e,n,r){var o=Eu(Ru(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function Eu(){return Eu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ru(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Eu.apply(null,arguments)}function Ru(t){return Ru=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ru(t)}function xu(t,e){return xu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xu(t,e)}wu.prototype.unpressButton=function(){Su.call(this),this.player_.cache_.inactivityTimeout=this.inactivityTimeout,this.player_.options_.inactivityTimeout=this.inactivityTimeout,this.player_.reportUserActivity()},r.Z.registerComponent("MenuButton",Ou);var Bu=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=Ru(e),function(t,e){if(e&&("object"==Pu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Cu()?Reflect.construct(e,n||[],Ru(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xu(t,e)}(e,t),n=e,(r=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(Tu(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,n,r){return Tu(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])&&_u(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function Lu(t){return Lu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lu(t)}function Mu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Du(r.key),r)}}function Du(t){var e=function(t){if("object"!=Lu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Lu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lu(e)?e:e+""}function Zu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Zu=function(){return!!t})()}function Iu(t){return Iu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Iu(t)}function Fu(t,e){return Fu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fu(t,e)}Bu.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},r.Z.registerComponent("TimeWrapper",Bu);var Au=r.Z.getComponent("SeekBar"),Nu=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=Iu(e),function(t,e){if(e&&("object"==Lu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zu()?Reflect.construct(e,n||[],Iu(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fu(t,e)}(e,t),n=e,(r=[{key:"handleMouseDown",value:function(t){var e=this.player_.preventScrubbingPlugin();e.isEnabled&&this.getMouseTime(t)>e.furthestVisitedTime||(Au.prototype.handleMouseDown.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback"))}},{key:"handleMouseMove",value:function(t){Au.prototype.handleMouseMove.call(this,t),this.update()}},{key:"getPercent",value:function(){var t=this.player_.currentTime()/this.player_.duration();return t>=1?1:t}},{key:"handleMouseUp",value:function(t){var e=this;Au.prototype.handleMouseUp.call(this,t),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(function(){e.player_.removeClass("cv-disable-play-pause-feedback")},500)}},{key:"clamp",value:function(t,e,n){return Math.min(Math.max(t,e),n)}},{key:"getMouseTime",value:function(t){return this.clamp(Au.prototype.calculateDistance.call(this,t).x,0,1)*this.player_.duration()}}])&&Mu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Au);function zu(t){return zu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zu(t)}function Vu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Hu(r.key),r)}}function Hu(t){var e=function(t){if("object"!=zu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=zu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zu(e)?e:e+""}function Uu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Uu=function(){return!!t})()}function Gu(t,e,n,r){var o=qu(Wu(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function qu(){return qu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Wu(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},qu.apply(null,arguments)}function Wu(t){return Wu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wu(t)}function Qu(t,e){return Qu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qu(t,e)}r.Z.registerComponent("SeekBar",Nu);var Ku=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=Wu(e),function(t,e){if(e&&("object"==zu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Uu()?Reflect.construct(e,n||[],Wu(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qu(t,e)}(e,t),n=e,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Gu(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,n,r){return Gu(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(t){this.el_.style.width=100*t+"%"}}])&&Vu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function $u(t){return $u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$u(t)}function Xu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ju(r.key),r)}}function Ju(t){var e=function(t){if("object"!=$u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=$u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$u(e)?e:e+""}function Yu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Yu=function(){return!!t})()}function ta(t,e,n,r){var o=ea(na(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function ea(){return ea="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=na(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ea.apply(null,arguments)}function na(t){return na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},na(t)}function ra(t,e){return ra=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ra(t,e)}var oa=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=na(e),function(t,e){if(e&&("object"==$u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Yu()?Reflect.construct(e,n||[],na(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ra(t,e)}(e,t),n=e,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(ta(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,n,r){return ta(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(t){t>0&&t<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*t+"%"}}])&&Xu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function ia(t){return ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ia(t)}function ua(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,aa(r.key),r)}}function aa(t){var e=function(t){if("object"!=ia(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ia(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ia(e)?e:e+""}function ca(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ca=function(){return!!t})()}function la(t,e,n,r){var o=sa(fa(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function sa(){return sa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=fa(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},sa.apply(null,arguments)}function fa(t){return fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fa(t)}function pa(t,e){return pa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pa(t,e)}var ya=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=fa(e),function(t,e){if(e&&("object"==ia(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ca()?Reflect.construct(e,n||[],fa(t).constructor):e.apply(t,n))}(this,e,[t,n])).playProgress=new oa(r.player_),r.addChild(r.playProgress),r.loadProgress=new Ku(r.player_),r.addChild(r.loadProgress),r.update(),r.updateBuffered(0),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pa(t,e)}(e,t),n=e,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(la(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,n,r){return la(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var t=this.player_.duration()||3600,e=this.options_.endTime-this.options_.startTime;if(t!==this.duration_){var n=e/t;this.el_.style.width=100*n+"%";var r=this.options_.startTime/t;this.el_.style.left=100*r+"%",this.duration_=t}var o=this.getCurrentTime();o<this.options_.startTime?this.playProgress.update(0):o>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((o-this.options_.startTime)/e)}},{key:"updateBuffered",value:function(t){var e=this.options_.endTime-this.options_.startTime;t<this.options_.startTime?this.loadProgress.update(0):t>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((t-this.options_.startTime)/e)}}])&&ua(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component")),ha=n(23035);function ba(t){return ba="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ba(t)}function va(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,da(r.key),r)}}function da(t){var e=function(t){if("object"!=ba(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ba(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ba(e)?e:e+""}function ma(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ma=function(){return!!t})()}function ga(t,e,n,r){var o=wa(Oa(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function wa(){return wa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Oa(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},wa.apply(null,arguments)}function Oa(t){return Oa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Oa(t)}function ja(t,e){return ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ja(t,e)}var Sa=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=Oa(e),function(t,e){if(e&&("object"==ba(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ma()?Reflect.construct(e,n||[],Oa(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ja(t,e)}(e,t),n=e,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(ga(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,n,r){return ga(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(){this.children_.forEach(function(t){t.update()})}},{key:"updateBuffered",value:function(){var t=this;this.children_.forEach(function(e){e.updateBuffered((0,ha.b)(t.player_))})}}])&&va(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function Pa(t){return Pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pa(t)}function _a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ka(r.key),r)}}function ka(t){var e=function(t){if("object"!=Pa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pa(e)?e:e+""}function Ca(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ca=function(){return!!t})()}function Ta(t,e,n,r){var o=Ea(Ra(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function Ea(){return Ea="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ra(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ea.apply(null,arguments)}function Ra(t){return Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ra(t)}function xa(t,e){return xa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xa(t,e)}var Ba=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Ra(e),function(t,e){if(e&&("object"==Pa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ca()?Reflect.construct(e,n||[],Ra(t).constructor):e.apply(t,n))}(this,e,[t,n])).onDurationChange=r.onDurationChange.bind(r),r.createChapterItems=r.createChapterItems.bind(r),r.updateBuffered=r.updateBuffered.bind(r),D.O.useChapters(r.player_,r.createChapterItems),r.player_.on("durationchange",r.onDurationChange),r.player_.on("progress",r.updateBuffered),r.createChapterItems(),r.update(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xa(t,e)}(e,t),n=e,(o=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),Ta(e,"dispose",this,3)([])}},{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar"),role:"progressbar"})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var t=Ta(e,"update",this,3)([]);return this.chapterBarItems&&this.chapterBarItems.update(),t}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"bindUpdateListener",value:function(t){var e=this,n=function(){e.createChapterItems(),e.updateBuffered()};t.addEventListener("cv:cuechange",n),this.player_.one("dispose",function(){return t.removeEventListener("cv:cuechange",n)})}},{key:"createChapterItems",value:function(t){var e,n;t&&(this.track_||this.bindUpdateListener(t),this.track_=t);var r=new Sa(this.player_);if((null===(n=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===n?void 0:n.length)&&!this.options_.ignoreChapters)for(var o=0;o<this.track_.cues.length;o++){var i=this.track_.cues[o],u=i.startTime,a=i.endTime,c=this.player_.duration();c&&(o===this.track_.cues.length-1&&i.endTime<this.player_.duration()&&(a=this.player_.duration()),a>c&&(a=c));var l=new ya(this.player_,{startTime:u,endTime:a});if(r.addChild(l),c&&a===c)break}else r.addChild(new ya(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&_a(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("SeekBar"));function La(t){return La="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},La(t)}function Ma(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Da(r.key),r)}}function Da(t){var e=function(t){if("object"!=La(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=La(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==La(e)?e:e+""}function Za(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Za=function(){return!!t})()}function Ia(){return Ia="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Fa(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ia.apply(null,arguments)}function Fa(t){return Fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fa(t)}function Aa(t,e){return Aa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Aa(t,e)}Ba.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},r.Z.browser.IS_IOS||r.Z.browser.IS_ANDROID||Ba.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),r.Z.registerComponent("ChapterSeekBar",Ba);var Na=r.Z.getComponent("ProgressControl"),za="seekBar",Va=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=Fa(e),function(t,e){if(e&&("object"==La(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Za()?Reflect.construct(e,n||[],Fa(t).constructor):e.apply(t,n))}(this,e,arguments)).seekBarName_=za,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Aa(t,e)}(e,t),n=e,r=[{key:"setSeekBarName",value:function(t){this.seekBarName_=t}},{key:"getChild",value:function(t){return(null==t?void 0:t.toLowerCase())===za.toLowerCase()&&(t=this.seekBarName_),(n=e,r=this,"function"==typeof(o=Ia(Fa(1&3?n.prototype:n),"getChild",r))?function(t){return o.apply(r,t)}:o)([t]);var n,r,o}}],r&&Ma(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Na);Va.prototype.options_={children:[]},r.Z.registerComponent("ProgressControl",Va);var Ha=n(35259),Ua=n(42503);function Ga(t){return Ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ga(t)}function qa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Wa(r.key),r)}}function Wa(t){var e=function(t){if("object"!=Ga(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ga(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ga(e)?e:e+""}function Qa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Qa=function(){return!!t})()}function Ka(){return Ka="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=$a(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ka.apply(null,arguments)}function $a(t){return $a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$a(t)}function Xa(t,e){return Xa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xa(t,e)}var Ja=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=$a(e),function(t,e){if(e&&("object"==Ga(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Qa()?Reflect.construct(e,n||[],$a(t).constructor):e.apply(t,n))}(this,e,[t,n])).hasCustomChapterText=!1,D.O.useChapters(r.player_,function(t){r.track_=t}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xa(t,e)}(e,t),n=e,o=[{key:"createEl",value:function(){var t,n,o,i=(t=e,n=this,"function"==typeof(o=Ka($a(1&3?t.prototype:t),"createEl",n))?function(t){return o.apply(n,t)}:o)([]);return this.chapter_=r.Z.dom.createEl("div"),i.appendChild(this.chapter_),this.time_=r.Z.dom.createEl("div"),i.appendChild(this.time_),i}},{key:"updateTime",value:function(t){var e=this.player_.duration();if(r.Z.dom.textContent(this.time_,(0,Ua.m)(t,e)),this.track_&&!this.hasCustomChapterText){for(var n=0;n<this.track_.cues.length;n++){var o=this.track_.cues[n],i=o.endTime||e;if(o.startTime<=t&&i>=t)return void r.Z.dom.textContent(this.chapter_,o.text)}r.Z.dom.textContent(this.chapter_,"")}}},{key:"clearChapterContent",value:function(){r.Z.dom.textContent(this.chapter_,"")}},{key:"updateText",value:function(t){r.Z.dom.textContent(this.time_,t)}},{key:"setCustomChapterText",value:function(t){this.hasCustomChapterText=!!t,r.Z.dom.textContent(this.chapter_,null!=t?t:"")}}],o&&qa(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("TimeTooltip"));function Ya(t){return Ya="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ya(t)}function tc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ec(r.key),r)}}function ec(t){var e=function(t){if("object"!=Ya(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ya(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ya(e)?e:e+""}function nc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(nc=function(){return!!t})()}function rc(){return rc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=oc(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},rc.apply(null,arguments)}function oc(t){return oc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},oc(t)}function ic(t,e){return ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ic(t,e)}r.Z.registerComponent("TimeTooltip",Ja);var uc=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=oc(e),function(t,e){if(e&&("object"==Ya(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,nc()?Reflect.construct(e,n||[],oc(t).constructor):e.apply(t,n))}(this,e,[t,n])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ic(t,e)}(e,t),n=e,o=[{key:"setTrack",value:function(t){this.track_=t}},{key:"createEl",value:function(){var t,n,o,i=(t=e,n=this,"function"==typeof(o=rc(oc(1&3?t.prototype:t),"createEl",n))?function(t){return o.apply(n,t)}:o)(["div",{className:"cv-thumbnail-display"}]);return this.img_=r.Z.dom.createEl("img"),i.appendChild(this.img_),i}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(t){var e=t.indexOf("#");if(-1===e)return{src:t,w:0,h:0,x:0,y:0};var n=t.substr(0,e),r=t.substr(e+1);if("xywh="!==r.substr(0,5))return{src:t,w:0,h:0,x:0,y:0};var o=this.getScale(),i=r.substr(5).split(",");return{src:n,w:parseInt(i[2])*o,h:parseInt(i[3])*o,x:parseInt(i[0])*o,y:parseInt(i[1])*o}}},{key:"getScale",value:function(){var t=this.options_.scaleFactor,e=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==e&&(t*=2),t}},{key:"update",value:function(t){var e,n;if(null===(n=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===n?void 0:n.length){for(var r,o=t,i=0;i<this.track_.cues.length;){var u=this.track_.cues[i];if(u.startTime<=o&&u.endTime>=o){r=this.parseImageLink(u.text);break}i++}if(null==r?void 0:r.src){this.enable();var a=r,c=a.src,l=a.w,s=a.h,f=a.x,p=a.y,y=this.getScale();this.img_.src=c,this.img_.style.left=-f+"px",this.img_.style.top=-p+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(y,")"),this.el_.style.width=l+"px",this.el_.style.height=s+"px"}else this.disable()}}}],o&&tc(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function ac(t){return ac="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ac(t)}function cc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,lc(r.key),r)}}function lc(t){var e=function(t){if("object"!=ac(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ac(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ac(e)?e:e+""}function sc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(sc=function(){return!!t})()}function fc(t){return fc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fc(t)}function pc(t,e){return pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pc(t,e)}uc.prototype.options_={scaleFactor:1},r.Z.registerComponent("ThumbnailDisplay",uc);var yc=r.Z.getComponent("MouseTimeDisplay"),hc="cv-mouse-time-display-force-show",bc=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),r=function(t,e,n){return e=fc(e),function(t,e){if(e&&("object"==ac(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,sc()?Reflect.construct(e,n||[],fc(t).constructor):e.apply(t,n))}(this,e,[t,n]),D.O.useMetadataTrack(r.player_,"thumbnails",function(t){r.getChild("ThumbnailDisplay").setTrack(t)}),r.update=r.update.bind(r),r.player_.on("durationchange",r.update),r.player_.one("dispose",function(){r.player_.off("durationchange",r.update)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pc(t,e)}(e,t),n=e,(r=[{key:"update",value:function(t,e){var n=this;this.requestAnimationFrame(function(){var r=n.getChild("TimeTooltip"),o=n.getChild("ThumbnailDisplay"),i=e*n.player_.duration(),u=n.player_.preventScrubbingPlugin(),a=n.player_.controlBar.getChild("progressControl").getChild(Ha.Hx),c=!1;u.isEnabled&&(c=i>u.furthestVisitedTime),c?(n.hide(),a.show(),(0,De.Ds)(a.hide,Ha.D,!1,a)()):(n.show(),a&&a.hide(!0),o.update(i),r.updateTime(i));var l=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-l.width/2+"px";var s=t.width*e;s<l.width/2?n.el_.style.left=l.width/2+"px":s>t.width-l.width/2?n.el_.style.left=t.width-l.width/2+"px":n.el_.style.left=t.width*e+"px"})}},{key:"forceShow",value:function(){this.addClass(hc)}},{key:"removeForceShow",value:function(){this.removeClass(hc)}}])&&cc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(yc);function vc(t){return vc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vc(t)}function dc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,mc(r.key),r)}}function mc(t){var e=function(t){if("object"!=vc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=vc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vc(e)?e:e+""}function gc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(gc=function(){return!!t})()}function wc(){return wc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Oc(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},wc.apply(null,arguments)}function Oc(t){return Oc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Oc(t)}function jc(t,e){return jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jc(t,e)}bc.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},r.Z.registerComponent("MouseTimeDisplay",bc);var Sc=r.Z.getComponent("ChaptersTrackMenuItem"),Pc=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Oc(e),function(t,e){if(e&&("object"==vc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,gc()?Reflect.construct(e,n||[],Oc(t).constructor):e.apply(t,n))}(this,e,[t,n])).nonIconControl=!1,r.thumbnailDisplay=new uc(r.player_,{scaleFactor:.5}),r.el().insertBefore(r.thumbnailDisplay.el(),r.el().firstChild),D.O.useMetadataTrack(r.player_,"thumbnails",function(t){r.addClass("cv-has-thumbnails"),r.thumbnailDisplay.setTrack(t),r.thumbnailDisplay.update(r.options_.cue.startTime)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jc(t,e)}(e,t),n=e,r=[{key:"update",value:function(){this.player_&&Sc.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(t,n,r){return this.nonIconControl=!0,(o=e,i=this,"function"==typeof(u=wc(Oc(1&3?o.prototype:o),"createEl",i))?function(t){return u.apply(i,t)}:u)(["li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},n),r]);var o,i,u}},{key:"getInnerHTML",value:function(){var t=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat((0,Ua.m)(this.options_.cue.startTime,t),")</p>")+"</span>"}}],r&&dc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sc);function _c(t){return _c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_c(t)}function kc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Cc(r.key),r)}}function Cc(t){var e=function(t){if("object"!=_c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=_c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_c(e)?e:e+""}function Tc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Tc=function(){return!!t})()}function Ec(t,e,n,r){var o=Rc(xc(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function Rc(){return Rc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=xc(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Rc.apply(null,arguments)}function xc(t){return xc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xc(t)}function Bc(t,e){return Bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bc(t,e)}var Lc=function(t){function e(t,n,r){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,n){return e=xc(e),function(t,e){if(e&&("object"==_c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Tc()?Reflect.construct(e,n||[],xc(t).constructor):e.apply(t,n))}(this,e,[t,n,r])).alwaysCollapsed=!1,o.isCollapsed=!1,o.isCollabsible=!0,o.update=o.update.bind(o),o.player_.on("cv-whiteboard-change",o.update),o.player_.on("fullscreenchange",o.update),o.player_.on("dispose",function(){o.player_.off("cv-whiteboard-change",o.update),o.player_.off("fullscreenchange",o.update)}),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bc(t,e)}(e,t),n=e,(r=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(Ec(e,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(Ec(e,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e||e.length<2)return t;for(var n=0,r=e.length;n<r;n++){var o=e[n],i=new Pc(this.player_,{track:this.track_,cue:o});t.push(i)}return t}},{key:"setTrack",value:function(t){var n=this;if(Ec(e,"setTrack",this,3)([t]),this.track_&&"chapters"===this.track_.kind){t.one("loadeddata",this.update);var r=function(){n.update(),n.player_.trigger("resizemenus")};t.on("cv:cuechange",r),this.player_.one("dispose",function(){return t.off("cv:cueupdate",r)})}}},{key:"update",value:function(t){Ec(e,"update",this,3)([t])}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var t=this.track_.activeCues[0];return(null==t?void 0:t.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var t=this.track_.cues;return!(!t||!t.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&kc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("ChaptersButton"));function Mc(t){return Mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mc(t)}function Dc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Zc(r.key),r)}}function Zc(t){var e=function(t){if("object"!=Mc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Mc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mc(e)?e:e+""}function Ic(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ic=function(){return!!t})()}function Fc(){return Fc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ac(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Fc.apply(null,arguments)}function Ac(t){return Ac=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ac(t)}function Nc(t,e){return Nc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Nc(t,e)}r.Z.registerComponent("ChaptersButton",Lc);var zc=r.Z.getComponent("OffTextTrackMenuItem"),Vc=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n.track={player:t,kind:n.kind,kinds:n.kinds,default:!1,mode:"hidden"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,function(t,e,n){return e=Ac(e),function(t,e){if(e&&("object"==Mc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ic()?Reflect.construct(e,n||[],Ac(t).constructor):e.apply(t,n))}(this,e,[t,n])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nc(t,e)}(e,t),n=e,r=[{key:"handleClick",value:function(t){zc.prototype.handleClick.call(this,t);for(var e=this.player_.textTracks(),n=0;n<e.length;n++){var r=e[n];"subtitles"===r.kind&&(r.mode="hidden")}this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(t,n,r){return(o=e,i=this,"function"==typeof(u=Fc(Ac(1&3?o.prototype:o),"createEl",i))?function(t){return u.apply(i,t)}:u)(["li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},n),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),r]);var o,i,u}}],r&&Dc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(zc);function Hc(t){return Hc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hc(t)}function Uc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Gc(r.key),r)}}function Gc(t){var e=function(t){if("object"!=Hc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Hc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hc(e)?e:e+""}function qc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(qc=function(){return!!t})()}function Wc(t){return Wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wc(t)}function Qc(t,e){return Qc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qc(t,e)}r.Z.registerComponent("OffTextTrackMenuItem",Vc);var Kc=r.Z.getComponent("TextTrackButton"),$c=r.Z.getComponent("TextTrackMenuItem"),Xc=r.Z.getComponent("OffTextTrackMenuItem"),Jc=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=Wc(e),function(t,e){if(e&&("object"==Hc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,qc()?Reflect.construct(e,n||[],Wc(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qc(t,e)}(e,t),n=e,r=[{key:"createItems",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$c;this.label_&&(t="".concat(this.label_," off")),e.push(new Xc(this.player_,{kinds:this.kinds_,kind:this.kind_,label:t})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var o=0;o<r.length;o++){var i=r[o];if(this.kinds_.indexOf(i.kind)>-1){var u=new n(this.player_,{track:i,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});u.addClass("vjs-".concat(i.kind,"-menu-item")),e.push(u)}}return this.player().trigger("resizemenus"),e}}],r&&Uc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Kc);r.Z.registerComponent("TextTrackButton",Jc);var Yc=n(62315);function tl(t){return tl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tl(t)}function el(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,nl(r.key),r)}}function nl(t){var e=function(t){if("object"!=tl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=tl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==tl(e)?e:e+""}function rl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(rl=function(){return!!t})()}function ol(t){return ol=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ol(t)}function il(t,e){return il=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},il(t,e)}var ul=r.Z.getComponent("SubsCapsMenuItem"),al=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=ol(e),function(t,e){if(e&&("object"==tl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,rl()?Reflect.construct(e,n||[],ol(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&il(t,e)}(e,t),n=e,(r=[{key:"handleClick",value:function(t){ul.prototype.handleClick.call(this,t);for(var e=this.player_.textTracks(),n=0;n<e.length;n++){var r=e[n];"subtitles"===r.kind&&"disabled"===r.mode&&(r.mode="hidden")}this.player_.trigger("cv:languageselected")}}])&&el(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ul);function cl(t){return cl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cl(t)}function ll(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,sl(r.key),r)}}function sl(t){var e=function(t){if("object"!=cl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=cl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==cl(e)?e:e+""}function fl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(fl=function(){return!!t})()}function pl(t){return pl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pl(t)}function yl(t,e){return yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},yl(t,e)}var hl=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r={};r.track={player:t,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="SubtitleSearchMenuItem",(n=function(t,e,n){return e=pl(e),function(t,e){if(e&&("object"==cl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,fl()?Reflect.construct(e,n||[],pl(t).constructor):e.apply(t,n))}(this,e,[t,r])).addClass("vjs-texttrack-settings"),n.addClass("cv-subtitle-search-menu-item"),n.controlText(", opens subtitle search"),n.toggleEnabled=n.toggleEnabled.bind(n);var o=n.player_.textTracks();return o.addEventListener("selectedlanguagechange",n.toggleEnabled),n.player_.one("dispose",function(){o.removeEventListener("selectedlanguagechange",n.toggleEnabled)}),n.toggleEnabled(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yl(t,e)}(e,t),n=e,(r=[{key:"toggleEnabled",value:function(){var t;if(this.player_){var e=D.O.getCurrentTextTrack(this.player_);e?(null===(t=e.cues)||void 0===t?void 0:t.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(e),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.toggleEnabled),t.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",function(){t.removeEventListener("loadeddata",e.toggleEnabled)})}},{key:"handleClick",value:function(){var t,e=this,n=D.O.getCurrentTextTrack(this.player_);(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length)&&this.requestAnimationFrame(function(){e.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()})}}])&&ll(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("TextTrackMenuItem"));function bl(t){return bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bl(t)}function vl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,dl(r.key),r)}}function dl(t){var e=function(t){if("object"!=bl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=bl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bl(e)?e:e+""}function ml(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ml=function(){return!!t})()}function gl(t){return gl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gl(t)}function wl(t,e){return wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wl(t,e)}var Ol=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r={};return r.track={player:t,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="SubtitleSizeMenuItem",(n=function(t,e,n){return e=gl(e),function(t,e){if(e&&("object"==bl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ml()?Reflect.construct(e,n||[],gl(t).constructor):e.apply(t,n))}(this,e,[t,r])).addClass("vjs-texttrack-settings"),n.addClass("cv-divider-after-menu-item"),n.addClass("cv-subtitle-size-menu-item"),n.controlText(", opens subtitle size settings"),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wl(t,e)}(e,t),n=e,(r=[{key:"handleClick",value:function(){var t=this;this.requestAnimationFrame(function(){t.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()})}}])&&vl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("TextTrackMenuItem"));function jl(t){return jl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jl(t)}function Sl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Pl(r.key),r)}}function Pl(t){var e=function(t){if("object"!=jl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=jl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jl(e)?e:e+""}function _l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_l=function(){return!!t})()}function kl(t){return kl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},kl(t)}function Cl(t,e){return Cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Cl(t,e)}var Tl=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r={};return r.track={player:t,kind:"subtitle",label:"Video Transcript",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="TranscriptMenuItem",(n=function(t,e,n){return e=kl(e),function(t,e){if(e&&("object"==jl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_l()?Reflect.construct(e,n||[],kl(t).constructor):e.apply(t,n))}(this,e,[t,r])).transcriptOn=n.player_.viewTranscriptPlugin&&n.player_.viewTranscriptPlugin().isTranscriptOn(),n.bindEventListeners(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cl(t,e)}(e,t),n=e,(o=[{key:"bindEventListeners",value:function(){var t=this,e=this.toggleListener.bind(this),n=this.onResize.bind(this);this.player_.on("cv-transcript-toggle",e),this.player_.on("playerresize",n),this.on("dispose",function(){t.player_.off("cv-transcript-toggle",e),t.player_.off("playerresize",n)})}},{key:"onResize",value:function(){var t=window.innerWidth<Yc.E;this.item&&(this.item.style.display=t?"none":"block")}},{key:"handleToggleListener",value:function(){this.transcriptOn?this.toggleOff():this.toggleOn()}},{key:"toggleListener",value:function(t,e){var n,o;e?(this.transcriptOn=!0,r.Z.dom.addClass(this.toggleEl,"on")):(this.transcriptOn=!1,null===(o=(n=r.Z.dom).removeClass)||void 0===o||o.call(n,this.toggleEl,"on"))}},{key:"toggleOn",value:function(){var t,e;this.transcriptOn=!0,r.Z.dom.addClass(this.toggleEl,"on"),this.player_.viewTranscriptPlugin&&(null===(e=null===(t=this.player_.viewTranscriptPlugin())||void 0===t?void 0:t.toggleTranscript)||void 0===e||e.call(t,!0,{shouldLog:!0})),this.player_.whiteboardModePlugin&&this.player_.whiteboardModePlugin().setEnabled(!1)}},{key:"toggleOff",value:function(){var t,e,n,o;this.transcriptOn=!1,null===(e=(t=r.Z.dom).removeClass)||void 0===e||e.call(t,this.toggleEl,"on"),this.player_.viewTranscriptPlugin&&(null===(o=null===(n=this.player_.viewTranscriptPlugin())||void 0===n?void 0:n.toggleTranscript)||void 0===o||o.call(n,!1,{shouldLog:!0}))}},{key:"createEl",value:function(t,e,n){return this.handlerBound||(this.handleToggleListener=this.handleToggleListener.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggleListener),this.toggleEl=r.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggleListener),this.item=r.Z.dom.createEl("li",{className:"vjs-menu-item cv-transcript-toggle",innerHTML:'\n <span class="vjs-menu-item-text">Video Transcript</span>\n <span class="cv-toggle-container"></span>\n <span class="vjs-control-text" aria-live="polite">, opens transcript</span>\n ',tabIndex:-1},n),this.item.children[1].appendChild(this.toggleEl),this.item}}])&&Sl(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("TextTrackMenuItem"));function El(t){return El="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},El(t)}function Rl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,xl(r.key),r)}}function xl(t){var e=function(t){if("object"!=El(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=El(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==El(e)?e:e+""}function Bl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Bl=function(){return!!t})()}function Ll(){return Ll="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ml(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ll.apply(null,arguments)}function Ml(t){return Ml=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ml(t)}function Dl(t,e){return Dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Dl(t,e)}r.Z.registerComponent("ToggleTranscriptMenuItem",Tl);var Zl=r.Z.getComponent("TextTrackButton"),Il=r.Z.getComponent("SubsCapsButton"),Fl=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=Ml(e),function(t,e){if(e&&("object"==El(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Bl()?Reflect.construct(e,n||[],Ml(t).constructor):e.apply(t,n))}(this,e,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t.className="cv-subs-caps-menu-button",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dl(t,e)}(e,t),n=e,r=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,n=this,"function"==typeof(r=Ll(Ml(1&3?t.prototype:t),"buildWrapperCSSClass",n))?function(t){return r.apply(n,t)}:r)([]));var t,n,r}},{key:"createItems",value:function(){var t=[];if(!this.player_.options_.mobile){var e=this.player().textTracks(),n=Array.from(e||[]).some(function(t){return"subtitles"===t.kind});this.player_.options_.allowTranscript&&!!n&&this.player_.viewTranscriptPlugin&&window.innerWidth>=Yc.E&&t.push(new Tl(this.player_)),this.player_.options_.allowTranscript||t.push(new hl(this.player_)),t.push(new Ol(this.player_)),this.hideThreshold_=this.hideThreshold_+2}return this.player().trigger("resizemenus"),Zl.prototype.createItems.call(this,t,al)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var n=t[e];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var n=t[e];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){Il.prototype.handleClick.apply(this)}}],r&&Rl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Il);function Al(t){return Al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Al(t)}function Nl(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return zl(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(zl(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,zl(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,zl(f,"constructor",l),zl(l,"constructor",c),c.displayName="GeneratorFunction",zl(l,o,"GeneratorFunction"),zl(f),zl(f,o,"Generator"),zl(f,r,function(){return this}),zl(f,"toString",function(){return"[object Generator]"}),(Nl=function(){return{w:i,m:p}})()}function zl(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}zl=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){zl(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},zl(t,e,n,r)}function Vl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Hl(r.key),r)}}function Hl(t){var e=function(t){if("object"!=Al(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Al(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Al(e)?e:e+""}function Ul(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ul=function(){return!!t})()}function Gl(t){return Gl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gl(t)}function ql(t,e){return ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ql(t,e)}r.Z.registerComponent("SubsCapsButton",Fl);var Wl="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(Xn,"</span>"),Ql=function(t){function e(t,n){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Gl(e),function(t,e){if(e&&("object"==Al(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ul()?Reflect.construct(e,n||[],Gl(t).constructor):e.apply(t,n))}(this,e,[t,n])).qualityId=n.qualityId;var o=t.qualityLevels(),i=r.handleQualityChange.bind(r);return o.on("change",i),t.one("dispose",function(){o.off("change",i)}),r.handleLocalCacheChange=r.handleLocalCacheChange.bind(r),r.player_.ready(function(){r.player_&&(r.player_.on("localcachechanged",r.handleLocalCacheChange),r.player_.one("dispose",function(){var t;null===(t=r.player_)||void 0===t||t.off("localcachechanged",r.handleLocalCacheChange)}),r.handleLocalCacheChange())}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ql(t,e)}(e,t),n=e,(r=[{key:"handleLocalCacheChange",value:function(){return t=this,e=void 0,n=void 0,r=Nl().m(function t(){var e,n;return Nl().w(function(t){for(;;)switch(t.n){case 0:return e=this.player_.localCache(),t.n=1,e.getActiveLocalCache();case 1:if(null==(n=t.v)?void 0:n.playbackProfile){t.n=2;break}return this.show(),this.enable(),this.setLabel(this.options_.label),t.a(2);case 2:n.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+Wl);case 3:return t.a(2)}},t,this)}),new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())});var t,e,n,r}},{key:"setLabel",value:function(t){var e=this.$(".vjs-menu-item-text");e&&(e.innerHTML=t)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var t=this.player_.qualityLevels(),e=0;e<t.length;e++){var n=t[e];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var t=this.player_.qualityLevels(),e=t[t.selectedIndex],n=e&&e.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&Vl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("MenuItem"));function Kl(t){return Kl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kl(t)}function $l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Xl(r.key),r)}}function Xl(t){var e=function(t){if("object"!=Kl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Kl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Kl(e)?e:e+""}function Jl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Jl=function(){return!!t})()}function Yl(t,e,n,r){var o=ts(es(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function ts(){return ts="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=es(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ts.apply(null,arguments)}function es(t){return es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},es(t)}function ns(t,e){return ns=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ns(t,e)}var rs={144:"144p (Preview)",240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},os=r.Z.getComponent("MenuButton"),is=function(t){function e(t,n){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=es(e),function(t,e){if(e&&("object"==Kl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Jl()?Reflect.construct(e,n||[],es(t).constructor):e.apply(t,n))}(this,e,[t,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.className="cv-quality-menu-button";var o=r.player_.qualityLevels(),i=r.update.bind(r);return o.on("addqualitylevel",i),o.on("removequalitylevel",i),t.one("dispose",function(){o.removeEventListener("addqualitylevel",i),o.removeEventListener("removequalitylevel",i)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ns(t,e)}(e,t),n=e,(r=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(Yl(e,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(Yl(e,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var t=[],e=this.player_.qualityLevels();t.push(new m.Z(this.player_,{label:"Quality"}));for(var n=0;n<e.length;n++){var r=e[n];if(r){var o=rs[r.id];o&&t.push(new Ql(this.player_,{qualityId:r.id,label:o,selectable:!0,multiSelectable:!1}))}}return t}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.qualityLevels(),e=t[t.selectedIndex];return e?rs[e.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){os.prototype.handleClick.apply(this)}}])&&$l(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(os);function us(t){return us="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},us(t)}function as(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,cs(r.key),r)}}function cs(t){var e=function(t){if("object"!=us(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=us(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==us(e)?e:e+""}function ls(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ls=function(){return!!t})()}function ss(){return ss="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=fs(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ss.apply(null,arguments)}function fs(t){return fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fs(t)}function ps(t,e){return ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ps(t,e)}r.Z.registerComponent("QualityButton",is);var ys=r.Z.getComponent("Menu"),hs=r.Z.getComponent("MenuButton"),bs=r.Z.getComponent("PlaybackRateMenuItem"),vs=r.Z.getComponent("PlaybackRateMenuButton"),ds=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=fs(e),function(t,e){if(e&&("object"==us(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ls()?Reflect.construct(e,n||[],fs(t).constructor):e.apply(t,n))}(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t.className="cv-playback-rate-menu-button",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ps(t,e)}(e,t),n=e,o=[{key:"createEl",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=hs.prototype.createEl).apply.apply(t,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,n=this,"function"==typeof(r=ss(fs(1&3?t.prototype:t),"buildWrapperCSSClass",n))?function(t){return r.apply(n,t)}:r)([]));var t,n,r}},{key:"createMenu",value:function(){var t=new ys(this.player(),{menuButton:this});t.addItem(new m.Z(this.player_,{label:"Playback Speed"}));var e=this.playbackRates();if(e)for(var n=0;n<e.length;n++){var r=e[n]+"x";1===e[n]&&(r+=" (Normal)"),t.addItem(new bs(this.player(),{rate:r}))}return t}},{key:"handleClick",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=hs.prototype.handleClick).apply.apply(t,[this].concat(n))}},{key:"updateLabel",value:function(){var t;this.setupLabelEl();for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=vs.prototype.updateLabel).apply.apply(t,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var t=this.$("button");t&&(this.labelEl_=r.Z.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}],o&&as(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(vs);function ms(t){return ms="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ms(t)}function gs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ws(r.key),r)}}function ws(t){var e=function(t){if("object"!=ms(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ms(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ms(e)?e:e+""}function Os(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Os=function(){return!!t})()}function js(t){return js=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},js(t)}function Ss(t,e){return Ss=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ss(t,e)}r.Z.registerComponent("PlaybackRateMenuButton",ds);var Ps=r.Z.getComponent("TextTrackSettings"),_s={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},ks={small:_s,medium:Object.assign(Object.assign({},_s),{fontPercent:1.5}),large:Object.assign(Object.assign({},_s),{fontPercent:2})},Cs=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=js(e),function(t,e){if(e&&("object"==ms(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Os()?Reflect.construct(e,n||[],js(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ss(t,e)}(e,t),n=e,(r=[{key:"setSizeSetting",value:function(t){var e=this;this.size_=t,this.player_.getChild("textTrackDisplay").updateDisplay();var n=this.player_.getChild("collapserator").getChild("subtitleSizeButton");this.player_.trigger("changesubtitlesize",this.size_),window.requestAnimationFrame(function(){n.update(),e.player_.trigger("resizemenus")})}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return ks[this.size_]?ks[this.size_]:_s}}])&&gs(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ps);function Ts(t){return Ts="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ts(t)}function Es(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Rs(r.key),r)}}function Rs(t){var e=function(t){if("object"!=Ts(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ts(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ts(e)?e:e+""}function xs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(xs=function(){return!!t})()}function Bs(t,e,n,r){var o=Ls(Ms(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function Ls(){return Ls="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ms(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ls.apply(null,arguments)}function Ms(t){return Ms=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ms(t)}function Ds(t,e){return Ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ds(t,e)}r.Z.registerComponent("TextTrackSettings",Cs);var Zs=window.navigator&&window.navigator.userAgent||"",Is=(/iPod/i.test(Zs),/Android/i.test(Zs),r.Z.getComponent("Player")),Fs=function(t){function e(t,n){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Ms(e),function(t,e){if(e&&("object"==Ts(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xs()?Reflect.construct(e,n||[],Ms(t).constructor):e.apply(t,n))}(this,e,[t,n]))._dataLoaded=!1,n.mobile&&r.addClass("cv-mobile-player");var o=function(){return r._dataLoaded=!0};return r.on("cv-playback-data-loaded",o),r.on("dispose",function(){return r.off("cv-playback-data-loaded",o)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ds(t,e)}(e,t),n=e,o=[{key:"dataLoaded",value:function(t){var e=this;this._dataLoaded?t():(this.one("cv-playback-data-loaded",t),this.one("dispose",function(){e.off("cv-playback-data-loaded",t)}))}},{key:"lock",value:function(t){this.callback_=t}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(t,n){var r=this;if("number"!=typeof t||!this.callback_||n)return Bs(e,"currentTime",this,3)([t]);this.callback_(function(){r.unlock(),r.currentTime(t)})}},{key:"play",value:function(){var t=this;if(!this.callback_)return Bs(e,"play",this,3)([]);this.callback_(function(){t.unlock(),t.play()})}},{key:"createEl",value:function(){var t=this,n=Bs(e,"createEl",this,3)([]);return this.videoContainer||(this.videoContainer=r.Z.dom.createEl("div",{className:"cv-video-wrapper"}),n.appendChild(this.videoContainer)),Array.from(n.childNodes).forEach(function(e){return e!==t.videoContainer&&t.videoContainer.appendChild(e)}),n}},{key:"addChild",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,o=Bs(e,"addChild",this,3)([t,n,r]),i=o.el();return i&&this.videoContainer.appendChild(i),o}},{key:"updateStyleEl_",value:function(){if(Is.prototype.updateStyleEl_.call(this),this.options_.fluid){var t=this.el_.parentNode;if(t&&this.options_.setMaxHeight){var e=this.aspectRatio();if(void 0!==e&&"auto"!==e||(e=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9"),this.player_.playerModePlugin().getMode()===Mi.Hover)return t.style.removeProperty("maxWidth"),void t.style.removeProperty("margin");var n=e.split(":"),r=+n[1]/+n[0];t.style.maxWidth=85/r+"vh",t.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var t=this;Is.prototype.listenForUserActivity_.call(this);var e=this.getChild("collapserator");e.on("mouseenter",function(){t.player().cache_.inactivityTimeout=t.player().options_.inactivityTimeout,t.player().options_.inactivityTimeout=0}),e.on("mouseleave",function(){t.player().options_.inactivityTimeout=t.player().cache_.inactivityTimeout})}}],o&&Es(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(Is);function As(t){return As="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},As(t)}function Ns(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,zs(r.key),r)}}function zs(t){var e=function(t){if("object"!=As(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=As(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==As(e)?e:e+""}function Vs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Vs=function(){return!!t})()}function Hs(t){return Hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hs(t)}function Us(t,e){return Us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Us(t,e)}Fs.prototype.options_=Object.assign(Object.assign({},Is.prototype.options_),{setMaxHeight:!0}),r.Z.registerComponent("player",Fs);var Gs=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Hs(e),function(t,e){if(e&&("object"==As(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vs()?Reflect.construct(e,n||[],Hs(t).constructor):e.apply(t,n))}(this,e,[t,n])).player_.addClass("cv-disable-play-pause-feedback"),r.onFirstPlay=r.onFirstPlay.bind(r),r.player_.one("play",r.onFirstPlay),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Us(t,e)}(e,t),n=e,(o=[{key:"dispose",value:function(){this.player_.off("play",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var t=this;window.setTimeout(function(){t.player_.isDisposed()||t.player_.removeClass("cv-disable-play-pause-feedback")},500)}},{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&Ns(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function qs(t){return qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qs(t)}function Ws(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Qs(r.key),r)}}function Qs(t){var e=function(t){if("object"!=qs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=qs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qs(e)?e:e+""}function Ks(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ks=function(){return!!t})()}function $s(t){return $s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$s(t)}function Xs(t,e){return Xs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xs(t,e)}r.Z.registerComponent("PlayPauseFeedback",Gs);var Js=r.Z.getComponent("PlayToggle"),Ys="Play (space)",tf=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=$s(e),function(t,e){if(e&&("object"==qs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ks()?Reflect.construct(e,n||[],$s(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xs(t,e)}(e,t),n=e,(r=[{key:"handlePlay",value:function(){Js.prototype.handlePlay.call(this),this.controlText("Pause (space)")}},{key:"handlePause",value:function(){Js.prototype.handlePause.call(this),this.controlText(Ys)}},{key:"handleClick",value:function(t){var e=this;Js.prototype.handleClick.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(function(){e.player_.removeClass("cv-disable-play-pause-feedback")},500)}}])&&Ws(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Js);function ef(t){return ef="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ef(t)}function nf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,rf(r.key),r)}}function rf(t){var e=function(t){if("object"!=ef(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ef(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ef(e)?e:e+""}function of(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(of=function(){return!!t})()}function uf(t){return uf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},uf(t)}function af(t,e){return af=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},af(t,e)}r.Z.registerComponent("PlayToggle",tf),tf.prototype.controlText_=Ys;var cf=r.Z.getComponent("TextTrackDisplay"),lf=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=uf(e),function(t,e){if(e&&("object"==ef(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,of()?Reflect.construct(e,n||[],uf(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&af(t,e)}(e,t),n=e,(r=[{key:"updateDisplayState",value:function(t){cf.prototype.updateDisplayState.call(this,t);for(var e=this.player_.textTrackSettings.getValues(),n=t.activeCues,r=n.length;r--;){var o=n[r];if(o){var i=o.displayState;if(e.fontPercent&&1!==e.fontPercent){var u=.025*this.el().getBoundingClientRect().width*100/100;i.style.fontSize=u*e.fontPercent+"px"}}}}}])&&nf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(cf);function sf(t){return sf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sf(t)}function ff(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,pf(r.key),r)}}function pf(t){var e=function(t){if("object"!=sf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=sf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==sf(e)?e:e+""}function yf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(yf=function(){return!!t})()}function hf(t){return hf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hf(t)}function bf(t,e){return bf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bf(t,e)}r.Z.registerComponent("TextTrackDisplay",lf);var vf=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=hf(e),function(t,e){if(e&&("object"==sf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,yf()?Reflect.construct(e,n||[],hf(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bf(t,e)}(e,t),n=e,(o=[{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-control-bar-gradient-container",innerHTML:'<div class="cv-control-bar-gradient"></div>'})}}])&&ff(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function df(t){return df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},df(t)}function mf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,gf(r.key),r)}}function gf(t){var e=function(t){if("object"!=df(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=df(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==df(e)?e:e+""}function wf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(wf=function(){return!!t})()}function Of(t,e,n,r){var o=jf(Sf(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function jf(){return jf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Sf(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},jf.apply(null,arguments)}function Sf(t){return Sf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Sf(t)}function Pf(t,e){return Pf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pf(t,e)}r.Z.registerComponent("ControlBarGradient",vf);var _f=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Sf(e),function(t,e){if(e&&("object"==df(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,wf()?Reflect.construct(e,n||[],Sf(t).constructor):e.apply(t,n))}(this,e,[t,n])).options_=n,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pf(t,e)}(e,t),n=e,(r=[{key:"createEl",value:function(){var t=this.options_.title;if(!this.options_.seriesName)return Of(e,"createEl",this,3)(["h1",{innerHTML:t}]);var n=this.buildSeasonEpisodeString();return n?(t="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase()," ").concat(n,"</div>")+t,Of(e,"createEl",this,3)(["h1",{innerHTML:t}])):(t="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+t,Of(e,"createEl",this,3)(["h1",{innerHTML:t}]))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var t=this.padNumber(this.options_.seasonNumber,2),e=this.padNumber(this.options_.episodeNumber,2);return"S".concat(t," • E").concat(e)}},{key:"padNumber",value:function(t,e){var n=t.toString();if(n.length>=e)return n;for(e-=n.length;e>0;)n="0"+n,e--;return n}}])&&mf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component")),kf=n(87984);function Cf(t){return Cf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cf(t)}function Tf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ef(r.key),r)}}function Ef(t){var e=function(t){if("object"!=Cf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Cf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Cf(e)?e:e+""}function Rf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Rf=function(){return!!t})()}function xf(){return xf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Bf(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},xf.apply(null,arguments)}function Bf(t){return Bf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Bf(t)}function Lf(t,e){return Lf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lf(t,e)}var Mf=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Bf(e),function(t,e){if(e&&("object"==Cf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Rf()?Reflect.construct(e,n||[],Bf(t).constructor):e.apply(t,n))}(this,e,[t,n])).options_=n,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lf(t,e)}(e,t),n=e,r=[{key:"buildCSSClass",value:function(){return"cv-splash-rating ".concat((0,kf.C)(this.options_.ratingValue))}},{key:"createEl",value:function(t,n,r){return this.options_.ratingCode?(o=e,i=this,"function"==typeof(u=xf(Bf(1&3?o.prototype:o),"createEl",i))?function(t){return u.apply(i,t)}:u)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass(),innerHTML:this.options_.ratingCode}),r]):null;var o,i,u}}],r&&Tf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function Df(t){return Df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Df(t)}function Zf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,If(r.key),r)}}function If(t){var e=function(t){if("object"!=Df(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Df(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Df(e)?e:e+""}function Ff(t,e){if(e&&("object"==Df(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Af(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Af=function(){return!!t})()}function Nf(t){return Nf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Nf(t)}function zf(t,e){return zf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zf(t,e)}var Vf=function(t){function e(t,n){var r,o,i,u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o=this,u=[t,n],i=Nf(i=e),r=Ff(o,Af()?Reflect.construct(i,u||[],Nf(o).constructor):i.apply(o,u)),n.embed?(r.addChild(new _f(t,n)),r.addChild(new Mf(t,n)),r):Ff(r,r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zf(t,e)}(e,t),n=e,(o=[{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-splash-metadata"})}}])&&Zf(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function Hf(t){return Hf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hf(t)}function Uf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Gf(r.key),r)}}function Gf(t){var e=function(t){if("object"!=Hf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Hf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hf(e)?e:e+""}function qf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(qf=function(){return!!t})()}function Wf(t){return Wf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wf(t)}function Qf(t,e){return Qf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qf(t,e)}var Kf=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Wf(e),function(t,e){if(e&&("object"==Hf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,qf()?Reflect.construct(e,n||[],Wf(t).constructor):e.apply(t,n))}(this,e,[t,n])).addChild(new Vf(t,n)),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qf(t,e)}(e,t),n=e,(o=[{key:"createEl",value:function(){var t="<div class='cv-splash-mask'></div>";return this.options_.embed&&(t+="<div class='cv-splash-logo'>".concat(Me,"</div>")),r.Z.dom.createEl("div",{className:"vjs-poster cv-embed-splash cv-embed-splash-black",tabIndex:-1,innerHTML:t})}},{key:"setSrc",value:function(t){var e="";t&&(e='url("'.concat(t,'")')),this.el_.style.backgroundImage=e}}])&&Uf(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("posterImage"));function $f(t){return $f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$f(t)}function Xf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Jf(r.key),r)}}function Jf(t){var e=function(t){if("object"!=$f(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=$f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$f(e)?e:e+""}function Yf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Yf=function(){return!!t})()}function tp(t){return tp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},tp(t)}function ep(t,e){return ep=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ep(t,e)}r.Z.registerComponent("posterImage",Kf);var np=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=tp(e),function(t,e){if(e&&("object"==$f(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Yf()?Reflect.construct(e,n||[],tp(t).constructor):e.apply(t,n))}(this,e,[t,n])).el().prepend(r.getErrorImage()),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ep(t,e)}(e,t),n=e,(o=[{key:"getErrorImage",value:function(){return r.Z.dom.createEl("div",{className:"cv-error-image",innerHTML:'\n <svg viewBox="0 0 301 185" xmlns="http://www.w3.org/2000/svg">\n <path d="M267.393 36.6514V167.906C267.393 168.182 267.169 168.406 266.893 168.406H32C31.7239 168.406 31.5 168.182 31.5 167.906V36.6514C31.5 36.3752 31.7239 36.1514 32 36.1514H80.5C80.7761 36.1514 81 36.3752 81 36.6514V57.7196C81 58.7622 82.0375 59.4868 83.0164 59.1279L95.7377 54.4634C95.9961 54.3687 96.2825 54.5006 96.3785 54.7585L102.094 70.1194C102.677 71.6866 105 71.2685 105 69.5964V48.4925C105 47.7632 104.475 47.1396 103.757 47.0146L94.2479 45.3609C93.9436 45.308 93.7596 44.9946 93.8616 44.7031L96.7376 36.4862C96.8077 36.2856 96.997 36.1514 97.2095 36.1514H266.893C267.169 36.1514 267.393 36.3752 267.393 36.6514Z" stroke="white"/>\n <path d="M163.296 101.777L149.437 90.1217C148.275 89.1441 146.5 89.9705 146.5 91.4894V113.664C146.5 115.141 148.191 115.98 149.367 115.087L163.226 104.569C164.139 103.876 164.173 102.515 163.296 101.777Z" stroke="white" stroke-linecap="round"/>\n <path d="M295.53 23.0783L277.524 26.2801L283.252 32.7192L274.855 38.9079L292.861 35.7061L287.133 29.2671L295.53 23.0783Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M268.06 2.91764L254.192 14.8403L262.401 17.4661L258.324 27.0679L272.192 15.1453L263.983 12.5194L268.06 2.91764Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n '})}}])&&Xf(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("ErrorDisplay"));function rp(t){return rp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rp(t)}function op(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ip(r.key),r)}}function ip(t){var e=function(t){if("object"!=rp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=rp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==rp(e)?e:e+""}function up(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(up=function(){return!!t})()}function ap(t){return ap=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ap(t)}function cp(t,e){return cp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},cp(t,e)}r.Z.registerComponent("ErrorDisplay",np);var lp=r.Z.getComponent("FullscreenToggle"),sp="Fullscreen (f)",fp=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=ap(e),function(t,e){if(e&&("object"==rp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,up()?Reflect.construct(e,n||[],ap(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cp(t,e)}(e,t),n=e,(r=[{key:"handleFullscreenChange",value:function(){lp.prototype.handleFullscreenChange.call(this),this.controlText(sp)}}])&&op(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(lp);function pp(t){return pp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pp(t)}function yp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,hp(r.key),r)}}function hp(t){var e=function(t){if("object"!=pp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=pp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pp(e)?e:e+""}function bp(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(bp=function(){return!!t})()}function vp(t){return vp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vp(t)}function dp(t,e){return dp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},dp(t,e)}r.Z.registerComponent("FullscreenToggle",fp),fp.prototype.controlText_=sp;var mp=r.Z.getComponent("MuteToggle"),gp="Mute (m)",wp=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=vp(e),function(t,e){if(e&&("object"==pp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,bp()?Reflect.construct(e,n||[],vp(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dp(t,e)}(e,t),n=e,(r=[{key:"updateControlText_",value:function(){var t=this.player_.muted()||0===this.player_.volume()?"Unmute (m)":gp;this.controlText_!==t&&this.controlText(t)}}])&&yp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(mp);r.Z.registerComponent("MuteToggle",wp),wp.prototype.controlText_=gp;var Op=n(67453),jp=n(54610);function Sp(t){return Sp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sp(t)}function Pp(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return _p(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(_p(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,_p(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,_p(f,"constructor",l),_p(l,"constructor",c),c.displayName="GeneratorFunction",_p(l,o,"GeneratorFunction"),_p(f),_p(f,o,"Generator"),_p(f,r,function(){return this}),_p(f,"toString",function(){return"[object Generator]"}),(Pp=function(){return{w:i,m:p}})()}function _p(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}_p=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){_p(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},_p(t,e,n,r)}function kp(t){return function(t){if(Array.isArray(t))return Cp(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Cp(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cp(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cp(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Tp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ep(r.key),r)}}function Ep(t){var e=function(t){if("object"!=Sp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Sp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Sp(e)?e:e+""}var Rp,xp=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())})},Bp=r.Z.getComponent("Player"),Lp=function(){return t=function t(e,n){var o=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.streamLogged=!1,this.options=r.Z.obj.merge({},t.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(e),this.buildVideoJs(),this.options.splash&&this.setupSplash(this.options.splash),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready(function(){o._configurePlugins(),o.options.setup&&o.options.setup(o.options,o.player),o.fetch().catch(function(t){return o.handleFetchError(t)})})},(e=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.configureMenuDimensionsPlugin({mobile:this.options.mobile,overflowControls:this.options.overflowControls,seekBarName:this.getSeekBarName()}),this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),!this.options.mobile&&this.options.allowFullscreen&&this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(t){var e;null===(e=this.analyticsService)||void 0===e||e.logVideoProgress(t)}},{key:"buildVideoJs",value:function(){return this.player=(0,r.Z)(this.el,this.getPlayerOptions())}},{key:"getInactivityTimeout",value:function(){if("number"==typeof this.options.inactivityTimeout)return this.options.inactivityTimeout;var t=500;return(this.options.mobile||r.Z.browser.IS_IOS||r.Z.browser.IS_ANDROID)&&(t=3e3),t}},{key:"getFluid",value:function(){return!this.options.theatreMode&&!this.options.embed&&!this.options.mobile}},{key:"getFill",value:function(){return!!this.options.theatreMode||!(!this.options.embed&&!this.options.mobile)}},{key:"getPlayerOptions",value:function(){var t=this,e=Bp.prototype.options_.children;return e=e.filter(function(t){return"bigPlayButton"!==t&&"posterImage"!==t}),{controls:this.options.controls,fluid:this.getFluid(),fill:this.getFill(),inactivityTimeout:this.getInactivityTimeout(),controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(kp(e),[{name:"collapserator",children:kt.filter(function(e){return!("fullscreenToggle"===e&&!t.options.allowFullscreen)})},"playPauseFeedback","controlBarGradient"]),userActions:{hotkeys:function(e){return function(t,e,n){if(!(t.ctrlKey||t.metaKey||t.altKey||t.shiftKey)){var r=zt()(t);if(("t"!==r||n.allowTheatreMode)&&("f"!==r||n.allowFullscreen)&&Qt[r]){Qt[r](e,t);var o=function(t){var e=t.target;return"video"===e.tagName.toLowerCase()||!!["video-js","vjs-tech"].find(function(t){return e.classList.contains(t)})}(t),i=["space"].includes(r);(o||i)&&(t.preventDefault(),t.stopPropagation())}}}(e,t.player,t.options)}},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio,mobile:this.options.mobile,allowTheatreMode:this.options.allowTheatreMode,deferMenus:this.options.deferMenus,muted:this.options.muted,devicesConfig:this.options.devicesConfig}}},{key:"getPlaybackObject",value:function(){return xp(this,void 0,void 0,Pp().m(function t(){var e,n,r=this;return Pp().w(function(t){for(;;)switch(t.n){case 0:if(!this.options.offlinePlaybackObject){t.n=1;break}return t.a(2,this.options.offlinePlaybackObject);case 1:if(e=this.options.fetch,void 0===this.options.fetch&&(e=function(t){var e="".concat(r.options.playerApi.origin,"/api/playback?viewKey=").concat(t);return At.e.get(e)}),this.options.viewKey){t.n=2;break}throw new Error("Please specify a viewKey or a fetch function");case 2:return t.n=3,e(this.options.viewKey);case 3:if(n=t.v){t.n=4;break}throw new Error("Error fetching playback object");case 4:return t.a(2,n)}},t,this)}))}},{key:"setChaptersInternal",value:function(t,e){var n=D.O.getTrack(this.player,"chapters",null);n||(n=this.player.addTextTrack("chapters")),kp(n.cues.cues_).forEach(function(t){return n.removeCue(t)}),t.forEach(function(t){n.addCue({startTime:t.timestamp,endTime:t.endTimestamp,text:t.name})}),e&&n.trigger({type:"cv:cuechange",target:n}),n.trigger({type:"loadeddata",target:n})}},{key:"setChapters",value:function(t){this.setChaptersInternal(t,!0)}},{key:"setPlayerMode",value:function(t,e){this.player.playerModePlugin().setPlayerMode(t,e)}},{key:"setFavourite",value:function(t,e){this.player.favouritePlugin().setFavourite(t,e)}},{key:"fetch",value:function(){var t,e,n,r,o;return xp(this,void 0,void 0,Pp().m(function i(){var u,a,c,l=this;return Pp().w(function(i){for(;;)switch(i.n){case 0:return i.n=1,this.getPlaybackObject();case 1:if(u=i.v,!this.isDisposed()){i.n=2;break}return i.a(2);case 2:a="MasterClip"===u.mediaType,c=null===(t=u.additionalData)||void 0===t?void 0:t.clipData,(null===(n=null===(e=u.chapters)||void 0===e?void 0:e.list)||void 0===n?void 0:n.length)>0&&!a&&!c&&this.setChaptersInternal(u.chapters.list,!1),this.player.localCache({localCacheAddresses:null!==(r=u.localCacheAddresses)&&void 0!==r?r:[],enabled:null===(o=this.options.enableLocalCache)||void 0===o||o}),this.player.progressiveFiles({sources:u.files.progressive.map(function(t){return{id:t.profile,mimeType:t.mimeType,url:t.url}})}),this.player.handleNetworkErrors({playerApi:this.options.playerApi,fileToken:u.files.fileToken}),u.subtitles.list.length>0&&u.subtitles.list.forEach(function(t){if("text/vtt"===t.mimeType){var e=l.player.addRemoteTextTrack({kind:"subtitles",src:t.url,language:t.language,label:t.label},!0);e.track.isClickViewProduced=t.isClickViewProduced,D.O.sanitizeTrack(e.track,l.player),D.O.activeTextTrack(e.track)}}),u.posterUrl&&this.player.poster(Op.j.createUrl(u.posterUrl,{size:jp.h2.Large})),this.setupSplash({title:u.title,posterUrl:u.posterUrl,episodeNumber:u.episodeNumber,ratingCode:u.ratingCode,seasonNumber:u.seasonNumber,seriesName:u.seriesName}),this.additionalSetup(u),this.handleAutoplay(u),this.options.startTime&&(this.player.currentTime(this.options.startTime),this.player.one("canplay",function(){l.player.currentTime(l.options.startTime)})),this.player.trigger("cv-playback-data-loaded",u);case 3:return i.a(2)}},i,this)}))}},{key:"handleFetchError",value:function(t){var e,n=t.message;t instanceof Kt.M&&(null===(e=t.response)||void 0===e?void 0:e.type)===Wt.PhysicallyChapteredVideo&&(n="Video cannot be played because it is either corrupt or damaged."),this.player.error(n),this.options.onError&&this.options.onError(t)}},{key:"fetchConfig",value:function(){return xp(this,void 0,void 0,Pp().m(function t(){var e;return Pp().w(function(t){for(;;)switch(t.n){case 0:if(!(Rp||this.options.fetch||this.options.offlinePlaybackObject)){t.n=1;break}return t.a(2);case 1:return e="".concat(this.options.playerApi.origin,"/api/config"),t.n=2,At.e.get(e);case 2:if(Rp=t.v,!this.isDisposed()){t.n=3;break}return t.a(2);case 3:this.trigger("config:loaded");case 4:return t.a(2)}},t,this)}))}},{key:"additionalSetup",value:function(t){var e,n=this;this.player.whiteboardModePlugin(),this.player.deferMenusPlugin();var r=this.options.enableLocalCache&&!!(null===(e=t.localCacheAddresses)||void 0===e?void 0:e.length);Rp?this.setupAnalyticsService(t,r):this.one("config:loaded",function(){return n.setupAnalyticsService(t,r)}),this.analyticsService||!this.isAnalyticsEnabled()?this.setupAnalyticsDependentPlugins(t):this.one("analytics:loaded",function(){return n.setupAnalyticsDependentPlugins(t)})}},{key:"setupAnalyticsService",value:function(t,e){this.options.eventLogging&&(this.analyticsService=new Ft({player:this.player,collectionApiUrls:Rp.collectionApi.urls,collectionApiClientId:Rp.collectionApi.clientId,productVersion:"1.35.0-rc.1",authSessionId:t.viewerAuthSessionId,videoId:t.videoId,mediaId:t.mediaId,userId:t.viewerId,shareId:t.shareId,customerId:t.viewerCustomerId,mediaType:t.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:this.options.embed,isUsingLocalCache:e,additionalAnalyticsData:this.getAdditionalAnalyticsData(t),regionName:t.instanceRegion||this.options.sharerInstanceRegion||$t.M.CvApSoutheast1}),this.on("timeupdate",this.logStream),this.trigger("analytics:loaded"))}},{key:"setupAnalyticsDependentPlugins",value:function(t){var e,n,r,o;this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(e=t.settings)||void 0===e?void 0:e.showSubtitles,subtitleSize:null===(n=t.settings)||void 0===n?void 0:n.playbackSubtitleSizeDefault,analyticsService:this.analyticsService}),this.player.persistQualitySettingsPlugin({playbackProfile:null===(r=t.settings)||void 0===r?void 0:r.playbackProfile,playbackProfileLocalCache:null===(o=t.settings)||void 0===o?void 0:o.playbackProfileLocalCache,analyticsService:this.analyticsService}),this.player.persistPlaybackRatePlugin({analyticsService:this.analyticsService})}},{key:"getAdditionalAnalyticsData",value:function(t){return{}}},{key:"isAnalyticsEnabled",value:function(){return!this.options.fetch&&!this.options.offlinePlaybackObject&&this.options.eventLogging}},{key:"handleAutoplay",value:function(t){var e=this;this.options.autoplay&&this.player.ready(function(){e.player.play().catch(function(){e.isDisposed()||e.showSplash()})})}},{key:"logStream",value:function(){this.analyticsService&&(this.player.currentTime()<3||this.streamLogged||(this.analyticsService.logStream(),this.streamLogged=!0,this.off("timeupdate",this.logStream)))}},{key:"getAnalyticsPlayerType",value:function(){return"player"}},{key:"createEl",value:function(t){var e;"string"==typeof t?(t=function(t){return 0===t.indexOf("#")?t.slice(1):t}(t),e=r.Z.dom.$("#"+t)):e=t;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=r.Z.dom.createEl("video",{},{class:n}),e.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(t,e){this.player.on(t,e)}},{key:"one",value:function(t,e){this.player.one(t,e)}},{key:"off",value:function(t,e){this.player.off(t,e)}},{key:"trigger",value:function(t,e){return this.player.trigger(t,e)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(t){this.player.ready(t)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"isPaused",value:function(){return this.player.paused()}},{key:"currentTime",value:function(t){return this.player.currentTime(t)}},{key:"muted",value:function(t){return this.player.muted(t)}},{key:"duration",value:function(){return this.player.duration()}},{key:"isFullscreen",value:function(){return this.player.isFullscreen()}},{key:"requestFullscreen",value:function(){this.player.requestFullscreen()}},{key:"exitFullscreen",value:function(){this.player.exitFullscreen()}},{key:"playbackRate",value:function(t){return this.player.playbackRate(t)}},{key:"quality",value:function(t){for(var e=this.player.qualityLevels(),n=0;n<e.length;n++){var r=e[n];if(t)r.enabled=r.id===t.toString();else if(r.enabled)return r.id}}},{key:"subtitles",value:function(t){for(var e=this.player.textTracks(),n=0;n<e.length;n++){var r=e[n];if(void 0===t){if("showing"===r.mode)return r.label}else r.label===t?r.mode="showing":r.mode="hidden"}}},{key:"bindEventListeners",value:function(){var t=this,e=function(t){return t.preventDefault()};if(this.showSplash=this.showSplash.bind(this),this.hideSplash=this.hideSplash.bind(this),this.player.on("ended",this.showSplash),this.player.on("play",this.hideSplash),this.player.tech(!0).on("contextmenu",e),this.player.one("dispose",function(){t.off("ended",t.showSplash),t.off("play",t.hideSplash),t.player.tech(!0).off("contextmenu",e)}),this.options.hotkeyElQuerySelector){var n=r.Z.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.one("dispose",function(){t.player.off(n,"keydown",t.player.handleKeyDown)}))}}},{key:"setupSeekBar",value:function(){var t=this.getSeekBarName(),e=this.player.controlBar.getChild("progressControl");e.addChild(t,this.getSeekBarOptions()),e.setSeekBarName(t)}},{key:"setupSplash",value:function(t){this._splashAdded||(this._splashAdded=!0,this.player.addChild("posterImage",Object.assign({embed:this.options.embed},t)),this.player.addChild("bigPlayButton"),this.options.autoplay?this.hideSplash():this.showSplash())}},{key:"showSplash",value:function(){this.player.hasStarted(!1),this.player.getChild("posterImage").show(),this.player.getChild("bigPlayButton").show()}},{key:"hideSplash",value:function(){this.player.getChild("posterImage").hide(),this.player.getChild("bigPlayButton").hide()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}}])&&Tp(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();Lp.options_={viewKey:null,controls:!0,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0,eventLogging:!0,allowFullscreen:!0}},98863:(t,e,n)=>{var r=n(76032),o=n(35259),i=n(95569);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}function c(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(l=function(){return!!t})()}function s(t,e,n,r){var o=f(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},f.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}var h=r.Z.getComponent("Component"),b="cv-prevent-scrubbing-tooltip-show",v="cv-prevent-scrubbing-tooltip-remove-transition",d=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=p(e),function(t,e){if(e&&("object"==u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,l()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}(this,e,arguments)).isShowing=!1,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(e,t),n=e,r=[{key:"buildCSSClass",value:function(){return"cv-prevent-scrubbing-tooltip ".concat(s(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,n,r){return s(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass(),innerText:o.vn}),r])}},{key:"show",value:function(){this.isShowing||(this.player_.userActive(!0),this.addClass(b),this.isShowing=!0)}},{key:"hide",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isShowing&&(e&&(this.addClass(v),window.requestAnimationFrame(function(){t.removeClass(v)})),this.player_.userActive(!1),this.removeClass(b),this.isShowing=!1)}}],r&&a(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(h);function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,w(r.key),r)}}function w(t){var e=function(t){if("object"!=m(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==m(e)?e:e+""}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(O=function(){return!!t})()}function j(){return j="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=S(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},j.apply(null,arguments)}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function P(t,e){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},P(t,e)}r.Z.registerComponent(o.Hx,d);var _=function(t){function e(t,n){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=S(e),function(t,e){if(e&&("object"==m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,O()?Reflect.construct(e,n||[],S(t).constructor):e.apply(t,n))}(this,e,[t])).isEnabled=!1,r.isPreviewing=!1;var o=null!=n?n:{},i=o.furthestVisitedTime,u=void 0===i?0:i,a=o.isEnabled,c=void 0!==a&&a;return r.playerCurrentTimeFn=r.player.currentTime.bind(t),r.player.currentTime=r.currentTime.bind(r),r.onTimeUpdate=r.onTimeUpdate.bind(r),r.furthestVisitedTime=u,r.isEnabled=c,c&&r.enable(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&P(t,e)}(e,t),n=e,r=[{key:"dispose",value:function(){var t,n,r;this.player.currentTime=this.playerCurrentTimeFn,this.isEnabled&&(this.disable(),(t=e,n=this,"function"==typeof(r=j(S(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([]))}},{key:"togglePreview",value:function(t){if(t){if(this.configurePreview(),this.isEnabled)return;this.enable(),this.isPreviewing=!0}else this.disable(),this.isPreviewing=!1}},{key:"configurePreview",value:function(){this.player.currentTime(0),this.furthestVisitedTime=0}},{key:"enable",value:function(){this.player.on("timeupdate",this.onTimeUpdate),this.getProgressControl().addChild(o.Hx),this.isEnabled=!0}},{key:"disable",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.getProgressControl().removeChild(this.getPreventScrubbingTooltip()),this.isEnabled=!1}},{key:"getProgressControl",value:function(){return this.player.controlBar.getChild("progressControl")}},{key:"onTimeUpdate",value:function(){var t=this.playerCurrentTimeFn();t>this.furthestVisitedTime&&(this.furthestVisitedTime=t)}},{key:"currentTime",value:function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),u=1;u<n;u++)r[u-1]=arguments[u];if("number"!=typeof t)return this.playerCurrentTimeFn.apply(this,[t].concat(r));if(this.isEnabled){var a=this.getPreventScrubbingTooltip(),c=null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay");if(t>this.furthestVisitedTime)return a.show(),(0,i.Ds)(a.hide,o.D,!1,a)(),null==c||c.hide(),void this.playerCurrentTimeFn(this.furthestVisitedTime,r);null==c||c.show(),a.hide(!0),this.playerCurrentTimeFn(t,r)}else this.playerCurrentTimeFn.apply(this,[t].concat(r))}},{key:"getPreventScrubbingTooltip",value:function(){return this.getProgressControl().getChild(o.Hx)}},{key:"getSeekBar",value:function(){var t;return null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar")}}],r&&g(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));r.Z.registerPlugin("preventScrubbingPlugin",_)},35259:(t,e,n)=>{n.d(e,{D:()=>i,Hx:()=>o,vn:()=>r});var r="No skipping ahead!",o="PreventScrubbingTooltip",i=1e3},6088:(t,e,n)=>{var r=n(76032),o=n(65858);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,a(r.key),r)}}function a(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function l(t,e,n,r){var o=s(f(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function s(){return s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},s.apply(null,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}var y=r.Z.getComponent("MenuButton"),h="Theatre mode (t)",b="Default view (t)",v="cv-theatre-mode-button",d=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=f(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}(this,e,[t,n])).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.updateControlText(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),n=e,(r=[{key:"getCollabsibleName",value:function(){return""}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!(window.innerWidth<992)}},{key:"showCollapsibleMenu",value:function(){l(e,"handleClick",this,3)([null])}},{key:"buildCSSClass",value:function(){return"cv-default-mode-button ".concat(l(e,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(l(e,"buildWrapperCSSClass",this,3)([]))}},{key:"handleClick",value:function(){this.player_.theatreModePlugin().toggleTheatreMode(void 0,{shouldLog:!0}),this.updateControlText()}},{key:"updateControlText",value:function(){this.player().theatreModePlugin().getTheatreMode()?this.controlText(b):this.controlText(h)}}])&&u(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(y);function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,w(r.key),r)}}function w(t){var e=function(t){if("object"!=m(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==m(e)?e:e+""}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(O=function(){return!!t})()}function j(){return j="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=S(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},j.apply(null,arguments)}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function P(t,e){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},P(t,e)}r.Z.registerComponent("theatreModeButton",d);var _=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=S(e),function(t,e){if(e&&("object"==m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,O()?Reflect.construct(e,n||[],S(t).constructor):e.apply(t,n))}(this,e,[t,n])).options=n,r.bindListeners(),t.ready(function(){return r.onReady()}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&P(t,e)}(e,t),n=e,r=[{key:"bindListeners",value:function(){this.onResize=this.onResize.bind(this),this.onFullscreenChange=this.onFullscreenChange.bind(this),this.player.on("playerresize",this.onResize),this.player.on("fullscreenchange",this.onFullscreenChange)}},{key:"onReady",value:function(){var t;if(this.options&&!(window.innerWidth<992)&&this.getCollapserator()){this.button=this.createButton();var e=this.options.theatreMode;e&&(null===(t=this.button)||void 0===t||t.addClass(v),this.options.onRequestTheatreMode(e))}}},{key:"dispose",value:function(){var t,n,r;this.player.off("playerresize",this.onResize),this.player.off("fullscreenchange",this.onFullscreenChange),(t=e,n=this,"function"==typeof(r=j(S(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([])}},{key:"toggleTheatreMode",value:function(t,e){var n,r;if(this.options){var i=this.options.theatreMode,u=void 0!==t?t:!i;if(this.options.onRequestTheatreMode(u),this.options.theatreMode=u,this.button)return i!==u&&(null==e?void 0:e.shouldLog)&&(null===(n=this.analyticsService)||void 0===n||n.logUserAction({id:this.options.playbackObject.videoId,name:this.options.playbackObject.title},{actionType:o.Vw.Click,descriptor:u?o.UX.EnableTheatreMode:o.UX.DisableTheatreMode,entity:o.py.Video})),u?(i||this.player.fill(!0),this.button.addClass(v),this.button.updateControlText(h),u):(i&&this.player.fluid(!0),null===(r=this.button)||void 0===r||r.removeClass(v),this.button.updateControlText(b),this.player.viewTranscriptPlugin&&this.player.viewTranscriptPlugin().toggleTranscript(!1,{shouldLog:!1}),u)}}},{key:"onResize",value:function(){var t,e;window.innerWidth<992?null===(t=this.button)||void 0===t||t.hide():this.player.isFullscreen()||(this.button||(this.button=this.createButton()),null===(e=this.button)||void 0===e||e.show())}},{key:"createButton",value:function(){var t=this.getCollapserator();return(null==t?void 0:t.getChild("theatreModeButton"))||t.addChild("theatreModeButton",{},t.children_.length-3),null==t?void 0:t.getChild("theatreModeButton")}},{key:"onFullscreenChange",value:function(){var t,e;this.player.isFullscreen()?null===(t=this.button)||void 0===t||t.hide():null===(e=this.button)||void 0===e||e.show()}},{key:"getCollapserator",value:function(){return this.player.getChild("collapserator")}},{key:"getTheatreMode",value:function(){return this.options.theatreMode}},{key:"registerAnalytics",value:function(t){this.analyticsService=t}}],r&&g(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));r.Z.registerPlugin("theatreModePlugin",_)},62315:(t,e,n)=>{n.d(e,{E:()=>V});var r=n(76032),o=n(65858),i=n(7442),u=n(10463),a=n(32735),c=n(42648),l=n(6620),s=n(91693),f=n(69130),p=n(36163),y=n(39323),h=n(88786),b=n(9932),v=n(37963),d=n(35223),m=n(23999),g=n(49985),w=n(34091),O=n(83914),j=n(36532),S=n(69883),P=n(74237);const _={languageSelect:"rHbhp",inputWithoutHighlight:"nJvbl"};function k(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return C(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(C(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,C(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,C(f,"constructor",l),C(l,"constructor",c),c.displayName="GeneratorFunction",C(l,o,"GeneratorFunction"),C(f),C(f,o,"Generator"),C(f,r,function(){return this}),C(f,"toString",function(){return"[object Generator]"}),(k=function(){return{w:i,m:p}})()}function C(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}C=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){C(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},C(t,e,n,r)}function T(t){var e,n,r=null===(e=t.languageOptions[0])||void 0===e?void 0:e.label,i=t.track.src,u=(0,S.Z)();return a.createElement("div",{className:"d-flex px-1 mb-3"},a.createElement(w.D,{query:t.searchQuery,currentSearchResultIndex:t.currentSearchResultIndex,onSearch:t.onSearch,totalSearchResults:t.totalSearchResults,jumpToSearchResult:t.jumpToSearchResult,analyticsData:t.analyticsData,analyticsOptions:t.analyticsOptions}),a.createElement(j.u,{spanHack:!0,title:t.languageOptions.length>1?"":"Only available in ".concat(r)},a.createElement(m.Z,null,a.createElement(m.Z.Toggle,{className:"text-dark ".concat(_.languageSelect),id:"language-select",disabled:(null===(n=t.languageOptions)||void 0===n?void 0:n.length)<=1,variant:"outline-dark"},a.createElement(O.x,{svgName:d.vn.Globe})),a.createElement(m.Z.Menu,{className:_.menu,"aria-labelledby":"language-select"},t.languageOptions.map(function(e,n){return a.createElement(m.Z.Item,{key:n,onClick:function(){var n;null===(n=t.onChangeLanguage)||void 0===n||n.call(t,e.value),g.k.logUserAction(Object.assign(Object.assign({},t.analyticsData),{language:e.value,previousLanguageName:t.selectedLanguage}),Object.assign(Object.assign({},t.analyticsOptions),{actionType:o.Vw.Select}))},className:"cursor-pointer",active:e.value===t.selectedLanguage},e.label)})))),a.createElement(s.h,{svgName:d.vn.Download,onClick:function(){return e=this,n=void 0,r=void 0,a=k().m(function e(){return k().w(function(e){for(;;)switch(e.n){case 0:return g.k.logUserAction(t.analyticsData,Object.assign(Object.assign({},t.analyticsOptions),{actionType:o.Vw.Download})),e.p=1,e.n=2,P.T.downloadBlob(i,"Subtitles-".concat(t.selectedLanguage,".vtt"));case 2:e.n=4;break;case 3:e.p=3,e.v,u.error("Error downloading transcript");case 4:return e.a(2)}},e,null,[[1,3]])}),new(r||(r=Promise))(function(t,o){function i(t){try{c(a.next(t))}catch(t){o(t)}}function u(t){try{c(a.throw(t))}catch(t){o(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r(function(t){t(n)})).then(i,u)}c((a=a.apply(e,n||[])).next())});var e,n,r,a},className:"position-relative d-flex align-items-center text-dark"}))}var E=n(14735),R=n(42892);function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,u,a=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(a.push(r.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return B(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function L(t){var e=R.S.get(i.KF)||(0,i.CD)(t.allTracks),n=a.useState(function(){return t.allTracks.find(function(t){return t.language===e})||t.allTracks.find(function(e){return e.language===(0,i.CD)(t.allTracks)})}),r=x(n,2),u=r[0],m=r[1],g=x(a.useState(e),2),w=g[0],O=g[1],j=x(a.useState(-1),2),S=j[0],P=j[1],_=x(a.useState(!0),2),k=_[0],C=_[1],E=x(a.useState([]),2),B=E[0],L=E[1],M=a.useMemo(function(){return Array.from((null==u?void 0:u.cues)||[])},[w]),D={videoId:t.playbackObject.videoId,videoName:t.playbackObject.title,language:w},Z={location:o.LZ.Player,entity:o.py.Transcript},I=t.player.hasStarted();(0,f.F)({currentTranscriptTrack:u,cuesToDisplay:M,setCurrentCueIndex:P,hasStarted:I});var F=a.useRef(),A=(0,l.MG)({count:B.length,getScrollElement:function(){var t;return null===(t=F.current)||void 0===t?void 0:t.view},estimateSize:function(){return 40},enabled:B.length>0}),N=A.getVirtualItems(),z=(0,p.I)(S,k,A),V=(0,y.t)({cuesToDisplay:M,resetHighlightedCues:tt,setHighlightedCues:L,scrollToCue:z}),H=V.isSearching,U=V.searchQuery,G=V.totalSearchResults,q=V.jumpToSearchResult,W=V.onSearch,Q=V.currentSearchResultIndex,K=V.resetSearchResults,$=t.player.paused(),X=x((0,v.X)(),2),J=X[0],Y=X[1];function tt(){L((0,h.B)(M))}return a.useEffect(function(){C(!Y&&!H&&I&&!$)},[Y,H,I,$]),a.useEffect(function(){tt()},[M]),u&&M.length?a.createElement("div",{ref:J,className:"cv-transcript py-3 px-2 ".concat(t.showTranscript?"cv-open":"")},a.createElement("div",{className:"text-dark d-flex justify-content-between px-1"},a.createElement("h3",null,"Transcript"),a.createElement(s.h,{svgName:d.vn.Close,onClick:function(){t.toggleTranscript(!1)},ariaLabel:"Close transcript"})),a.createElement(T,{selectedLanguage:w,languageOptions:t.languageOptions,onChangeLanguage:function(e){m(t.allTracks.find(function(t){return t.language===e})),O(e),R.S.set(i.KF,e),K()},track:u,onSearch:W,searchQuery:U,currentSearchResultIndex:Q,totalSearchResults:G,jumpToSearchResult:q,analyticsData:D,analyticsOptions:Z}),a.createElement("div",{className:"cv-transcript-list-wrapper text-dark"},a.createElement(c.ZP,{ref:F},a.createElement(b.x,{timepoint:M[S],onClickTranscriptionItem:function(e){var n;null===(n=t.setStartTime)||void 0===n||n.call(t,e.startTime)},cuesToDisplay:B,chapters:t.chapters,currentSearchResultIndex:Q,inPlayer:!0,virtualizer:A,items:N,analyticsOptions:Z,analyticsData:D,isAuthenticated:!1})))):a.createElement(a.Fragment,null)}function M(t){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M(t)}function D(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Z(r.key),r)}}function Z(t){var e=function(t){if("object"!=M(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=M(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==M(e)?e:e+""}function I(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(I=function(){return!!t})()}function F(){return F="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=A(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},F.apply(null,arguments)}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},A(t)}function N(t,e){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},N(t,e)}r.Z.registerComponent("Transcript",(0,E.Z)(function(t,e){return a.createElement(L,Object.assign({player:t},e))}));var z=r.Z.getPlugin("plugin"),V=992,H=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=A(e),function(t,e){if(e&&("object"==M(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,I()?Reflect.construct(e,n||[],A(t).constructor):e.apply(t,n))}(this,e,[t])).allClickViewTracks=[],n.player=t,n.bindListeners(),t.ready(function(){return n.initialize()}),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&N(t,e)}(e,t),n=e,r=[{key:"bindListeners",value:function(){var t=this;this.onResize=this.onResize.bind(this),u.O.useMetadataTracks(this.player,"transcript",function(){return t.player.trigger("resizemenus")}),this.player.on("playerresize",this.onResize)}},{key:"dispose",value:function(){var t,n,r;this.player.off("playerresize",this.onResize),(t=e,n=this,"function"==typeof(r=F(A(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([])}},{key:"initialize",value:function(){u.O.useSubtitles(this.player,this.onTrackLoaded.bind(this)),u.O.useChapters(this.player,this.onChaptersLoaded.bind(this))}},{key:"onChaptersLoaded",value:function(t){this.chapterTrack=t}},{key:"onTrackLoaded",value:function(t){var e=t.isClickViewProduced;!this.allClickViewTracks.find(function(e){return e.language===t.language})&&e&&this.allClickViewTracks.push(t),this.languageOptions=this.buildOptions(this.allClickViewTracks)}},{key:"buildOptions",value:function(t){return t.map(function(t){return{label:t.label,value:t.language}}).sort(function(t,e){var n=t.value.includes(i.C8)?1:0;return(e.value.includes(i.C8)?1:0)-n})}},{key:"buildComponentProps",value:function(t,e,n){var r,o=Array.from((null===(r=this.chapterTrack)||void 0===r?void 0:r.cues)||[]).map(function(t){return{endTimeStamp:t.endTime,startTime:t.startTime,name:t.text}});return{showTranscript:t,languageOptions:this.languageOptions,toggleTranscript:function(t){return e(t,{shouldLog:!0})},allTracks:this.allClickViewTracks,setStartTime:n,chapters:o,playbackObject:this.playbackObject}}},{key:"addChildren",value:function(t){if(this.component)return this.component.show(),this.component;var e=this.toggleTranscript.bind(this),n=this.setStartTime.bind(this),r=this.buildComponentProps(t,e,n);this.component=this.player.addChild("Transcript",r)}},{key:"toggleTranscript",value:function(t,e){var n,r,i,u=void 0!==t?t:!this.showTranscript;this.showTranscript=u,u?(null===(n=this.player.theatreModePlugin())||void 0===n||n.toggleTheatreMode(!0,{shouldLog:!1}),this.addChildren(!0),this.player.addClass("cv-transcript-plugin")):(null===(r=this.component)||void 0===r||r.hide(),this.player.removeClass("cv-transcript-plugin")),this.player.whiteboardModePlugin&&this.player.whiteboardModePlugin().setEnabled(!u),this.player.trigger("cv-transcript-toggle",u),this.player.trigger("resizemenus"),this.player.trigger("playerresize"),(null==e?void 0:e.shouldLog)&&(null===(i=this.analyticsService)||void 0===i||i.logUserAction({videoId:this.playbackObject.videoId,videoName:this.playbackObject.title},{actionType:o.Vw.Click,descriptor:u?o.UX.ShowTranscript:o.UX.HideTranscript,entity:o.py.Transcript}))}},{key:"setStartTime",value:function(t){this.player.currentTime(t)}},{key:"isTranscriptOn",value:function(){return!!this.showTranscript}},{key:"onResize",value:function(){window.innerWidth<V?this.player.addClass("hide-transcript"):this.showTranscript&&this.player.removeClass("hide-transcript")}},{key:"registerAnalytics",value:function(t,e){this.analyticsService=t,this.playbackObject=e}}],r&&D(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(z);r.Z.registerPlugin("viewTranscriptPlugin",H)},14735:(t,e,n)=>{n.d(e,{Z:()=>m});var r=n(44645),o=n(76032);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,l(r.key),r)}}function c(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function s(t,e,n){return e=y(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},p.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}var v=function(t){function e(t,n){return u(this,e),s(this,e,[t,n])}return h(e,t),c(e,[{key:"dispose",value:function(){var t,n,r,o=this;setImmediate(function(){var t;null===(t=o.root)||void 0===t||t.unmount()}),(t=e,n=this,"function"==typeof(r=p(y(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([])}}])}(o.Z.getComponent("Component")),d={tagName:"div"};function m(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;if(!t)throw new Error("componentCtor is required");var n=function(n){function i(){return u(this,i),s(this,i,arguments)}return h(i,n),c(i,[{key:"createEl",value:function(){var n=o.Z.dom.createEl(e.tagName,e.properties,e.attributes),i=(0,r.s)(n);return i.render(t(this.player_,this.options_)),this.root=i,n}}])}(v);return n}},87984:(t,e,n)=>{function r(t){return t?function(t){switch(!0){case t<32:return"cv-rating-purple";case t<48:return"cv-rating-green";case t<80:return"cv-rating-blue";case t<96:return"cv-rating-red";case t<128:return"cv-rating-pink";case t>=128:return"cv-rating-yellow";default:return""}}(t):""}n.d(e,{C:()=>r})},51415:(t,e,n)=>{n.d(e,{e:()=>s});var r=n(30364);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,i){var a=r&&r.prototype instanceof l?r:l,s=Object.create(a.prototype);return u(s,"_invoke",function(n,r,o){var i,u,a,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,u=0,a=t,p.n=n,c}};function y(n,r){for(u=n,a=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(a=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(u=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,u=0))}if(o||n>1)return c;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,a=h;(e=u<2?t:a)||!f;){i||(u?u<3?(u>1&&(p.n=-1),y(u,a)):p.n=a:p.v=a);try{if(l=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=p.n<0)?a:n.call(r,p))!==c)break}catch(e){i=t,u=1,a=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),s}var c={};function l(){}function s(){}function f(){}e=Object.getPrototypeOf;var p=[][r]?e(e([][r]())):(u(e={},r,function(){return this}),e),y=f.prototype=l.prototype=Object.create(p);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,u(t,o,"GeneratorFunction")),t.prototype=Object.create(y),t}return s.prototype=f,u(y,"constructor",f),u(f,"constructor",s),s.displayName="GeneratorFunction",u(f,o,"GeneratorFunction"),u(y),u(y,o,"Generator"),u(y,r,function(){return this}),u(y,"toString",function(){return"[object Generator]"}),(i=function(){return{w:a,m:h}})()}function u(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}u=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){u(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},u(t,e,n,r)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}function c(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var l=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())})},s=new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tokens={gateway:null}},e=[{key:"get",value:function(t,e){return l(this,void 0,void 0,i().m(function n(){var r,o;return i().w(function(n){for(;;)switch(n.n){case 0:return r=this,n.n=1,fetch(t,{method:"GET",mode:"cors",headers:this.getHeaders(e)});case 1:return o=n.v,n.n=2,r.parseResponse.call(r,o);case 2:return n.a(2,n.v)}},n,this)}))}},{key:"delete",value:function(t,e){return l(this,void 0,void 0,i().m(function n(){return i().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,fetch(t,{method:"DELETE",headers:this.getHeaders(e)});case 1:return n.a(2)}},n,this)}))}},{key:"post",value:function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return l(this,void 0,void 0,i().m(function o(){var u;return i().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,fetch(t,{method:"POST",headers:this.getHeaders(n),body:e,mode:"cors"});case 1:if(u=o.v,!r){o.n=3;break}return o.n=2,this.parseResponse(u);case 2:return o.a(2,o.v);case 3:return o.a(2)}},o,this)}))}},{key:"put",value:function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return l(this,void 0,void 0,i().m(function o(){var u;return i().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,fetch(t,{method:"PUT",headers:this.getHeaders(n),body:e,mode:"cors"});case 1:if(u=o.v,!r){o.n=3;break}return o.n=2,this.parseResponse(u);case 2:return o.a(2,o.v);case 3:return o.a(2)}},o,this)}))}},{key:"setToken",value:function(t,e){this.tokens[t]=e}},{key:"getHeaders",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={"Content-Type":"application/json"};return this.tokens[t.tokenName]&&(e.authorization="Bearer ".concat(this.tokens[t.tokenName])),e}},{key:"parseResponse",value:function(t){return l(this,void 0,void 0,i().m(function e(){var n,o;return i().w(function(e){for(;;)switch(e.n){case 0:if(404!==t.status){e.n=1;break}return e.a(2,null);case 1:if(t.ok){e.n=6;break}return e.p=2,e.n=3,t.json();case 3:n=e.v,e.n=5;break;case 4:throw e.p=4,e.v,new r.M(t.url);case 5:throw e.p=5,new r.M(t.url,n);case 6:return e.n=7,t.json();case 7:return o=e.v,e.a(2,o)}},e,null,[[2,4,5,6]])}))}}],e&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}())},95569:(t,e,n)=>{n.d(e,{Ds:()=>o,P2:()=>r});var r=function(t,e){var n=window.performance.now();return function(){var r=window.performance.now();r-n>=e&&(t.apply(void 0,arguments),n=r)}},o=function(t,e,n){var r,o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,u=function(){for(var u=arguments.length,a=new Array(u),c=0;c<u;c++)a[c]=arguments[c];var l=!1,s=function(){r=null,s=null,t.apply(this,a)};return!r&&n&&(t.apply(o,a),l=!0),i.clearTimeout(r),r=i.setTimeout(s,e),l};return u.cancel=function(){i.clearTimeout(r),r=null},u}},42503:(t,e,n)=>{function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;t=t<0?0:t;var n=Math.floor(t%60),r=Math.floor(t/60%60),o=Math.floor(t/3600),i=Math.floor(e/60%60),u=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(o=r=n="-"),(o=o>0||u>0?o+":":"")+(r=((o||i>=10)&&r<10?"0"+r:r)+":")+(n<10?"0"+n:n)}n.d(e,{m:()=>r})},23035:(t,e,n)=>{function r(t){for(var e=t.buffered(),n=t.currentTime(),r=0,o=0;o<e.length;o++){var i=e.start(o),u=e.end(o);if(i<=n&&u>=n){r=u;break}}return r}n.d(e,{b:()=>r})},10463:(t,e,n)=>{n.d(e,{O:()=>l});var r=n(28400);function o(t,e,n,r){if(!t.length)return[];for(var o=[],i=t.length-1;i>=0;i--){var u=t[i];if(u.kind===e){if(n&&u.label!==n)continue;if(r&&u.language!==r)continue;o.push(u)}}return o}function i(t,e,n,r,o){t.kind===e&&(n&&t.label!==n||o&&t.language!==o||(t.loaded_?r(t):t.one("loadeddata",function(){r(t)})))}function u(t){if(null==t?void 0:t.cues.length)for(var e=0;e<t.cues.length;e++){var n=t.cues[e];(null==n?void 0:n.text)&&(n.text=r.m.sanitize(n.text))}}function a(t,e,n,r,u){var a=t.textTracks(),c=o(a,e,n,u)[0];if(c)i(c,e,n,r);else{var l=function(t){i(t.track,e,n,r),a.removeEventListener("addtrack",l)};a.addEventListener("addtrack",l),t.one("dispose",function(){a.removeEventListener("addtrack",l)})}}function c(t,e,n,r,u){var a=t.textTracks(),c=o(a,e,n,u);c.length&&c.forEach(function(t){return i(t,e,n,r,u)});var l=function(t){i(t.track,e,n,r,u)};a.addEventListener("addtrack",l),t.one("dispose",function(){a.removeEventListener("addtrack",l)})}var l={getTrack:function(t,e,n,r){return o(t.textTracks(),e,n,r)[0]},useChapters:function(t,e){a(t,"chapters",null,e)},useMetadataTrack:function(t,e,n){a(t,"metadata",e,n,null)},useMetadataTracks:function(t,e,n,r){c(t,"metadata",e,n,r)},useSubtitles:function(t,e,n){c(t,"subtitles",null,e,n)},getCurrentTextTrack:function(t){return this.findTrackByPredicate(t,function(t){return"showing"===t.mode})},findTrackByPredicate:function(t,e){if(!t)return null;for(var n=t.textTracks(),r=0;r<n.length;r++){var o=n[r];if(e(o))return o}return null},forEachTrack:function(t,e){if(t)for(var n=t.textTracks(),r=0;r<n.length;r++)e(n[r])},sanitizeTrack:function(t,e){if(t&&e)if(t.loaded)u(t);else{var n=function(){return u(t)};t.addEventListener("loadeddata",n),e.one("dispose",function(){t.removeEventListener("loadeddata",n)})}},activeTextTrack:function(t){"disabled"===t.mode&&"subtitles"===t.kind&&(t.mode="hidden")}}}}]);
3
- //# sourceMappingURL=7252-941e7573cf-lite.chunk.js.map
1
+ /*! For license information please see 7252-3540b11acb-lite.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[7252],{30050:(t,e,n)=>{n.d(e,{Z:()=>f});var r=n(76032);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function u(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a=function(){return!!t})()}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},c.apply(null,arguments)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}var f=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=l(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,a()?Reflect.construct(e,n||[],l(t).constructor):e.apply(t,n))}(this,e,[t,n])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(e,t),n=e,u=[{key:"createEl",value:function(){return r.Z.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(t){var n,r,o,i=this;(n=e,r=this,"function"==typeof(o=c(l(1&3?n.prototype:n),"handleClick",r))?function(t){return o.apply(r,t)}:o)([t]),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame(function(){i.player_.getChild("collapserator").getChild("cogButton").pressButton()})}}],u&&i(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(r.Z.getComponent("MenuItem"))},78651:(t,e,n)=>{n.d(e,{W:()=>i});var r=n(86777),o=n(76032).Z.getComponent("Menu"),i=o.prototype.createEl;o.prototype.createEl=function(){var t=i.call(this);return this.simpleBar=new r.Z(this.contentEl(),{autoHide:!1}),t};var u=o.prototype.contentEl;o.prototype.contentEl=function(){return this.simpleBar?this.simpleBar.getContentElement():u.call(this)};var a=o.prototype.dispose;o.prototype.dispose=function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),a.call(this)};var c=o.prototype.addItem;o.prototype.addItem=function(t){c.call(this,t),this.simpleBar.recalculate()};var l=o.prototype.lockShowing;o.prototype.lockShowing=function(){l.call(this),this.simpleBar.recalculate()},o.prototype.recalculateScrollBar=function(){this.simpleBar.recalculate()};var s=o.prototype.handleBlur;o.prototype.handleBlur=function(t){var e=t.relatedTarget||document.activeElement;this.el().contains(e)||s.call(this,t)}},61384:(t,e,n)=>{n.d(e,{C:()=>g,Z:()=>m});var r=n(76032),o=n(95569);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,l(r.key),r)}}function c(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function s(t,e,n){return e=h(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function p(t,e,n,r){var o=y(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},y.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function b(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var d=r.Z.getComponent("MenuItem"),m=function(t){function e(t,n){var r;return u(this,e),(r=s(this,e,[t,n])).onChange=(0,o.Ds)(r.onChange,100,!1,r),r.bindEventListeners(),r}return b(e,t),c(e,[{key:"createEl",value:function(){var t=this.localize("Search");return p(e,"createEl",this,3)(["li",{className:"vjs-menu-item cv-search-input-menu-item-container ".concat(this.options_.className||"").trim(),innerHTML:'\n <div class="cv-search-input-menu-item">\n <span class="cv-search-icon">\n <svg viewBox="0 0 24 24">\n <path d="M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"/>\n </svg>\n </span><input placeholder="'.concat(t,'" type="text" autocomplete="off" spellcheck="false" aria-label="').concat(t,'" />\n </div>\n ')}])}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var t=this,e=this.$("input");this.onChange=this.onChange.bind(this),e.addEventListener("keyup",this.onChange),e.addEventListener("blur",function(e){t.options_.menuButton.menu.handleBlur(e)})}},{key:"onChange",value:function(t){var e=t.target;this.options_.search(e.value)}}])}(d);r.Z.registerComponent("SearchInputMenuItem",m);var g=function(t){function e(){return u(this,e),s(this,e,arguments)}return b(e,t),c(e,[{key:"createEl",value:function(t,n,r){return p(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:"vjs-menu-item cv-no-results"}),r])}},{key:"setLabel",value:function(t){var e=this.$(".vjs-menu-item-text");e&&(e.innerHTML=t)}}])}(d);r.Z.registerComponent("NoMatchingResultsMenuItem",g)},30364:(t,e,n)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t){var e="function"==typeof Map?new Map:void 0;return o=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(i())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&u(o,n.prototype),o}(t,arguments,a(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,t)},o(t)}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(i=function(){return!!t})()}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.d(e,{M:()=>c});var c=function(t){function e(t,n){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,n){return e=a(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,i()?Reflect.construct(e,n||[],a(t).constructor):e.apply(t,n))}(this,e,[(null==n?void 0:n.title)||"Ajax error"])).url=t,o.response=n,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(o(Error))},87252:(t,e,n)=>{n.d(e,{r:()=>Lp});var r=n(76032);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}function a(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}function l(t,e,n){return e=y(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,s()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!t})()}function f(t,e,n,r){var o=p(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},p.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}var v=function(t){function e(t,n){return i(this,e),l(this,e,[t,n])}return h(e,t),a(e,[{key:"handleClick",value:function(t){var n=this;f(e,"handleClick",this,3)([t]),this.requestAnimationFrame(function(){n.options_.item.showCollapsibleMenu()})}},{key:"createEl",value:function(t,n,o){if(!this.options_.item)return f(e,"createEl",this,3)([t,n,o]);var i=this.options_.item.getCollabsibleName(),u=this.options_.item.getCollabsibleValue(),a=this.options_.item.className,c='<span class="vjs-menu-item-text">'.concat(i,"</span>");this.valueHolder_=r.Z.dom.createEl("span",{innerHTML:u});var l=f(e,"createEl",this,3)([t,{className:"vjs-menu-item cv-cog-menu-item ".concat(u?"cv-has-cog-value":""," ").concat(a||"").trim(),innerHTML:c},o]);return l.appendChild(this.valueHolder_),l}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}])}(r.Z.getComponent("MenuItem")),d=function(t){function e(t,n){var r;return i(this,e),(r=l(this,e,[t,n])).controlText("Settings"),r}return h(e,t),a(e,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(f(e,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(f(e,"buildCSSClass",this,3)([]))}},{key:"pressButton",value:function(){this.player_.options_.deferMenus?this.player_.deferMenusPlugin().deferMenu():(this.menu.children_.forEach(function(t){t.updateCollapsibleValue&&t.updateCollapsibleValue()}),f(e,"pressButton",this,3)([]))}},{key:"createItems",value:function(){for(var t,e=this,n=[],r=0;r<this.options_.items.length;r++){var o=this.options_.items[r];o.isCollabsible&&o.showInCollabsibleMenu()&&o.isCollapsed&&n.push(new v(this.player_,{item:o}))}return(null===(t=this.additionalItems)||void 0===t?void 0:t.length)&&this.additionalItems.forEach(function(t){var r,o=new t.ctor(e.player_,Object.assign(Object.assign({},e.options_),null!==(r=t.options)&&void 0!==r?r:{}));n.splice(t.index,0,o)}),n}},{key:"update",value:function(){f(e,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(t){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some(function(e){return e.name===t.name})||(this.additionalItems.push(t),this.update())}}])}(r.Z.getComponent("MenuButton"));r.Z.registerComponent("cogButton",d);var m=n(30050);function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=C(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},w.apply(null,arguments)}function O(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function j(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,P(r.key),r)}}function S(t,e,n){return e&&j(t.prototype,e),n&&j(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function P(t){var e=function(t){if("object"!=g(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==g(e)?e:e+""}function _(t,e,n){return e=C(e),function(t,e){if(e&&("object"==g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,k()?Reflect.construct(e,n||[],C(t).constructor):e.apply(t,n))}function k(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(k=function(){return!!t})()}function C(t){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},C(t)}function T(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&E(t,e)}function E(t,e){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},E(t,e)}var R=r.Z.getComponent("MenuItem"),x=r.Z.getComponent("MenuButton"),B=["large","medium","small"],L=function(t){function e(t,n){return O(this,e),_(this,e,[t,n])}return T(e,t),S(e,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}])}(R),M=function(t){function e(t,n){var r;return O(this,e),(r=_(this,e,[t,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.player_.ready(function(){r.update()}),r}return T(e,t),S(e,[{key:"createItems",value:function(){var t=this,e=this.player_.textTrackSettings;if(e){var n=e.getSizeSetting(),r=[new m.Z(this.player_,{label:"Caption Text Size",onClickBack:function(){t.requestAnimationFrame(function(){t.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()})}})];return B.map(function(e){r.push(new L(t.player_,{label:e.charAt(0).toUpperCase()+e.substring(1),selectable:!0,multiSelectable:!1,selected:e===n,value:e}))}),r}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,n=this,"function"==typeof(r=w(C(1&3?t.prototype:t),"buildWrapperCSSClass",n))?function(t){return r.apply(n,t)}:r)([]));var t,n,r}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){x.prototype.handleClick.apply(this)}}])}(x);r.Z.registerComponent("SubtitleSizeButton",M);var D=n(10463),Z=n(61384);function I(t){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I(t)}function F(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,A(r.key),r)}}function A(t){var e=function(t){if("object"!=I(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=I(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==I(e)?e:e+""}function N(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(N=function(){return!!t})()}function z(t){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},z(t)}function V(t,e){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},V(t,e)}var H=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=z(e),function(t,e){if(e&&("object"==I(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,N()?Reflect.construct(e,n||[],z(t).constructor):e.apply(t,n))}(this,e,[t,n])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&V(t,e)}(e,t),n=e,(r=[{key:"update",value:function(t,e){var n=this;if(null==t?void 0:t.length){var r=[],o=0;t.forEach(function(t){var i=n.options_.label.substr(o,t);i&&r.push(i),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(t,e)),r.push("</span>"),o=t+e}),r.push(this.options_.label.substring(o,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(r.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&F(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("MenuItem"));function U(t){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(t)}function G(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,q(r.key),r)}}function q(t){var e=function(t){if("object"!=U(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==U(e)?e:e+""}function W(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(W=function(){return!!t})()}function Q(t,e,n,r){var o=K($(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function K(){return K="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=$(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},K.apply(null,arguments)}function $(t){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$(t)}function X(t,e){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},X(t,e)}var J=r.Z.getComponent("MenuButton"),Y=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=$(e),function(t,e){if(e&&("object"==U(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,W()?Reflect.construct(e,n||[],$(t).constructor):e.apply(t,n))}(this,e,[t,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(r),r.search=r.search.bind(r),r.player_.textTracks().addEventListener("selectedlanguagechange",r.update),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&X(t,e)}(e,t),n=e,(r=[{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.update),t.addEventListener("loadeddata",this.update),this.player_.one("dispose",function(){t.removeEventListener("loadeddata",e.update)})}},{key:"createItems",value:function(){var t,e=D.O.getCurrentTextTrack(this.player_);if(e){if(null===(t=e.cues)||void 0===t?void 0:t.length){for(var n=[new Z.Z(this.player_,{menuButton:this,search:this.search})],r=0;r<e.cues.length;r++){var o=e.cues[r];n.push(new H(this.player_,{cue:o,label:o.text,selected:!1,multiSelectable:!1}))}var i=new Z.C(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return i.hide(),n.push(i),n}this.bindTrackEvents(e)}}},{key:"search",value:function(t){var e;t=t.trim();var n=D.O.getCurrentTextTrack(this.player_);if(null===(e=null==n?void 0:n.cues)||void 0===e?void 0:e.length){var r=this.findMatches(t,n);this.toggleItemVisibility(t,r),this.toggleNoResults(t,r)}}},{key:"findMatches",value:function(t,e){var n={};if(!t)return n;for(var r=new RegExp(t,"gi"),o=0;o<e.cues.length;o++){for(var i=e.cues[o].text,u=[],a=void 0;a=r.exec(i);)u.push(a.index);u.length&&(n[o]=u)}return n}},{key:"toggleItemVisibility",value:function(t,e){this.menu.children_.slice(1,this.menu.children_.length-1).forEach(function(n,r){!t||e[r]?n.show():n.hide(),n.update(e[r],t.length)})}},{key:"toggleNoResults",value:function(t,e){var n=this.menu.children_[this.menu.children_.length-1];!t||Object.keys(e).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(Q(e,"buildWrapperCSSClass",this,3)([]))}},{key:"update",value:function(){Q(e,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){Q(e,"pressButton",this,3)([]);var t=this.menu.children_[0];(null==t?void 0:t.focus)&&(null==t||t.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){J.prototype.handleClick.apply(this)}}])&&G(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(J);function tt(t){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(t)}function et(){return et="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ct(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},et.apply(null,arguments)}function nt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,it(r.key),r)}}function ot(t,e,n){return e&&rt(t.prototype,e),n&&rt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function it(t){var e=function(t){if("object"!=tt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=tt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==tt(e)?e:e+""}function ut(t,e,n){return e=ct(e),function(t,e){if(e&&("object"==tt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,at()?Reflect.construct(e,n||[],ct(t).constructor):e.apply(t,n))}function at(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(at=function(){return!!t})()}function ct(t){return ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ct(t)}function lt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&st(t,e)}function st(t,e){return st=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},st(t,e)}r.Z.registerComponent("subtitleSearchButton",Y);var ft=r.Z.getComponent("MenuItem"),pt=r.Z.getComponent("MenuButton"),yt=[{label:"Play / Pause",type:"play-pause"},{label:"Volume",type:"volume"},{label:"Mute",type:"mute"},{label:"Toggle fullscreen",type:"fullscreen"},{label:"Exit fullscreen",type:"exit-fullscreen"},{label:"Toggle theatre mode",type:"theatre-mode"}],ht=function(t){function e(t,n){return nt(this,e),ut(this,e,[t,n])}return lt(e,t),ot(e,[{key:"createEl",value:function(){return r.Z.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(t){switch(t){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">&uArr;</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">&dArr;</span>';case"mute":return'<span class="cv-keyboard-button cv-single-key">m</span>';case"fullscreen":return'<span class="cv-keyboard-button cv-single-key">f</span>';case"exit-fullscreen":return'<span class="cv-keyboard-button cv-single-key">esc</span>';case"theatre-mode":return'<span class="cv-keyboard-button cv-single-key">t</span>'}return""}}])}(ft),bt=function(t){function e(){var t;return nt(this,e),(t=ut(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return lt(e,t),ot(e,[{key:"createItems",value:function(){var t=this,e=[];return e.push(new m.Z(this.player_,{label:"Keyboard Shortcuts"})),yt.forEach(function(n){e.push(new ht(t.player_,n))}),e}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat((t=e,n=this,"function"==typeof(r=et(ct(1&3?t.prototype:t),"buildWrapperCSSClass",n))?function(t){return r.apply(n,t)}:r)([]));var t,n,r}},{key:"getCollabsibleName",value:function(){return"Keyboard Shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!this.player_.options_.mobile}},{key:"showCollapsibleMenu",value:function(){pt.prototype.handleClick.apply(this)}}])}(pt);function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function dt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,mt(r.key),r)}}function mt(t){var e=function(t){if("object"!=vt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=vt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vt(e)?e:e+""}function gt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(gt=function(){return!!t})()}function wt(t,e,n,r){var o=Ot(jt(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function Ot(){return Ot="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=jt(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ot.apply(null,arguments)}function jt(t){return jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jt(t)}function St(t,e){return St=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},St(t,e)}r.Z.registerComponent("KeyboardShortcutsButton",bt);var Pt="cv-collapsed",_t=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=jt(e),function(t,e){if(e&&("object"==vt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,gt()?Reflect.construct(e,n||[],jt(t).constructor):e.apply(t,n))}(this,e,[t,n])).addChild("cogButton",{items:r.children_},r.children_.length-1),r.update=r.update.bind(r),r.player_.on("cv-updatecog",r.update),r.player_.on("playerresize",r.update),r.player_.one("play",r.update),r.player_.on("dispose",function(){r.player_.off("cv-updatecog",r.update),r.player_.off("playerresize",r.update),r.player_.off("play",r.update)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&St(t,e)}(e,t),n=e,(r=[{key:"toggleHidden",value:function(t){for(var e=0;e<this.children_.length;e++){var n=this.children_[e];n.isCollabsible&&(n.alwaysCollapsed||t?(n.isCollapsed=!0,n.addClass(Pt)):(n.isCollapsed=!1,n.removeClass(Pt)))}this.getChild("cogButton").update()}},{key:"update",value:function(){var t=this.player_.isFullscreen(),e=this.player_.whiteboardModePlugin().side,n=this.player_.el().getBoundingClientRect(),r=!t||"left"!==e&&"right"!==e?n.width:n.height;if(r){this.addClass("cv-collapsorator-ready");var o=r<(!t||"left"!==e&&"right"!==e&&"top"!==e?600:1200);this.player_.options_.deferMenus&&(o=!0),this.toggleHidden(o)}}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(wt(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,n,r){return wt(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])&&dt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));r.Z.registerComponent("collapserator",_t);var kt=["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"],Ct=n(57900),Tt=n(17562),Et=n(65858),Rt=n(50873),xt=n(870);function Bt(t){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bt(t)}function Lt(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return Mt(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(Mt(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,Mt(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,Mt(f,"constructor",l),Mt(l,"constructor",c),c.displayName="GeneratorFunction",Mt(l,o,"GeneratorFunction"),Mt(f),Mt(f,o,"Generator"),Mt(f,r,function(){return this}),Mt(f,"toString",function(){return"[object Generator]"}),(Lt=function(){return{w:i,m:p}})()}function Mt(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}Mt=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){Mt(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},Mt(t,e,n,r)}function Dt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Zt(r.key),r)}}function Zt(t){var e=function(t){if("object"!=Bt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Bt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bt(e)?e:e+""}var It,Ft=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.initialize()},(e=[{key:"logStream",value:function(){var t="v:".concat(this.options.videoId);Ct.SG.cacheExists(t)||(this.collectionApiClient.log({type:Et.Vw.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:Et.eq.V3}),Ct.SG&&Ct.SG.cacheSet(t,null,300))}},{key:"logVideoProgress",value:function(t){var e=this,n=this.getAnalyticsData();this.collectionApiClient.log(t.map(function(t){return{type:Et.Vw.StreamProgress,actionContext:e.getActionContext(),data:Object.assign(Object.assign({},n),{progress:t}),eventVersion:Et.eq.V2}}))}},{key:"logUserAction",value:function(t,e){var n=Object.assign(Object.assign({},this.getAnalyticsData()),t),r=Object.assign(Object.assign({},this.getActionContext()),e);this.collectionApiClient.log({type:e.actionType,data:n,actionContext:r,eventVersion:e.eventVersion||Et.eq.V2})}},{key:"getAnalyticsData",value:function(){var t=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(t.video.shareId=this.options.shareId);var e=this.getEntityType();return e===Et.py.Interactive?t.interactive={id:+this.options.mediaId}:e===Et.py.Clip&&(t.clip={id:+this.options.mediaId}),t}},{key:"initialize",value:function(){this.setupCollectionApiClient(),xt.Y.lockWindowSession(),this.options.player.one("dispose",function(){return xt.Y.unlockWindowSession()})}},{key:"setupCollectionApiClient",value:function(){var t=this;this.collectionApiClient=new Tt.q({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return t.getCurrentUser()},shouldLog:Rt.k.shouldLog,formatData:Rt.k.formatData})}},{key:"getCurrentUser",value:function(){return t=this,e=void 0,n=void 0,r=Lt().m(function t(){return Lt().w(function(t){for(;;)if(0===t.n)return t.a(2,{id:this.options.userId,customerId:this.options.customerId,sessionId:this.options.authSessionId})},t,this)}),new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())});var t,e,n,r}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?Et.MC.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return Et.py.Video;case"MasterInteractive":return Et.py.Interactive;case"MasterClip":return Et.py.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return Et.LZ.Player;case"interactive-player":return Et.LZ.InteractivePlayer;case"create-clip-player":return Et.LZ.CreateClipPlayer}}}])&&Dt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),At=n(51415),Nt=n(19389),zt=n.n(Nt);function Vt(t){return Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vt(t)}function Ht(t,e,n){return(e=function(t){var e=function(t){if("object"!=Vt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Vt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ut(t){t.paused()?t.play():t.pause()}function Gt(t,e){t.currentTime(t.currentTime()+e)}function qt(t,e){t.volume(t.volume()+e)}var Wt,Qt=(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(It={},"f",function(t){document[t.fsApi_.fullscreenEnabled]&&(t.isFullscreen()?t.exitFullscreen():t.requestFullscreen())}),"m",function(t){var e=t.volume(),n=t.lastVolume_();if(0===e){var r=n<.1?.1:n;t.volume(r),t.muted(!1)}else t.muted(!t.muted())}),"k",Ut),"space",Ut),"t",function(t){var e=t.theatreModePlugin().getTheatreMode();t.theatreModePlugin().toggleTheatreMode(!e,{shouldLog:!0})}),"left",function(t){return Gt(t,-5)}),"right",function(t){return Gt(t,5)}),"j",function(t){return Gt(t,-10)}),"l",function(t){return Gt(t,10)}),"up",function(t){return qt(t,.05)}),Ht(It,"down",function(t){return qt(t,-.05)})),Kt=n(30364);!function(t){t.PhysicallyChapteredVideo="physically-chaptered-video"}(Wt||(Wt={}));var $t=n(83765);function Xt(t){return Xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xt(t)}function Jt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Yt(r.key),r)}}function Yt(t){var e=function(t){if("object"!=Xt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Xt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xt(e)?e:e+""}function te(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(te=function(){return!!t})()}function ee(){return ee="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ne(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ee.apply(null,arguments)}function ne(t){return ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ne(t)}function re(t,e){return re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},re(t,e)}n(74978);var oe=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=ne(e),function(t,e){if(e&&("object"==Xt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,te()?Reflect.construct(e,n||[],ne(t).constructor):e.apply(t,n))}(this,e,[t])).options=n,r.configureMenuDimensions=r.configureMenuDimensions.bind(r),r.initialize(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&re(t,e)}(e,t),n=e,r=[{key:"initialize",value:function(){this.player.ready(this.configureMenuDimensions),this.player.one("play",this.configureMenuDimensions),this.player.on("resize",this.configureMenuDimensions),this.player.on("fullscreenchange",this.configureMenuDimensions),this.player.on("resizemenus",this.configureMenuDimensions),this.player.on("ready",this.configureMenuDimensions)}},{key:"dispose",value:function(){var t,n,r;this.player.off("resize",this.configureMenuDimensions),this.player.off("fullscreenchange",this.configureMenuDimensions),this.player.off("resizemenus",this.configureMenuDimensions),this.player.off("ready",this.configureMenuDimensions),(t=e,n=this,"function"==typeof(r=ee(ne(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([])}},{key:"configureMenuDimensions",value:function(){var t=this,e=function(e){if(!t.options.mobile){var n=t.player.getChild("collapserator"),r=n.getChild("volumePanel"),o=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:e},o),t.player.trigger("volumechange")}},n=this.player.isFullscreen();if(n&&!this.options.mobile){var r=this.player.whiteboardModePlugin().side;if(e("top"!==r),"left"===r||"right"===r||"top"===r){var o=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach(function(t){t.style.paddingTop=null,t.style.marginBottom=null,t.style.width="calc(".concat(o,"px - 4em)")})}}n||e(!0);var i=this.player.currentWidth(),u=this.player.currentHeight()/i*100,a=this.player.el().querySelector(".cv-collapsorator"),c=this.player.el().querySelectorAll(".vjs-menu"),l=a&&a.offsetHeight;l?("CreateClipSeekBar"===this.options.seekBarName&&(l+=22),c&&c.length&&c.forEach(function(e){!n&&t.options.overflowControls?e.style.paddingTop="80%":e.style.paddingTop="calc(".concat(u,"% - ").concat(l,"px)"),e.style.marginBottom="".concat(l,"px"),e.style.width=null,e.querySelector(".vjs-menu-content")&&(i<=450?t.player.addClass("cv-player-small"):t.player.removeClass("cv-player-small"))})):this.player.one("play",this.configureMenuDimensions)}}],r&&Jt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));r.Z.registerPlugin("configureMenuDimensionsPlugin",oe);var ie=n(42892);function ue(t){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ue(t)}function ae(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ce(r.key),r)}}function ce(t){var e=function(t){if("object"!=ue(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ue(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ue(e)?e:e+""}function le(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(le=function(){return!!t})()}function se(){return se="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=fe(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},se.apply(null,arguments)}function fe(t){return fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fe(t)}function pe(t,e){return pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pe(t,e)}var ye=r.Z.getPlugin("plugin"),he="cvplayer-volume",be="cvplayer-mute",ve=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=fe(e),function(t,e){if(e&&("object"==ue(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,le()?Reflect.construct(e,n||[],fe(t).constructor):e.apply(t,n))}(this,e,[t])).enabled=!0,n.player.ready(function(){return n.initialize()}),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pe(t,e)}(e,t),n=e,r=[{key:"initialize",value:function(){this.player.options_.mobile?this.removeVolumeControl():ie.S.hasLocalStorage()&&(this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var t=ie.S.get(he),e=ie.S.get(be);t&&this.player.volume(+t),e&&this.player.muted("true"===e)}},{key:"saveVolumeState",value:function(){this.enabled&&(ie.S.set(he,this.player.volume().toString()),ie.S.set(be,this.player.muted().toString()))}},{key:"removeVolumeControl",value:function(){this.player.volume(1);var t=this.player.getChild("collapserator"),e=t.getChild("volumePanel");t.removeChild(e)}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1}},{key:"dispose",value:function(){var t,n,r;this.player.off("volumechange",this.saveVolumeState),(t=e,n=this,"function"==typeof(r=se(fe(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([])}}],r&&ae(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ye);function de(t){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},de(t)}function me(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ge(r.key),r)}}function ge(t){var e=function(t){if("object"!=de(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=de(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==de(e)?e:e+""}function we(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(we=function(){return!!t})()}function Oe(t){return Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Oe(t)}function je(t,e){return je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},je(t,e)}r.Z.registerPlugin("persistVolumePlugin",ve);var Se=r.Z.getPlugin("plugin"),Pe="cvplayer-playback-rate",_e=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Oe(e),function(t,e){if(e&&("object"==de(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,we()?Reflect.construct(e,n||[],Oe(t).constructor):e.apply(t,n))}(this,e,[t])).options=n,r.player.dataLoaded(function(){return r.initialize()}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&je(t,e)}(e,t),n=e,(r=[{key:"initialize",value:function(){var t,e=this;if(ie.S.hasLocalStorage()){this.savePlaybackRate=this.savePlaybackRate.bind(this),this.player.on("ratechange",this.savePlaybackRate),this.one("dispose",function(){e.player.off("ratechange",e.savePlaybackRate)});var n=+ie.S.get(Pe);(null===(t=this.player.options_.playbackRates)||void 0===t?void 0:t.some(function(t){return t===n}))&&this.player.playbackRate(n)}}},{key:"savePlaybackRate",value:function(){var t,e=this.player.playbackRate().toString();ie.S.set(Pe,e),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({rate:e},{actionType:Et.Vw.Select,workflowPhase:Et.eu.Complete,descriptor:Et.UX.ChangeSpeed,entity:Et.py.PlaybackSpeed,eventVersion:Et.eq.V3})}}])&&me(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Se);function ke(t){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ke(t)}function Ce(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Te(r.key),r)}}function Te(t){var e=function(t){if("object"!=ke(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ke(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ke(e)?e:e+""}function Ee(t,e){if(e&&("object"==ke(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Re(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Re=function(){return!!t})()}function xe(t){return xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xe(t)}function Be(t,e){return Be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Be(t,e)}r.Z.registerPlugin("persistPlaybackRatePlugin",_e);var Le=function(t){function e(t){var n,r,o,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),r=this,i=[t],o=xe(o=e),(n=Ee(r,Re()?Reflect.construct(o,i||[],xe(r).constructor):o.apply(r,i))).fullscreenBecauseOfRotate=!1,n.player.supportsFullScreen()?(n.onRotate=n.onRotate.bind(n),n.onFullscreenChange=n.onFullscreenChange.bind(n),n.player.ready(function(){return n.initialize()}),n):Ee(n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Be(t,e)}(e,t),n=e,(r=[{key:"initialize",value:function(){this.player.on("fullscreenchange",this.onFullscreenChange),window.addEventListener("orientationchange",this.onRotate)}},{key:"dispose",value:function(){this.player.off("fullscreenchange",this.onFullscreenChange),window.removeEventListener("orientationchange",this.onRotate)}},{key:"onFullscreenChange",value:function(){this.player.isFullscreen()||(this.fullscreenBecauseOfRotate=!1)}},{key:"onRotate",value:function(){var t=this.getAngle();90===t||-90===t||270===t?(this.player.requestFullscreen(),this.fullscreenBecauseOfRotate=!0):this.fullscreenBecauseOfRotate&&this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"getAngle",value:function(){var t,e;return"number"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.angle)?window.screen.orientation.angle:0}}])&&Ce(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));r.Z.registerPlugin("fullscreenOnRotatePlugin",Le);var Me="\n <svg viewBox='0 0 434 71'>\n <g>\n <path fill='#FFFFFF' d='M114.44 56.57l3.5 3.5a32.87 32.87 0 0 1-25.16 11.26c-19.63 0-33.62-15.54-33.62-35.16C59.16 16.55 73.16 1 92.78 1a32.31 32.31 0 0 1 24.19 10.4l-3.6 3.3a27.32 27.32 0 0 0-20.59-8.74c-16.91 0-28.39 13.5-28.39 30.21s11.48 30.21 28.39 30.21a28.08 28.08 0 0 0 21.66-9.81zM126.64 1h4.55v70.22h-4.73L126.64 1zm17.3 10.6a3.7 3.7 0 1 1 0 7.4 3.7 3.7 0 0 1 0-7.4zm-2.41 15.07h4.81v44.56h-4.81V26.67zm48 33.15l3.33 3.15a21.8 21.8 0 0 1-17.31 8.61c-12.59 0-21.76-10-21.76-22.22 0-12.22 9.17-22.22 21.76-22.22a21.84 21.84 0 0 1 16.85 8l-3.43 3.06a17.15 17.15 0 0 0-13.42-6.3c-10.09 0-16.76 8.15-16.76 17.5s6.67 17.5 16.76 17.5a17.38 17.38 0 0 0 13.98-7.08zm14.99-9.33v20.74h-4.73V1.01h4.73v47.75l20.74-19.02h6.64l-21.56 19.84L234 71.23h-7.01l-22.47-20.74z'/>\n <path fill='#F8981D' d='M304.09 19.4a5.56 5.56 0 1 1 0-11.12 5.56 5.56 0 0 1 0 11.12zm-5.56 7.27h11.11v44.56h-11.11V26.67zm61.42 22.15c0 .81 0 2.42-.09 4h-31.75c.8 3.77 5.2 8.61 11.93 8.61a17.11 17.11 0 0 0 11.66-4.31l5.38 8.16a27.23 27.23 0 0 1-17 6.1c-12.92 0-22.88-9.87-22.88-22.34s9.06-22.33 21.35-22.33c11.62-.04 21.4 9.02 21.4 22.11zm-10.77-3.76c-.18-3.68-3.58-8.62-10.67-8.62-6.91 0-10.05 4.85-10.4 8.62h21.07zM385.92 71h-6.42l-19.64-44.37h13.97l9.16 23.98 9.72-23.98h8.31l9.63 23.98 9.16-23.98h13.97L414.24 71h-6.52l-10.85-23.7L385.92 71zm-120.22.35h-6L226.11 1.01h17.01l19.42 44.18 18.08-44.18h16.91L265.7 71.35zM0 1l41 35L0 71V1z'/>\n </g>\n </svg>\n",De=n(95569);function Ze(t){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(t)}function Ie(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Fe(r.key),r)}}function Fe(t){var e=function(t){if("object"!=Ze(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ze(e)?e:e+""}function Ae(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ae=function(){return!!t})()}function Ne(t){return Ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ne(t)}function ze(t,e){return ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ze(t,e)}var Ve=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Ne(e),function(t,e){if(e&&("object"==Ze(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ae()?Reflect.construct(e,n||[],Ne(t).constructor):e.apply(t,n))}(this,e,[t,n])).update=(0,De.P2)(r.update.bind(r),1e3),t.on("timeupdate",r.update),t.one("dispose",function(){t.off("timeupdate",r.update),r.el_.removeEventListener("click",r.pause)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ze(t,e)}(e,t),n=e,(o=[{key:"update",value:function(){var t=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(t)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var t={innerHTML:Me,className:this.buildCSSClass()},e={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=r.Z.dom.createEl("a",t,e);return this.createControlTextEl(n),n.addEventListener("click",this.pause.bind(this)),n}},{key:"pause",value:function(){this.player_.pause()}}])&&Ie(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Button"));function He(t){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},He(t)}function Ue(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ge(r.key),r)}}function Ge(t){var e=function(t){if("object"!=He(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=He(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==He(e)?e:e+""}function qe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(qe=function(){return!!t})()}function We(t){return We=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},We(t)}function Qe(t,e){return Qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qe(t,e)}Ve.prototype.controlText_="Open in ClickView",r.Z.registerComponent("OpenExternallyButton",Ve);var Ke=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=We(e),function(t,e){if(e&&("object"==He(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,qe()?Reflect.construct(e,n||[],We(t).constructor):e.apply(t,n))}(this,e,[t,n])).options=n,t.ready(function(){return r.onReady()}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qe(t,e)}(e,t),n=e,(r=[{key:"onReady",value:function(){var t=this.player.getChild("collapserator"),e=t.getChild("customControlSpacer"),n=t.children_.indexOf(e);t.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&Ue(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function $e(t){return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$e(t)}function Xe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Je(r.key),r)}}function Je(t){var e=function(t){if("object"!=$e(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=$e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$e(e)?e:e+""}function Ye(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ye=function(){return!!t})()}function tn(t,e,n,r){var o=en(nn(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function en(){return en="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=nn(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},en.apply(null,arguments)}function nn(t){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nn(t)}function rn(t,e){return rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},rn(t,e)}r.Z.registerPlugin("openExternallyPlugin",Ke);var on=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=nn(e),function(t,e){if(e&&("object"==$e(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ye()?Reflect.construct(e,n||[],nn(t).constructor):e.apply(t,n))}(this,e,[t,n])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rn(t,e)}(e,t),n=e,(r=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(tn(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,n,r){return tn(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"setUi",value:function(t,e){var n=this,r=t>0,o=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(o,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*t,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(function(){n.removeText()},e)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&Xe(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("component"));function un(t){return un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},un(t)}function an(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,cn(r.key),r)}}function cn(t){var e=function(t){if("object"!=un(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=un(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==un(e)?e:e+""}function ln(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ln=function(){return!!t})()}function sn(){return sn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=fn(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},sn.apply(null,arguments)}function fn(t){return fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fn(t)}function pn(t,e){return pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pn(t,e)}r.Z.registerComponent("TouchControls",on);var yn=r.Z.getPlugin("plugin"),hn=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=fn(e),function(t,e){if(e&&("object"==un(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ln()?Reflect.construct(e,n||[],fn(t).constructor):e.apply(t,n))}(this,e,[t])).doubleTouchCount=0,n.seekStartTime=0,n.directionModifier=0,n.bindFunctions(),n.player.ready(function(){return n.initialize()}),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pn(t,e)}(e,t),n=e,r=[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this),this.unBindEventListeners=this.unBindEventListeners.bind(this)}},{key:"initialize",value:function(){var t=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",function(){t.player.off("ready",t.reBindEventListeners)}),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.tech.on("touchstart",this.onTouchStart),this.tech.on("touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&"Html5"===this.tech.name()&&(this.tech.off("touchstart",this.onTouchStart),this.tech.off("touchend",this.onTouchEnd))}},{key:"dispose",value:function(){var t,n,r;(t=e,n=this,"function"==typeof(r=sn(fn(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([]),this.unBindEventListeners()}},{key:"onTouchStart",value:function(t){this.touchStartTime=t.timeStamp,this.userActive=this.player.userActive()}},{key:"onTouchEnd",value:function(t){var e=this;if(t.changedTouches.length){if(t.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(t),void(this.lastTouchTime=t.timeStamp);this.resetProperties(),this.lastTouchTime=t.timeStamp,t.timeStamp-this.touchStartTime<300&&window.setTimeout(function(){e.doubleTouchCount||(e.player.paused()?e.player.play():e.userActive&&e.player.pause())},300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(t){var e=this.player.el().getBoundingClientRect(),n=e.left+e.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),t.changedTouches[0].pageX<n?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}],r&&an(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(yn);function bn(t){return bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bn(t)}function vn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,dn(r.key),r)}}function dn(t){var e=function(t){if("object"!=bn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bn(e)?e:e+""}r.Z.registerPlugin("touchControls",hn);var mn=function(){return t=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=n.id,this.plugin=e,this.source=n,this.enabled=this.enabled.bind(this)},(e=[{key:"enabled",value:function(t){return void 0===t?this.plugin.currentSource===this.source:(t&&this.plugin.setSource(this.source.id),t)}}])&&vn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function gn(t){return gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gn(t)}function wn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,On(r.key),r)}}function On(t){var e=function(t){if("object"!=gn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=gn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gn(e)?e:e+""}function jn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(jn=function(){return!!t})()}function Sn(t){return Sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Sn(t)}function Pn(t,e){return Pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pn(t,e)}var _n=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Sn(e),function(t,e){if(e&&("object"==gn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,jn()?Reflect.construct(e,n||[],Sn(t).constructor):e.apply(t,n))}(this,e,[t])).options_=n,r.player.ready(function(){return r.initialize()}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pn(t,e)}(e,t),n=e,r=[{key:"initialize",value:function(){var t=this;this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources),this.onQualityChange=this.onQualityChange.bind(this),this.qualityLevels.on("change",this.onQualityChange),this.player.one("dispose",function(){t.qualityLevels.off("change",t.onQualityChange)})}},{key:"currentSource",get:function(){return this._currentSource}},{key:"onQualityChange",value:function(){var t=this.qualityLevels[this.qualityLevels.selectedIndex];this.player.trigger("cv-quality-change",t.id)}},{key:"setSource",value:function(t){var e=this,n=this.getSourceById(t);if(null===n)return this.currentSource;var r=this.player.currentTime(),o=!this.player.paused();this._currentSource=n;var i=this.player.playbackRate(),u=this.player.hasStarted();return this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",function(){e.player.playbackRate(i),e.player.currentTime()!==r&&e.player.currentTime(r),o&&e.player.play(),u&&e.player.hasStarted(!0)}),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(t){return this.sources.find(function(e){return e.id===t})}},{key:"repopulateSources",value:function(t){for(var e=null;this.qualityLevels.length;)this.qualityLevels[0].enabled&&(e=this.qualityLevels[0].id),this.qualityLevels.removeQualityLevel(this.qualityLevels[0]);this.sources=[],this.populateSources(t,e)}},{key:"sortSources",value:function(t){return t.sort(function(t,e){return t.id===e.id?0:+t.id>+e.id?-1:1})}},{key:"populateSources",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=null;(t=this.sortSources(t)).forEach(function(t){e.qualityLevels.addQualityLevel(new mn(e,t)),e.sources.push(t),e.trigger({event:"addsource",source:t}),null===n?t.default&&(r=t):t.id===n&&(r=t)}),null===r&&(r=this.sources[0]),null!==r&&this.setSource(r.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(t){for(var e=this.qualityLevels,n=-1,r=0;r<e.length;r++)if(e[r].id===t.id){n=r;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:"change"})}}],r&&wn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function kn(t){return kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kn(t)}function Cn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Tn(r.key),r)}}function Tn(t){var e=function(t){if("object"!=kn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=kn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kn(e)?e:e+""}r.Z.registerPlugin("progressiveFiles",_n);var En=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(t,e){var n=t.getQualityLevelById(e);if(n||(n=this.getNextBestQuality(t,e)),!n)return null;for(var r=0;r<t.length;r++){var o=t[r];o.enabled=n.id===o.id}return n}},{key:"getNextBestQuality",value:function(t,e){var n=this.getKnownProfiles(),r=n.indexOf(e);if(r>=0){for(var o=r+1;o<n.length;o++){var i=n[o],u=t.getQualityLevelById(i);if(u)return u}for(var a=r-1;a>0;a--){var c=n[a],l=t.getQualityLevelById(c);if(l)return l}}return null}}],null&&Cn(t.prototype,null),e&&Cn(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Rn(t){return Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rn(t)}function xn(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return Bn(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(Bn(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,Bn(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,Bn(f,"constructor",l),Bn(l,"constructor",c),c.displayName="GeneratorFunction",Bn(l,o,"GeneratorFunction"),Bn(f),Bn(f,o,"Generator"),Bn(f,r,function(){return this}),Bn(f,"toString",function(){return"[object Generator]"}),(xn=function(){return{w:i,m:p}})()}function Bn(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}Bn=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){Bn(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},Bn(t,e,n,r)}function Ln(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Mn(r.key),r)}}function Mn(t){var e=function(t){if("object"!=Rn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Rn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Rn(e)?e:e+""}var Dn=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e.name,this.playbackProfile=e.playbackProfile,this.address=new URL(e.httpsAddress)},(e=[{key:"getUrl",value:function(t){return t?this.address+"cache?file="+encodeURIComponent(t):null}},{key:"ping",value:function(){return t=this,e=void 0,n=void 0,r=xn().m(function t(){var e,n,r,o;return xn().w(function(t){for(;;)switch(t.n){case 0:return e=new AbortController,n=setTimeout(function(){return e.abort()},1e3),t.p=1,t.n=2,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:e.signal});case 2:return r=t.v,t.n=3,r.text();case 3:return o=t.v,clearTimeout(n),t.a(2,"PONG"===o);case 4:return t.p=4,t.v,t.a(2,!1)}},t,this,[[1,4]])}),new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())});var t,e,n,r}}])&&Ln(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Zn(t){return Zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zn(t)}function In(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return Fn(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(Fn(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,Fn(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,Fn(f,"constructor",l),Fn(l,"constructor",c),c.displayName="GeneratorFunction",Fn(l,o,"GeneratorFunction"),Fn(f),Fn(f,o,"Generator"),Fn(f,r,function(){return this}),Fn(f,"toString",function(){return"[object Generator]"}),(In=function(){return{w:i,m:p}})()}function Fn(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}Fn=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){Fn(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},Fn(t,e,n,r)}function An(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Nn(r.key),r)}}function Nn(t){var e=function(t){if("object"!=Zn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Zn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Zn(e)?e:e+""}var zn=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.player=e,this.logger=r.Z.log.createLogger("localcache")},(e=[{key:"setSource",value:function(t,e){return n=this,r=void 0,o=void 0,i=In().m(function n(){var r;return In().w(function(n){for(;;)switch(n.n){case 0:if(!this.player.localCache||void 0===(null==t?void 0:t.src)){n.n=2;break}return n.n=1,this.player.localCache().getActiveLocalCache();case 1:null!==(r=n.v)&&(this.logger.debug("Using Local Cache",r),t.src=r.getUrl(t.src));case 2:e(null,t);case 3:return n.a(2)}},n,this)}),new(o||(o=Promise))(function(t,e){function u(t){try{c(i.next(t))}catch(t){e(t)}}function a(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o(function(t){t(n)})).then(u,a)}c((i=i.apply(n,r||[])).next())});var n,r,o,i}}])&&An(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Vn(t){return Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vn(t)}function Hn(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return Un(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(Un(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,Un(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,Un(f,"constructor",l),Un(l,"constructor",c),c.displayName="GeneratorFunction",Un(l,o,"GeneratorFunction"),Un(f),Un(f,o,"Generator"),Un(f,r,function(){return this}),Un(f,"toString",function(){return"[object Generator]"}),(Hn=function(){return{w:i,m:p}})()}function Un(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}Un=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){Un(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},Un(t,e,n,r)}function Gn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,qn(r.key),r)}}function qn(t){var e=function(t){if("object"!=Vn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Vn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vn(e)?e:e+""}function Wn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Wn=function(){return!!t})()}function Qn(){return Qn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Kn(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Qn.apply(null,arguments)}function Kn(t){return Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Kn(t)}function $n(t,e){return $n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$n(t,e)}r.Z.use("*",function(t){return new zn(t)});var Xn='<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.9"><g id="Local-Cache" transform="translate(2.000000, 2.000000)"><rect id="Rectangle" fill="#FFFFFF" x="0" y="2.4" width="18.8" height="15.2"></rect><ellipse id="Oval" fill="#FFFFFF" cx="9.4" cy="2.4" rx="9.4" ry="2.4"></ellipse><ellipse id="Oval-Copy" fill="#FFFFFF" cx="9.4" cy="17.6" rx="9.4" ry="2.4"></ellipse><g id="Logo/Circle" transform="translate(2.500000, 3.000000)"><circle id="Oval" fill="#FFFFFF" cx="7" cy="7" r="7"></circle><polygon id="Fill-1" fill="#F8981D" points="4.66666667 2.33333333 4.66666667 11.4245258 10.0383286 6.87866667"></polygon></g></g></g></svg>',Jn=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Kn(e),function(t,e){if(e&&("object"==Vn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Wn()?Reflect.construct(e,n||[],Kn(t).constructor):e.apply(t,n))}(this,e,[t,n])).hide(),r.onLocalCacheChange=r.onLocalCacheChange.bind(r),t.ready(function(){r.initialize()}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$n(t,e)}(e,t),n=e,r=[{key:"createEl",value:function(){return(t=e,n=this,"function"==typeof(r=Qn(Kn(1&3?t.prototype:t),"createEl",n))?function(t){return r.apply(n,t)}:r)(["div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(Xn,"</div>")},{title:"Streaming from ClickView Local Cache"}]);var t,n,r}},{key:"initialize",value:function(){var t=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",function(){t.localCachePlugin.off("localcachechanged",t.onLocalCacheChange)}),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return t=this,e=void 0,n=void 0,r=Hn().m(function t(){return Hn().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.localCachePlugin.getActiveLocalCache();case 1:t.v?this.show():this.hide();case 2:return t.a(2)}},t,this)}),new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())});var t,e,n,r}}],r&&Gn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function Yn(t){return Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(t)}function tr(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return er(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(er(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,er(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,er(f,"constructor",l),er(l,"constructor",c),c.displayName="GeneratorFunction",er(l,o,"GeneratorFunction"),er(f),er(f,o,"Generator"),er(f,r,function(){return this}),er(f,"toString",function(){return"[object Generator]"}),(tr=function(){return{w:i,m:p}})()}function er(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}er=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){er(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},er(t,e,n,r)}function nr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,rr(r.key),r)}}function rr(t){var e=function(t){if("object"!=Yn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Yn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Yn(e)?e:e+""}function or(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(or=function(){return!!t})()}function ir(){return ir="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ur(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ir.apply(null,arguments)}function ur(t){return ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ur(t)}function ar(t,e){return ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ar(t,e)}r.Z.registerComponent("localCacheIndicator",Jn);var cr=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())})},lr=function(t){function e(t,n){var o;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,n){return e=ur(e),function(t,e){if(e&&("object"==Yn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,or()?Reflect.construct(e,n||[],ur(t).constructor):e.apply(t,n))}(this,e,[t])).logger_=r.Z.log.createLogger("localcache"),void 0===n)throw Error("no options defined");return o.localCaches_=n.localCacheAddresses.map(function(t){return new Dn(t)}),o.player.ready(function(){o.initialize(),n.enabled&&o.enable()}),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ar(t,e)}(e,t),n=e,o=[{key:"isEnabled",get:function(){return this.enabled_}},{key:"enable",value:function(){this.enabled_=!0,this.resetActiveLocalCache()}},{key:"disable",value:function(){this.enabled_=!1}},{key:"getActiveLocalCache",value:function(){return this.enabled_?this.activeLocalCache_:null}},{key:"resetActiveLocalCache",value:function(){this.clearActiveLocalCache(),this.activeLocalCache_=this.getActiveLocalCacheInternal()}},{key:"clearActiveLocalCache",value:function(){this.activeLocalCache_&&(this.activeLocalCache_=null,this.onLocalCacheChange(null))}},{key:"removeLocalCache",value:function(t){this.localCaches_=this.localCaches_.filter(function(e){return e!==t})}},{key:"dispose",value:function(){var t,n,r;(t=e,n=this,"function"==typeof(r=ir(ur(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([])}},{key:"initialize",value:function(){this.player.controlBar.addChild("localCacheIndicator")}},{key:"handleNetworkError",value:function(){return cr(this,void 0,void 0,tr().m(function t(){var e;return tr().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.getActiveLocalCache();case 1:if(!(e=t.v)){t.n=3;break}return t.n=2,e.ping();case 2:t.v&&this.removeLocalCache(e);case 3:return this.resetActiveLocalCache(),t.n=4,this.getActiveLocalCache();case 4:return this.resetSource(),t.a(2,!0)}},t,this)}))}},{key:"resetSource",value:function(){for(var t=this.player.qualityLevels(),e=0;e<t.length;e++)t[e].enabled&&(t[e].enabled=!0)}},{key:"getActiveLocalCacheInternal",value:function(){return cr(this,void 0,void 0,tr().m(function t(){var e,n,r,o=this;return tr().w(function(t){for(;;)switch(t.n){case 0:return e=[],n=function(t){return cr(o,void 0,void 0,tr().m(function n(){return tr().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,t.ping();case 1:if(!n.v){n.n=2;break}e.push(t);case 2:return n.a(2)}},n)}))},t.n=1,Promise.all(this.localCaches_.map(function(t){return n(t)}));case 1:if(!(e.length>0)){t.n=2;break}return r=e[0],this.onLocalCacheChange(r),t.a(2,r);case 2:return t.a(2,null)}},t,this)}))}},{key:"onLocalCacheChange",value:function(t){this.logger_.debug("Local Cache changed",t),this.trigger("localcachechanged",{localCache:t});var e=!1;t&&t.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",t.playbackProfile),En.enableProfileOrNextBest(this.player.qualityLevels(),t.playbackProfile),e=!0),e||this.player.src(this.player.src())}}],o&&nr(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getPlugin("plugin"));function sr(t){return sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sr(t)}function fr(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return pr(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(pr(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,pr(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,pr(f,"constructor",l),pr(l,"constructor",c),c.displayName="GeneratorFunction",pr(l,o,"GeneratorFunction"),pr(f),pr(f,o,"Generator"),pr(f,r,function(){return this}),pr(f,"toString",function(){return"[object Generator]"}),(fr=function(){return{w:i,m:p}})()}function pr(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}pr=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){pr(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},pr(t,e,n,r)}function yr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,hr(r.key),r)}}function hr(t){var e=function(t){if("object"!=sr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=sr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==sr(e)?e:e+""}function br(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(br=function(){return!!t})()}function vr(){return vr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=dr(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},vr.apply(null,arguments)}function dr(t){return dr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},dr(t)}function mr(t,e){return mr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mr(t,e)}r.Z.registerPlugin("localCache",lr);var gr=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())})},wr=function(t){function e(t,n){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,n){return e=dr(e),function(t,e){if(e&&("object"==sr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,br()?Reflect.construct(e,n||[],dr(t).constructor):e.apply(t,n))}(this,e,[t])).playerApi=n.playerApi,o.fileToken=n.fileToken,o.logger=r.Z.log.createLogger("video-signature-expiry-plugin"),o.bindErrorHandlers(),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mr(t,e)}(e,t),n=e,o=[{key:"bindErrorHandlers",value:function(){this.onError=this.onError.bind(this),this.player.on("error",this.onError)}},{key:"dispose",value:function(){var t,n,r;this.player.off("error",this.onError),(t=e,n=this,"function"==typeof(r=vr(dr(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([])}},{key:"onError",value:function(){return gr(this,void 0,void 0,fr().m(function t(){var e,n=this;return fr().w(function(t){for(;;)switch(t.n){case 0:if((e=this.player.error().code)===MediaError.MEDIA_ERR_NETWORK||e===MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED){t.n=1;break}return t.a(2);case 1:return t.n=2,this.player.localCache().getActiveLocalCache();case 2:if(!t.v){t.n=3;break}return this.callErrorHandler(function(){return n.player.localCache().handleNetworkError()}),t.a(2);case 3:this.callErrorHandler(function(){return n.handleVideoSignatureExpiry()});case 4:return t.a(2)}},t,this)}))}},{key:"handleVideoSignatureExpiry",value:function(){return gr(this,void 0,void 0,fr().m(function t(){var e,n;return fr().w(function(t){for(;;)switch(t.n){case 0:if(this.playerApi&&this.fileToken){t.n=1;break}return t.a(2,!1);case 1:if(!(this.refetchedSourcesTimestamp+9e5>Date.now())){t.n=2;break}return t.a(2,!1);case 2:return this.refetchedSourcesTimestamp=Date.now(),e=null,t.p=3,this.logger.debug("Detected expired mp4 urls, attempting to refetch"),n="".concat(this.playerApi.origin,"/api/files?fileToken=").concat(this.fileToken),t.n=4,At.e.get(n);case 4:e=t.v,t.n=6;break;case 5:return t.p=5,t.v,this.logger.error("Failed to refetch expired mp4 urls"),t.a(2,!1);case 6:return this.logger.debug("Mp4 urls successfully refetched"),this.player.progressiveFiles().repopulateSources(e.progressive.map(function(t){return{id:t.profile,mimeType:t.mimeType,url:t.url}})),this.fileToken=e.fileToken,t.a(2,!0)}},t,this,[[3,5]])}))}},{key:"callErrorHandler",value:function(t){return gr(this,void 0,void 0,fr().m(function e(){var n,r,o,i,u=this;return fr().w(function(e){for(;;)switch(e.n){case 0:return n=this.player.currentTime(),r=!this.player.paused(),o=this.player.playbackRate(),i=function(){u.player.playbackRate(o),u.player.currentTime(n),r&&u.player.play(),u.player.error(null)},this.player.one("loadedmetadata",i),e.n=1,t();case 1:if(!e.v){e.n=2;break}return e.a(2);case 2:this.player.off("loadedmetadata",i);case 3:return e.a(2)}},e,this)}))}}],o&&yr(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getPlugin("plugin"));function Or(t){return Or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Or(t)}function jr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Sr(r.key),r)}}function Sr(t){var e=function(t){if("object"!=Or(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Or(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Or(e)?e:e+""}function Pr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Pr=function(){return!!t})()}function _r(t){return _r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_r(t)}function kr(t,e){return kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},kr(t,e)}r.Z.registerPlugin("handleNetworkErrors",wr);var Cr=r.Z.getPlugin("plugin"),Tr="cvplayer-show-subtitles",Er="cvplayer-selected-language",Rr="cvplayer-subtitle-size",xr=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=_r(e),function(t,e){if(e&&("object"==Or(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Pr()?Reflect.construct(e,n||[],_r(t).constructor):e.apply(t,n))}(this,e,[t])).options=n,r.initialize(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kr(t,e)}(e,t),n=e,(r=[{key:"initialize",value:function(){this.applyUserPreferences=this.applyUserPreferences.bind(this),this.player.textTracks().length&&(this.bindEventListeners(),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var t=!!this.options.showSubtitles,e=this.safeGet(Tr);if("true"===e&&(t=!0),"false"===e&&(t=!1),t){var n=this.guessWhichTrack();n&&(n.mode="showing")}else this.hideSubtitles();var r=this.safeGet(Rr);r||(r=this.options.subtitleSize),this.player.options_.mobile&&(r="medium"),r&&this.player.textTrackSettings.setSizeSetting(r)}},{key:"safeGet",value:function(t){if(ie.S.hasLocalStorage())return ie.S.get(t)}},{key:"onSelectedLanguageChange",value:function(){for(var t,e,n=this.player.textTracks(),r=0;r<n.length;r++){var o=n[r];if("showing"===o.mode)return ie.S.set(Tr,"true"),ie.S.set(Er,o.language),void(null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({language:o.language},{actionType:Et.Vw.Select,entity:Et.py.Subtitle,workflowPhase:Et.eu.Complete,descriptor:Et.DL.On}))}ie.S.set(Tr,"false"),ie.S.remove(Er),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({language:""},{actionType:Et.Vw.Select,entity:Et.py.Subtitle,workflowPhase:Et.eu.Complete,descriptor:Et.DL.Off,eventVersion:Et.eq.V3})}},{key:"bindEventListeners",value:function(){var t=this;ie.S.hasLocalStorage()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",function(){t.player.off("cv:languageselected",t.onSelectedLanguageChange),t.player.off("changesubtitlesize",t.onChangeSubtitleSize)}))}},{key:"onChangeSubtitleSize",value:function(){var t=this.player.textTrackSettings.getSizeSetting();ie.S.set(Rr,t)}},{key:"guessWhichTrack",value:function(){for(var t,e,n=this.safeGet(Er)||window.navigator.language,r=this.getLanguageParts(n),o=r.language,i=r.country,u=this.player.textTracks(),a=0;a<u.length;a++){var c=u[a],l=this.getLanguageParts(c.language),s=l.language,f=l.country;if(s===o&&(t=c,f||(e=c),f===i))return t}return e||t||null}},{key:"getLanguageParts",value:function(t){var e=t.toLowerCase().split("-");return{language:e[0],country:e[1]}}},{key:"hideSubtitles",value:function(){for(var t=this.player.textTracks(),e=0;e<t.length;e++)t[e].mode="hidden"}},{key:"previewModeSubtitles",value:function(){var t=this.guessWhichTrack();t&&(t.mode="showing"),this.player.off("changesubtitlesize",this.onChangeSubtitleSize),this.player.textTrackSettings.setSizeSetting("large"),this.player.on("changesubtitlesize",this.onChangeSubtitleSize)}}])&&jr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Cr);function Br(t){return Br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Br(t)}function Lr(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return Mr(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(Mr(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,Mr(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,Mr(f,"constructor",l),Mr(l,"constructor",c),c.displayName="GeneratorFunction",Mr(l,o,"GeneratorFunction"),Mr(f),Mr(f,o,"Generator"),Mr(f,r,function(){return this}),Mr(f,"toString",function(){return"[object Generator]"}),(Lr=function(){return{w:i,m:p}})()}function Mr(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}Mr=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){Mr(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},Mr(t,e,n,r)}function Dr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Zr(r.key),r)}}function Zr(t){var e=function(t){if("object"!=Br(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Br(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Br(e)?e:e+""}function Ir(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ir=function(){return!!t})()}function Fr(t){return Fr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fr(t)}function Ar(t,e){return Ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ar(t,e)}r.Z.registerPlugin("persistSubtitleSettingsPlugin",xr);var Nr=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())})},zr=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Fr(e),function(t,e){if(e&&("object"==Br(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ir()?Reflect.construct(e,n||[],Fr(t).constructor):e.apply(t,n))}(this,e,[t])).options=n,r.player.ready(function(){return r.initialize()}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ar(t,e)}(e,t),n=e,(r=[{key:"initialize",value:function(){return Nr(this,void 0,void 0,Lr().m(function t(){var e,n,r,o,i=this;return Lr().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.getActiveLocalCache();case 1:if(e=t.v,(n=e?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(n="1080"),ie.S.hasLocalStorage()&&(r=ie.S.get(this.getStorageKey(!!e)))&&(n=r),o=this.player.qualityLevels(),(null==e?void 0:e.playbackProfile)||En.enableProfileOrNextBest(o,n),ie.S.hasLocalStorage()){t.n=2;break}return t.a(2);case 2:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),o.on("change",this.onQualityLevelsChange),this.on("dispose",function(){o.off("change",i.onQualityLevelsChange)});case 3:return t.a(2)}},t,this)}))}},{key:"onQualityLevelsChange",value:function(){var t;return Nr(this,void 0,void 0,Lr().m(function e(){var n,r,o;return Lr().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.isLocalCacheActive();case 1:n=e.v,r=this.player.qualityLevels(),o=r[r.selectedIndex],ie.S.set(this.getStorageKey(n),o.id),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({quality:o.id},{actionType:Et.Vw.Select,workflowPhase:Et.eu.Complete,descriptor:Et.UX.ChangeResolution,entity:Et.py.Resolution,eventVersion:Et.eq.V3});case 2:return e.a(2)}},e,this)}))}},{key:"isLocalCacheActive",value:function(){return Nr(this,void 0,void 0,Lr().m(function t(){return Lr().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.player.localCache().getActiveLocalCache();case 1:return t.a(2,!!t.v)}},t,this)}))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(t){return t?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&Dr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function Vr(t){return Vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vr(t)}function Hr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ur(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Wr(r.key),r)}}function qr(t,e,n){return e&&Gr(t.prototype,e),n&&Gr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Wr(t){var e=function(t){if("object"!=Vr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Vr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vr(e)?e:e+""}function Qr(t,e,n){return e=$r(e),function(t,e){if(e&&("object"==Vr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Kr()?Reflect.construct(e,n||[],$r(t).constructor):e.apply(t,n))}function Kr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Kr=function(){return!!t})()}function $r(t){return $r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$r(t)}function Xr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jr(t,e)}function Jr(t,e){return Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jr(t,e)}r.Z.registerPlugin("persistQualitySettingsPlugin",zr);var Yr=r.Z.getComponent("Component"),to=function(t){function e(t,n){return Ur(this,e),Qr(this,e,[t,n])}return Xr(e,t),qr(e,[{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var t=this.options_.event,e=this.player_.duration(),n=(t.end.time-t.start.time)/e;this.el_.style.width=100*n+"%";var r=t.start.time/e;this.el_.style.left=100*r+"%"}}])}(Yr),eo=function(t){function e(){var t;return Ur(this,e),(t=Qr(this,e,arguments)).events_=[],t}return Xr(e,t),qr(e,[{key:"update",value:function(){for(var t=this,e=this.children(),n=e.length;n>0;n--)this.removeChild(e[n]);this.events_.forEach(function(e){var n=new to(t.player(),{event:e});t.addChild(n),n.update()})}},{key:"addEvents",value:function(t){var e,n;(e=this.events_).push.apply(e,function(t){if(Array.isArray(t))return Hr(t)}(n=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return Hr(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hr(t,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),this.update()}},{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-progress-reporter-display"})}}])}(Yr);function no(t){return no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},no(t)}function ro(t,e,n){return(e=io(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,io(r.key),r)}}function io(t){var e=function(t){if("object"!=no(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=no(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==no(e)?e:e+""}function uo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(uo=function(){return!!t})()}function ao(t){return ao=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ao(t)}function co(t,e){return co=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},co(t,e)}var lo=r.Z.getPlugin("plugin"),so="play",fo="playing",po="pause",yo="seekstart",ho="ended",bo="pausedseek",vo=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=ao(e),function(t,e){if(e&&("object"==no(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,uo()?Reflect.construct(e,n||[],ao(t).constructor):e.apply(t,n))}(this,e,[t,n])).eventBuffer=[],r.latestTime=0,r.lastPlayingTime=0,r.isPlaying=!1,r.isSeeking=!1,r.hasEnded=!1,r.shouldLogPlayOnTimeUpdate=!1,r.options=n,r.player.ready(function(){return r.initialize()}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&co(t,e)}(e,t),n=e,r=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval(),this.addEasterEgg()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var t=this,e=ro(ro(ro(ro(ro(ro({},so,function(){return t.onPlay()}),po,function(){return t.onPause()}),"timeupdate",function(){return t.onTimeUpdate()}),"seeking",function(){return t.onSeeking()}),ho,function(){return t.onEnded()}),fo,function(){return t.onPlaying()}),n=Object.keys(e);n.forEach(function(n){return t.player.on(n,e[n])}),this.one("dispose",function(){n.forEach(function(n){return t.player.off(n,e[n])})})}},{key:"startInterval",value:function(){var t=this,e=this.options.interval||5e3;this.interval=window.setInterval(function(){return t.flushBuffer()},e),this.player.one("dispose",function(){return window.clearInterval(t.interval)})}},{key:"addEasterEgg",value:function(){var t,e,n=this,r="",o=function(e){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(r+=e.key)&&n.addDisplay(),window.clearTimeout(t),t=window.setTimeout(function(){r=""},500)},i=!1,u=function(){i=!0,e=window.setTimeout(function(){i&&n.addDisplay()},1e4)};function a(){i=!1,window.clearTimeout(e)}this.player.el().addEventListener("keyup",o);var c=this.player.getChild("Collapserator").getChild("PlayToggle");c.on("touchstart",u),c.on("touchend",a),this.player.one("dispose",function(){var t,e;null===(e=null===(t=n.player)||void 0===t?void 0:t.el())||void 0===e||e.removeEventListener("keyup",o),c.off("touchstart",u),c.off("touchend",a)})}},{key:"addDisplay",value:function(){var t=this;this.progressReporterDisplay||(this.progressReporterDisplay=new eo(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",function(){t.progressReporterDisplay=void 0}))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent("seekend"),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(so)}},{key:"onPause",value:function(){var t=this;this.isSeeking||(this.pauseTimeout=window.setTimeout(function(){t.isPlaying=!1,t.logEvent(po),delete t.pauseTimeout},50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(so)),this.isPlaying&&!this.isSeeking&&this.logEvent(fo)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(bo),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(yo))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(ho)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(t){if(this.player){var e=this.player.currentTime();t===yo&&(e=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:e,type:t})}}},{key:"shouldUseCarriedOverTime",value:function(t){return this.lastPlayingTime&&(t===fo||t===so)}},{key:"shouldSaveCarriedOverTime",value:function(t){return t===fo||t===po}},{key:"shouldClearCarriedOverTime",value:function(t){return t===ho||t===bo}},{key:"flushBuffer",value:function(){for(var t,e,n=[],r={};this.eventBuffer.length;){var o=this.eventBuffer.shift();this.shouldClearCarriedOverTime(o.type)?delete this.lastPlayingTime:r.start?o.type===fo&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(o.type)&&(this.lastPlayingTime=o.time),r.end=o,n.push(r),r={}):(this.shouldUseCarriedOverTime(o.type)&&(o.time=this.lastPlayingTime,delete this.lastPlayingTime),r.start=o)}this.eventBuffer=[],n.length&&this.validateEvents(n)&&(this.options.onFlush(n),null===(t=this.player)||void 0===t||t.trigger("progressflush"),null===(e=this.progressReporterDisplay)||void 0===e||e.addEvents(n))}},{key:"validateEvents",value:function(t){var e=0;t.forEach(function(t){e+=t.end.time-t.start.time});var n=this.options.interval||5e3;return n/=1e3,n+=.5,n*=this.player.playbackRate(),e<n}}],r&&oo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(lo);function mo(t){return mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mo(t)}function go(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,wo(r.key),r)}}function wo(t){var e=function(t){if("object"!=mo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=mo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mo(e)?e:e+""}function Oo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Oo=function(){return!!t})()}function jo(t){return jo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jo(t)}function So(t,e){return So=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},So(t,e)}r.Z.registerPlugin("progressReporterPlugin",vo);var Po=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=jo(e),function(t,e){if(e&&("object"==mo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Oo()?Reflect.construct(e,n||[],jo(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&So(t,e)}(e,t),n=e,(o=[{key:"createEl",value:function(){return r.Z.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&go(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component")),_o=["top","left","right","bottom"],ko={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};function Co(t){return Co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Co(t)}function To(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Eo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,xo(r.key),r)}}function Ro(t,e,n){return e&&Eo(t.prototype,e),n&&Eo(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function xo(t){var e=function(t){if("object"!=Co(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Co(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Co(e)?e:e+""}function Bo(t,e,n){return e=Do(e),function(t,e){if(e&&("object"==Co(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Lo()?Reflect.construct(e,n||[],Do(t).constructor):e.apply(t,n))}function Lo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Lo=function(){return!!t})()}function Mo(){return Mo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Do(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Mo.apply(null,arguments)}function Do(t){return Do=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Do(t)}function Zo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Io(t,e)}function Io(t,e){return Io=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Io(t,e)}var Fo=r.Z.getComponent("Component"),Ao=function(t){function e(t,n){var r;return To(this,e),(r=Bo(this,e,[t,n])).bindEventListeners(),r}return Zo(e,t),Ro(e,[{key:"createEl",value:function(){return(t=e,n=this,"function"==typeof(r=Mo(Do(1&3?t.prototype:t),"createEl",n))?function(t){return r.apply(n,t)}:r)(["div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)}]);var t,n,r}},{key:"bindEventListeners",value:function(){var t=this,e=this.el(),n=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move",t.addClass("cv-drag-over")},r=function(e){e.preventDefault(),t.removeClass("cv-drag-over"),t.player_.whiteboardModePlugin().setWhiteboardMode(t.options_.side)},o=function(){t.removeClass("cv-drag-over")};e.addEventListener("dragover",n),e.addEventListener("drop",r),e.addEventListener("dragleave",o),this.on("dispose",function(){e.removeEventListener("dragover",n),e.removeEventListener("drop",r),e.removeEventListener("dragleave",o)})}}])}(Fo),No=function(t){function e(t,n){var r;return To(this,e),(r=Bo(this,e,[t,n])).addChildren(),r}return Zo(e,t),Ro(e,[{key:"addChildren",value:function(){var t=this;_o.forEach(function(e){t.addChild(new Ao(t.player_,{side:e}))})}}])}(Fo);function zo(t){return zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zo(t)}function Vo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ho(r.key),r)}}function Ho(t){var e=function(t){if("object"!=zo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=zo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zo(e)?e:e+""}function Uo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Uo=function(){return!!t})()}function Go(t){return Go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Go(t)}function qo(t,e){return qo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qo(t,e)}var Wo=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=Go(e),function(t,e){if(e&&("object"==zo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Uo()?Reflect.construct(e,n||[],Go(t).constructor):e.apply(t,n))}(this,e,[t,n])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qo(t,e)}(e,t),n=e,(r=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Vo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("MenuItem"));function Qo(t){return Qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qo(t)}function Ko(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,$o(r.key),r)}}function $o(t){var e=function(t){if("object"!=Qo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qo(e)?e:e+""}function Xo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Xo=function(){return!!t})()}function Jo(){return Jo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Yo(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Jo.apply(null,arguments)}function Yo(t){return Yo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Yo(t)}function ti(t,e){return ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ti(t,e)}var ei=r.Z.getComponent("MenuButton"),ni=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=Yo(e),function(t,e){if(e&&("object"==Qo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Xo()?Reflect.construct(e,n||[],Yo(t).constructor):e.apply(t,n))}(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ti(t,e)}(e,t),n=e,r=[{key:"createItems",value:function(){var t=this,e=this.player_.whiteboardModePlugin().side,n=[new m.Z(this.player_,{label:"Video Controls"})];return _o.forEach(function(r){n.push(new Wo(t.player_,{side:r,label:ko[r],selectable:!0,multiSelectable:!1,selected:r===e}))}),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,n=this,"function"==typeof(r=Jo(Yo(1&3?t.prototype:t),"buildWrapperCSSClass",n))?function(t){return r.apply(n,t)}:r)([]));var t,n,r}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.whiteboardModePlugin().side;return ko[t]}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.whiteboardModePlugin().isEnabled()&&this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){ei.prototype.handleClick.apply(this)}}],r&&Ko(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ei);function ri(t){return ri="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ri(t)}function oi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ii(r.key),r)}}function ii(t){var e=function(t){if("object"!=ri(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ri(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ri(e)?e:e+""}function ui(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ui=function(){return!!t})()}function ai(t){return ai=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ai(t)}function ci(t,e){return ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ci(t,e)}var li="cv-whiteboard-side",si=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=ai(e),function(t,e){if(e&&("object"==ri(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ui()?Reflect.construct(e,n||[],ai(t).constructor):e.apply(t,n))}(this,e,[t])).side="bottom",n.enabled=!0,n.player.ready(function(){n.initialize()}),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ci(t,e)}(e,t),n=e,o=[{key:"initialize",value:function(){if(!this.player.options_.mobile){if(ie.S.hasLocalStorage()){var t=ie.S.get(li);t&&(this.side=t)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}}},{key:"initCollapserator",value:function(){var t,e,n=this;if(!(null===(e=(t=this.player).viewTranscriptPlugin)||void 0===e?void 0:e.call(t).isTranscriptOn())){var r=this.player.getChild("collapserator");this.dragHandle=new Po(this.player),this.button=new ni(this.player),r.addChild(this.dragHandle),r.addChild(this.button),this.player.trigger("cv-updatecog");var o=function(){n.player.isFullscreen()&&r.el().setAttribute("draggable","true")},i=function(){n.player.isFullscreen()&&r.el().setAttribute("draggable","false")},u=function(t){n.player.isFullscreen()&&(n.player.addClass("cv-dragging"),t.dataTransfer.setData("text/plain","handle"))},a=function(){n.player.isFullscreen()&&(n.player.removeClass("cv-dragging"),r.el().setAttribute("draggable","false"))};this.dragHandle.el().addEventListener("mousedown",o),this.dragHandle.el().addEventListener("mouseup",i),r.el().addEventListener("dragstart",u),r.el().addEventListener("dragend",a),this.on("dispose",function(){n.dragHandle.el().removeEventListener("mousedown",o),n.dragHandle.el().removeEventListener("mouseup",i),r.el().removeEventListener("dragstart",u),r.el().removeEventListener("dragend",a)})}}},{key:"initDragTargets",value:function(){this.player.addChild(new No(this.player))}},{key:"initFullscreenListener",value:function(){var t=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.player.on("cv-transcript-toggle",this.update),this.one("dispose",function(){t.player.off("fullscreenchange",t.update)})}},{key:"setWhiteboardMode",value:function(t){this.side=t,this.button.update(),ie.S.hasLocalStorage()&&ie.S.set(li,t),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"setEnabled",value:function(t){this.enabled=t,this.update()}},{key:"isEnabled",value:function(){return this.enabled}},{key:"getSide",value:function(){return this.isEnabled()?this.side:"bottom"}},{key:"update",value:function(){var t,e;if(this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),r.Z.dom.removeClass(window.document.documentElement,"cv-whiteboard-html-font-size"),this.player.trigger("resizemenus"),this.player.trigger("cv-updatecog"),this.isEnabled()){null===(e=this.dragHandle)||void 0===e||e.show();var n=this.getSide();this.player.isFullscreen()&&"bottom"!==n&&(this.player.addClass("cv-whiteboard-".concat(n)),r.Z.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}else null===(t=this.dragHandle)||void 0===t||t.hide()}}],o&&oi(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getPlugin("plugin"));function fi(t){return fi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fi(t)}function pi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,yi(r.key),r)}}function yi(t){var e=function(t){if("object"!=fi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=fi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fi(e)?e:e+""}function hi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(hi=function(){return!!t})()}function bi(t){return bi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bi(t)}function vi(t,e){return vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vi(t,e)}r.Z.registerPlugin("whiteboardModePlugin",si);var di=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=bi(e),function(t,e){if(e&&("object"==fi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,hi()?Reflect.construct(e,n||[],bi(t).constructor):e.apply(t,n))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vi(t,e)}(e,t),n=e,(r=[{key:"deferMenu",value:function(){var t={subtitles:this.buildSubtitles(),qualities:this.buildQualities(),playbackSpeeds:this.buildPlaybackSpeeds()};this.player.trigger("cv-defer-menus",t)}},{key:"buildSubtitles",value:function(){for(var t=[],e=!1,n=this.player.textTracks(),r=0;r<n.length;r++){var o=n[r],i="showing"===o.mode;t.unshift({id:o.label,name:o.label,selected:i}),i&&(e=!0)}return t.push({id:null,name:"Off",selected:!e}),t}},{key:"buildQualities",value:function(){for(var t=[],e=this.player.qualityLevels(),n=0;n<e.length;n++){var r=e[n];t.push({id:r.id,name:r.id+"p",selected:r.enabled})}return t}},{key:"buildPlaybackSpeeds",value:function(){var t=this.player.playbackRate();return this.player.options_.playbackRates.map(function(e){return{id:e,name:e+"x"+(1===e?" (Normal)":""),selected:t===e}})}}])&&pi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function mi(t){return mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mi(t)}function gi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,wi(r.key),r)}}function wi(t){var e=function(t){if("object"!=mi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=mi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mi(e)?e:e+""}function Oi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Oi=function(){return!!t})()}function ji(t){return ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ji(t)}function Si(t,e){return Si=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Si(t,e)}r.Z.registerPlugin("deferMenusPlugin",di),n(98863);var Pi=r.Z.getComponent("Button"),_i="cv-muted",ki=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=ji(e),function(t,e){if(e&&("object"==mi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Oi()?Reflect.construct(e,n||[],ji(t).constructor):e.apply(t,n))}(this,e,[t])).update(),n.update=n.update.bind(n),t.on("volumechange",n.update),t.on("dispose",function(){return t.off("volumechange",n.update)}),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Si(t,e)}(e,t),n=e,(r=[{key:"handleClick",value:function(){this.player_.muted(!this.player_.muted()),this.update()}},{key:"update",value:function(){this.player_.muted()?this.addClass(_i):this.removeClass(_i)}},{key:"buildCSSClass",value:function(){return"cv-mute-button cv-muted"}}])&&gi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Pi);function Ci(t){return Ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ci(t)}function Ti(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ei(r.key),r)}}function Ei(t){var e=function(t){if("object"!=Ci(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ci(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ci(e)?e:e+""}function Ri(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ri=function(){return!!t})()}function xi(){return xi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Bi(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},xi.apply(null,arguments)}function Bi(t){return Bi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Bi(t)}function Li(t,e){return Li=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Li(t,e)}r.Z.registerComponent("muteButton",ki),ki.prototype.controlText_="Mute";var Mi,Di=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Bi(e),function(t,e){if(e&&("object"==Ci(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ri()?Reflect.construct(e,n||[],Bi(t).constructor):e.apply(t,n))}(this,e,[t,n]))._onClickHandler=n.onClickHandler,r.bindEventListeners(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Li(t,e)}(e,t),n=e,o=[{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-player-overlay"})}},{key:"handleClick",value:function(t){"function"==typeof this._onClickHandler&&(t.stopImmediatePropagation(),this._onClickHandler())}},{key:"dispose",value:function(){var t,n,r;this.off("click",this.handleClick),(t=e,n=this,"function"==typeof(r=xi(Bi(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([])}},{key:"bindEventListeners",value:function(){this.on("click",this.handleClick)}}],o&&Ti(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function Zi(t){return Zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zi(t)}function Ii(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Fi(r.key),r)}}function Fi(t){var e=function(t){if("object"!=Zi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Zi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Zi(e)?e:e+""}function Ai(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ai=function(){return!!t})()}function Ni(t){return Ni=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ni(t)}function zi(t,e){return zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zi(t,e)}r.Z.registerComponent("playerOverlay",Di),function(t){t.Default="play",t.Hover="hover"}(Mi||(Mi={}));var Vi=r.Z.getPlugin("plugin"),Hi="cv-preview-mode",Ui=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=Ni(e),function(t,e){if(e&&("object"==Zi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ai()?Reflect.construct(e,n||[],Ni(t).constructor):e.apply(t,n))}(this,e,[t])).buttonAdded=!1,n.mode=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zi(t,e)}(e,t),n=e,(r=[{key:"getMode",value:function(){return this.mode}},{key:"setPlayerMode",value:function(t,e){var n=this.mode;if(this.mode=t,t===Mi.Hover)return this.buttonAdded||this.addButtons(e),this.player.addClass(Hi),this.enableSubtites(),this.mute(),this.removeActivityTimeout(),void this.player.trigger("resize");n===Mi.Hover&&(this.player.removeClass(Hi),this.disableSubtitles(),this.unmute(),this.restoreActivityTimeout(),this.player.trigger("resize"))}},{key:"addButtons",value:function(t){var e=new ki(this.player),n=new Di(this.player,{onClickHandler:t});this.player.addChild(e),this.player.addChild(n),this.buttonAdded=!0}},{key:"enableSubtites",value:function(){var t=this;this.player.dataLoaded(function(){return t.player.persistSubtitleSettingsPlugin().previewModeSubtitles()})}},{key:"disableSubtitles",value:function(){var t=this;this.player.dataLoaded(function(){return t.player.persistSubtitleSettingsPlugin().applyUserPreferences()})}},{key:"mute",value:function(){var t=this;this.player.ready(function(){t.player.persistVolumePlugin().disable(),t.player.muted(!0)})}},{key:"unmute",value:function(){var t=this;this.player.ready(function(){t.player.persistVolumePlugin().applyUserPreferences(),t.player.persistVolumePlugin().enable()})}},{key:"removeActivityTimeout",value:function(){this.player.cache_.inactivityTimeout=this.player.options_.inactivityTimeout,this.player.options_.inactivityTimeout=0}},{key:"restoreActivityTimeout",value:function(){this.player.options_.inactivityTimeout=this.player.cache_.inactivityTimeout}}])&&Ii(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Vi);function Gi(t){return Gi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gi(t)}function qi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ki(r.key),r)}}function Qi(t,e,n){return e&&Wi(t.prototype,e),n&&Wi(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ki(t){var e=function(t){if("object"!=Gi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Gi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Gi(e)?e:e+""}function $i(t,e,n){return e=Ji(e),function(t,e){if(e&&("object"==Gi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Xi()?Reflect.construct(e,n||[],Ji(t).constructor):e.apply(t,n))}function Xi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Xi=function(){return!!t})()}function Ji(t){return Ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ji(t)}function Yi(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tu(t,e)}function tu(t,e){return tu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tu(t,e)}r.Z.registerPlugin("playerModePlugin",Ui);var eu=r.Z.getComponent("Component"),nu=r.Z.getComponent("ClickableComponent"),ru=function(t){function e(){return qi(this,e),$i(this,e,arguments)}return Yi(e,t),Qi(e,[{key:"createEl",value:function(){return eu.prototype.createEl.call(this,"span",{className:"cv-favourite-button-svg",innerHTML:"<span class='cv-favourite-heart'>".concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Heart-Filled" d="m18.833 5.9735c-0.78916-0.95022-1.8839-1.4735-3.0826-1.4735-1.6859 0-2.7532 1.0685-3.3517 1.9648-0.15528 0.2326-0.28738 0.46582-0.39828 0.68529-0.11091-0.21946-0.24297-0.45269-0.39828-0.68529-0.5985-0.89636-1.6658-1.9648-3.3517-1.9648-1.1987 0-2.2935 0.52333-3.0827 1.4735-0.75275 0.90644-1.1673 2.1204-1.1673 3.4183 0 1.4128 0.51978 2.7268 1.6358 4.1353 0.99741 1.2588 2.4323 2.5564 4.0939 4.0589 0.61916 0.5599 1.2594 1.1389 1.9411 1.7718l0.02047 0.01903c0.08837 0.08211 0.19856 0.12313 0.30875 0.12313s0.22038-0.04105 0.30875-0.12313l0.02047-0.01903c0.68166-0.63289 1.3219-1.2119 1.9412-1.7719 1.6615-1.5024 3.0964-2.8 4.0938-4.0588 1.116-1.4085 1.6358-2.7225 1.6358-4.1353 0-1.2979-0.41459-2.5119-1.1674-3.4183z"/>\n </svg>\n',"</span><span class='cv-favourite-outline'>").concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Shape" d="m18.959 5.9741c-0.76992-0.92705-1.9357-1.5351-3.1052-1.5351-1.6448 0-2.8808 0.74937-3.4647 1.6238-0.15149 0.22693-0.28074 0.55125-0.38894 0.76537-0.10821-0.21411-0.23718-0.53844-0.38871-0.76537-0.58391-0.87451-1.8205-1.6238-3.4653-1.6238-1.1695 0-2.2376 0.60808-3.0075 1.5351-0.7344 0.88434-1.1388 1.9712-1.1388 3.2374 0 1.3784 0.50711 3.0509 1.5959 4.4251 0.97309 1.2281 2.373 2.4941 3.9941 3.9599 0.60406 0.54625 1.2285 1.1104 1.8936 1.7278l0.01997 0.01934c0.08622 0.08011 0.38931 0.21727 0.49681 0.21727 0.1075 0 0.40992-0.13796 0.49614-0.21804l0.0201-0.0178c0.66504-0.61746 1.2897-1.1824 1.8939-1.7287 1.621-1.4658 3.0209-2.7317 3.994-3.9598 1.0888-1.3742 1.5955-3.0467 1.5955-4.4251 0-1.2663-0.30646-2.3531-1.0409-3.2374zm-5.337 10.688c-0.51948 0.47226-1.0567 0.95549-1.6218 1.4768-0.56507-0.52124-1.101-1.0059-1.6219-1.4769-3.1725-2.8689-5.2684-4.7641-5.2684-7.2556 0-1.0298 0.32333-1.9863 0.91044-2.6933 0.59385-0.71497 1.4183-1.1088 2.3213-1.1088 1.254 0 2.0645 0.81976 2.5237 1.5074 0.41187 0.61679 0.62678 1.2385 0.70006 1.4772 0.06131 0.19978 0.23683 0.33499 0.43482 0.33499s0.37351-0.1352 0.43482-0.33499c0.07329-0.23867 0.28821-0.86044 0.70006-1.4773 0.45914-0.68766 1.2698-1.5074 2.5237-1.5074 0.90309 0 1.7274 0.39377 2.3213 1.1088 0.58714 0.70695 0.91047 1.6634 0.91047 2.6933 0 2.4914-2.1035 4.3783-5.2685 7.2557z" stroke-width=".97562"/>\n </svg>\n',"</span>")})}}])}(eu),ou=function(t){function e(t,n){var r;return qi(this,e),(r=$i(this,e,[t,n])).isFavourited=n.isFavourited,r.renderIcon(),r.update(),r}return Yi(e,t),Qi(e,[{key:"renderIcon",value:function(){this.icon&&this.removeChild(this.icon),this.icon=new ru(this.player_),this.addChild(this.icon)}},{key:"update",value:function(){this.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"createEl",value:function(t,e,n){e=Object.assign({innerHTML:"",className:"cv-favourite-button"},e),n=Object.assign({type:"button"},n);var r=eu.prototype.createEl.call(this,"button",e,n);return this.createControlTextEl(r),r}},{key:"handleClick",value:function(){this.isFavourited=!this.isFavourited,this.update(),this.options_.onClick&&this.options_.onClick(this.isFavourited)}}])}(nu);function iu(t){return iu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},iu(t)}function uu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,au(r.key),r)}}function au(t){var e=function(t){if("object"!=iu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=iu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==iu(e)?e:e+""}function cu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(cu=function(){return!!t})()}function lu(t){return lu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lu(t)}function su(t,e){return su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},su(t,e)}ou.prototype.controlText_="Favourite";var fu=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=lu(e),function(t,e){if(e&&("object"==iu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,cu()?Reflect.construct(e,n||[],lu(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&su(t,e)}(e,t),n=e,(r=[{key:"setFavourite",value:function(t,e){if(!this.initialized){var n=new ou(this.player,{isFavourited:t,onClick:e});this.player.addChild(n),this.initialized=!0}}}])&&uu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function pu(t){return pu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pu(t)}function yu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,hu(r.key),r)}}function hu(t){var e=function(t){if("object"!=pu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=pu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pu(e)?e:e+""}function bu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(bu=function(){return!!t})()}function vu(t){return vu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vu(t)}function du(t,e){return du=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},du(t,e)}r.Z.registerPlugin("favouritePlugin",fu),n(6088),n(78651);var mu=r.Z.getComponent("Menu"),gu=r.Z.getComponent("Component"),wu=r.Z.getComponent("MenuButton"),Ou=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=vu(e),function(t,e){if(e&&("object"==pu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,bu()?Reflect.construct(e,n||[],vu(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&du(t,e)}(e,t),n=e,(o=[{key:"createMenu",value:function(){var t,e=new mu(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=r.Z.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(t=this.options_.title,"string"!=typeof t?t:t.replace(/./,function(t){return t.toUpperCase()})),tabIndex:-1});this.hideThreshold_+=1;var o=new gu(this.player_,{el:n});e.addItem(o)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e}}])&&yu(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(wu),ju=wu.prototype.pressButton;wu.prototype.pressButton=function(){ju.call(this),this.inactivityTimeout=this.player_.cache_.inactivityTimeout,this.player_.cache_.inactivityTimeout=0,this.player_.options_.inactivityTimeout=0};var Su=wu.prototype.unpressButton;function Pu(t){return Pu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pu(t)}function _u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ku(r.key),r)}}function ku(t){var e=function(t){if("object"!=Pu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pu(e)?e:e+""}function Cu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Cu=function(){return!!t})()}function Tu(t,e,n,r){var o=Eu(Ru(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function Eu(){return Eu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ru(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Eu.apply(null,arguments)}function Ru(t){return Ru=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ru(t)}function xu(t,e){return xu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xu(t,e)}wu.prototype.unpressButton=function(){Su.call(this),this.player_.cache_.inactivityTimeout=this.inactivityTimeout,this.player_.options_.inactivityTimeout=this.inactivityTimeout,this.player_.reportUserActivity()},r.Z.registerComponent("MenuButton",Ou);var Bu=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=Ru(e),function(t,e){if(e&&("object"==Pu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Cu()?Reflect.construct(e,n||[],Ru(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xu(t,e)}(e,t),n=e,(r=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(Tu(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,n,r){return Tu(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])&&_u(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function Lu(t){return Lu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lu(t)}function Mu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Du(r.key),r)}}function Du(t){var e=function(t){if("object"!=Lu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Lu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lu(e)?e:e+""}function Zu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Zu=function(){return!!t})()}function Iu(t){return Iu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Iu(t)}function Fu(t,e){return Fu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fu(t,e)}Bu.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},r.Z.registerComponent("TimeWrapper",Bu);var Au=r.Z.getComponent("SeekBar"),Nu=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=Iu(e),function(t,e){if(e&&("object"==Lu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zu()?Reflect.construct(e,n||[],Iu(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fu(t,e)}(e,t),n=e,(r=[{key:"handleMouseDown",value:function(t){var e=this.player_.preventScrubbingPlugin();e.isEnabled&&this.getMouseTime(t)>e.furthestVisitedTime||(Au.prototype.handleMouseDown.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback"))}},{key:"handleMouseMove",value:function(t){Au.prototype.handleMouseMove.call(this,t),this.update()}},{key:"getPercent",value:function(){var t=this.player_.currentTime()/this.player_.duration();return t>=1?1:t}},{key:"handleMouseUp",value:function(t){var e=this;Au.prototype.handleMouseUp.call(this,t),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(function(){e.player_.removeClass("cv-disable-play-pause-feedback")},500)}},{key:"clamp",value:function(t,e,n){return Math.min(Math.max(t,e),n)}},{key:"getMouseTime",value:function(t){return this.clamp(Au.prototype.calculateDistance.call(this,t).x,0,1)*this.player_.duration()}}])&&Mu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Au);function zu(t){return zu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zu(t)}function Vu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Hu(r.key),r)}}function Hu(t){var e=function(t){if("object"!=zu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=zu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zu(e)?e:e+""}function Uu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Uu=function(){return!!t})()}function Gu(t,e,n,r){var o=qu(Wu(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function qu(){return qu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Wu(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},qu.apply(null,arguments)}function Wu(t){return Wu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wu(t)}function Qu(t,e){return Qu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qu(t,e)}r.Z.registerComponent("SeekBar",Nu);var Ku=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=Wu(e),function(t,e){if(e&&("object"==zu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Uu()?Reflect.construct(e,n||[],Wu(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qu(t,e)}(e,t),n=e,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Gu(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,n,r){return Gu(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(t){this.el_.style.width=100*t+"%"}}])&&Vu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function $u(t){return $u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$u(t)}function Xu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ju(r.key),r)}}function Ju(t){var e=function(t){if("object"!=$u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=$u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$u(e)?e:e+""}function Yu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Yu=function(){return!!t})()}function ta(t,e,n,r){var o=ea(na(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function ea(){return ea="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=na(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ea.apply(null,arguments)}function na(t){return na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},na(t)}function ra(t,e){return ra=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ra(t,e)}var oa=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=na(e),function(t,e){if(e&&("object"==$u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Yu()?Reflect.construct(e,n||[],na(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ra(t,e)}(e,t),n=e,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(ta(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,n,r){return ta(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(t){t>0&&t<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*t+"%"}}])&&Xu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function ia(t){return ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ia(t)}function ua(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,aa(r.key),r)}}function aa(t){var e=function(t){if("object"!=ia(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ia(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ia(e)?e:e+""}function ca(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ca=function(){return!!t})()}function la(t,e,n,r){var o=sa(fa(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function sa(){return sa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=fa(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},sa.apply(null,arguments)}function fa(t){return fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fa(t)}function pa(t,e){return pa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pa(t,e)}var ya=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=fa(e),function(t,e){if(e&&("object"==ia(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ca()?Reflect.construct(e,n||[],fa(t).constructor):e.apply(t,n))}(this,e,[t,n])).playProgress=new oa(r.player_),r.addChild(r.playProgress),r.loadProgress=new Ku(r.player_),r.addChild(r.loadProgress),r.update(),r.updateBuffered(0),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pa(t,e)}(e,t),n=e,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(la(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,n,r){return la(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var t=this.player_.duration()||3600,e=this.options_.endTime-this.options_.startTime;if(t!==this.duration_){var n=e/t;this.el_.style.width=100*n+"%";var r=this.options_.startTime/t;this.el_.style.left=100*r+"%",this.duration_=t}var o=this.getCurrentTime();o<this.options_.startTime?this.playProgress.update(0):o>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((o-this.options_.startTime)/e)}},{key:"updateBuffered",value:function(t){var e=this.options_.endTime-this.options_.startTime;t<this.options_.startTime?this.loadProgress.update(0):t>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((t-this.options_.startTime)/e)}}])&&ua(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component")),ha=n(23035);function ba(t){return ba="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ba(t)}function va(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,da(r.key),r)}}function da(t){var e=function(t){if("object"!=ba(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ba(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ba(e)?e:e+""}function ma(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ma=function(){return!!t})()}function ga(t,e,n,r){var o=wa(Oa(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function wa(){return wa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Oa(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},wa.apply(null,arguments)}function Oa(t){return Oa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Oa(t)}function ja(t,e){return ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ja(t,e)}var Sa=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=Oa(e),function(t,e){if(e&&("object"==ba(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ma()?Reflect.construct(e,n||[],Oa(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ja(t,e)}(e,t),n=e,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(ga(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,n,r){return ga(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(){this.children_.forEach(function(t){t.update()})}},{key:"updateBuffered",value:function(){var t=this;this.children_.forEach(function(e){e.updateBuffered((0,ha.b)(t.player_))})}}])&&va(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function Pa(t){return Pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pa(t)}function _a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ka(r.key),r)}}function ka(t){var e=function(t){if("object"!=Pa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pa(e)?e:e+""}function Ca(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ca=function(){return!!t})()}function Ta(t,e,n,r){var o=Ea(Ra(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function Ea(){return Ea="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ra(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ea.apply(null,arguments)}function Ra(t){return Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ra(t)}function xa(t,e){return xa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xa(t,e)}var Ba=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Ra(e),function(t,e){if(e&&("object"==Pa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ca()?Reflect.construct(e,n||[],Ra(t).constructor):e.apply(t,n))}(this,e,[t,n])).onDurationChange=r.onDurationChange.bind(r),r.createChapterItems=r.createChapterItems.bind(r),r.updateBuffered=r.updateBuffered.bind(r),D.O.useChapters(r.player_,r.createChapterItems),r.player_.on("durationchange",r.onDurationChange),r.player_.on("progress",r.updateBuffered),r.createChapterItems(),r.update(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xa(t,e)}(e,t),n=e,(o=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),Ta(e,"dispose",this,3)([])}},{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar"),role:"progressbar"})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var t=Ta(e,"update",this,3)([]);return this.chapterBarItems&&this.chapterBarItems.update(),t}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"bindUpdateListener",value:function(t){var e=this,n=function(){e.createChapterItems(),e.updateBuffered()};t.addEventListener("cv:cuechange",n),this.player_.one("dispose",function(){return t.removeEventListener("cv:cuechange",n)})}},{key:"createChapterItems",value:function(t){var e,n;t&&(this.track_||this.bindUpdateListener(t),this.track_=t);var r=new Sa(this.player_);if((null===(n=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===n?void 0:n.length)&&!this.options_.ignoreChapters)for(var o=0;o<this.track_.cues.length;o++){var i=this.track_.cues[o],u=i.startTime,a=i.endTime,c=this.player_.duration();c&&(o===this.track_.cues.length-1&&i.endTime<this.player_.duration()&&(a=this.player_.duration()),a>c&&(a=c));var l=new ya(this.player_,{startTime:u,endTime:a});if(r.addChild(l),c&&a===c)break}else r.addChild(new ya(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&_a(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("SeekBar"));function La(t){return La="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},La(t)}function Ma(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Da(r.key),r)}}function Da(t){var e=function(t){if("object"!=La(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=La(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==La(e)?e:e+""}function Za(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Za=function(){return!!t})()}function Ia(){return Ia="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Fa(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ia.apply(null,arguments)}function Fa(t){return Fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fa(t)}function Aa(t,e){return Aa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Aa(t,e)}Ba.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},r.Z.browser.IS_IOS||r.Z.browser.IS_ANDROID||Ba.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),r.Z.registerComponent("ChapterSeekBar",Ba);var Na=r.Z.getComponent("ProgressControl"),za="seekBar",Va=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=Fa(e),function(t,e){if(e&&("object"==La(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Za()?Reflect.construct(e,n||[],Fa(t).constructor):e.apply(t,n))}(this,e,arguments)).seekBarName_=za,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Aa(t,e)}(e,t),n=e,r=[{key:"setSeekBarName",value:function(t){this.seekBarName_=t}},{key:"getChild",value:function(t){return(null==t?void 0:t.toLowerCase())===za.toLowerCase()&&(t=this.seekBarName_),(n=e,r=this,"function"==typeof(o=Ia(Fa(1&3?n.prototype:n),"getChild",r))?function(t){return o.apply(r,t)}:o)([t]);var n,r,o}}],r&&Ma(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Na);Va.prototype.options_={children:[]},r.Z.registerComponent("ProgressControl",Va);var Ha=n(35259),Ua=n(42503);function Ga(t){return Ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ga(t)}function qa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Wa(r.key),r)}}function Wa(t){var e=function(t){if("object"!=Ga(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ga(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ga(e)?e:e+""}function Qa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Qa=function(){return!!t})()}function Ka(){return Ka="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=$a(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ka.apply(null,arguments)}function $a(t){return $a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$a(t)}function Xa(t,e){return Xa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xa(t,e)}var Ja=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=$a(e),function(t,e){if(e&&("object"==Ga(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Qa()?Reflect.construct(e,n||[],$a(t).constructor):e.apply(t,n))}(this,e,[t,n])).hasCustomChapterText=!1,D.O.useChapters(r.player_,function(t){r.track_=t}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xa(t,e)}(e,t),n=e,o=[{key:"createEl",value:function(){var t,n,o,i=(t=e,n=this,"function"==typeof(o=Ka($a(1&3?t.prototype:t),"createEl",n))?function(t){return o.apply(n,t)}:o)([]);return this.chapter_=r.Z.dom.createEl("div"),i.appendChild(this.chapter_),this.time_=r.Z.dom.createEl("div"),i.appendChild(this.time_),i}},{key:"updateTime",value:function(t){var e=this.player_.duration();if(r.Z.dom.textContent(this.time_,(0,Ua.m)(t,e)),this.track_&&!this.hasCustomChapterText){for(var n=0;n<this.track_.cues.length;n++){var o=this.track_.cues[n],i=o.endTime||e;if(o.startTime<=t&&i>=t)return void r.Z.dom.textContent(this.chapter_,o.text)}r.Z.dom.textContent(this.chapter_,"")}}},{key:"clearChapterContent",value:function(){r.Z.dom.textContent(this.chapter_,"")}},{key:"updateText",value:function(t){r.Z.dom.textContent(this.time_,t)}},{key:"setCustomChapterText",value:function(t){this.hasCustomChapterText=!!t,r.Z.dom.textContent(this.chapter_,null!=t?t:"")}}],o&&qa(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("TimeTooltip"));function Ya(t){return Ya="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ya(t)}function tc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ec(r.key),r)}}function ec(t){var e=function(t){if("object"!=Ya(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ya(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ya(e)?e:e+""}function nc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(nc=function(){return!!t})()}function rc(){return rc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=oc(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},rc.apply(null,arguments)}function oc(t){return oc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},oc(t)}function ic(t,e){return ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ic(t,e)}r.Z.registerComponent("TimeTooltip",Ja);var uc=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=oc(e),function(t,e){if(e&&("object"==Ya(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,nc()?Reflect.construct(e,n||[],oc(t).constructor):e.apply(t,n))}(this,e,[t,n])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ic(t,e)}(e,t),n=e,o=[{key:"setTrack",value:function(t){this.track_=t}},{key:"createEl",value:function(){var t,n,o,i=(t=e,n=this,"function"==typeof(o=rc(oc(1&3?t.prototype:t),"createEl",n))?function(t){return o.apply(n,t)}:o)(["div",{className:"cv-thumbnail-display"}]);return this.img_=r.Z.dom.createEl("img"),i.appendChild(this.img_),i}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(t){var e=t.indexOf("#");if(-1===e)return{src:t,w:0,h:0,x:0,y:0};var n=t.substr(0,e),r=t.substr(e+1);if("xywh="!==r.substr(0,5))return{src:t,w:0,h:0,x:0,y:0};var o=this.getScale(),i=r.substr(5).split(",");return{src:n,w:parseInt(i[2])*o,h:parseInt(i[3])*o,x:parseInt(i[0])*o,y:parseInt(i[1])*o}}},{key:"getScale",value:function(){var t=this.options_.scaleFactor,e=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==e&&(t*=2),t}},{key:"update",value:function(t){var e,n;if(null===(n=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===n?void 0:n.length){for(var r,o=t,i=0;i<this.track_.cues.length;){var u=this.track_.cues[i];if(u.startTime<=o&&u.endTime>=o){r=this.parseImageLink(u.text);break}i++}if(null==r?void 0:r.src){this.enable();var a=r,c=a.src,l=a.w,s=a.h,f=a.x,p=a.y,y=this.getScale();this.img_.src=c,this.img_.style.left=-f+"px",this.img_.style.top=-p+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(y,")"),this.el_.style.width=l+"px",this.el_.style.height=s+"px"}else this.disable()}}}],o&&tc(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function ac(t){return ac="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ac(t)}function cc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,lc(r.key),r)}}function lc(t){var e=function(t){if("object"!=ac(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ac(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ac(e)?e:e+""}function sc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(sc=function(){return!!t})()}function fc(t){return fc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fc(t)}function pc(t,e){return pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pc(t,e)}uc.prototype.options_={scaleFactor:1},r.Z.registerComponent("ThumbnailDisplay",uc);var yc=r.Z.getComponent("MouseTimeDisplay"),hc="cv-mouse-time-display-force-show",bc=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),r=function(t,e,n){return e=fc(e),function(t,e){if(e&&("object"==ac(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,sc()?Reflect.construct(e,n||[],fc(t).constructor):e.apply(t,n))}(this,e,[t,n]),D.O.useMetadataTrack(r.player_,"thumbnails",function(t){r.getChild("ThumbnailDisplay").setTrack(t)}),r.update=r.update.bind(r),r.player_.on("durationchange",r.update),r.player_.one("dispose",function(){r.player_.off("durationchange",r.update)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pc(t,e)}(e,t),n=e,(r=[{key:"update",value:function(t,e){var n=this;this.requestAnimationFrame(function(){var r=n.getChild("TimeTooltip"),o=n.getChild("ThumbnailDisplay"),i=e*n.player_.duration(),u=n.player_.preventScrubbingPlugin(),a=n.player_.controlBar.getChild("progressControl").getChild(Ha.Hx),c=!1;u.isEnabled&&(c=i>u.furthestVisitedTime),c?(n.hide(),a.show(),(0,De.Ds)(a.hide,Ha.D,!1,a)()):(n.show(),a&&a.hide(!0),o.update(i),r.updateTime(i));var l=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-l.width/2+"px";var s=t.width*e;s<l.width/2?n.el_.style.left=l.width/2+"px":s>t.width-l.width/2?n.el_.style.left=t.width-l.width/2+"px":n.el_.style.left=t.width*e+"px"})}},{key:"forceShow",value:function(){this.addClass(hc)}},{key:"removeForceShow",value:function(){this.removeClass(hc)}}])&&cc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(yc);function vc(t){return vc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vc(t)}function dc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,mc(r.key),r)}}function mc(t){var e=function(t){if("object"!=vc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=vc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vc(e)?e:e+""}function gc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(gc=function(){return!!t})()}function wc(){return wc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Oc(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},wc.apply(null,arguments)}function Oc(t){return Oc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Oc(t)}function jc(t,e){return jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jc(t,e)}bc.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},r.Z.registerComponent("MouseTimeDisplay",bc);var Sc=r.Z.getComponent("ChaptersTrackMenuItem"),Pc=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Oc(e),function(t,e){if(e&&("object"==vc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,gc()?Reflect.construct(e,n||[],Oc(t).constructor):e.apply(t,n))}(this,e,[t,n])).nonIconControl=!1,r.thumbnailDisplay=new uc(r.player_,{scaleFactor:.5}),r.el().insertBefore(r.thumbnailDisplay.el(),r.el().firstChild),D.O.useMetadataTrack(r.player_,"thumbnails",function(t){r.addClass("cv-has-thumbnails"),r.thumbnailDisplay.setTrack(t),r.thumbnailDisplay.update(r.options_.cue.startTime)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jc(t,e)}(e,t),n=e,r=[{key:"update",value:function(){this.player_&&Sc.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(t,n,r){return this.nonIconControl=!0,(o=e,i=this,"function"==typeof(u=wc(Oc(1&3?o.prototype:o),"createEl",i))?function(t){return u.apply(i,t)}:u)(["li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},n),r]);var o,i,u}},{key:"getInnerHTML",value:function(){var t=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat((0,Ua.m)(this.options_.cue.startTime,t),")</p>")+"</span>"}}],r&&dc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sc);function _c(t){return _c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_c(t)}function kc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Cc(r.key),r)}}function Cc(t){var e=function(t){if("object"!=_c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=_c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_c(e)?e:e+""}function Tc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Tc=function(){return!!t})()}function Ec(t,e,n,r){var o=Rc(xc(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function Rc(){return Rc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=xc(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Rc.apply(null,arguments)}function xc(t){return xc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xc(t)}function Bc(t,e){return Bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bc(t,e)}var Lc=function(t){function e(t,n,r){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,n){return e=xc(e),function(t,e){if(e&&("object"==_c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Tc()?Reflect.construct(e,n||[],xc(t).constructor):e.apply(t,n))}(this,e,[t,n,r])).alwaysCollapsed=!1,o.isCollapsed=!1,o.isCollabsible=!0,o.update=o.update.bind(o),o.player_.on("cv-whiteboard-change",o.update),o.player_.on("fullscreenchange",o.update),o.player_.on("dispose",function(){o.player_.off("cv-whiteboard-change",o.update),o.player_.off("fullscreenchange",o.update)}),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bc(t,e)}(e,t),n=e,(r=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(Ec(e,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(Ec(e,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e||e.length<2)return t;for(var n=0,r=e.length;n<r;n++){var o=e[n],i=new Pc(this.player_,{track:this.track_,cue:o});t.push(i)}return t}},{key:"setTrack",value:function(t){var n=this;if(Ec(e,"setTrack",this,3)([t]),this.track_&&"chapters"===this.track_.kind){t.one("loadeddata",this.update);var r=function(){n.update(),n.player_.trigger("resizemenus")};t.on("cv:cuechange",r),this.player_.one("dispose",function(){return t.off("cv:cueupdate",r)})}}},{key:"update",value:function(t){Ec(e,"update",this,3)([t])}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var t=this.track_.activeCues[0];return(null==t?void 0:t.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var t=this.track_.cues;return!(!t||!t.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&kc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("ChaptersButton"));function Mc(t){return Mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mc(t)}function Dc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Zc(r.key),r)}}function Zc(t){var e=function(t){if("object"!=Mc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Mc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mc(e)?e:e+""}function Ic(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ic=function(){return!!t})()}function Fc(){return Fc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ac(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Fc.apply(null,arguments)}function Ac(t){return Ac=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ac(t)}function Nc(t,e){return Nc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Nc(t,e)}r.Z.registerComponent("ChaptersButton",Lc);var zc=r.Z.getComponent("OffTextTrackMenuItem"),Vc=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n.track={player:t,kind:n.kind,kinds:n.kinds,default:!1,mode:"hidden"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,function(t,e,n){return e=Ac(e),function(t,e){if(e&&("object"==Mc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ic()?Reflect.construct(e,n||[],Ac(t).constructor):e.apply(t,n))}(this,e,[t,n])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nc(t,e)}(e,t),n=e,r=[{key:"handleClick",value:function(t){zc.prototype.handleClick.call(this,t);for(var e=this.player_.textTracks(),n=0;n<e.length;n++){var r=e[n];"subtitles"===r.kind&&(r.mode="hidden")}this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(t,n,r){return(o=e,i=this,"function"==typeof(u=Fc(Ac(1&3?o.prototype:o),"createEl",i))?function(t){return u.apply(i,t)}:u)(["li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},n),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),r]);var o,i,u}}],r&&Dc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(zc);function Hc(t){return Hc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hc(t)}function Uc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Gc(r.key),r)}}function Gc(t){var e=function(t){if("object"!=Hc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Hc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hc(e)?e:e+""}function qc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(qc=function(){return!!t})()}function Wc(t){return Wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wc(t)}function Qc(t,e){return Qc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qc(t,e)}r.Z.registerComponent("OffTextTrackMenuItem",Vc);var Kc=r.Z.getComponent("TextTrackButton"),$c=r.Z.getComponent("TextTrackMenuItem"),Xc=r.Z.getComponent("OffTextTrackMenuItem"),Jc=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=Wc(e),function(t,e){if(e&&("object"==Hc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,qc()?Reflect.construct(e,n||[],Wc(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qc(t,e)}(e,t),n=e,r=[{key:"createItems",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$c;this.label_&&(t="".concat(this.label_," off")),e.push(new Xc(this.player_,{kinds:this.kinds_,kind:this.kind_,label:t})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var o=0;o<r.length;o++){var i=r[o];if(this.kinds_.indexOf(i.kind)>-1){var u=new n(this.player_,{track:i,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});u.addClass("vjs-".concat(i.kind,"-menu-item")),e.push(u)}}return this.player().trigger("resizemenus"),e}}],r&&Uc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Kc);r.Z.registerComponent("TextTrackButton",Jc);var Yc=n(62315);function tl(t){return tl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tl(t)}function el(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,nl(r.key),r)}}function nl(t){var e=function(t){if("object"!=tl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=tl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==tl(e)?e:e+""}function rl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(rl=function(){return!!t})()}function ol(t){return ol=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ol(t)}function il(t,e){return il=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},il(t,e)}var ul=r.Z.getComponent("SubsCapsMenuItem"),al=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=ol(e),function(t,e){if(e&&("object"==tl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,rl()?Reflect.construct(e,n||[],ol(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&il(t,e)}(e,t),n=e,(r=[{key:"handleClick",value:function(t){ul.prototype.handleClick.call(this,t);for(var e=this.player_.textTracks(),n=0;n<e.length;n++){var r=e[n];"subtitles"===r.kind&&"disabled"===r.mode&&(r.mode="hidden")}this.player_.trigger("cv:languageselected")}}])&&el(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ul);function cl(t){return cl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cl(t)}function ll(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,sl(r.key),r)}}function sl(t){var e=function(t){if("object"!=cl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=cl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==cl(e)?e:e+""}function fl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(fl=function(){return!!t})()}function pl(t){return pl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pl(t)}function yl(t,e){return yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},yl(t,e)}var hl=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r={};r.track={player:t,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="SubtitleSearchMenuItem",(n=function(t,e,n){return e=pl(e),function(t,e){if(e&&("object"==cl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,fl()?Reflect.construct(e,n||[],pl(t).constructor):e.apply(t,n))}(this,e,[t,r])).addClass("vjs-texttrack-settings"),n.addClass("cv-subtitle-search-menu-item"),n.controlText(", opens subtitle search"),n.toggleEnabled=n.toggleEnabled.bind(n);var o=n.player_.textTracks();return o.addEventListener("selectedlanguagechange",n.toggleEnabled),n.player_.one("dispose",function(){o.removeEventListener("selectedlanguagechange",n.toggleEnabled)}),n.toggleEnabled(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yl(t,e)}(e,t),n=e,(r=[{key:"toggleEnabled",value:function(){var t;if(this.player_){var e=D.O.getCurrentTextTrack(this.player_);e?(null===(t=e.cues)||void 0===t?void 0:t.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(e),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.toggleEnabled),t.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",function(){t.removeEventListener("loadeddata",e.toggleEnabled)})}},{key:"handleClick",value:function(){var t,e=this,n=D.O.getCurrentTextTrack(this.player_);(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length)&&this.requestAnimationFrame(function(){e.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()})}}])&&ll(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("TextTrackMenuItem"));function bl(t){return bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bl(t)}function vl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,dl(r.key),r)}}function dl(t){var e=function(t){if("object"!=bl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=bl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bl(e)?e:e+""}function ml(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ml=function(){return!!t})()}function gl(t){return gl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gl(t)}function wl(t,e){return wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wl(t,e)}var Ol=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r={};return r.track={player:t,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="SubtitleSizeMenuItem",(n=function(t,e,n){return e=gl(e),function(t,e){if(e&&("object"==bl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ml()?Reflect.construct(e,n||[],gl(t).constructor):e.apply(t,n))}(this,e,[t,r])).addClass("vjs-texttrack-settings"),n.addClass("cv-divider-after-menu-item"),n.addClass("cv-subtitle-size-menu-item"),n.controlText(", opens subtitle size settings"),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wl(t,e)}(e,t),n=e,(r=[{key:"handleClick",value:function(){var t=this;this.requestAnimationFrame(function(){t.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()})}}])&&vl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("TextTrackMenuItem"));function jl(t){return jl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jl(t)}function Sl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Pl(r.key),r)}}function Pl(t){var e=function(t){if("object"!=jl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=jl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jl(e)?e:e+""}function _l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_l=function(){return!!t})()}function kl(t){return kl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},kl(t)}function Cl(t,e){return Cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Cl(t,e)}var Tl=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r={};return r.track={player:t,kind:"subtitle",label:"Video Transcript",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="TranscriptMenuItem",(n=function(t,e,n){return e=kl(e),function(t,e){if(e&&("object"==jl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_l()?Reflect.construct(e,n||[],kl(t).constructor):e.apply(t,n))}(this,e,[t,r])).transcriptOn=n.player_.viewTranscriptPlugin&&n.player_.viewTranscriptPlugin().isTranscriptOn(),n.bindEventListeners(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cl(t,e)}(e,t),n=e,(o=[{key:"bindEventListeners",value:function(){var t=this,e=this.toggleListener.bind(this),n=this.onResize.bind(this);this.player_.on("cv-transcript-toggle",e),this.player_.on("playerresize",n),this.on("dispose",function(){t.player_.off("cv-transcript-toggle",e),t.player_.off("playerresize",n)})}},{key:"onResize",value:function(){var t=window.innerWidth<Yc.E;this.item&&(this.item.style.display=t?"none":"block")}},{key:"handleToggleListener",value:function(){this.transcriptOn?this.toggleOff():this.toggleOn()}},{key:"toggleListener",value:function(t,e){var n,o;e?(this.transcriptOn=!0,r.Z.dom.addClass(this.toggleEl,"on")):(this.transcriptOn=!1,null===(o=(n=r.Z.dom).removeClass)||void 0===o||o.call(n,this.toggleEl,"on"))}},{key:"toggleOn",value:function(){var t,e;this.transcriptOn=!0,r.Z.dom.addClass(this.toggleEl,"on"),this.player_.viewTranscriptPlugin&&(null===(e=null===(t=this.player_.viewTranscriptPlugin())||void 0===t?void 0:t.toggleTranscript)||void 0===e||e.call(t,!0,{shouldLog:!0})),this.player_.whiteboardModePlugin&&this.player_.whiteboardModePlugin().setEnabled(!1)}},{key:"toggleOff",value:function(){var t,e,n,o;this.transcriptOn=!1,null===(e=(t=r.Z.dom).removeClass)||void 0===e||e.call(t,this.toggleEl,"on"),this.player_.viewTranscriptPlugin&&(null===(o=null===(n=this.player_.viewTranscriptPlugin())||void 0===n?void 0:n.toggleTranscript)||void 0===o||o.call(n,!1,{shouldLog:!0}))}},{key:"createEl",value:function(t,e,n){return this.handlerBound||(this.handleToggleListener=this.handleToggleListener.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggleListener),this.toggleEl=r.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggleListener),this.item=r.Z.dom.createEl("li",{className:"vjs-menu-item cv-transcript-toggle",innerHTML:'\n <span class="vjs-menu-item-text">Video Transcript</span>\n <span class="cv-toggle-container"></span>\n <span class="vjs-control-text" aria-live="polite">, opens transcript</span>\n ',tabIndex:-1},n),this.item.children[1].appendChild(this.toggleEl),this.item}}])&&Sl(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("TextTrackMenuItem"));function El(t){return El="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},El(t)}function Rl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,xl(r.key),r)}}function xl(t){var e=function(t){if("object"!=El(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=El(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==El(e)?e:e+""}function Bl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Bl=function(){return!!t})()}function Ll(){return Ll="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ml(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ll.apply(null,arguments)}function Ml(t){return Ml=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ml(t)}function Dl(t,e){return Dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Dl(t,e)}r.Z.registerComponent("ToggleTranscriptMenuItem",Tl);var Zl=r.Z.getComponent("TextTrackButton"),Il=r.Z.getComponent("SubsCapsButton"),Fl=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=Ml(e),function(t,e){if(e&&("object"==El(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Bl()?Reflect.construct(e,n||[],Ml(t).constructor):e.apply(t,n))}(this,e,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t.className="cv-subs-caps-menu-button",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dl(t,e)}(e,t),n=e,r=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,n=this,"function"==typeof(r=Ll(Ml(1&3?t.prototype:t),"buildWrapperCSSClass",n))?function(t){return r.apply(n,t)}:r)([]));var t,n,r}},{key:"createItems",value:function(){var t=[];if(!this.player_.options_.mobile){var e=this.player().textTracks(),n=Array.from(e||[]).some(function(t){return"subtitles"===t.kind});this.player_.options_.allowTranscript&&!!n&&this.player_.viewTranscriptPlugin&&window.innerWidth>=Yc.E&&t.push(new Tl(this.player_)),this.player_.options_.allowTranscript||t.push(new hl(this.player_)),t.push(new Ol(this.player_)),this.hideThreshold_=this.hideThreshold_+2}return this.player().trigger("resizemenus"),Zl.prototype.createItems.call(this,t,al)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var n=t[e];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var n=t[e];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){Il.prototype.handleClick.apply(this)}}],r&&Rl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Il);function Al(t){return Al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Al(t)}function Nl(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return zl(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(zl(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,zl(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,zl(f,"constructor",l),zl(l,"constructor",c),c.displayName="GeneratorFunction",zl(l,o,"GeneratorFunction"),zl(f),zl(f,o,"Generator"),zl(f,r,function(){return this}),zl(f,"toString",function(){return"[object Generator]"}),(Nl=function(){return{w:i,m:p}})()}function zl(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}zl=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){zl(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},zl(t,e,n,r)}function Vl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Hl(r.key),r)}}function Hl(t){var e=function(t){if("object"!=Al(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Al(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Al(e)?e:e+""}function Ul(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ul=function(){return!!t})()}function Gl(t){return Gl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gl(t)}function ql(t,e){return ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ql(t,e)}r.Z.registerComponent("SubsCapsButton",Fl);var Wl="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(Xn,"</span>"),Ql=function(t){function e(t,n){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Gl(e),function(t,e){if(e&&("object"==Al(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ul()?Reflect.construct(e,n||[],Gl(t).constructor):e.apply(t,n))}(this,e,[t,n])).qualityId=n.qualityId;var o=t.qualityLevels(),i=r.handleQualityChange.bind(r);return o.on("change",i),t.one("dispose",function(){o.off("change",i)}),r.handleLocalCacheChange=r.handleLocalCacheChange.bind(r),r.player_.ready(function(){r.player_&&(r.player_.on("localcachechanged",r.handleLocalCacheChange),r.player_.one("dispose",function(){var t;null===(t=r.player_)||void 0===t||t.off("localcachechanged",r.handleLocalCacheChange)}),r.handleLocalCacheChange())}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ql(t,e)}(e,t),n=e,(r=[{key:"handleLocalCacheChange",value:function(){return t=this,e=void 0,n=void 0,r=Nl().m(function t(){var e,n;return Nl().w(function(t){for(;;)switch(t.n){case 0:return e=this.player_.localCache(),t.n=1,e.getActiveLocalCache();case 1:if(null==(n=t.v)?void 0:n.playbackProfile){t.n=2;break}return this.show(),this.enable(),this.setLabel(this.options_.label),t.a(2);case 2:n.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+Wl);case 3:return t.a(2)}},t,this)}),new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())});var t,e,n,r}},{key:"setLabel",value:function(t){var e=this.$(".vjs-menu-item-text");e&&(e.innerHTML=t)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var t=this.player_.qualityLevels(),e=0;e<t.length;e++){var n=t[e];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var t=this.player_.qualityLevels(),e=t[t.selectedIndex],n=e&&e.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&Vl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("MenuItem"));function Kl(t){return Kl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kl(t)}function $l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Xl(r.key),r)}}function Xl(t){var e=function(t){if("object"!=Kl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Kl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Kl(e)?e:e+""}function Jl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Jl=function(){return!!t})()}function Yl(t,e,n,r){var o=ts(es(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function ts(){return ts="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=es(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ts.apply(null,arguments)}function es(t){return es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},es(t)}function ns(t,e){return ns=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ns(t,e)}var rs={144:"144p (Preview)",240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},os=r.Z.getComponent("MenuButton"),is=function(t){function e(t,n){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=es(e),function(t,e){if(e&&("object"==Kl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Jl()?Reflect.construct(e,n||[],es(t).constructor):e.apply(t,n))}(this,e,[t,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.className="cv-quality-menu-button";var o=r.player_.qualityLevels(),i=r.update.bind(r);return o.on("addqualitylevel",i),o.on("removequalitylevel",i),t.one("dispose",function(){o.removeEventListener("addqualitylevel",i),o.removeEventListener("removequalitylevel",i)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ns(t,e)}(e,t),n=e,(r=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(Yl(e,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(Yl(e,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var t=[],e=this.player_.qualityLevels();t.push(new m.Z(this.player_,{label:"Quality"}));for(var n=0;n<e.length;n++){var r=e[n];if(r){var o=rs[r.id];o&&t.push(new Ql(this.player_,{qualityId:r.id,label:o,selectable:!0,multiSelectable:!1}))}}return t}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.qualityLevels(),e=t[t.selectedIndex];return e?rs[e.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){os.prototype.handleClick.apply(this)}}])&&$l(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(os);function us(t){return us="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},us(t)}function as(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,cs(r.key),r)}}function cs(t){var e=function(t){if("object"!=us(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=us(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==us(e)?e:e+""}function ls(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ls=function(){return!!t})()}function ss(){return ss="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=fs(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ss.apply(null,arguments)}function fs(t){return fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fs(t)}function ps(t,e){return ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ps(t,e)}r.Z.registerComponent("QualityButton",is);var ys=r.Z.getComponent("Menu"),hs=r.Z.getComponent("MenuButton"),bs=r.Z.getComponent("PlaybackRateMenuItem"),vs=r.Z.getComponent("PlaybackRateMenuButton"),ds=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=fs(e),function(t,e){if(e&&("object"==us(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ls()?Reflect.construct(e,n||[],fs(t).constructor):e.apply(t,n))}(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t.className="cv-playback-rate-menu-button",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ps(t,e)}(e,t),n=e,o=[{key:"createEl",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=hs.prototype.createEl).apply.apply(t,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,n=this,"function"==typeof(r=ss(fs(1&3?t.prototype:t),"buildWrapperCSSClass",n))?function(t){return r.apply(n,t)}:r)([]));var t,n,r}},{key:"createMenu",value:function(){var t=new ys(this.player(),{menuButton:this});t.addItem(new m.Z(this.player_,{label:"Playback Speed"}));var e=this.playbackRates();if(e)for(var n=0;n<e.length;n++){var r=e[n]+"x";1===e[n]&&(r+=" (Normal)"),t.addItem(new bs(this.player(),{rate:r}))}return t}},{key:"handleClick",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=hs.prototype.handleClick).apply.apply(t,[this].concat(n))}},{key:"updateLabel",value:function(){var t;this.setupLabelEl();for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=vs.prototype.updateLabel).apply.apply(t,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var t=this.$("button");t&&(this.labelEl_=r.Z.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}],o&&as(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(vs);function ms(t){return ms="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ms(t)}function gs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ws(r.key),r)}}function ws(t){var e=function(t){if("object"!=ms(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ms(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ms(e)?e:e+""}function Os(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Os=function(){return!!t})()}function js(t){return js=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},js(t)}function Ss(t,e){return Ss=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ss(t,e)}r.Z.registerComponent("PlaybackRateMenuButton",ds);var Ps=r.Z.getComponent("TextTrackSettings"),_s={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},ks={small:_s,medium:Object.assign(Object.assign({},_s),{fontPercent:1.5}),large:Object.assign(Object.assign({},_s),{fontPercent:2})},Cs=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=js(e),function(t,e){if(e&&("object"==ms(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Os()?Reflect.construct(e,n||[],js(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ss(t,e)}(e,t),n=e,(r=[{key:"setSizeSetting",value:function(t){var e=this;this.size_=t,this.player_.getChild("textTrackDisplay").updateDisplay();var n=this.player_.getChild("collapserator").getChild("subtitleSizeButton");this.player_.trigger("changesubtitlesize",this.size_),window.requestAnimationFrame(function(){n.update(),e.player_.trigger("resizemenus")})}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return ks[this.size_]?ks[this.size_]:_s}}])&&gs(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ps);function Ts(t){return Ts="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ts(t)}function Es(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Rs(r.key),r)}}function Rs(t){var e=function(t){if("object"!=Ts(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ts(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ts(e)?e:e+""}function xs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(xs=function(){return!!t})()}function Bs(t,e,n,r){var o=Ls(Ms(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function Ls(){return Ls="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ms(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ls.apply(null,arguments)}function Ms(t){return Ms=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ms(t)}function Ds(t,e){return Ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ds(t,e)}r.Z.registerComponent("TextTrackSettings",Cs);var Zs=window.navigator&&window.navigator.userAgent||"",Is=(/iPod/i.test(Zs),/Android/i.test(Zs),r.Z.getComponent("Player")),Fs=function(t){function e(t,n){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Ms(e),function(t,e){if(e&&("object"==Ts(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xs()?Reflect.construct(e,n||[],Ms(t).constructor):e.apply(t,n))}(this,e,[t,n]))._dataLoaded=!1,n.mobile&&r.addClass("cv-mobile-player");var o=function(){return r._dataLoaded=!0};return r.on("cv-playback-data-loaded",o),r.on("dispose",function(){return r.off("cv-playback-data-loaded",o)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ds(t,e)}(e,t),n=e,o=[{key:"dataLoaded",value:function(t){var e=this;this._dataLoaded?t():(this.one("cv-playback-data-loaded",t),this.one("dispose",function(){e.off("cv-playback-data-loaded",t)}))}},{key:"lock",value:function(t){this.callback_=t}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(t,n){var r=this;if("number"!=typeof t||!this.callback_||n)return Bs(e,"currentTime",this,3)([t]);this.callback_(function(){r.unlock(),r.currentTime(t)})}},{key:"play",value:function(){var t=this;if(!this.callback_)return Bs(e,"play",this,3)([]);this.callback_(function(){t.unlock(),t.play()})}},{key:"createEl",value:function(){var t=this,n=Bs(e,"createEl",this,3)([]);return this.videoContainer||(this.videoContainer=r.Z.dom.createEl("div",{className:"cv-video-wrapper"}),n.appendChild(this.videoContainer)),Array.from(n.childNodes).forEach(function(e){return e!==t.videoContainer&&t.videoContainer.appendChild(e)}),n}},{key:"addChild",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,o=Bs(e,"addChild",this,3)([t,n,r]),i=o.el();return i&&this.videoContainer.appendChild(i),o}},{key:"updateStyleEl_",value:function(){if(Is.prototype.updateStyleEl_.call(this),this.options_.fluid){var t=this.el_.parentNode;if(t&&this.options_.setMaxHeight){var e=this.aspectRatio();if(void 0!==e&&"auto"!==e||(e=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9"),this.player_.playerModePlugin().getMode()===Mi.Hover)return t.style.removeProperty("maxWidth"),void t.style.removeProperty("margin");var n=e.split(":"),r=+n[1]/+n[0];t.style.maxWidth=85/r+"vh",t.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var t=this;Is.prototype.listenForUserActivity_.call(this);var e=this.getChild("collapserator");e.on("mouseenter",function(){t.player().cache_.inactivityTimeout=t.player().options_.inactivityTimeout,t.player().options_.inactivityTimeout=0}),e.on("mouseleave",function(){t.player().options_.inactivityTimeout=t.player().cache_.inactivityTimeout})}}],o&&Es(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(Is);function As(t){return As="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},As(t)}function Ns(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,zs(r.key),r)}}function zs(t){var e=function(t){if("object"!=As(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=As(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==As(e)?e:e+""}function Vs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Vs=function(){return!!t})()}function Hs(t){return Hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hs(t)}function Us(t,e){return Us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Us(t,e)}Fs.prototype.options_=Object.assign(Object.assign({},Is.prototype.options_),{setMaxHeight:!0}),r.Z.registerComponent("player",Fs);var Gs=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Hs(e),function(t,e){if(e&&("object"==As(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vs()?Reflect.construct(e,n||[],Hs(t).constructor):e.apply(t,n))}(this,e,[t,n])).player_.addClass("cv-disable-play-pause-feedback"),r.onFirstPlay=r.onFirstPlay.bind(r),r.player_.one("play",r.onFirstPlay),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Us(t,e)}(e,t),n=e,(o=[{key:"dispose",value:function(){this.player_.off("play",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var t=this;window.setTimeout(function(){t.player_.isDisposed()||t.player_.removeClass("cv-disable-play-pause-feedback")},500)}},{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&Ns(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function qs(t){return qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qs(t)}function Ws(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Qs(r.key),r)}}function Qs(t){var e=function(t){if("object"!=qs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=qs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qs(e)?e:e+""}function Ks(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ks=function(){return!!t})()}function $s(t){return $s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$s(t)}function Xs(t,e){return Xs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xs(t,e)}r.Z.registerComponent("PlayPauseFeedback",Gs);var Js=r.Z.getComponent("PlayToggle"),Ys="Play (space)",tf=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=$s(e),function(t,e){if(e&&("object"==qs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ks()?Reflect.construct(e,n||[],$s(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xs(t,e)}(e,t),n=e,(r=[{key:"handlePlay",value:function(){Js.prototype.handlePlay.call(this),this.controlText("Pause (space)")}},{key:"handlePause",value:function(){Js.prototype.handlePause.call(this),this.controlText(Ys)}},{key:"handleClick",value:function(t){var e=this;Js.prototype.handleClick.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(function(){e.player_.removeClass("cv-disable-play-pause-feedback")},500)}}])&&Ws(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Js);function ef(t){return ef="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ef(t)}function nf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,rf(r.key),r)}}function rf(t){var e=function(t){if("object"!=ef(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ef(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ef(e)?e:e+""}function of(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(of=function(){return!!t})()}function uf(t){return uf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},uf(t)}function af(t,e){return af=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},af(t,e)}r.Z.registerComponent("PlayToggle",tf),tf.prototype.controlText_=Ys;var cf=r.Z.getComponent("TextTrackDisplay"),lf=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=uf(e),function(t,e){if(e&&("object"==ef(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,of()?Reflect.construct(e,n||[],uf(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&af(t,e)}(e,t),n=e,(r=[{key:"updateDisplayState",value:function(t){cf.prototype.updateDisplayState.call(this,t);for(var e=this.player_.textTrackSettings.getValues(),n=t.activeCues,r=n.length;r--;){var o=n[r];if(o){var i=o.displayState;if(e.fontPercent&&1!==e.fontPercent){var u=.025*this.el().getBoundingClientRect().width*100/100;i.style.fontSize=u*e.fontPercent+"px"}}}}}])&&nf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(cf);function sf(t){return sf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sf(t)}function ff(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,pf(r.key),r)}}function pf(t){var e=function(t){if("object"!=sf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=sf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==sf(e)?e:e+""}function yf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(yf=function(){return!!t})()}function hf(t){return hf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hf(t)}function bf(t,e){return bf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bf(t,e)}r.Z.registerComponent("TextTrackDisplay",lf);var vf=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=hf(e),function(t,e){if(e&&("object"==sf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,yf()?Reflect.construct(e,n||[],hf(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bf(t,e)}(e,t),n=e,(o=[{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-control-bar-gradient-container",innerHTML:'<div class="cv-control-bar-gradient"></div>'})}}])&&ff(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function df(t){return df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},df(t)}function mf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,gf(r.key),r)}}function gf(t){var e=function(t){if("object"!=df(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=df(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==df(e)?e:e+""}function wf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(wf=function(){return!!t})()}function Of(t,e,n,r){var o=jf(Sf(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function jf(){return jf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Sf(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},jf.apply(null,arguments)}function Sf(t){return Sf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Sf(t)}function Pf(t,e){return Pf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pf(t,e)}r.Z.registerComponent("ControlBarGradient",vf);var _f=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Sf(e),function(t,e){if(e&&("object"==df(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,wf()?Reflect.construct(e,n||[],Sf(t).constructor):e.apply(t,n))}(this,e,[t,n])).options_=n,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pf(t,e)}(e,t),n=e,(r=[{key:"createEl",value:function(){var t=this.options_.title;if(!this.options_.seriesName)return Of(e,"createEl",this,3)(["h1",{innerHTML:t}]);var n=this.buildSeasonEpisodeString();return n?(t="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase()," ").concat(n,"</div>")+t,Of(e,"createEl",this,3)(["h1",{innerHTML:t}])):(t="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+t,Of(e,"createEl",this,3)(["h1",{innerHTML:t}]))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var t=this.padNumber(this.options_.seasonNumber,2),e=this.padNumber(this.options_.episodeNumber,2);return"S".concat(t," • E").concat(e)}},{key:"padNumber",value:function(t,e){var n=t.toString();if(n.length>=e)return n;for(e-=n.length;e>0;)n="0"+n,e--;return n}}])&&mf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component")),kf=n(87984);function Cf(t){return Cf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cf(t)}function Tf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ef(r.key),r)}}function Ef(t){var e=function(t){if("object"!=Cf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Cf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Cf(e)?e:e+""}function Rf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Rf=function(){return!!t})()}function xf(){return xf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Bf(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},xf.apply(null,arguments)}function Bf(t){return Bf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Bf(t)}function Lf(t,e){return Lf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lf(t,e)}var Mf=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Bf(e),function(t,e){if(e&&("object"==Cf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Rf()?Reflect.construct(e,n||[],Bf(t).constructor):e.apply(t,n))}(this,e,[t,n])).options_=n,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lf(t,e)}(e,t),n=e,r=[{key:"buildCSSClass",value:function(){return"cv-splash-rating ".concat((0,kf.C)(this.options_.ratingValue))}},{key:"createEl",value:function(t,n,r){return this.options_.ratingCode?(o=e,i=this,"function"==typeof(u=xf(Bf(1&3?o.prototype:o),"createEl",i))?function(t){return u.apply(i,t)}:u)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass(),innerHTML:this.options_.ratingCode}),r]):null;var o,i,u}}],r&&Tf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function Df(t){return Df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Df(t)}function Zf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,If(r.key),r)}}function If(t){var e=function(t){if("object"!=Df(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Df(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Df(e)?e:e+""}function Ff(t,e){if(e&&("object"==Df(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Af(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Af=function(){return!!t})()}function Nf(t){return Nf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Nf(t)}function zf(t,e){return zf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zf(t,e)}var Vf=function(t){function e(t,n){var r,o,i,u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o=this,u=[t,n],i=Nf(i=e),r=Ff(o,Af()?Reflect.construct(i,u||[],Nf(o).constructor):i.apply(o,u)),n.embed?(r.addChild(new _f(t,n)),r.addChild(new Mf(t,n)),r):Ff(r,r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zf(t,e)}(e,t),n=e,(o=[{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-splash-metadata"})}}])&&Zf(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function Hf(t){return Hf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hf(t)}function Uf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Gf(r.key),r)}}function Gf(t){var e=function(t){if("object"!=Hf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Hf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hf(e)?e:e+""}function qf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(qf=function(){return!!t})()}function Wf(t){return Wf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wf(t)}function Qf(t,e){return Qf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qf(t,e)}var Kf=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Wf(e),function(t,e){if(e&&("object"==Hf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,qf()?Reflect.construct(e,n||[],Wf(t).constructor):e.apply(t,n))}(this,e,[t,n])).addChild(new Vf(t,n)),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qf(t,e)}(e,t),n=e,(o=[{key:"createEl",value:function(){var t="<div class='cv-splash-mask'></div>";return this.options_.embed&&(t+="<div class='cv-splash-logo'>".concat(Me,"</div>")),r.Z.dom.createEl("div",{className:"vjs-poster cv-embed-splash cv-embed-splash-black",tabIndex:-1,innerHTML:t})}},{key:"setSrc",value:function(t){var e="";t&&(e='url("'.concat(t,'")')),this.el_.style.backgroundImage=e}}])&&Uf(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("posterImage"));function $f(t){return $f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$f(t)}function Xf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Jf(r.key),r)}}function Jf(t){var e=function(t){if("object"!=$f(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=$f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$f(e)?e:e+""}function Yf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Yf=function(){return!!t})()}function tp(t){return tp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},tp(t)}function ep(t,e){return ep=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ep(t,e)}r.Z.registerComponent("posterImage",Kf);var np=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=tp(e),function(t,e){if(e&&("object"==$f(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Yf()?Reflect.construct(e,n||[],tp(t).constructor):e.apply(t,n))}(this,e,[t,n])).el().prepend(r.getErrorImage()),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ep(t,e)}(e,t),n=e,(o=[{key:"getErrorImage",value:function(){return r.Z.dom.createEl("div",{className:"cv-error-image",innerHTML:'\n <svg viewBox="0 0 301 185" xmlns="http://www.w3.org/2000/svg">\n <path d="M267.393 36.6514V167.906C267.393 168.182 267.169 168.406 266.893 168.406H32C31.7239 168.406 31.5 168.182 31.5 167.906V36.6514C31.5 36.3752 31.7239 36.1514 32 36.1514H80.5C80.7761 36.1514 81 36.3752 81 36.6514V57.7196C81 58.7622 82.0375 59.4868 83.0164 59.1279L95.7377 54.4634C95.9961 54.3687 96.2825 54.5006 96.3785 54.7585L102.094 70.1194C102.677 71.6866 105 71.2685 105 69.5964V48.4925C105 47.7632 104.475 47.1396 103.757 47.0146L94.2479 45.3609C93.9436 45.308 93.7596 44.9946 93.8616 44.7031L96.7376 36.4862C96.8077 36.2856 96.997 36.1514 97.2095 36.1514H266.893C267.169 36.1514 267.393 36.3752 267.393 36.6514Z" stroke="white"/>\n <path d="M163.296 101.777L149.437 90.1217C148.275 89.1441 146.5 89.9705 146.5 91.4894V113.664C146.5 115.141 148.191 115.98 149.367 115.087L163.226 104.569C164.139 103.876 164.173 102.515 163.296 101.777Z" stroke="white" stroke-linecap="round"/>\n <path d="M295.53 23.0783L277.524 26.2801L283.252 32.7192L274.855 38.9079L292.861 35.7061L287.133 29.2671L295.53 23.0783Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M268.06 2.91764L254.192 14.8403L262.401 17.4661L258.324 27.0679L272.192 15.1453L263.983 12.5194L268.06 2.91764Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n '})}}])&&Xf(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("ErrorDisplay"));function rp(t){return rp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rp(t)}function op(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ip(r.key),r)}}function ip(t){var e=function(t){if("object"!=rp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=rp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==rp(e)?e:e+""}function up(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(up=function(){return!!t})()}function ap(t){return ap=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ap(t)}function cp(t,e){return cp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},cp(t,e)}r.Z.registerComponent("ErrorDisplay",np);var lp=r.Z.getComponent("FullscreenToggle"),sp="Fullscreen (f)",fp=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=ap(e),function(t,e){if(e&&("object"==rp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,up()?Reflect.construct(e,n||[],ap(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cp(t,e)}(e,t),n=e,(r=[{key:"handleFullscreenChange",value:function(){lp.prototype.handleFullscreenChange.call(this),this.controlText(sp)}}])&&op(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(lp);function pp(t){return pp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pp(t)}function yp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,hp(r.key),r)}}function hp(t){var e=function(t){if("object"!=pp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=pp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pp(e)?e:e+""}function bp(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(bp=function(){return!!t})()}function vp(t){return vp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vp(t)}function dp(t,e){return dp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},dp(t,e)}r.Z.registerComponent("FullscreenToggle",fp),fp.prototype.controlText_=sp;var mp=r.Z.getComponent("MuteToggle"),gp="Mute (m)",wp=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=vp(e),function(t,e){if(e&&("object"==pp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,bp()?Reflect.construct(e,n||[],vp(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dp(t,e)}(e,t),n=e,(r=[{key:"updateControlText_",value:function(){var t=this.player_.muted()||0===this.player_.volume()?"Unmute (m)":gp;this.controlText_!==t&&this.controlText(t)}}])&&yp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(mp);r.Z.registerComponent("MuteToggle",wp),wp.prototype.controlText_=gp;var Op=n(67453),jp=n(54610);function Sp(t){return Sp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sp(t)}function Pp(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return _p(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(_p(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,_p(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,_p(f,"constructor",l),_p(l,"constructor",c),c.displayName="GeneratorFunction",_p(l,o,"GeneratorFunction"),_p(f),_p(f,o,"Generator"),_p(f,r,function(){return this}),_p(f,"toString",function(){return"[object Generator]"}),(Pp=function(){return{w:i,m:p}})()}function _p(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}_p=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){_p(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},_p(t,e,n,r)}function kp(t){return function(t){if(Array.isArray(t))return Cp(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Cp(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cp(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cp(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Tp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ep(r.key),r)}}function Ep(t){var e=function(t){if("object"!=Sp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Sp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Sp(e)?e:e+""}var Rp,xp=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())})},Bp=r.Z.getComponent("Player"),Lp=function(){return t=function t(e,n){var o=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.streamLogged=!1,this.options=r.Z.obj.merge({},t.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(e),this.buildVideoJs(),this.options.splash&&this.setupSplash(this.options.splash),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready(function(){o._configurePlugins(),o.options.setup&&o.options.setup(o.options,o.player),o.fetch().catch(function(t){return o.handleFetchError(t)})})},(e=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.configureMenuDimensionsPlugin({mobile:this.options.mobile,overflowControls:this.options.overflowControls,seekBarName:this.getSeekBarName()}),this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),!this.options.mobile&&this.options.allowFullscreen&&this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(t){var e;null===(e=this.analyticsService)||void 0===e||e.logVideoProgress(t)}},{key:"buildVideoJs",value:function(){return this.player=(0,r.Z)(this.el,this.getPlayerOptions())}},{key:"getInactivityTimeout",value:function(){if("number"==typeof this.options.inactivityTimeout)return this.options.inactivityTimeout;var t=500;return(this.options.mobile||r.Z.browser.IS_IOS||r.Z.browser.IS_ANDROID)&&(t=3e3),t}},{key:"getFluid",value:function(){return!this.options.theatreMode&&!this.options.embed&&!this.options.mobile}},{key:"getFill",value:function(){return!!this.options.theatreMode||!(!this.options.embed&&!this.options.mobile)}},{key:"getPlayerOptions",value:function(){var t=this,e=Bp.prototype.options_.children;return e=e.filter(function(t){return"bigPlayButton"!==t&&"posterImage"!==t}),{controls:this.options.controls,fluid:this.getFluid(),fill:this.getFill(),inactivityTimeout:this.getInactivityTimeout(),controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(kp(e),[{name:"collapserator",children:kt.filter(function(e){return!("fullscreenToggle"===e&&!t.options.allowFullscreen)})},"playPauseFeedback","controlBarGradient"]),userActions:{hotkeys:function(e){return function(t,e,n){if(!(t.ctrlKey||t.metaKey||t.altKey||t.shiftKey)){var r=zt()(t);if(("t"!==r||n.allowTheatreMode)&&("f"!==r||n.allowFullscreen)&&Qt[r]){Qt[r](e,t);var o=function(t){var e=t.target;return"video"===e.tagName.toLowerCase()||!!["video-js","vjs-tech"].find(function(t){return e.classList.contains(t)})}(t),i=["space"].includes(r);(o||i)&&(t.preventDefault(),t.stopPropagation())}}}(e,t.player,t.options)}},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio,mobile:this.options.mobile,allowTheatreMode:this.options.allowTheatreMode,deferMenus:this.options.deferMenus,muted:this.options.muted,devicesConfig:this.options.devicesConfig}}},{key:"getPlaybackObject",value:function(){return xp(this,void 0,void 0,Pp().m(function t(){var e,n,r=this;return Pp().w(function(t){for(;;)switch(t.n){case 0:if(!this.options.offlinePlaybackObject){t.n=1;break}return t.a(2,this.options.offlinePlaybackObject);case 1:if(e=this.options.fetch,void 0===this.options.fetch&&(e=function(t){var e="".concat(r.options.playerApi.origin,"/api/playback?viewKey=").concat(t);return At.e.get(e)}),this.options.viewKey){t.n=2;break}throw new Error("Please specify a viewKey or a fetch function");case 2:return t.n=3,e(this.options.viewKey);case 3:if(n=t.v){t.n=4;break}throw new Error("Error fetching playback object");case 4:return t.a(2,n)}},t,this)}))}},{key:"setChaptersInternal",value:function(t,e){var n=D.O.getTrack(this.player,"chapters",null);n||(n=this.player.addTextTrack("chapters")),kp(n.cues.cues_).forEach(function(t){return n.removeCue(t)}),t.forEach(function(t){n.addCue({startTime:t.timestamp,endTime:t.endTimestamp,text:t.name})}),e&&n.trigger({type:"cv:cuechange",target:n}),n.trigger({type:"loadeddata",target:n})}},{key:"setChapters",value:function(t){this.setChaptersInternal(t,!0)}},{key:"setPlayerMode",value:function(t,e){this.player.playerModePlugin().setPlayerMode(t,e)}},{key:"setFavourite",value:function(t,e){this.player.favouritePlugin().setFavourite(t,e)}},{key:"fetch",value:function(){var t,e,n,r,o;return xp(this,void 0,void 0,Pp().m(function i(){var u,a,c,l=this;return Pp().w(function(i){for(;;)switch(i.n){case 0:return i.n=1,this.getPlaybackObject();case 1:if(u=i.v,!this.isDisposed()){i.n=2;break}return i.a(2);case 2:a="MasterClip"===u.mediaType,c=null===(t=u.additionalData)||void 0===t?void 0:t.clipData,(null===(n=null===(e=u.chapters)||void 0===e?void 0:e.list)||void 0===n?void 0:n.length)>0&&!a&&!c&&this.setChaptersInternal(u.chapters.list,!1),this.player.localCache({localCacheAddresses:null!==(r=u.localCacheAddresses)&&void 0!==r?r:[],enabled:null===(o=this.options.enableLocalCache)||void 0===o||o}),this.player.progressiveFiles({sources:u.files.progressive.map(function(t){return{id:t.profile,mimeType:t.mimeType,url:t.url}})}),this.player.handleNetworkErrors({playerApi:this.options.playerApi,fileToken:u.files.fileToken}),u.subtitles.list.length>0&&u.subtitles.list.forEach(function(t){if("text/vtt"===t.mimeType){var e=l.player.addRemoteTextTrack({kind:"subtitles",src:t.url,language:t.language,label:t.label},!0);e.track.isClickViewProduced=t.isClickViewProduced,D.O.sanitizeTrack(e.track,l.player),D.O.activeTextTrack(e.track)}}),u.posterUrl&&this.player.poster(Op.j.createUrl(u.posterUrl,{size:jp.h2.Large})),this.setupSplash({title:u.title,posterUrl:u.posterUrl,episodeNumber:u.episodeNumber,ratingCode:u.ratingCode,seasonNumber:u.seasonNumber,seriesName:u.seriesName}),this.additionalSetup(u),this.handleAutoplay(u),this.options.startTime&&(this.player.currentTime(this.options.startTime),this.player.one("canplay",function(){l.player.currentTime(l.options.startTime)})),this.player.trigger("cv-playback-data-loaded",u);case 3:return i.a(2)}},i,this)}))}},{key:"handleFetchError",value:function(t){var e,n=t.message;t instanceof Kt.M&&(null===(e=t.response)||void 0===e?void 0:e.type)===Wt.PhysicallyChapteredVideo&&(n="Video cannot be played because it is either corrupt or damaged."),this.player.error(n),this.options.onError&&this.options.onError(t)}},{key:"fetchConfig",value:function(){return xp(this,void 0,void 0,Pp().m(function t(){var e;return Pp().w(function(t){for(;;)switch(t.n){case 0:if(!(Rp||this.options.fetch||this.options.offlinePlaybackObject)){t.n=1;break}return t.a(2);case 1:return e="".concat(this.options.playerApi.origin,"/api/config"),t.n=2,At.e.get(e);case 2:if(Rp=t.v,!this.isDisposed()){t.n=3;break}return t.a(2);case 3:this.trigger("config:loaded");case 4:return t.a(2)}},t,this)}))}},{key:"additionalSetup",value:function(t){var e,n=this;this.player.whiteboardModePlugin(),this.player.deferMenusPlugin();var r=this.options.enableLocalCache&&!!(null===(e=t.localCacheAddresses)||void 0===e?void 0:e.length);Rp?this.setupAnalyticsService(t,r):this.one("config:loaded",function(){return n.setupAnalyticsService(t,r)}),this.analyticsService||!this.isAnalyticsEnabled()?this.setupAnalyticsDependentPlugins(t):this.one("analytics:loaded",function(){return n.setupAnalyticsDependentPlugins(t)})}},{key:"setupAnalyticsService",value:function(t,e){this.options.eventLogging&&(this.analyticsService=new Ft({player:this.player,collectionApiUrls:Rp.collectionApi.urls,collectionApiClientId:Rp.collectionApi.clientId,productVersion:"1.35.0",authSessionId:t.viewerAuthSessionId,videoId:t.videoId,mediaId:t.mediaId,userId:t.viewerId,shareId:t.shareId,customerId:t.viewerCustomerId,mediaType:t.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:this.options.embed,isUsingLocalCache:e,additionalAnalyticsData:this.getAdditionalAnalyticsData(t),regionName:t.instanceRegion||this.options.sharerInstanceRegion||$t.M.CvApSoutheast1}),this.on("timeupdate",this.logStream),this.trigger("analytics:loaded"))}},{key:"setupAnalyticsDependentPlugins",value:function(t){var e,n,r,o;this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(e=t.settings)||void 0===e?void 0:e.showSubtitles,subtitleSize:null===(n=t.settings)||void 0===n?void 0:n.playbackSubtitleSizeDefault,analyticsService:this.analyticsService}),this.player.persistQualitySettingsPlugin({playbackProfile:null===(r=t.settings)||void 0===r?void 0:r.playbackProfile,playbackProfileLocalCache:null===(o=t.settings)||void 0===o?void 0:o.playbackProfileLocalCache,analyticsService:this.analyticsService}),this.player.persistPlaybackRatePlugin({analyticsService:this.analyticsService})}},{key:"getAdditionalAnalyticsData",value:function(t){return{}}},{key:"isAnalyticsEnabled",value:function(){return!this.options.fetch&&!this.options.offlinePlaybackObject&&this.options.eventLogging}},{key:"handleAutoplay",value:function(t){var e=this;this.options.autoplay&&this.player.ready(function(){e.player.play().catch(function(){e.isDisposed()||e.showSplash()})})}},{key:"logStream",value:function(){this.analyticsService&&(this.player.currentTime()<3||this.streamLogged||(this.analyticsService.logStream(),this.streamLogged=!0,this.off("timeupdate",this.logStream)))}},{key:"getAnalyticsPlayerType",value:function(){return"player"}},{key:"createEl",value:function(t){var e;"string"==typeof t?(t=function(t){return 0===t.indexOf("#")?t.slice(1):t}(t),e=r.Z.dom.$("#"+t)):e=t;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=r.Z.dom.createEl("video",{},{class:n}),e.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(t,e){this.player.on(t,e)}},{key:"one",value:function(t,e){this.player.one(t,e)}},{key:"off",value:function(t,e){this.player.off(t,e)}},{key:"trigger",value:function(t,e){return this.player.trigger(t,e)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(t){this.player.ready(t)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"isPaused",value:function(){return this.player.paused()}},{key:"currentTime",value:function(t){return this.player.currentTime(t)}},{key:"muted",value:function(t){return this.player.muted(t)}},{key:"duration",value:function(){return this.player.duration()}},{key:"isFullscreen",value:function(){return this.player.isFullscreen()}},{key:"requestFullscreen",value:function(){this.player.requestFullscreen()}},{key:"exitFullscreen",value:function(){this.player.exitFullscreen()}},{key:"playbackRate",value:function(t){return this.player.playbackRate(t)}},{key:"quality",value:function(t){for(var e=this.player.qualityLevels(),n=0;n<e.length;n++){var r=e[n];if(t)r.enabled=r.id===t.toString();else if(r.enabled)return r.id}}},{key:"subtitles",value:function(t){for(var e=this.player.textTracks(),n=0;n<e.length;n++){var r=e[n];if(void 0===t){if("showing"===r.mode)return r.label}else r.label===t?r.mode="showing":r.mode="hidden"}}},{key:"bindEventListeners",value:function(){var t=this,e=function(t){return t.preventDefault()};if(this.showSplash=this.showSplash.bind(this),this.hideSplash=this.hideSplash.bind(this),this.player.on("ended",this.showSplash),this.player.on("play",this.hideSplash),this.player.tech(!0).on("contextmenu",e),this.player.one("dispose",function(){t.off("ended",t.showSplash),t.off("play",t.hideSplash),t.player.tech(!0).off("contextmenu",e)}),this.options.hotkeyElQuerySelector){var n=r.Z.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.one("dispose",function(){t.player.off(n,"keydown",t.player.handleKeyDown)}))}}},{key:"setupSeekBar",value:function(){var t=this.getSeekBarName(),e=this.player.controlBar.getChild("progressControl");e.addChild(t,this.getSeekBarOptions()),e.setSeekBarName(t)}},{key:"setupSplash",value:function(t){this._splashAdded||(this._splashAdded=!0,this.player.addChild("posterImage",Object.assign({embed:this.options.embed},t)),this.player.addChild("bigPlayButton"),this.options.autoplay?this.hideSplash():this.showSplash())}},{key:"showSplash",value:function(){this.player.hasStarted(!1),this.player.getChild("posterImage").show(),this.player.getChild("bigPlayButton").show()}},{key:"hideSplash",value:function(){this.player.getChild("posterImage").hide(),this.player.getChild("bigPlayButton").hide()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}}])&&Tp(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();Lp.options_={viewKey:null,controls:!0,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0,eventLogging:!0,allowFullscreen:!0}},98863:(t,e,n)=>{var r=n(76032),o=n(35259),i=n(95569);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}function c(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(l=function(){return!!t})()}function s(t,e,n,r){var o=f(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},f.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}var h=r.Z.getComponent("Component"),b="cv-prevent-scrubbing-tooltip-show",v="cv-prevent-scrubbing-tooltip-remove-transition",d=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=p(e),function(t,e){if(e&&("object"==u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,l()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}(this,e,arguments)).isShowing=!1,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(e,t),n=e,r=[{key:"buildCSSClass",value:function(){return"cv-prevent-scrubbing-tooltip ".concat(s(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,n,r){return s(e,"createEl",this,3)([t,Object.assign(Object.assign({},n),{className:this.buildCSSClass(),innerText:o.vn}),r])}},{key:"show",value:function(){this.isShowing||(this.player_.userActive(!0),this.addClass(b),this.isShowing=!0)}},{key:"hide",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isShowing&&(e&&(this.addClass(v),window.requestAnimationFrame(function(){t.removeClass(v)})),this.player_.userActive(!1),this.removeClass(b),this.isShowing=!1)}}],r&&a(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(h);function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,w(r.key),r)}}function w(t){var e=function(t){if("object"!=m(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==m(e)?e:e+""}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(O=function(){return!!t})()}function j(){return j="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=S(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},j.apply(null,arguments)}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function P(t,e){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},P(t,e)}r.Z.registerComponent(o.Hx,d);var _=function(t){function e(t,n){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=S(e),function(t,e){if(e&&("object"==m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,O()?Reflect.construct(e,n||[],S(t).constructor):e.apply(t,n))}(this,e,[t])).isEnabled=!1,r.isPreviewing=!1;var o=null!=n?n:{},i=o.furthestVisitedTime,u=void 0===i?0:i,a=o.isEnabled,c=void 0!==a&&a;return r.playerCurrentTimeFn=r.player.currentTime.bind(t),r.player.currentTime=r.currentTime.bind(r),r.onTimeUpdate=r.onTimeUpdate.bind(r),r.furthestVisitedTime=u,r.isEnabled=c,c&&r.enable(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&P(t,e)}(e,t),n=e,r=[{key:"dispose",value:function(){var t,n,r;this.player.currentTime=this.playerCurrentTimeFn,this.isEnabled&&(this.disable(),(t=e,n=this,"function"==typeof(r=j(S(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([]))}},{key:"togglePreview",value:function(t){if(t){if(this.configurePreview(),this.isEnabled)return;this.enable(),this.isPreviewing=!0}else this.disable(),this.isPreviewing=!1}},{key:"configurePreview",value:function(){this.player.currentTime(0),this.furthestVisitedTime=0}},{key:"enable",value:function(){this.player.on("timeupdate",this.onTimeUpdate),this.getProgressControl().addChild(o.Hx),this.isEnabled=!0}},{key:"disable",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.getProgressControl().removeChild(this.getPreventScrubbingTooltip()),this.isEnabled=!1}},{key:"getProgressControl",value:function(){return this.player.controlBar.getChild("progressControl")}},{key:"onTimeUpdate",value:function(){var t=this.playerCurrentTimeFn();t>this.furthestVisitedTime&&(this.furthestVisitedTime=t)}},{key:"currentTime",value:function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),u=1;u<n;u++)r[u-1]=arguments[u];if("number"!=typeof t)return this.playerCurrentTimeFn.apply(this,[t].concat(r));if(this.isEnabled){var a=this.getPreventScrubbingTooltip(),c=null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay");if(t>this.furthestVisitedTime)return a.show(),(0,i.Ds)(a.hide,o.D,!1,a)(),null==c||c.hide(),void this.playerCurrentTimeFn(this.furthestVisitedTime,r);null==c||c.show(),a.hide(!0),this.playerCurrentTimeFn(t,r)}else this.playerCurrentTimeFn.apply(this,[t].concat(r))}},{key:"getPreventScrubbingTooltip",value:function(){return this.getProgressControl().getChild(o.Hx)}},{key:"getSeekBar",value:function(){var t;return null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar")}}],r&&g(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));r.Z.registerPlugin("preventScrubbingPlugin",_)},35259:(t,e,n)=>{n.d(e,{D:()=>i,Hx:()=>o,vn:()=>r});var r="No skipping ahead!",o="PreventScrubbingTooltip",i=1e3},6088:(t,e,n)=>{var r=n(76032),o=n(65858);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,a(r.key),r)}}function a(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function l(t,e,n,r){var o=s(f(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function s(){return s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},s.apply(null,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}var y=r.Z.getComponent("MenuButton"),h="Theatre mode (t)",b="Default view (t)",v="cv-theatre-mode-button",d=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=f(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}(this,e,[t,n])).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.updateControlText(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),n=e,(r=[{key:"getCollabsibleName",value:function(){return""}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!(window.innerWidth<992)}},{key:"showCollapsibleMenu",value:function(){l(e,"handleClick",this,3)([null])}},{key:"buildCSSClass",value:function(){return"cv-default-mode-button ".concat(l(e,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(l(e,"buildWrapperCSSClass",this,3)([]))}},{key:"handleClick",value:function(){this.player_.theatreModePlugin().toggleTheatreMode(void 0,{shouldLog:!0}),this.updateControlText()}},{key:"updateControlText",value:function(){this.player().theatreModePlugin().getTheatreMode()?this.controlText(b):this.controlText(h)}}])&&u(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(y);function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,w(r.key),r)}}function w(t){var e=function(t){if("object"!=m(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==m(e)?e:e+""}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(O=function(){return!!t})()}function j(){return j="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=S(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},j.apply(null,arguments)}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function P(t,e){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},P(t,e)}r.Z.registerComponent("theatreModeButton",d);var _=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=S(e),function(t,e){if(e&&("object"==m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,O()?Reflect.construct(e,n||[],S(t).constructor):e.apply(t,n))}(this,e,[t,n])).options=n,r.bindListeners(),t.ready(function(){return r.onReady()}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&P(t,e)}(e,t),n=e,r=[{key:"bindListeners",value:function(){this.onResize=this.onResize.bind(this),this.onFullscreenChange=this.onFullscreenChange.bind(this),this.player.on("playerresize",this.onResize),this.player.on("fullscreenchange",this.onFullscreenChange)}},{key:"onReady",value:function(){var t;if(this.options&&!(window.innerWidth<992)&&this.getCollapserator()){this.button=this.createButton();var e=this.options.theatreMode;e&&(null===(t=this.button)||void 0===t||t.addClass(v),this.options.onRequestTheatreMode(e))}}},{key:"dispose",value:function(){var t,n,r;this.player.off("playerresize",this.onResize),this.player.off("fullscreenchange",this.onFullscreenChange),(t=e,n=this,"function"==typeof(r=j(S(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([])}},{key:"toggleTheatreMode",value:function(t,e){var n,r;if(this.options){var i=this.options.theatreMode,u=void 0!==t?t:!i;if(this.options.onRequestTheatreMode(u),this.options.theatreMode=u,this.button)return i!==u&&(null==e?void 0:e.shouldLog)&&(null===(n=this.analyticsService)||void 0===n||n.logUserAction({id:this.options.playbackObject.videoId,name:this.options.playbackObject.title},{actionType:o.Vw.Click,descriptor:u?o.UX.EnableTheatreMode:o.UX.DisableTheatreMode,entity:o.py.Video})),u?(i||this.player.fill(!0),this.button.addClass(v),this.button.updateControlText(h),u):(i&&this.player.fluid(!0),null===(r=this.button)||void 0===r||r.removeClass(v),this.button.updateControlText(b),this.player.viewTranscriptPlugin&&this.player.viewTranscriptPlugin().toggleTranscript(!1,{shouldLog:!1}),u)}}},{key:"onResize",value:function(){var t,e;window.innerWidth<992?null===(t=this.button)||void 0===t||t.hide():this.player.isFullscreen()||(this.button||(this.button=this.createButton()),null===(e=this.button)||void 0===e||e.show())}},{key:"createButton",value:function(){var t=this.getCollapserator();return(null==t?void 0:t.getChild("theatreModeButton"))||t.addChild("theatreModeButton",{},t.children_.length-3),null==t?void 0:t.getChild("theatreModeButton")}},{key:"onFullscreenChange",value:function(){var t,e;this.player.isFullscreen()?null===(t=this.button)||void 0===t||t.hide():null===(e=this.button)||void 0===e||e.show()}},{key:"getCollapserator",value:function(){return this.player.getChild("collapserator")}},{key:"getTheatreMode",value:function(){return this.options.theatreMode}},{key:"registerAnalytics",value:function(t){this.analyticsService=t}}],r&&g(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));r.Z.registerPlugin("theatreModePlugin",_)},62315:(t,e,n)=>{n.d(e,{E:()=>V});var r=n(76032),o=n(65858),i=n(7442),u=n(10463),a=n(32735),c=n(42648),l=n(6620),s=n(91693),f=n(69130),p=n(36163),y=n(39323),h=n(88786),b=n(9932),v=n(37963),d=n(35223),m=n(23999),g=n(49985),w=n(34091),O=n(83914),j=n(36532),S=n(69883),P=n(74237);const _={languageSelect:"rHbhp",inputWithoutHighlight:"nJvbl"};function k(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,l=Object.create(c.prototype);return C(l,"_invoke",function(n,r,o){var i,a,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,a=0,c=t,p.n=n,u}};function y(n,r){for(a=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return u;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),a=s,c=h;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,c)):p.n=c:p.v=c);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==u)break}catch(e){i=t,a=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(C(e={},r,function(){return this}),e),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,C(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,C(f,"constructor",l),C(l,"constructor",c),c.displayName="GeneratorFunction",C(l,o,"GeneratorFunction"),C(f),C(f,o,"Generator"),C(f,r,function(){return this}),C(f,"toString",function(){return"[object Generator]"}),(k=function(){return{w:i,m:p}})()}function C(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}C=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){C(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},C(t,e,n,r)}function T(t){var e,n,r=null===(e=t.languageOptions[0])||void 0===e?void 0:e.label,i=t.track.src,u=(0,S.Z)();return a.createElement("div",{className:"d-flex px-1 mb-3"},a.createElement(w.D,{query:t.searchQuery,currentSearchResultIndex:t.currentSearchResultIndex,onSearch:t.onSearch,totalSearchResults:t.totalSearchResults,jumpToSearchResult:t.jumpToSearchResult,analyticsData:t.analyticsData,analyticsOptions:t.analyticsOptions}),a.createElement(j.u,{spanHack:!0,title:t.languageOptions.length>1?"":"Only available in ".concat(r)},a.createElement(m.Z,null,a.createElement(m.Z.Toggle,{className:"text-dark ".concat(_.languageSelect),id:"language-select",disabled:(null===(n=t.languageOptions)||void 0===n?void 0:n.length)<=1,variant:"outline-dark"},a.createElement(O.x,{svgName:d.vn.Globe})),a.createElement(m.Z.Menu,{className:_.menu,"aria-labelledby":"language-select"},t.languageOptions.map(function(e,n){return a.createElement(m.Z.Item,{key:n,onClick:function(){var n;null===(n=t.onChangeLanguage)||void 0===n||n.call(t,e.value),g.k.logUserAction(Object.assign(Object.assign({},t.analyticsData),{language:e.value,previousLanguageName:t.selectedLanguage}),Object.assign(Object.assign({},t.analyticsOptions),{actionType:o.Vw.Select}))},className:"cursor-pointer",active:e.value===t.selectedLanguage},e.label)})))),a.createElement(s.h,{svgName:d.vn.Download,onClick:function(){return e=this,n=void 0,r=void 0,a=k().m(function e(){return k().w(function(e){for(;;)switch(e.n){case 0:return g.k.logUserAction(t.analyticsData,Object.assign(Object.assign({},t.analyticsOptions),{actionType:o.Vw.Download})),e.p=1,e.n=2,P.T.downloadBlob(i,"Subtitles-".concat(t.selectedLanguage,".vtt"));case 2:e.n=4;break;case 3:e.p=3,e.v,u.error("Error downloading transcript");case 4:return e.a(2)}},e,null,[[1,3]])}),new(r||(r=Promise))(function(t,o){function i(t){try{c(a.next(t))}catch(t){o(t)}}function u(t){try{c(a.throw(t))}catch(t){o(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r(function(t){t(n)})).then(i,u)}c((a=a.apply(e,n||[])).next())});var e,n,r,a},className:"position-relative d-flex align-items-center text-dark"}))}var E=n(14735),R=n(42892);function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,u,a=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(a.push(r.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return B(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function L(t){var e=R.S.get(i.KF)||(0,i.CD)(t.allTracks),n=a.useState(function(){return t.allTracks.find(function(t){return t.language===e})||t.allTracks.find(function(e){return e.language===(0,i.CD)(t.allTracks)})}),r=x(n,2),u=r[0],m=r[1],g=x(a.useState(e),2),w=g[0],O=g[1],j=x(a.useState(-1),2),S=j[0],P=j[1],_=x(a.useState(!0),2),k=_[0],C=_[1],E=x(a.useState([]),2),B=E[0],L=E[1],M=a.useMemo(function(){return Array.from((null==u?void 0:u.cues)||[])},[w]),D={videoId:t.playbackObject.videoId,videoName:t.playbackObject.title,language:w},Z={location:o.LZ.Player,entity:o.py.Transcript},I=t.player.hasStarted();(0,f.F)({currentTranscriptTrack:u,cuesToDisplay:M,setCurrentCueIndex:P,hasStarted:I});var F=a.useRef(),A=(0,l.MG)({count:B.length,getScrollElement:function(){var t;return null===(t=F.current)||void 0===t?void 0:t.view},estimateSize:function(){return 40},enabled:B.length>0}),N=A.getVirtualItems(),z=(0,p.I)(S,k,A),V=(0,y.t)({cuesToDisplay:M,resetHighlightedCues:tt,setHighlightedCues:L,scrollToCue:z}),H=V.isSearching,U=V.searchQuery,G=V.totalSearchResults,q=V.jumpToSearchResult,W=V.onSearch,Q=V.currentSearchResultIndex,K=V.resetSearchResults,$=t.player.paused(),X=x((0,v.X)(),2),J=X[0],Y=X[1];function tt(){L((0,h.B)(M))}return a.useEffect(function(){C(!Y&&!H&&I&&!$)},[Y,H,I,$]),a.useEffect(function(){tt()},[M]),u&&M.length?a.createElement("div",{ref:J,className:"cv-transcript py-3 px-2 ".concat(t.showTranscript?"cv-open":"")},a.createElement("div",{className:"text-dark d-flex justify-content-between px-1"},a.createElement("h3",null,"Transcript"),a.createElement(s.h,{svgName:d.vn.Close,onClick:function(){t.toggleTranscript(!1)},ariaLabel:"Close transcript"})),a.createElement(T,{selectedLanguage:w,languageOptions:t.languageOptions,onChangeLanguage:function(e){m(t.allTracks.find(function(t){return t.language===e})),O(e),R.S.set(i.KF,e),K()},track:u,onSearch:W,searchQuery:U,currentSearchResultIndex:Q,totalSearchResults:G,jumpToSearchResult:q,analyticsData:D,analyticsOptions:Z}),a.createElement("div",{className:"cv-transcript-list-wrapper text-dark"},a.createElement(c.ZP,{ref:F},a.createElement(b.x,{timepoint:M[S],onClickTranscriptionItem:function(e){var n;null===(n=t.setStartTime)||void 0===n||n.call(t,e.startTime)},cuesToDisplay:B,chapters:t.chapters,currentSearchResultIndex:Q,inPlayer:!0,virtualizer:A,items:N,analyticsOptions:Z,analyticsData:D,isAuthenticated:!1})))):a.createElement(a.Fragment,null)}function M(t){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M(t)}function D(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Z(r.key),r)}}function Z(t){var e=function(t){if("object"!=M(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=M(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==M(e)?e:e+""}function I(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(I=function(){return!!t})()}function F(){return F="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=A(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},F.apply(null,arguments)}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},A(t)}function N(t,e){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},N(t,e)}r.Z.registerComponent("Transcript",(0,E.Z)(function(t,e){return a.createElement(L,Object.assign({player:t},e))}));var z=r.Z.getPlugin("plugin"),V=992,H=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=A(e),function(t,e){if(e&&("object"==M(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,I()?Reflect.construct(e,n||[],A(t).constructor):e.apply(t,n))}(this,e,[t])).allClickViewTracks=[],n.player=t,n.bindListeners(),t.ready(function(){return n.initialize()}),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&N(t,e)}(e,t),n=e,r=[{key:"bindListeners",value:function(){var t=this;this.onResize=this.onResize.bind(this),u.O.useMetadataTracks(this.player,"transcript",function(){return t.player.trigger("resizemenus")}),this.player.on("playerresize",this.onResize)}},{key:"dispose",value:function(){var t,n,r;this.player.off("playerresize",this.onResize),(t=e,n=this,"function"==typeof(r=F(A(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([])}},{key:"initialize",value:function(){u.O.useSubtitles(this.player,this.onTrackLoaded.bind(this)),u.O.useChapters(this.player,this.onChaptersLoaded.bind(this))}},{key:"onChaptersLoaded",value:function(t){this.chapterTrack=t}},{key:"onTrackLoaded",value:function(t){var e=t.isClickViewProduced;!this.allClickViewTracks.find(function(e){return e.language===t.language})&&e&&this.allClickViewTracks.push(t),this.languageOptions=this.buildOptions(this.allClickViewTracks)}},{key:"buildOptions",value:function(t){return t.map(function(t){return{label:t.label,value:t.language}}).sort(function(t,e){var n=t.value.includes(i.C8)?1:0;return(e.value.includes(i.C8)?1:0)-n})}},{key:"buildComponentProps",value:function(t,e,n){var r,o=Array.from((null===(r=this.chapterTrack)||void 0===r?void 0:r.cues)||[]).map(function(t){return{endTimeStamp:t.endTime,startTime:t.startTime,name:t.text}});return{showTranscript:t,languageOptions:this.languageOptions,toggleTranscript:function(t){return e(t,{shouldLog:!0})},allTracks:this.allClickViewTracks,setStartTime:n,chapters:o,playbackObject:this.playbackObject}}},{key:"addChildren",value:function(t){if(this.component)return this.component.show(),this.component;var e=this.toggleTranscript.bind(this),n=this.setStartTime.bind(this),r=this.buildComponentProps(t,e,n);this.component=this.player.addChild("Transcript",r)}},{key:"toggleTranscript",value:function(t,e){var n,r,i,u=void 0!==t?t:!this.showTranscript;this.showTranscript=u,u?(null===(n=this.player.theatreModePlugin())||void 0===n||n.toggleTheatreMode(!0,{shouldLog:!1}),this.addChildren(!0),this.player.addClass("cv-transcript-plugin")):(null===(r=this.component)||void 0===r||r.hide(),this.player.removeClass("cv-transcript-plugin")),this.player.whiteboardModePlugin&&this.player.whiteboardModePlugin().setEnabled(!u),this.player.trigger("cv-transcript-toggle",u),this.player.trigger("resizemenus"),this.player.trigger("playerresize"),(null==e?void 0:e.shouldLog)&&(null===(i=this.analyticsService)||void 0===i||i.logUserAction({videoId:this.playbackObject.videoId,videoName:this.playbackObject.title},{actionType:o.Vw.Click,descriptor:u?o.UX.ShowTranscript:o.UX.HideTranscript,entity:o.py.Transcript}))}},{key:"setStartTime",value:function(t){this.player.currentTime(t)}},{key:"isTranscriptOn",value:function(){return!!this.showTranscript}},{key:"onResize",value:function(){window.innerWidth<V?this.player.addClass("hide-transcript"):this.showTranscript&&this.player.removeClass("hide-transcript")}},{key:"registerAnalytics",value:function(t,e){this.analyticsService=t,this.playbackObject=e}}],r&&D(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(z);r.Z.registerPlugin("viewTranscriptPlugin",H)},14735:(t,e,n)=>{n.d(e,{Z:()=>m});var r=n(44645),o=n(76032);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,l(r.key),r)}}function c(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function s(t,e,n){return e=y(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},p.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}var v=function(t){function e(t,n){return u(this,e),s(this,e,[t,n])}return h(e,t),c(e,[{key:"dispose",value:function(){var t,n,r,o=this;setImmediate(function(){var t;null===(t=o.root)||void 0===t||t.unmount()}),(t=e,n=this,"function"==typeof(r=p(y(1&3?t.prototype:t),"dispose",n))?function(t){return r.apply(n,t)}:r)([])}}])}(o.Z.getComponent("Component")),d={tagName:"div"};function m(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;if(!t)throw new Error("componentCtor is required");var n=function(n){function i(){return u(this,i),s(this,i,arguments)}return h(i,n),c(i,[{key:"createEl",value:function(){var n=o.Z.dom.createEl(e.tagName,e.properties,e.attributes),i=(0,r.s)(n);return i.render(t(this.player_,this.options_)),this.root=i,n}}])}(v);return n}},87984:(t,e,n)=>{function r(t){return t?function(t){switch(!0){case t<32:return"cv-rating-purple";case t<48:return"cv-rating-green";case t<80:return"cv-rating-blue";case t<96:return"cv-rating-red";case t<128:return"cv-rating-pink";case t>=128:return"cv-rating-yellow";default:return""}}(t):""}n.d(e,{C:()=>r})},51415:(t,e,n)=>{n.d(e,{e:()=>s});var r=n(30364);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,i){var a=r&&r.prototype instanceof l?r:l,s=Object.create(a.prototype);return u(s,"_invoke",function(n,r,o){var i,u,a,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return i=e,u=0,a=t,p.n=n,c}};function y(n,r){for(u=n,a=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],y=p.p,h=i[2];n>3?(o=h===r)&&(a=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=n<2&&y<i[1])?(u=0,p.v=r,p.n=i[1]):y<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,u=0))}if(o||n>1)return c;throw f=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,a=h;(e=u<2?t:a)||!f;){i||(u?u<3?(u>1&&(p.n=-1),y(u,a)):p.n=a:p.v=a);try{if(l=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=p.n<0)?a:n.call(r,p))!==c)break}catch(e){i=t,u=1,a=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),s}var c={};function l(){}function s(){}function f(){}e=Object.getPrototypeOf;var p=[][r]?e(e([][r]())):(u(e={},r,function(){return this}),e),y=f.prototype=l.prototype=Object.create(p);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,u(t,o,"GeneratorFunction")),t.prototype=Object.create(y),t}return s.prototype=f,u(y,"constructor",f),u(f,"constructor",s),s.displayName="GeneratorFunction",u(f,o,"GeneratorFunction"),u(y),u(y,o,"Generator"),u(y,r,function(){return this}),u(y,"toString",function(){return"[object Generator]"}),(i=function(){return{w:a,m:h}})()}function u(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}u=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){u(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},u(t,e,n,r)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}function c(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var l=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(u,a)}c((r=r.apply(t,e||[])).next())})},s=new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tokens={gateway:null}},e=[{key:"get",value:function(t,e){return l(this,void 0,void 0,i().m(function n(){var r,o;return i().w(function(n){for(;;)switch(n.n){case 0:return r=this,n.n=1,fetch(t,{method:"GET",mode:"cors",headers:this.getHeaders(e)});case 1:return o=n.v,n.n=2,r.parseResponse.call(r,o);case 2:return n.a(2,n.v)}},n,this)}))}},{key:"delete",value:function(t,e){return l(this,void 0,void 0,i().m(function n(){return i().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,fetch(t,{method:"DELETE",headers:this.getHeaders(e)});case 1:return n.a(2)}},n,this)}))}},{key:"post",value:function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return l(this,void 0,void 0,i().m(function o(){var u;return i().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,fetch(t,{method:"POST",headers:this.getHeaders(n),body:e,mode:"cors"});case 1:if(u=o.v,!r){o.n=3;break}return o.n=2,this.parseResponse(u);case 2:return o.a(2,o.v);case 3:return o.a(2)}},o,this)}))}},{key:"put",value:function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return l(this,void 0,void 0,i().m(function o(){var u;return i().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,fetch(t,{method:"PUT",headers:this.getHeaders(n),body:e,mode:"cors"});case 1:if(u=o.v,!r){o.n=3;break}return o.n=2,this.parseResponse(u);case 2:return o.a(2,o.v);case 3:return o.a(2)}},o,this)}))}},{key:"setToken",value:function(t,e){this.tokens[t]=e}},{key:"getHeaders",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={"Content-Type":"application/json"};return this.tokens[t.tokenName]&&(e.authorization="Bearer ".concat(this.tokens[t.tokenName])),e}},{key:"parseResponse",value:function(t){return l(this,void 0,void 0,i().m(function e(){var n,o;return i().w(function(e){for(;;)switch(e.n){case 0:if(404!==t.status){e.n=1;break}return e.a(2,null);case 1:if(t.ok){e.n=6;break}return e.p=2,e.n=3,t.json();case 3:n=e.v,e.n=5;break;case 4:throw e.p=4,e.v,new r.M(t.url);case 5:throw e.p=5,new r.M(t.url,n);case 6:return e.n=7,t.json();case 7:return o=e.v,e.a(2,o)}},e,null,[[2,4,5,6]])}))}}],e&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}())},95569:(t,e,n)=>{n.d(e,{Ds:()=>o,P2:()=>r});var r=function(t,e){var n=window.performance.now();return function(){var r=window.performance.now();r-n>=e&&(t.apply(void 0,arguments),n=r)}},o=function(t,e,n){var r,o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,u=function(){for(var u=arguments.length,a=new Array(u),c=0;c<u;c++)a[c]=arguments[c];var l=!1,s=function(){r=null,s=null,t.apply(this,a)};return!r&&n&&(t.apply(o,a),l=!0),i.clearTimeout(r),r=i.setTimeout(s,e),l};return u.cancel=function(){i.clearTimeout(r),r=null},u}},42503:(t,e,n)=>{function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;t=t<0?0:t;var n=Math.floor(t%60),r=Math.floor(t/60%60),o=Math.floor(t/3600),i=Math.floor(e/60%60),u=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(o=r=n="-"),(o=o>0||u>0?o+":":"")+(r=((o||i>=10)&&r<10?"0"+r:r)+":")+(n<10?"0"+n:n)}n.d(e,{m:()=>r})},23035:(t,e,n)=>{function r(t){for(var e=t.buffered(),n=t.currentTime(),r=0,o=0;o<e.length;o++){var i=e.start(o),u=e.end(o);if(i<=n&&u>=n){r=u;break}}return r}n.d(e,{b:()=>r})},10463:(t,e,n)=>{n.d(e,{O:()=>l});var r=n(28400);function o(t,e,n,r){if(!t.length)return[];for(var o=[],i=t.length-1;i>=0;i--){var u=t[i];if(u.kind===e){if(n&&u.label!==n)continue;if(r&&u.language!==r)continue;o.push(u)}}return o}function i(t,e,n,r,o){t.kind===e&&(n&&t.label!==n||o&&t.language!==o||(t.loaded_?r(t):t.one("loadeddata",function(){r(t)})))}function u(t){if(null==t?void 0:t.cues.length)for(var e=0;e<t.cues.length;e++){var n=t.cues[e];(null==n?void 0:n.text)&&(n.text=r.m.sanitize(n.text))}}function a(t,e,n,r,u){var a=t.textTracks(),c=o(a,e,n,u)[0];if(c)i(c,e,n,r);else{var l=function(t){i(t.track,e,n,r),a.removeEventListener("addtrack",l)};a.addEventListener("addtrack",l),t.one("dispose",function(){a.removeEventListener("addtrack",l)})}}function c(t,e,n,r,u){var a=t.textTracks(),c=o(a,e,n,u);c.length&&c.forEach(function(t){return i(t,e,n,r,u)});var l=function(t){i(t.track,e,n,r,u)};a.addEventListener("addtrack",l),t.one("dispose",function(){a.removeEventListener("addtrack",l)})}var l={getTrack:function(t,e,n,r){return o(t.textTracks(),e,n,r)[0]},useChapters:function(t,e){a(t,"chapters",null,e)},useMetadataTrack:function(t,e,n){a(t,"metadata",e,n,null)},useMetadataTracks:function(t,e,n,r){c(t,"metadata",e,n,r)},useSubtitles:function(t,e,n){c(t,"subtitles",null,e,n)},getCurrentTextTrack:function(t){return this.findTrackByPredicate(t,function(t){return"showing"===t.mode})},findTrackByPredicate:function(t,e){if(!t)return null;for(var n=t.textTracks(),r=0;r<n.length;r++){var o=n[r];if(e(o))return o}return null},forEachTrack:function(t,e){if(t)for(var n=t.textTracks(),r=0;r<n.length;r++)e(n[r])},sanitizeTrack:function(t,e){if(t&&e)if(t.loaded)u(t);else{var n=function(){return u(t)};t.addEventListener("loadeddata",n),e.one("dispose",function(){t.removeEventListener("loadeddata",n)})}},activeTextTrack:function(t){"disabled"===t.mode&&"subtitles"===t.kind&&(t.mode="hidden")}}}}]);
3
+ //# sourceMappingURL=7252-3540b11acb-lite.chunk.js.map