@clickview/reports 0.0.26 → 0.0.27-rc.0
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.
- package/dist/bundles.json +2 -2
- package/dist/css/11-reports.chunk.css +365 -0
- package/dist/css/13-reports.chunk.css +1846 -0
- package/dist/css/16-reports.chunk.css +39 -0
- package/dist/css/17-reports.chunk.css +42 -0
- package/dist/css/18-reports.chunk.css +37 -0
- package/dist/css/19-reports.chunk.css +21 -0
- package/dist/css/2-reports.chunk.css +49 -0
- package/dist/css/20-reports.chunk.css +34 -0
- package/dist/css/22-reports.chunk.css +12 -0
- package/dist/css/24-reports.chunk.css +163 -0
- package/dist/css/25-reports.chunk.css +72 -0
- package/dist/css/26-reports.chunk.css +80 -0
- package/dist/css/27-reports.chunk.css +30 -0
- package/dist/css/28-reports.chunk.css +143 -0
- package/dist/css/29-reports.chunk.css +24 -0
- package/dist/css/30-reports.chunk.css +21 -0
- package/dist/css/31-reports.chunk.css +9 -0
- package/dist/css/32-reports.chunk.css +60 -0
- package/dist/css/33-reports.chunk.css +3 -0
- package/dist/css/34-reports.chunk.css +12 -0
- package/dist/css/35-reports.chunk.css +12 -0
- package/dist/css/36-reports.chunk.css +22 -0
- package/dist/css/4-reports.chunk.css +22 -0
- package/dist/css/5-reports.chunk.css +44 -0
- package/dist/css/6-reports.chunk.css +63 -0
- package/dist/css/7-reports.chunk.css +83 -0
- package/dist/css/reports-app.css +11498 -0
- package/dist/scripts/{0-45d6f561a1-reports.chunk.js → 0-0994898684-reports.chunk.js} +1 -1
- package/dist/scripts/0-reports.chunk.js +43 -0
- package/dist/scripts/{1-b44bc2d382-reports.chunk.js → 1-74923a7364-reports.chunk.js} +1 -1
- package/dist/scripts/1-reports.chunk.js +11 -0
- package/dist/scripts/{10-c9b19fd45d-reports.chunk.js → 10-72de985ca6-reports.chunk.js} +1 -1
- package/dist/scripts/10-reports.chunk.js +11 -0
- package/dist/scripts/{11-4d34a4e7ba-reports.chunk.js → 11-61af1e19c7-reports.chunk.js} +1 -1
- package/dist/scripts/11-reports.chunk.js +397 -0
- package/dist/scripts/{12-3a1b307676-reports.chunk.js → 12-a58508b6ee-reports.chunk.js} +1 -1
- package/dist/scripts/12-reports.chunk.js +43 -0
- package/dist/scripts/13-reports.chunk.js +1088 -0
- package/dist/scripts/14-reports.chunk.js +1255 -0
- package/dist/scripts/{15-b5cdf2ca83-reports.chunk.js → 15-6d142f0f60-reports.chunk.js} +2 -2
- package/dist/scripts/15-reports.chunk.js +43 -0
- package/dist/scripts/16-2c857db15c-reports.chunk.js +1 -0
- package/dist/scripts/16-reports.chunk.js +167 -0
- package/dist/scripts/17-f19243cfde-reports.chunk.js +1 -0
- package/dist/scripts/17-reports.chunk.js +151 -0
- package/dist/scripts/{18-26152e90cf-reports.chunk.js → 18-fdcee8d99b-reports.chunk.js} +1 -1
- package/dist/scripts/18-reports.chunk.js +104 -0
- package/dist/scripts/19-48d8402ead-reports.chunk.js +1 -0
- package/dist/scripts/19-reports.chunk.js +97 -0
- package/dist/scripts/{2-10046bd9c7-reports.chunk.js → 2-6363a15c1a-reports.chunk.js} +1 -1
- package/dist/scripts/2-reports.chunk.js +42 -0
- package/dist/scripts/{20-fb21388afa-reports.chunk.js → 20-d599187e5b-reports.chunk.js} +1 -1
- package/dist/scripts/20-reports.chunk.js +72 -0
- package/dist/scripts/{21-1f824cdc04-reports.chunk.js → 21-3d1f0982d4-reports.chunk.js} +1 -1
- package/dist/scripts/21-reports.chunk.js +67 -0
- package/dist/scripts/{22-b39a13f4bc-reports.chunk.js → 22-c2ea378dce-reports.chunk.js} +1 -1
- package/dist/scripts/22-reports.chunk.js +34 -0
- package/dist/scripts/{23-b4762a301a-reports.chunk.js → 23-8d9a55c243-reports.chunk.js} +1 -1
- package/dist/scripts/23-reports.chunk.js +2469 -0
- package/dist/scripts/{24-192d8a65eb-reports.chunk.js → 24-4552a4d4b1-reports.chunk.js} +1 -1
- package/dist/scripts/24-reports.chunk.js +704 -0
- package/dist/scripts/{25-514ac9b009-reports.chunk.js → 25-2217879368-reports.chunk.js} +1 -1
- package/dist/scripts/25-reports.chunk.js +227 -0
- package/dist/scripts/{26-6d77d19c83-reports.chunk.js → 26-a9a0806c8e-reports.chunk.js} +1 -1
- package/dist/scripts/26-reports.chunk.js +214 -0
- package/dist/scripts/{27-1e40e49481-reports.chunk.js → 27-98603dad42-reports.chunk.js} +1 -1
- package/dist/scripts/27-reports.chunk.js +150 -0
- package/dist/scripts/{28-2e12aa2b84-reports.chunk.js → 28-83e02981bb-reports.chunk.js} +1 -1
- package/dist/scripts/28-reports.chunk.js +119 -0
- package/dist/scripts/{29-8df8a60b39-reports.chunk.js → 29-07f938f396-reports.chunk.js} +1 -1
- package/dist/scripts/29-reports.chunk.js +105 -0
- package/dist/scripts/{3-581ba906a8-reports.chunk.js → 3-54445e0784-reports.chunk.js} +1 -1
- package/dist/scripts/3-reports.chunk.js +17 -0
- package/dist/scripts/{30-c692a12728-reports.chunk.js → 30-5b1fa09845-reports.chunk.js} +1 -1
- package/dist/scripts/30-reports.chunk.js +97 -0
- package/dist/scripts/{31-d560bb2964-reports.chunk.js → 31-39c16f8ecb-reports.chunk.js} +1 -1
- package/dist/scripts/31-reports.chunk.js +81 -0
- package/dist/scripts/32-reports.chunk.js +81 -0
- package/dist/scripts/33-reports.chunk.js +50 -0
- package/dist/scripts/34-reports.chunk.js +34 -0
- package/dist/scripts/35-reports.chunk.js +34 -0
- package/dist/scripts/36-reports.chunk.js +18 -0
- package/dist/scripts/37-reports.chunk.js +11 -0
- package/dist/scripts/38-reports.chunk.js +11 -0
- package/dist/scripts/39-reports.chunk.js +11 -0
- package/dist/scripts/4-0563be5390-reports.chunk.js +1 -0
- package/dist/scripts/4-reports.chunk.js +89 -0
- package/dist/scripts/40-reports.chunk.js +11 -0
- package/dist/scripts/{5-dc395553ff-reports.chunk.js → 5-7de2073c7c-reports.chunk.js} +15 -15
- package/dist/scripts/5-reports.chunk.js +73 -0
- package/dist/scripts/{6-7b13156847-reports.chunk.js → 6-6ca85a7710-reports.chunk.js} +1 -1
- package/dist/scripts/6-reports.chunk.js +113 -0
- package/dist/scripts/{7-11a1aa63ca-reports.chunk.js → 7-4972d87778-reports.chunk.js} +1 -1
- package/dist/scripts/7-reports.chunk.js +56 -0
- package/dist/scripts/8-3b004dbc7d-reports.chunk.js +1 -0
- package/dist/scripts/8-reports.chunk.js +17 -0
- package/dist/scripts/{9-b9fdcedfb5-reports.chunk.js → 9-a223165d25-reports.chunk.js} +1 -1
- package/dist/scripts/9-reports.chunk.js +35 -0
- package/dist/scripts/bundle-0fc3abb0ed.min.js +19 -0
- package/dist/scripts/bundle.js +7281 -0
- package/dist/scripts/polyfills-241c416f13.min.js +1 -0
- package/dist/scripts/polyfills.js +2750 -0
- package/package.json +3 -3
- package/dist/scripts/16-13269fde77-reports.chunk.js +0 -1
- package/dist/scripts/17-e4c043a006-reports.chunk.js +0 -1
- package/dist/scripts/19-935f79cf67-reports.chunk.js +0 -1
- package/dist/scripts/4-7099530847-reports.chunk.js +0 -1
- package/dist/scripts/8-e5da1d6aa4-reports.chunk.js +0 -1
- package/dist/scripts/bundle-6d2a417531.min.js +0 -19
- package/dist/scripts/polyfills-fc123dbc56.min.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_reports=window.webpackJsonp_clickview_reports||[]).push([[17,7],{1076:function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(106),a=n(195),c=n(91),u=n(7),l=n(78);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b="shared.privateResourceError",v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(i,e);var t,n,r,o=y(i);function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,u.a.getPhrase(b,"title"))}return t=i,(n=[{key:"name",get:function(){return"PrivateResourceError"}},{key:"heading",get:function(){return u.a.getPhrase(b,"heading")}},{key:"description",get:function(){return u.a.getPhrase(b,"description")}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(l.a);function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=j(e);if(t){var o=j(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return C(this,n)}}function C(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}(i,e);var t,n,r,o=O(i);function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,u.a.getPhrase("shared.regionLockedResourceError","title"))}return t=i,(n=[{key:"name",get:function(){return"RegionLockedResourceError"}},{key:"heading",get:function(){return u.a.getPhrase("shared.regionLockedResourceError","heading")}},{key:"description",get:function(){return u.a.getPhrase("shared.regionLockedResourceError","description")}}])&&g(t.prototype,n),r&&g(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(l.a),S={notFound:a.a,forbidden:{rating:v,yearLevel:v,region:_,privacy:v},badRequest:c.a};function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var r;r="number"==typeof e?e:e.status;var a=Object.assign(Object.assign({},S),t);r&&o.a.ErrorHelper.isStatusCodeError(r)&&(r!==i.a.NotFound?r!==i.a.Forbidden?n.badRequest||o.a.ErrorHelper.throw(new a.badRequest):n.forbidden||o.a.ErrorHelper.throw(new a.forbidden.privacy):n.notFound||o.a.ErrorHelper.throw(new a.notFound))}}function k(e){return e.map((function(e){return e.statusCode})).join(":")}function E(e,t,n){var o=Array.isArray(e)?e:[e];Object(r.useEffect)((function(){o.forEach((function(e){P(e.statusCode,t,n)}))}),[k(o),t,n])}n.d(t,"a",(function(){return E}))},1077:function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.Login="login",e.VideoView="video_view"}(r||(r={}))},1078:function(e,t,n){"use strict";var r,o;n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),function(e){e.YearGroup="year_group",e.UserType="user_type"}(r||(r={})),function(e){e.ContentType="content_type",e.Subject="subject",e.Topic="topic"}(o||(o={}))},1079:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n.n(r),i=o.a.forwardRef((function(e,t){return o.a.createElement("div",Object.assign({},e,{ref:t,role:"button",tabIndex:0,className:"".concat(e.className?e.className:""," cursor-pointer"),onKeyDown:e.onKeyDown?e.onKeyDown:function(t){return"Enter"===t.key&&e.onClick(t)},onClick:e.onClick,style:e.style?e.style:{}}),e.children)}))},1080:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(105),o=n(37),i=n(36),a=n(1084),c={views:function(e,t,n,o,c,u){var l="video:views";t&&(l+=":".concat(t));var s=Object.assign(Object.assign({objectId:t},e),{timeOffset:i.a.getTimezoneOffset()});return n&&(s.sharerId=n),{url:r.a.urlBuilder("{gateway}/v1/analytics/video-views",s),key:Object(a.a)(l,e,n),normalize:!1,success:o,error:c,always:u}},individualEngagement:function(e,t,n,o,i,c){var u=Object.assign({objectId:e},t);return n&&(u.sharerId=n),{url:r.a.urlBuilder("{gateway}/v1/analytics/heat-map",u),key:Object(a.a)("engagement:".concat(e),t,n),formatData:function(e){var t;return Object.assign(Object.assign({},e),{data:null===(t=e.data)||void 0===t?void 0:t.map((function(e){var t;return Object.assign(Object.assign({},e),{heatMap:null!==(t=e.heatMap)&&void 0!==t?t:[]})}))})},normalize:!1,success:o,error:i,always:c}},aggregateEngagement:function(e,t,n,o,i,c){var u=Object.assign({objectId:e},t);return n&&(u.sharerId=n),{url:r.a.urlBuilder("{gateway}/v1/analytics/heat-map/aggregations",u),key:Object(a.a)("aggregate:engagement:".concat(e),t,n),formatData:function(e){var t;return Object.assign(Object.assign({},e),{heatMap:null!==(t=e.heatMap)&&void 0!==t?t:[]})},normalize:!1,success:o,error:i,always:c}},topVideos:function(e,t,n,i,c){return{url:r.a.urlBuilder("{gateway}/v1/analytics/videos/top",Object.assign({"query.video":"thumbnail","query.interactive":"video[thumbnail],clip[video[thumbnail]],thumbnail","query.clip":"video[thumbnail]",limit:t},e)),key:Object(a.a)("top:videos:".concat(null!=t?t:0),e),normalize:!1,formatData:function(e){var t=o.a.sortBy(e.data,"count");return t.reverse(),Object.assign(Object.assign({},e),{data:t})},success:n,error:i,always:c}}}},1081:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l}));var r=n(1142),o=n(7),i=n(143),a=n(147),c=o.a.encloseNamespace("reportsShared.utils");function u(e,t){return t?Object(r.c)(function(e){var t=+"".concat(e.id).concat(Math.floor((new Date).getMinutes()/5));return{dictionaries:[r.b,r.a],separator:" ",length:2,style:"capital",seed:t}}(e)):i.a.getFullName(e)}function l(e){switch(e.toLowerCase()){case a.a.Learner:return c("student");case a.a.Staff:return c("staff");default:return e}}},1082:function(e,t,n){"use strict";var r,o,i=n(0),a=n.n(i),c=n(1105),u=n(1092),l=n.n(u);function s(e){var t=e===r.Large?5.8:2,n=e===r.Large?.36:.2;return"".concat(t/2-2*n,"rem")}function f(e){return e>=c.a.HIGH?"text-success":e>=c.a.MODERATE?"text-warning":"text-danger"}function p(e,t){var n="d-inline-block ".concat(l.a.circleContainer);return e===r.Large&&(n+=" ".concat(l.a.lgCircleContainer)),y(t)&&(n+=" ".concat(l.a.pendingCircle)),n}function y(e){return"number"!=typeof e}function h(e){var t,n=a.a.useCallback((function(t){if(t){var n=t.r.baseVal.value,r=2*Math.PI*n,o=r-e.percentage*r;t.style.strokeDasharray="".concat(r," ").concat(r),t.style.strokeDashoffset=o.toString()}}),[]);return a.a.createElement("svg",null,a.a.createElement("circle",{r:s(e.size),className:l.a.backgroundCircle}),!y(e.percentage)&&a.a.createElement("circle",{ref:n,r:s(e.size),className:(t=e.percentage,t>=c.a.HIGH?l.a.circleSuccess:t>=c.a.MODERATE?l.a.circleWarning:l.a.circleDanger)}))}function d(e){var t,n,i=function(e){if(!y(e))return+e.toFixed(2)}(e.percentage),c=e.layout===o.LabelInside?r.Large:r.Small,u=e.customLabel||(y(n=i)?"--%":"".concat(Math.round(100*n),"%"));return e.layout===o.LabelOnly?a.a.createElement("span",{className:f(i)},u):a.a.createElement("div",{className:"d-flex align-items-center justify-content-between ".concat(null!==(t=e.className)&&void 0!==t?t:"")},e.layout===o.LabelBefore&&a.a.createElement("span",{className:"mr-2"},u),a.a.createElement("div",{className:p(c,i)},a.a.createElement(h,{percentage:i,size:c}),e.layout===o.LabelInside&&a.a.createElement("span",{className:l.a.centredPercentageText},u)))}!function(e){e.Small="small",e.Large="large"}(r||(r={})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return d})),function(e){e.CircleOnly="circle_only",e.LabelOnly="label_only",e.LabelBefore="label_before",e.LabelInside="label_inside"}(o||(o={})),d.defaultProps={layout:o.CircleOnly}},1083:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0),o=n(42),i=n(43);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){var t=a(Object(o.a)(i.a.HEADER_TITLE),2)[1];Object(r.useEffect)((function(){return t(e),function(){t(null)}}),[e])}},1084:function(e,t,n){"use strict";function r(e,t,n){var r="".concat(e,":").concat(t.start,":").concat(t.end),o=Array.isArray(t.userId)?t.userId.sort().join(":"):t.userId,i=Array.isArray(t.groupId)?t.groupId.sort().join(":"):t.groupId;return o&&(r+=":".concat(o)),i&&(r+=":".concat(i)),n&&(r+=":".concat(n)),r}n.d(t,"a",(function(){return r}))},1085:function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e[e.RootTopic=1]="RootTopic",e[e.ChildTopic=2]="ChildTopic"}(r||(r={}))},1086:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0),o=n(42),i=n(43);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){var t,n=a(Object(o.a)(i.a.AUDIENCE_FILTER_SELECTED_COUNT),2)[1];Object(r.useEffect)((function(){e.data?n(e.data.userCount):n(null)}),[null===(t=e.data)||void 0===t?void 0:t.userCount])}},1087:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1076),o={notFound:n(290).a};function i(e){Object(r.a)(e,o)}},1088:function(e,t,n){e.exports={totalCount:"_3a-8G",chartContainer:"_1QY5r"}},1089:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n.n(r),i=n(1090),a=n.n(i);function c(){return o.a.createElement("div",{className:"d-flex align-items-start justify-content-between"},o.a.createElement("div",null,o.a.createElement("div",{className:"partial-loading-background mb-2 ".concat(a.a.partialHeading)}),o.a.createElement("div",{className:"partial-loading-background ".concat(a.a.partialCount)})),o.a.createElement("div",{className:"partial-loading-background rounded ".concat(a.a.partialSelector)}))}},1090:function(e,t,n){e.exports={partialHeading:"_6n6Gf",partialSelector:"hK60D",partialCount:"_2jwV2"}},1091:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(8),o=n(50),i=n(80);function a(e){var t,n=null===(t=r.a.useBasicFetch(i.a.userProducts()).data)||void 0===t?void 0:t.find((function(e){return e.id===o.a.Primary}));if(n)return function(t){return e(n,t)}}},1092:function(e,t,n){e.exports={circleContainer:"_3uMQG",backgroundCircle:"_29byp",circleSuccess:"_1leSx",circleWarning:"_1yreR",circleDanger:"_13evQ",lgCircleContainer:"_2gBnl",pendingCircle:"NTTU7",centredPercentageText:"_1wF3E"}},1093:function(e,t,n){"use strict";var r,o,i,a,c,u,l=n(0),s=n.n(l),f=n(1096),p=n.n(f),y=n(1118),h=n.n(y),d=n(14),b=n(7),v=n(1097),m=n(37),g=n(1081),w=n(1098),O=n(1077),C=n(1078);function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _=(j(r={},O.a.Login,"login_group_by"),j(r,O.a.VideoView,"video_view_group_by"),r),S=(j(o={},C.a.YearGroup,"yearGroups"),j(o,C.a.UserType,"userType"),j(o,C.b.ContentType,"contentType"),j(o,C.b.Subject,"subject"),j(o,C.b.Topic,"topic"),o),P=C.a.YearGroup,k=(j(c={},O.a.Login,(j(i={},C.a.YearGroup,"totalStudentLogins"),j(i,C.a.UserType,"totalLogins"),i)),j(c,O.a.VideoView,(j(a={},C.a.YearGroup,"totalStudentViews"),j(a,C.a.UserType,"totalViews"),j(a,C.b.ContentType,"totalViews"),j(a,C.b.Subject,"totalViews"),j(a,C.b.Topic,"totalViews"),a)),c),E=(j(u={},O.a.Login,"logins"),j(u,O.a.VideoView,"views"),u),T={title:{text:null},credits:{enabled:!1},chart:{backgroundColor:"transparent",spacing:[0,0,0,0]},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},showInLegend:!0}}};function R(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}(e)||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 x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function L(e,t){var n=_[e];return t?n+"_single":n}function B(e,t){return Object.assign(Object.assign({},T),{series:[{type:"pie",name:t,data:e}]})}function I(e,t,n,r){var o={},i=e[t];return null==i||i.forEach((function(e){var t;e.name&&!(null==n?void 0:n.includes(e.name.toLowerCase()))&&(o[e.name]=null!==(t=o[e.name])&&void 0!==t?t:0,o[e.name]+=e.count)})),Object(w.a)(m.a.sortBy(Object.keys(o).map((function(e){return{name:r?r(e):e,y:o[e],type:"pie"}})),"name"))}var N=n(1088),M=n.n(N);function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D(e,t)}(e,t)||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 D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return V}));var F=b.a.encloseNamespace("shared.userActivityPieChart");function z(e){var t=function(e,t){var n=[C.a.YearGroup,C.a.UserType];return e===O.a.VideoView&&n.push(C.b.ContentType),t&&n.push.apply(n,R(t.map((function(e){return e.type})))),n}(e.eventType,e.customGroupBy);return s.a.createElement(d.Dropdown,{alignRight:!0},s.a.createElement(d.Dropdown.Toggle,{id:"group-by-dropdown",variant:"outline-dark",className:"no-caret"},F(S[e.selectedOption])),s.a.createElement(d.Dropdown.Menu,null,t.map((function(t,n){return e.selectedOption!==t&&s.a.createElement(d.Dropdown.Item,{key:n,onSelect:function(){return e.onSelect(t)}},F(S[t]))}))))}function V(e){var t,n,r,o=A(s.a.useState((t=e.eventType,n=!!e.objectId,null!=(r=localStorage.getItem(L(t,n)))?r:P)),2),i=o[0],a=o[1];Object(v.a)();var c,u,l,f=function(e,t){switch(t){case C.a.YearGroup:return I(e,"yearGroupCount",["staff","unknown"]);case C.a.UserType:return I(e,"userTypeCount",null,g.b);case C.b.ContentType:return I(e,"contentTypeCount")}}(e.events,i),y=function(e){var t;return null!==(t=null==e?void 0:e.reduce((function(e,t){return e+t.y}),0))&&void 0!==t?t:null}(f),d=(c=i,u=e.customGroupBy,Array.isArray(u)?null===(l=u.find((function(e){return e.type===c})))||void 0===l?void 0:l.getComponent:void 0);return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:"d-flex align-items-start justify-content-between w-100"},s.a.createElement("div",null,s.a.createElement("h3",{className:"h6 m-0"},F(k[e.eventType][i])),"number"==typeof y&&s.a.createElement("strong",{className:M.a.totalCount},y)),s.a.createElement(z,{eventType:e.eventType,selectedOption:i,onSelect:function(t){!function(e,t,n){localStorage.setItem(L(e,n),t)}(e.eventType,t,!!e.objectId),a(t)},customGroupBy:e.customGroupBy})),!!d&&d(),!d&&(f.length?s.a.createElement(h.a,{highcharts:p.a,options:B(f,F(E[e.eventType])),containerProps:{className:"".concat(M.a.chartContainer," position-absolute w-100 h-75 flex-grow-1")}}):e.emptyStateComponent))}},1094:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(8),a=n(32),c=n(1076),u=n(1080),l=n(193),s=n(1086),f=n(1093),p=n(1089),y=n(1077),h=n(1078),d=n(145),b=n(7),v=n(144),m=b.a.encloseNamespace("reportsShared.viewCountPieChartEmptyState");function g(e){return o.a.createElement(d.a,{className:"flex-grow-1 justify-content-center"},o.a.createElement(d.a.Image,{src:v.a.EmptyStates.Shared.ViewCount,className:"w-75 pb-0"}),o.a.createElement(d.a.Heading,null,m("heading")),o.a.createElement(d.a.Info,{className:"w-100"},m(e.singular?"descriptionSingular":"descriptionMultiple")))}var w=n(146),O=n.n(w),C=n(1116),j=n(96),_=n(1107),S=n(1085),P=n(1099),k=n.n(P),E=b.a.encloseNamespace("reportsShared.viewCountByTopicCard");function T(e){var t=Object(l.b)(),n=i.a.useBasicFetch(!!t&&_.a.viewsByTopic(t,e.type));return n.data?n.data.length?o.a.createElement("div",{className:"h-100 mr-n2"},o.a.createElement(O.a,{height:"100%",className:"mt-2"},o.a.createElement("div",{className:"d-flex align-items-center pr-1"},o.a.createElement("div",{className:"d-flex flex-wrap pr-2 ".concat(k.a.topicColumn)},o.a.createElement("strong",{className:"mr-1"},E(e.type===S.a.RootTopic?"subject":"topic")),o.a.createElement("span",{className:"text-muted"},E(e.type===S.a.RootTopic?"multipleSubjects":"multipleTopics"))),o.a.createElement("strong",null,E("views"))),o.a.createElement("ul",{className:"list-unstyled"},n.data.map((function(e,t){return o.a.createElement("li",{key:t},o.a.createElement(j.a,{title:e.collection.name,spanHack:!0,spanHackClassName:"d-flex align-items-center pr-1"},o.a.createElement("div",{className:"py-2 pr-2 ".concat(k.a.topicColumn)},o.a.createElement(C.a,{data:e.collection})),o.a.createElement("strong",null,E("viewCount",{smartCount:e.count}))))}))))):o.a.createElement(g,null):o.a.createElement(o.a.Fragment,null)}function R(e){var t,n=Object(l.b)(),r=i.a.useBasicFetch(!!e.useSharerId&&a.a.currentUser()),d=i.a.useBasicFetch(!!n&&(e.useSharerId?!!r.data&&u.a.views(n,e.objectId,r.data.id):u.a.views(n,e.objectId)));return Object(c.a)(d),Object(s.a)(d),o.a.createElement("div",{className:"bg-white rounded p-3 position-relative d-flex flex-column ".concat(null!==(t=e.className)&&void 0!==t?t:"")},d.data?o.a.createElement(f.a,{eventType:y.a.VideoView,events:d.data,objectId:e.objectId,emptyStateComponent:o.a.createElement(g,{singular:!!e.objectId}),customGroupBy:e.objectId?null:[{type:h.b.Subject,getComponent:function(){return o.a.createElement(T,{type:S.a.RootTopic})}},{type:h.b.Topic,getComponent:function(){return o.a.createElement(T,{type:S.a.ChildTopic})}}]}):o.a.createElement(p.a,null))}n.d(t,"a",(function(){return R}))},1095:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(4),a=n(92),c=n(1079),u=n(39),l=n(1100),s=n.n(l);function f(e){var t;return o.a.createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},o.a.createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(s.a.pillTabSelector)},e.tabs.map((function(e){return e.appLink||e.onSelect?o.a.createElement("li",{className:"py-0 px-2 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?o.a.createElement(u.a,{appLink:e.appLink,className:"cursor-pointer py-1 d-block text-decoration-none text-reset"},e.name):o.a.createElement(c.a,{className:"py-1",onClick:function(){return function(e){e.active||e.onSelect()}(e)}},e.name)):o.a.createElement(o.a.Fragment,{key:e.name})}))))}function p(e){var t=e.items.map((function(e){var t,n;return{name:e.label,onSelect:function(){return i.a.AppLinkHelper.trigger(e.appLink)},active:e.appLink.action===(null===(n=null===(t=a.a.getCurrentRoute())||void 0===t?void 0:t.appLink)||void 0===n?void 0:n.action)}}));return o.a.createElement(f,{className:"pb-3",tabs:t})}n.d(t,"a",(function(){return p}))},1097:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(42),o=n(43);function i(){Object(r.a)(o.a.LEFT_NAV_STATE)}},1098:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=["#FF9300","#38A2E8","#7A76E8","#B679C7","#F7847B","#D9584F","#FFCD52","#5DC786","#40BCC3","#40C2BB"];function o(e){return e.map((function(e,t){return Object.assign(Object.assign({},e),{color:r[t%r.length]})}))}},1099:function(e,t,n){e.exports={topicColumn:"_1cZZ-"}},1100:function(e,t,n){e.exports={pillTabSelector:"_3qG1e"}},1101:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n.n(r),i=n(1079),a=n(96);function c(e){function t(){e.disabled||e.onClick.apply(e,arguments)}var n=e.disabled?"disabled":"",r=e.hideOutline?"outline-none":"",c=e.on?"on":"";e.disabled&&!e.showStateWhenDisabled&&(c="");var u="".concat("d-inline-block float-right align-top custom-toggle toggle-option"," ").concat(c," ").concat(n," ").concat(r);return e.tooltipText?o.a.createElement(a.a,{title:e.tooltipText,spanHack:!0},o.a.createElement(i.a,{onClick:t,className:u},o.a.createElement("span",{className:"handle"}))):o.a.createElement(i.a,{onClick:t,className:u},o.a.createElement("span",{className:"handle"}))}},1102:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return s}));var r,o,i=n(0),a=n(20),c=n(18),u=n(1119),l=n.n(u);function s(e){var t,n=e.type,u=e.mediaType,s=e.extraClasses,f=function(e){return e===r.Video?l.a.videoFallback:e===r.Playlist?l.a.playlistFallback:e===r.Series||e===r.TallSubject?l.a.posterFallback:e===r.Subject?"".concat(l.a.subjectFallback," svg-container d-inline-block"):""}(n),p=function(e){return e===r.Video?c.b.Play:e===r.Playlist?c.b.Image:e===r.Series?c.b.Series:e===r.Subject||e===r.TallSubject?c.b.Subject:""}(n),y=function(e){return e===r.Subject?a.b.ExtraLarge:a.b.Standard}(n),h="".concat(function(e,t){return t===r.Subject?l.a.subjectFallbackContainer:e===o.Svg?t===r.Video?"".concat(l.a.svgFallbackContainer," rounded-lg"):l.a.svgFallbackContainer:l.a.baseFallbackContainer}(u,n));return s&&(h+=" ".concat(e.extraClasses)),i.createElement("div",{className:h},u===o.Svg?i.createElement(a.a,{svgName:p,className:"".concat(f," ").concat(null!==(t=e.svgContainerClassName)&&void 0!==t?t:""),tagName:"div",size:y}):i.createElement("div",{className:l.a.fallbackThumbnailImage,style:{backgroundImage:"url('".concat(p,"')")}}))}!function(e){e[e.Video=0]="Video",e[e.Playlist=1]="Playlist",e[e.Series=2]="Series",e[e.Subject=3]="Subject",e[e.TallSubject=4]="TallSubject"}(r||(r={})),function(e){e[e.Svg=0]="Svg",e[e.Image=1]="Image"}(o||(o={})),s.defaultProps={mediaType:o.Svg}},1104:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n.n(r),i=n(1110),a=n.n(i);function c(e){var t,n;return o.a.createElement("div",{className:"bg-white rounded ".concat(a.a.table," ").concat(null!==(t=e.className)&&void 0!==t?t:"")},o.a.createElement("div",{className:"border-bottom ".concat(a.a.header," ").concat(null!==(n=e.headerClassName)&&void 0!==n?n:"")}),e.children)}},1105:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={HIGH:.75,MODERATE:.5}},1106:function(e,t,n){"use strict";var r,o=n(0),i=n.n(o),a=n(1103),c=n(20),u=n(18),l=n(1108),s=n.n(l);!function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(r||(r={}));var f=o.memo((function(e){var t,n,i=e.direction===r.Left,a=i?u.b.ChevronLeft:u.b.ChevronRight,l=(e.contents,t=i,n=s.a.topPos,n+=t?" "+s.a.left:" "+s.a.right);return e.hide?o.createElement(o.Fragment,null):o.createElement(o.Fragment,null,o.createElement("div",{role:"button",className:"".concat(l," ").concat(s.a.button," ").concat(e.className||""),onClick:e.onClick},e.hoverText&&o.createElement("span",{className:"pl-3 pr-2 ".concat(s.a.hoverText)},e.hoverText),o.createElement(c.a,{svgName:a,size:c.b.Medium,className:"svg-container d-inline-block ".concat(s.a.chevron)})),e.useGradientBackdrop&&o.createElement("div",{className:i?s.a.gradientLeft:s.a.gradientRight}),!e.hideExtendedClickableArea&&o.createElement("div",{role:"button",onClick:e.onClick,className:i?s.a.extendedClickableAreaLeft:s.a.extendedClickableAreaRight}))})),p=n(39),y=n(16);function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e,t)||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 d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(e){var t,n,r,o;return{canScrollLeft:(null===(t=e.current)||void 0===t?void 0:t.scrollLeft)>0,canScrollRight:(null===(n=e.current)||void 0===n?void 0:n.scrollLeft)<(null===(r=e.current)||void 0===r?void 0:r.scrollWidth)-(null===(o=e.current)||void 0===o?void 0:o.clientWidth)}}var v=n(1109),m=n.n(v);function g(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,t)}(e)||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 w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return _}));var O=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function C(e){var t,n;return e.column.canSort?i.a.createElement("span",{className:"".concat(m.a.sortIndicator,"\n ").concat(e.column.isSorted?"":"text-muted","\n ").concat(null!==(n=null===(t=e.theme)||void 0===t?void 0:t.sortIndicator)&&void 0!==n?n:"")},i.a.createElement(c.a,{svgName:e.column.isSortedDesc||!e.column.isSorted?u.b.ArrowRight:u.b.ArrowLeft,size:c.b.Small})):i.a.createElement(i.a.Fragment,null)}function j(e){var t,n,r,o,c,u,l,s,f={columns:e.columns,data:e.data,disableSortBy:!e.enableSort,manualSortBy:e.manualSort};e.initialSelectedRowIds&&(f.initialState={selectedRowIds:(l=e.initialSelectedRowIds,s={},l.forEach((function(e){return s[e]=!0})),s)}),e.getRowId&&(f.getRowId=e.getRowId);var y=a.useTable.apply(void 0,[f].concat(g([a.useFlexLayout,a.useSortBy,a.useRowSelect]))),h=y.getTableProps,d=y.getTableBodyProps,b=y.headerGroups,v=y.rows,m=y.prepareRow,w=y.toggleAllRowsSelected,O=y.state.sortBy;return i.a.useEffect((function(){e.onSort&&e.onSort(O)}),[O]),i.a.createElement("div",Object.assign({},h(),{className:null!==(n=null===(t=e.theme)||void 0===t?void 0:t.table)&&void 0!==n?n:""}),i.a.createElement("div",{className:null!==(o=null===(r=e.theme)||void 0===r?void 0:r.header)&&void 0!==o?o:""},b.map((function(t){var n,r;return i.a.createElement("div",Object.assign({},t.getHeaderGroupProps(),{className:null!==(r=null===(n=e.theme)||void 0===n?void 0:n.headerRow)&&void 0!==r?r:""}),t.headers.map((function(t){var n,r;return i.a.createElement("div",Object.assign({},t.getHeaderProps(t.getSortByToggleProps()),{className:null!==(r=null===(n=e.theme)||void 0===n?void 0:n.headerCell)&&void 0!==r?r:""}),t.render("Header",{renderSortIndicator:function(){return i.a.createElement(C,{column:t,theme:e.theme})}}),!t.hideSortIndicator&&i.a.createElement(C,{column:t,theme:e.theme}))})))}))),i.a.createElement("div",Object.assign({},d(),{className:null!==(u=null===(c=e.theme)||void 0===c?void 0:c.body)&&void 0!==u?u:""}),v.map((function(t){var n,r,o,a;m(t);var c=null!==(r=null===(n=e.theme)||void 0===n?void 0:n.row)&&void 0!==r?r:"";t.isSelected&&(null===(o=e.theme)||void 0===o?void 0:o.selectedRow)&&(c+=" ".concat(null===(a=e.theme)||void 0===a?void 0:a.selectedRow)),e.onSelectRow&&(c+=" cursor-pointer");var u=!!e.getRowAppLink&&e.getRowAppLink(t);function l(){return t.cells.map((function(t){var n,r,o=null!==(r=null===(n=e.theme)||void 0===n?void 0:n.cell)&&void 0!==r?r:"";return e.onSelectCell&&(o+=" cursor-pointer"),i.a.createElement("div",Object.assign({},t.getCellProps(),{className:o,onClick:function(){e.onSelectCell&&e.onSelectCell(t)}}),t.render("Cell"))}))}return u?i.a.createElement(p.a,Object.assign({},t.getRowProps(),{className:c,appLink:u}),l()):i.a.createElement("div",Object.assign({},t.getRowProps(),{className:c,onClick:function(){e.onSelectRow&&(e.allowSelectMultipleRows||w(!1),e.onSelectRow(t),t.toggleRowSelected(!0))},onMouseOver:e.onRowMouseOver&&function(){return e.onRowMouseOver(t)},onMouseLeave:e.onRowMouseLeave&&function(){return e.onRowMouseLeave(t)}}),l())}))))}function _(e){var t=e.enableSlider,n=e.scrollIncrement,o=O(e,["enableSlider","scrollIncrement"]),a=function(){var e=i.a.useRef(),t=h(i.a.useState(b(e)),2),n=t[0],r=t[1];function o(){r(b(e))}return i.a.useEffect((function(){if(e.current){var t=y.a.throttle(o,200);return r(b(e)),e.current.addEventListener("scroll",t),function(){e.current.removeEventListener("scroll",t)}}}),[e.current]),{ref:e,scrollState:n,scroll:function(t){var n;null===(n=e.current)||void 0===n||n.scrollBy({left:t,top:0,behavior:"smooth"})}}}(),c=a.ref,u=a.scrollState,l=a.scroll;if(!t)return i.a.createElement(j,Object.assign({},o));function s(e){c.current&&l(n*("right"===e?1:-1))}return i.a.createElement("div",{className:"mx-n3 overflow-hidden-x"},i.a.createElement("div",{className:"px-3"},i.a.createElement("div",{className:"position-relative"},i.a.createElement(f,{direction:r.Left,onClick:function(){return s("left")},hide:!u.canScrollLeft}),i.a.createElement("div",{className:m.a.scrollContainer,ref:c},i.a.createElement(j,Object.assign({},o))),i.a.createElement(f,{direction:r.Right,onClick:function(){return s("right")},hide:!u.canScrollRight}))))}_.defaultProps={scrollIncrement:250}},1107:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(105),o=n(1084);function i(e,t){return Object.assign(Object.assign({},e),{topicAnalyticsType:t,query:"cover"})}var a={topTopics:function(e,t,n,a,c){return{url:r.a.urlBuilder("{gateway}/v1/analytics/topics/top",i(e,t)),key:Object(o.a)("top:topics:".concat(t),e),success:n,error:a,always:c}},viewsByTopic:function(e,t,n,a,c){return{url:r.a.urlBuilder("{gateway}/v1/analytics/topics/count",i(e,t)),key:Object(o.a)("views:topics:".concat(t),e),normalize:!1,success:n,error:a,always:c}}}},1108:function(e,t,n){e.exports={left:"_789pr",right:"_1P8qt",button:"_24q_F",hoverText:"p-vNG",chevron:"_3M27X",gradientLeft:"_3fkiw",gradientRight:"_2RDDy",extendedClickableAreaRight:"_13dgy",extendedClickableAreaLeft:"_37LtK",videoTopPos:"_1XTRO",topPos:"_3_p_J"}},1109:function(e,t,n){e.exports={sortIndicator:"_2fe85",scrollContainer:"_1CRya"}},1110:function(e,t,n){e.exports={table:"_3XPjZ",header:"_1hiMB"}},1112:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0),o=n(42),i=n(43);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){var t=a(Object(o.a)(i.a.HEADER_ACTIONS),2)[1];Object(r.useEffect)((function(){return t(e),function(){t(null)}}),[!!e])}},1115:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(7),a=n(20),c=n(18),u=n(42),l=n(1101),s=n(43);function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e,t)||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 p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var y=i.a.encloseNamespace("reportsShared.anonymiseAction");function h(){var e=f(Object(u.a)(s.a.ANONYMISE_USERS,!1),2),t=e[0],n=e[1];return o.a.createElement("div",{className:"d-flex align-items center justify-content-between",onClick:function(){return n(!t)}},o.a.createElement("span",{className:"mr-3"},y("hideNames")),o.a.createElement(l.a,{on:t,onClick:function(){}}))}var d=n(1091),b=n(289);n.d(t,"a",(function(){return m}));var v=i.a.encloseNamespace("reportsShared.utils");function m(e){var t=Object(d.a)(b.a.getPrimaryObjectUrl);if(e){var n=[];return t&&n.push({label:function(){return o.a.createElement("span",{className:"d-flex justify-content-between align-items-center"},o.a.createElement("span",{className:"mr-2"},v("seeVideo")),o.a.createElement(a.a,{svgName:c.b.NewWindow}))},href:t(e),openInNewTab:!0}),n.push({label:function(){return o.a.createElement(h,null)}}),n}}},1116:function(e,t,n){"use strict";var r,o=n(0),i=n(123),a=n(291),c=n(57),u=n(39),l=n(1102),s=n(242);!function(e){e.Draft="Draft",e.ComingSoon="ComingSoon",e.Published="Published"}(r||(r={}));var f=n(3),p=n(1130),y=n.n(p);n.d(t,"a",(function(){return v}));var h=function(e){var t=e.name,n=e.multiline,r="".concat(y.a.comingSoonPanel," \n d-flex flex-column align-items-center justify-content-center px-3 text-center"),i="";return n?i+=" ".concat(y.a.clamped," clamp-2"):(r+=" text-nowrap",i+=" text-truncate"),o.createElement("div",{className:r},o.createElement("small",{className:"text-muted"},o.createElement(s.b,{namespace:"shared.subjectWidgetItem",phrase:"comingSoon"})),o.createElement("p",{className:"".concat(y.a.name," h6 pb-1")},o.createElement("span",{className:i},t)))},d=function(e){var t=e.name,n=e.multiline,r="px-3 text-center d-flex align-items-center",i="".concat(y.a.name," h6");return n?i+=" ".concat(y.a.clamped," clamp-2 text-left"):(r+=" text-nowrap text-truncate",i+=" text-truncate"),o.createElement("div",{className:r},o.createElement("p",{className:i},t))};function b(e){var t,n,i=(null===(t=e.data)||void 0===t?void 0:t.status)===r.ComingSoon,u=a.a.createUrl(null===(n=e.data.cover)||void 0===n?void 0:n.url,{size:c.a.Small});return o.createElement("div",{className:"border d-flex position-relative ".concat(y.a.widgetItem),id:e.data.id},o.createElement("div",{className:"".concat(y.a.imagePanel," ").concat(e.isLarge?y.a.large:"")},o.createElement("div",{className:y.a.image,style:{backgroundImage:"url('".concat(u,"')")}}),o.createElement(l.a,{type:l.b.Subject,extraClasses:e.isLarge?y.a.large:""})),i?o.createElement(h,{name:e.data.name,multiline:e.isLarge}):o.createElement(d,{name:e.data.name,multiline:e.isLarge}))}var v=o.memo((function(e){var t,n,a,c,l=!!e.appLink&&Object.assign(Object.assign({},e.appLink),{args:[e.data.id,i.a.slugify(e.data.name)]}),s=(null===(t=e.data)||void 0===t?void 0:t.status)===r.ComingSoon,p=Object.assign(Object.assign({},e.analyticsData),{id:null===(n=e.data)||void 0===n?void 0:n.id,name:null===(a=e.data)||void 0===a?void 0:a.name,presentationId:null===(c=e.data)||void 0===c?void 0:c.presentationId,comingSoon:!!s}),y=Object.assign(Object.assign({},e.analyticsOptions),{actionType:f.UserAction.Click,entity:f.EntityType.Classification,descriptor:f.ClickDescriptor.Cover});return l?o.createElement(u.a,{appLink:l,analyticsData:p,analyticsOptions:y},o.createElement(b,{data:e.data,isLarge:e.isLarge})):o.createElement(b,{data:e.data,isLarge:e.isLarge})}))},1119:function(e,t,n){e.exports={baseFallbackContainer:"_3jl1L",svgFallbackContainer:"_2rOm2",subjectFallbackContainer:"nDJRl",videoFallback:"_2GQyA",playlistFallback:"JI1jg",posterFallback:"_1YnF6",subjectFallback:"p7JWY",fallbackThumbnailImage:"_2Av0B"}},1120:function(e,t,n){"use strict";function r(e){var t=[];return Object.keys(e).forEach((function(n){var r=e[n];r&&t.push("".concat(n,":").concat(Array.isArray(r)?r.join(","):r))})),t.join(":")}n.d(t,"a",(function(){return r}))},1121:function(e,t,n){"use strict";n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return m}));var r=n(0),o=n.n(r),i=n(1251),a=n.n(i),c=n(242),u=n(1135),l=n(1197),s=n.n(l);function f(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e)||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 p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var y=a.a.scale(["#daf07d","#08bd1a"]),h=[0,.01,.25,.5,.75,1];function d(e,t){return e?y(e/t).hex():"#f1f1f1"}function b(e,t){for(var n=[],r=0;r<e.length;r++){var o=r>0&&e[r-1],i=e[r],a=r<e.length-1&&e[r+1];i===o&&i===a||n.push("".concat(d(i,t)," ").concat(100/e.length*r,"%"))}return"linear-gradient(to right, ".concat(n.join(","),")")}function v(){var e=Math.max.apply(Math,h),t=100/h.length;return o.a.createElement("div",{className:"d-flex justify-content-between w-100"},o.a.createElement(c.b,{namespace:"shared.engagementHeatMap",phrase:"less"}),o.a.createElement("div",{className:"d-flex mx-1 flex-grow-1 ".concat(s.a.legend)},h.map((function(n,r){return o.a.createElement("div",{key:r,style:{width:"".concat(t,"%"),backgroundColor:d(n,e)}})}))),o.a.createElement(c.b,{namespace:"shared.engagementHeatMap",phrase:"more"}))}function m(e){var t,n,r=Object(u.a)(e.engagement),i=null!==(t=e.max)&&void 0!==t?t:Math.max.apply(Math,f(r));return o.a.createElement("div",{className:"border rounded ".concat(s.a.heatMap," ").concat(null!==(n=e.className)&&void 0!==n?n:""),style:{background:b(r,i)}})}},1122:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(129),a=n(1123);function c(e){if(e)return(e=function(e){if(e)return e.replace(/<a.*?>/g,"").replace("</a>","")}(e=function(e){if(e)return e.replace(/<p>/g,"").replace(/<\/p>/g,"<br>")}(e=function(e,t){if(e&&t)return t.forEach((function(t){e=e.replace("<"+t+">","").replace("</"+t+">","")})),e}(e,["b","i","u","ul","li","old"])))).split("<br>")[0]||"Annotation"}function u(e){var t=a.a.getTypeInfo(e.interaction.typeId),n=t.name,r=t.bgClassName,u=t.Svg,l=e.questionNumber?"".concat(e.questionNumber,". "):"",s="interaction-type-icon ".concat(r);return e.smallIcon&&(s+=" sm"),(e.showQuestion||e.showTypeName)&&(s+=e.smallIcon?" mr-1":" mr-2"),e.iconClassName&&(s+=" ".concat(e.iconClassName)),o.a.createElement(o.a.Fragment,null,!!e.showIcon&&o.a.createElement("span",{className:s},o.a.createElement(u,null)),!!e.showTypeName&&o.a.createElement("span",{className:e.typeNameClassName},o.a.createElement("strong",null,l,n)),!!e.showQuestion&&o.a.createElement("span",{className:e.questionClassName},e.interaction.typeId===i.InteractionTypeId.Annotation?o.a.createElement("span",{dangerouslySetInnerHTML:{__html:c(e.interaction.data.annotation)}}):e.interaction.name))}n.d(t,"a",(function(){return u})),u.defaultProps={showIcon:!0,showQuestion:!0}},1123:function(e,t,n){"use strict";var r=n(4),o=n(7),i=n(0),a=n.n(i);function c(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("g",{transform:"translate(1.000000, 1.000000)"},a.a.createElement("g",{transform:"translate(5.000000, 3.000000)"},a.a.createElement("path",{d:"M5.129,4.52970994e-14 C5.80434375,4.52970994e-14 6.35378125,0.5494375 6.35378125,1.22478125 L6.35378125,1.22478125 L6.35378125,4.12053125 C6.35378125,4.795875 5.80434375,5.3453125 5.129,5.3453125 L5.129,5.3453125 L5.01765625,5.3453125 L5.01765625,5.7625625 C5.14371875,5.7230625 5.2778125,5.70175 5.4166875,5.70175 C5.8579375,5.70175 6.24996875,5.9166875 6.4935,6.24740625 C6.6880625,6.13675 6.9129375,6.0735 7.15228125,6.0735 C7.61575,6.0735 8.024875,6.31059375 8.26471875,6.6699375 C8.450875,6.57140625 8.6629375,6.51559375 8.88784375,6.51559375 C9.6248125,6.51559375 10.2244688,7.11515625 10.2244688,7.85209375 L10.2244688,7.85209375 L10.2239688,11.0194063 C10.22375,12.719125 9.73003125,14.3683438 8.79625,15.7887188 C8.7095625,15.9205625 8.562375,15.9999688 8.4045625,15.9999688 L8.4045625,15.9999688 L3.1323125,15.9999688 C3.0124375,15.9999688 2.897125,15.9540625 2.8100625,15.8716563 C2.80745313,15.8691864 2.80274841,15.8647056 2.79608533,15.8582606 L2.73370254,15.7963915 C2.38498908,15.4434944 0.983540179,13.9211451 0.6698125,11.95725 L0.6698125,11.95725 L0.0538125,9.3209375 C-0.03209375,8.95328125 0.043625,8.5848125 0.261625,8.3100625 C0.46915625,8.04846875 0.78865625,7.89309375 1.14465625,7.8788125 C1.47575,7.8150625 1.81340625,7.8773125 2.10134375,8.0561875 C2.19071875,8.1116875 2.272125,8.17646875 2.34459375,8.24915625 L2.34459375,8.24915625 L2.34459375,5.34534375 L2.23325,5.34534375 C1.55790625,5.34534375 1.00846875,4.79590625 1.00846875,4.1205625 L1.00846875,4.1205625 L1.00846875,1.22478125 C1.00846875,0.5494375 1.55790625,4.52970994e-14 2.23325,4.52970994e-14 L2.23325,4.52970994e-14 Z M3.6810625,3.4381875 C3.46103125,3.4381875 3.282,3.61721875 3.282,3.83725 L3.282,3.83725 L3.282,11.2870938 C3.282,11.4215625 3.22428125,11.5495625 3.12346875,11.6385313 C3.02265625,11.7275 2.88853125,11.7689063 2.7550625,11.7522188 L2.7550625,11.7522188 L2.7175,11.7475313 C2.5228125,11.7231875 2.36390625,11.580125 2.31925,11.3890625 L2.31925,11.3890625 L1.78459375,9.10071875 C1.76034375,8.9969375 1.69715625,8.9088125 1.60659375,8.8525625 C1.51603125,8.7963125 1.407,8.78928125 1.30065625,8.79571875 C1.2585,8.79828125 1.23959375,8.8036875 1.194,8.80803125 C1.10340625,8.81665625 1.035625,8.84275 0.996,8.89271875 C0.956375,8.9426875 0.94596875,9.019 0.96665625,9.107625 L0.96665625,9.107625 L1.58653125,11.7605625 C1.5891875,11.7719063 1.59140625,11.7833438 1.59321875,11.794875 C1.83815625,13.3630313 2.95146875,14.6606563 3.32925,15.0625 L3.32925,15.0625 L8.1469375,15.0625 C8.893,13.8445 9.28625,12.4519688 9.2864375,11.0193125 L9.2864375,11.0193125 L9.2869375,7.85203125 C9.2869375,7.63209375 9.10790625,7.4530625 8.887875,7.4530625 C8.66784375,7.4530625 8.4888125,7.63209375 8.4888125,7.852125 L8.4888125,7.852125 L8.4888125,8.61359375 C8.4888125,8.87246875 8.2789375,9.08234375 8.0200625,9.08234375 C7.7611875,9.08234375 7.5513125,8.87246875 7.5513125,8.61359375 L7.5513125,8.61359375 L7.5513125,7.4100625 C7.5513125,7.19003125 7.3723125,7.011 7.15228125,7.011 C6.93225,7.011 6.75321875,7.19003125 6.75321875,7.4100625 L6.75321875,7.4100625 L6.75321875,8.28625 C6.75321875,8.545125 6.54334375,8.755 6.28446875,8.755 C6.02559375,8.755 5.81571875,8.545125 5.81571875,8.28625 L5.81571875,8.28625 L5.81571875,7.0383125 C5.81571875,6.81828125 5.6366875,6.63928125 5.41665625,6.63928125 C5.196625,6.63928125 5.017625,6.81828125 5.017625,7.0383125 L5.017625,7.0383125 L5.017625,8.232875 C5.017625,8.49175 4.80775,8.701625 4.548875,8.701625 C4.29,8.701625 4.080125,8.49175 4.080125,8.232875 L4.080125,8.232875 L4.080125,3.83725 C4.080125,3.61721875 3.90109375,3.4381875 3.6810625,3.4381875 Z M11.131,-1.59872116e-14 C11.8064063,-1.59872116e-14 12.3558125,0.5494375 12.3558125,1.22478125 L12.3558125,1.22478125 L12.3558125,4.1205625 C12.3558125,4.79590625 11.806375,5.34534375 11.131,5.34534375 L11.131,5.34534375 L8.23525,5.34534375 C7.55990625,5.34534375 7.01046875,4.79590625 7.01046875,4.1205625 L7.01046875,4.1205625 L7.01046875,1.22478125 C7.01046875,0.5494375 7.55990625,-1.59872116e-14 8.23525,-1.59872116e-14 L8.23525,-1.59872116e-14 Z M11.1310313,0.9375 L8.23528125,0.9375 C8.076875,0.9375 7.948,1.066375 7.948,1.22478125 L7.948,1.22478125 L7.948,4.1205625 C7.948,4.27896875 8.076875,4.40784375 8.23528125,4.40784375 L8.23528125,4.40784375 L11.1310313,4.40784375 C11.2894375,4.40784375 11.4183438,4.27896875 11.4183438,4.1205625 L11.4183438,4.1205625 L11.4183438,1.22478125 C11.4183438,1.066375 11.2894375,0.9375 11.1310313,0.9375 L11.1310313,0.9375 Z M5.129,0.9375 L2.23325,0.9375 C2.07484375,0.9375 1.94596875,1.066375 1.94596875,1.22478125 L1.94596875,1.22478125 L1.94596875,4.1205625 C1.94596875,4.27896875 2.07484375,4.40784375 2.2331875,4.40784375 L2.2331875,4.40784375 L2.34453125,4.40784375 L2.34453125,3.83721875 C2.34453125,3.10025 2.944125,2.50065625 3.68109375,2.50065625 C4.4180625,2.50065625 5.01765625,3.10025 5.01765625,3.83721875 L5.01765625,3.83721875 L5.01765625,4.40784375 L5.129,4.40784375 C5.28740625,4.40784375 5.41628125,4.27896875 5.41628125,4.1205625 L5.41628125,4.1205625 L5.41628125,1.22478125 C5.41628125,1.066375 5.28740625,0.9375 5.129,0.9375 L5.129,0.9375 Z"}))))}function u(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("g",{transform:"translate(1.000000, 1.000000)"},a.a.createElement("path",{d:"M16.5547082,3.66666667 C17.0307547,3.66666667 17.4166667,4.10561087 17.4166667,4.65176211 L17.4166667,17.3482379 C17.4166667,17.8922911 17.0325905,18.3333333 16.5547082,18.3333333 L5.44529184,18.3333333 C4.9692453,18.3333333 4.58333333,17.8943891 4.58333333,17.3482379 L4.58333333,4.65176211 C4.58333333,4.10770892 4.96740951,3.66666667 5.44529184,3.66666667 L16.5547082,3.66666667 Z M6.64149485,4.58362946 L5.39188119,4.58333333 L5.39188119,4.58333333 L5.39140886,4.63124366 C5.39133174,4.64701901 5.39125542,4.66659213 5.39117991,4.68981696 L5.39052172,4.99349248 C5.39045096,5.0373129 5.39038099,5.08434682 5.39031181,5.13444817 L5.38951907,5.87355262 C5.38945612,5.94585631 5.38939393,6.02064317 5.38933252,6.09776711 L5.38846857,7.41164942 C5.38841476,7.50849255 5.38836171,7.60694243 5.3883094,7.706853 L5.38744819,9.63144592 C5.38740476,9.7436262 5.38736207,9.85639075 5.3873201,9.96959351 L5.38636125,13.0260679 C5.38633211,13.1353268 5.38630366,13.2437094 5.38627591,13.3510694 L5.38541667,17.4092786 L5.38541667,17.4092786 C5.38541667,17.4094727 5.40139773,17.4096625 5.43215374,17.4098483 L5.66621602,17.410657 C5.70239956,17.4107438 5.74182455,17.4108296 5.78434021,17.4109144 L6.24635879,17.4116506 C6.30606164,17.4117294 6.36840286,17.4118072 6.43323171,17.411884 L7.07978636,17.412549 C7.15818403,17.4126199 7.23861702,17.4126899 7.32093458,17.4127589 L8.38955516,17.4135407 C8.48453695,17.413602 8.58080025,17.4136624 8.67819428,17.4137218 L10.2050643,17.4145426 C10.3099966,17.4145926 10.4153058,17.4146418 10.5208411,17.41469 L12.7186143,17.4155682 C12.8199282,17.4156037 12.9204129,17.4156383 13.0199177,17.4156721 L16.5962838,17.4166643 C16.6041235,17.4166659 16.6081188,17.4166667 16.6081188,17.4166667 L16.6083574,17.404543 L16.6083574,17.404543 L16.6092636,17.1281822 C16.609336,17.0909349 16.6094075,17.0503279 16.6094783,17.0065075 L16.6102897,16.3357629 C16.6103542,16.2685716 16.610418,16.1987511 16.6104809,16.1264474 L16.6111995,15.1489598 C16.6112564,15.059128 16.6113124,14.9673972 16.6113678,14.8739137 L16.6122825,13.0334559 C16.6123288,12.924197 16.6123745,12.8140617 16.6124193,12.703196 L16.6132553,10.3177583 C16.6132901,10.2038252 16.6133242,10.0901843 16.6133575,9.97698153 L16.6143069,6.10515513 C16.6143225,6.02803119 16.6143373,5.95324434 16.6143515,5.88094064 L16.6145833,4.59072136 L16.6145833,4.59072136 L16.6027483,4.59043343 L16.6027483,4.59043343 L16.5107818,4.58987601 C16.4881671,4.58978515 16.4620094,4.5896953 16.4324595,4.58960647 L16.0789915,4.58883422 C16.0304453,4.58875142 15.9789591,4.58866963 15.9246838,4.58858883 L15.1491499,4.58766678 C15.0749737,4.58759388 14.9986113,4.58752196 14.9202136,4.58745101 L14.1637515,4.58683864 C14.0744988,4.5867735 13.983663,4.58670932 13.891395,4.58664609 L12.4188002,4.58576887 C12.3159787,4.5857151 12.2124787,4.58566226 12.108451,4.58561036 L10.2115288,4.58477559 C10.1065966,4.58473469 10.0020412,4.58469469 9.89801354,4.5846556 L6.8573146,4.58368638 C6.78313834,4.58366655 6.71114817,4.58364758 6.64149485,4.58362946 Z M9.80280172,11.9166667 C10.0210177,11.9166667 10.1979167,12.1218695 10.1979167,12.375 C10.1979167,12.6281305 10.0210177,12.8333333 9.80280172,12.8333333 L9.80280172,12.8333333 L7.38469828,12.8333333 C7.16648232,12.8333333 6.98958333,12.6281305 6.98958333,12.375 C6.98958333,12.1218695 7.16648232,11.9166667 7.38469828,11.9166667 L7.38469828,11.9166667 Z M14.5678761,9.16666667 C14.8122845,9.16666667 15.0104167,9.37186949 15.0104167,9.625 C15.0104167,9.87813051 14.8122845,10.0833333 14.5678761,10.0833333 L14.5678761,10.0833333 L7.4321239,10.0833333 C7.18771549,10.0833333 6.98958333,9.87813051 6.98958333,9.625 C6.98958333,9.37186949 7.18771549,9.16666667 7.4321239,9.16666667 L7.4321239,9.16666667 Z M14.5678761,6.41666667 C14.8122845,6.41666667 15.0104167,6.62186949 15.0104167,6.875 C15.0104167,7.12813051 14.8122845,7.33333333 14.5678761,7.33333333 L14.5678761,7.33333333 L7.4321239,7.33333333 C7.18771549,7.33333333 6.98958333,7.12813051 6.98958333,6.875 C6.98958333,6.62186949 7.18771549,6.41666667 7.4321239,6.41666667 L7.4321239,6.41666667 Z"})))}function l(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("g",{transform:"translate(2.000000, 2.000000)"},a.a.createElement("g",{transform:"translate(3.500000, 2.000000)"},a.a.createElement("path",{d:"M10.78125,7.53125 C11.0285625,7.53125 11.2715937,7.59621875 11.4840312,7.71909375 C11.7963125,7.89971875 12.1875,7.6735625 12.1875,7.31334375 L12.1875,3.3125 C12.1875,3.053625 11.977625,2.84375 11.71875,2.84375 L8.38675,2.84375 C8.42015625,2.680125 8.4375,2.51184375 8.4375,2.34375 C8.4375,1.05140625 7.38609375,0 6.09375,0 C4.80140625,0 3.75,1.05140625 3.75,2.34375 C3.75,2.51184375 3.76734375,2.680125 3.80075,2.84375 L0.46875,2.84375 C0.209875,2.84375 0,3.053625 0,3.3125 L0,7.31334375 C0,7.674125 0.391625,7.899375 0.70346875,7.71909375 C0.91590625,7.59621875 1.1589375,7.53125 1.40625,7.53125 C2.18165625,7.53125 2.8125,8.16209375 2.8125,8.9375 C2.8125,9.71290625 2.18165625,10.34375 1.40625,10.34375 C1.1589375,10.34375 0.91590625,10.2787812 0.70346875,10.1559062 C0.3911875,9.9753125 0,10.2013437 0,10.5616563 L0,15.53125 C0,15.790125 0.209875,16 0.46875,16 L4.46959375,16 C4.8303125,16 5.05578125,15.608375 4.8753125,15.2965312 C4.7524375,15.0840937 4.6875,14.8410938 4.6875,14.59375 C4.6875,13.8183438 5.31834375,13.1875 6.09375,13.1875 C6.86915625,13.1875 7.5,13.8183438 7.5,14.59375 C7.5,14.8410938 7.4350625,15.0840937 7.31215625,15.2965312 C7.13146875,15.6087812 7.3576875,16 7.717875,16 L11.71875,16 C11.977625,16 12.1875,15.790125 12.1875,15.53125 L12.1875,10.5616563 C12.1875,10.2009375 11.7959375,9.97553125 11.4840312,10.1559063 C11.2715937,10.2787812 11.0285625,10.34375 10.78125,10.34375 C10.0058438,10.34375 9.375,9.71290625 9.375,8.9375 C9.375,8.16209375 10.0058438,7.53125 10.78125,7.53125 Z M10.78125,11.28125 C10.9393125,11.28125 11.096375,11.2652812 11.25,11.234 L11.25,15.0625 L8.39021875,15.0625 C8.42153125,14.9088438 8.4375,14.7518125 8.4375,14.59375 C8.4375,13.3014062 7.38609375,12.25 6.09375,12.25 C4.80140625,12.25 3.75,13.3014062 3.75,14.59375 C3.75,14.7518125 3.76596875,14.9088438 3.79728125,15.0625 L0.9375,15.0625 L0.9375,11.234 C1.091125,11.2652812 1.2481875,11.28125 1.40625,11.28125 C2.69859375,11.28125 3.75,10.2298438 3.75,8.9375 C3.75,7.64515625 2.69859375,6.59375 1.40625,6.59375 C1.2481875,6.59375 1.091125,6.60971875 0.9375,6.641 L0.9375,3.78125 L4.46959375,3.78125 C4.8303125,3.78125 5.05578125,3.389625 4.8753125,3.07778125 C4.75596875,2.87140625 4.6875,2.603875 4.6875,2.34375 C4.6875,1.56834375 5.31834375,0.9375 6.09375,0.9375 C6.86915625,0.9375 7.5,1.56834375 7.5,2.34375 C7.5,2.603875 7.43153125,2.87140625 7.31215625,3.07778125 C7.13146875,3.39003125 7.3576875,3.78125 7.717875,3.78125 L11.25,3.78125 L11.25,6.641 C11.096375,6.60971875 10.9393125,6.59375 10.78125,6.59375 C9.48890625,6.59375 8.4375,7.64515625 8.4375,8.9375 C8.4375,10.2298438 9.48890625,11.28125 10.78125,11.28125 Z"}))))}function s(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("g",{transform:"translate(1.000000, 1.000000)"},a.a.createElement("path",{d:"M15.125,3.66666667 C16.8969136,3.66666667 18.3333333,5.10308643 18.3333333,6.875 L18.3333333,15.125 C18.3333333,16.8969136 16.8969136,18.3333333 15.125,18.3333333 L6.875,18.3333333 C5.10308643,18.3333333 3.66666667,16.8969136 3.66666667,15.125 L3.66666667,6.875 C3.66666667,5.10308643 5.10308643,3.66666667 6.875,3.66666667 L15.125,3.66666667 Z M15.125,4.58333333 L6.875,4.58333333 C5.60934745,4.58333333 4.58333333,5.60934745 4.58333333,6.875 L4.58333333,15.125 C4.58333333,16.3906526 5.60934745,17.4166667 6.875,17.4166667 L15.125,17.4166667 C16.3906526,17.4166667 17.4166667,16.3906526 17.4166667,15.125 L17.4166667,6.875 C17.4166667,5.60934745 16.3906526,4.58333333 15.125,4.58333333 Z M7.33333333,13.2916667 C7.83959435,13.2916667 8.25,13.7020723 8.25,14.2083333 C8.25,14.7145944 7.83959435,15.125 7.33333333,15.125 C6.82707231,15.125 6.41666667,14.7145944 6.41666667,14.2083333 C6.41666667,13.7020723 6.82707231,13.2916667 7.33333333,13.2916667 Z M15.0349223,13.75 C15.2880528,13.75 15.4932556,13.9552028 15.4932556,14.2083333 C15.4932556,14.4614638 15.2880528,14.6666667 15.0349223,14.6666667 L9.625,14.6666667 C9.37186949,14.6666667 9.16666667,14.4614638 9.16666667,14.2083333 C9.16666667,13.9552028 9.37186949,13.75 9.625,13.75 L15.0349223,13.75 Z M7.33333333,10.0833333 C7.83959435,10.0833333 8.25,10.493739 8.25,11 C8.25,11.506261 7.83959435,11.9166667 7.33333333,11.9166667 C6.82707231,11.9166667 6.41666667,11.506261 6.41666667,11 C6.41666667,10.493739 6.82707231,10.0833333 7.33333333,10.0833333 Z M15.125,10.5416667 C15.3781305,10.5416667 15.5833333,10.7468695 15.5833333,11 C15.5833333,11.2531305 15.3781305,11.4583333 15.125,11.4583333 L9.625,11.4583333 C9.37186949,11.4583333 9.16666667,11.2531305 9.16666667,11 C9.16666667,10.7468695 9.37186949,10.5416667 9.625,10.5416667 L15.125,10.5416667 Z M7.33333333,6.875 C7.83959435,6.875 8.25,7.28540565 8.25,7.79166667 C8.25,8.29792769 7.83959435,8.70833333 7.33333333,8.70833333 C6.82707231,8.70833333 6.41666667,8.29792769 6.41666667,7.79166667 C6.41666667,7.28540565 6.82707231,6.875 7.33333333,6.875 Z M15.125,7.33333333 C15.3781305,7.33333333 15.5833333,7.53853616 15.5833333,7.79166667 C15.5833333,8.04479718 15.3781305,8.25 15.125,8.25 L9.625,8.25 C9.37186949,8.25 9.16666667,8.04479718 9.16666667,7.79166667 C9.16666667,7.53853616 9.37186949,7.33333333 9.625,7.33333333 L15.125,7.33333333 Z"})))}function f(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("path",{d:"M19,5 C19.5522847,5 20,5.44771525 20,6 L20,18 C20,18.5522847 19.5522847,19 19,19 L5,19 C4.44771525,19 4,18.5522847 4,18 L4,6 C4,5.44771525 4.44771525,5 5,5 L19,5 Z M19,6 L5,6 L5,18 L19,18 L19,6 Z M13.5270821,8.72788029 L17.419465,14.7278803 C17.5697525,14.9595444 17.5037838,15.2691774 17.2721197,15.419465 C17.0404556,15.5697525 16.7308226,15.5037838 16.580535,15.2721197 L13.0911139,9.89327406 L11.4091273,12.2874279 C11.2306031,12.5415408 10.866042,12.5731488 10.6464466,12.3535534 L10.0540971,11.7612039 L7.4,15.3 C7.23431458,15.5209139 6.9209139,15.5656854 6.7,15.4 C6.4790861,15.2343146 6.43431458,14.9209139 6.6,14.7 L9.6,10.7 C9.7825648,10.4565803 10.1383987,10.4312919 10.3535534,10.6464466 L10.9328729,11.2257661 L12.6984898,8.71257207 C12.9021272,8.42271292 13.3342903,8.43069712 13.5270821,8.72788029 Z M8,7.5 C8.82842712,7.5 9.5,8.17157288 9.5,9 C9.5,9.82842712 8.82842712,10.5 8,10.5 C7.17157288,10.5 6.5,9.82842712 6.5,9 C6.5,8.17157288 7.17157288,7.5 8,7.5 Z M8,8.5 C7.72385763,8.5 7.5,8.72385763 7.5,9 C7.5,9.27614237 7.72385763,9.5 8,9.5 C8.27614237,9.5 8.5,9.27614237 8.5,9 C8.5,8.72385763 8.27614237,8.5 8,8.5 Z"}))}function p(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("g",{transform:"translate(1.000000, 1.000000)"},a.a.createElement("path",{d:"M15.0505278,14.68561 L15.4700891,14.1696106 C16.3000604,13.1488666 16.7599031,11.8782117 16.7599031,10.5341182 C16.7599031,7.34884269 14.1777271,4.76666667 10.9924516,4.76666667 C7.80717602,4.76666667 5.225,7.34884269 5.225,10.5341182 C5.225,13.7193938 7.80717602,16.3015698 10.9924516,16.3015698 C11.8841204,16.3015698 12.744766,16.0998293 13.5263257,15.7168631 L13.9796508,15.4947327 L15.7162646,16.2389957 L15.0505278,14.68561 Z M17.8106022,18.3333333 L14.0103444,16.7046514 C13.0994588,17.1509876 12.0752185,17.4015698 10.9924516,17.4015698 C7.1996628,17.4015698 4.125,14.326907 4.125,10.5341182 C4.125,6.74132946 7.1996628,3.66666667 10.9924516,3.66666667 C14.7852403,3.66666667 17.8599031,6.74132946 17.8599031,10.5341182 C17.8599031,12.175402 17.2841351,13.682208 16.3235621,14.8635731 L17.8106022,18.3333333 Z"})))}var y,h=n(129),d=n(21);function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return g}));var v=o.a.encloseNamespace("shared.interactionTypes"),m=(b(y={},h.InteractionTypeId.Annotation,(function(){return{name:v("annotationName"),bgClassName:"bg-pink",Svg:p,typeName:"annotation"}})),b(y,h.InteractionTypeId.Image,(function(){return{name:v("imageName"),bgClassName:"bg-orange",Svg:f,typeName:"image"}})),b(y,h.InteractionTypeId.MissingWord,(function(){return{name:v("missingWordName"),prompt:v("missingWordPrompt"),bgClassName:"bg-teal",Svg:l,typeName:"missing-word"}})),b(y,h.InteractionTypeId.MultipleChoice,(function(){return{name:v("multipleChoiceName"),prompt:v("multipleChoicePrompt"),bgClassName:"bg-blue",Svg:s,typeName:"multiple-choice"}})),b(y,h.InteractionTypeId.ShortAnswer,(function(){return{name:v("shortAnswerName"),prompt:v("shortAnswerPrompt"),bgClassName:"bg-green",Svg:u,typeName:"short-answer"}})),b(y,h.InteractionTypeId.TrueOrFalse,(function(){return{name:v("trueOrFalseName"),prompt:v("trueOrFalsePrompt"),bgClassName:"bg-purple",Svg:c,typeName:"true-or-false"}})),y),g={getTypeInfo:function(e){var t=m[e];if(t)return t();r.a.ErrorHelper.throw(new d.a("No type info defined for typeId: ".concat(e)))}}},1127:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(0),o=n.n(r),i=n(8),a=n(7),c=n(32),u=n(193),l=n(1080),s=n(1082),f=n(1128),p=n(1076),y=a.a.encloseNamespace("shared.engagementOverviewCard");function h(e){var t,n,r=Object(u.a)(),a=Object(u.b)(),h=!r.users&&!r.classrooms&&!r.classroomGroups,d=i.a.useBasicFetch(!!e.useSharerId&&c.a.currentUser()),b=i.a.useBasicFetch(!!a&&(e.useSharerId?!!d.data&&l.a.aggregateEngagement(e.objectId,a,d.data.id):l.a.aggregateEngagement(e.objectId,a)));Object(p.a)(b);var v=(null===(t=b.data)||void 0===t?void 0:t.engagementRate)>0?b.data.engagementRate:null;return o.a.createElement("div",{className:"d-flex flex-column rounded bg-white p-3 ".concat(null!==(n=e.className)&&void 0!==n?n:"")},o.a.createElement("h3",{className:"h6 mb-2"},y("heading")),o.a.createElement("div",{className:"d-flex align-items-center flex-grow-1\n ".concat("vertical"===e.layout?" flex-column justify-content-center text-center":"")},!!b.data&&o.a.createElement(o.a.Fragment,null,o.a.createElement(s.a,{percentage:v,layout:s.b.LabelInside}),o.a.createElement("p",{className:"horizontal"===e.layout?"ml-2":""},"number"==typeof v?y(h?"descriptionEveryone":"descriptionSome",{percentage:Math.round(100*b.data.engagementRate)}):y("descriptionNoData"))),!b.data&&o.a.createElement(o.a.Fragment,null,o.a.createElement(f.a,{layout:s.b.LabelInside}),"vertical"===e.layout&&o.a.createElement("p",null," "))))}},1128:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=n.n(r),i=n(1082);function a(e){return o.a.createElement(i.a,{layout:e.layout,className:e.className,percentage:0,customLabel:"--%"})}},1130:function(e,t,n){e.exports={widgetItem:"_1oyw1",imagePanel:"_1UOVG",image:"_1_BF4",large:"_1EtWs",comingSoonPanel:"_3js2e",name:"_3csgE",editSubjectsItem:"_1yBMf",allSubjectsItem:"_2oBMH",logoContainer:"T3Lym"}},1135:function(e,t,n){"use strict";function r(e){return new Array(Math.ceil(e.videoDuration)).fill(null).map((function(t,n){return e.heatMap[n]||0}))}n.d(t,"a",(function(){return r}))},1136:function(e,t,n){e.exports={playerContainer:"_1-TM0",playerPlaceholder:"_2Gd0W",heatMapContainer:"_2mepP",heatMap:"_3QIok",heatMapTimepointIndicator:"_3EouS",heatMapTimepointIndicatorVisible:"_1472A",partialLoadingContainer:"_1Z2fg"}},1157:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(38),o={createViewKey:function(e,t,n){var o={mediaId:e.toString(),mediaIdType:t};return n&&(o.shareContextId=n),{url:"/api/player/create-view-key",key:"view:key:".concat(e,":").concat(t),type:r.a.POST,data:o,expiryTime:28800}}}},1158:function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.Share="share",e.MasterObject="masterobject"}(r||(r={}))},1159:function(e){e.exports=JSON.parse('{"a":"0.0.24"}')},1160:function(e,t,n){},1161:function(e,t,n){},1162:function(e,t,n){},1163:function(e,t,n){},1164:function(e,t,n){},1165:function(e,t,n){},1166:function(e,t,n){},1167:function(e,t,n){},1168:function(e,t,n){},1169:function(e,t,n){},1170:function(e,t,n){},1171:function(e,t,n){},1172:function(e,t,n){},1173:function(e,t,n){},1174:function(e,t,n){},1175:function(e,t,n){},1176:function(e,t,n){},1177:function(e,t,n){},1178:function(e,t,n){},1179:function(e,t,n){},1180:function(e,t,n){},1181:function(e,t,n){},1182:function(e,t,n){},1183:function(e,t,n){},1184:function(e,t,n){},1185:function(e,t,n){},1186:function(e,t,n){},1187:function(e,t,n){},1188:function(e,t,n){},1189:function(e,t,n){},1190:function(e,t,n){},1191:function(e,t,n){},1192:function(e,t,n){},1193:function(e,t,n){},1194:function(e,t,n){},1195:function(e,t,n){},1196:function(e,t,n){},1197:function(e,t,n){e.exports={heatMap:"_3eiuN",legend:"_2Ubvw"}},1198:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0),o=n.n(r),i=n(7),a=n(1121),c=n(1136),u=n.n(c),l=i.a.encloseNamespace("shared.videoEngagementOverlay");function s(){return o.a.createElement("div",{className:"bg-white rounded d-flex flex-column justify-content-end p-2 ".concat(u.a.partialLoadingContainer)},o.a.createElement("div",{className:u.a.heatMapContainer},o.a.createElement("div",{className:"position-relative"},o.a.createElement(a.a,{engagement:{heatMap:[],videoDuration:0},className:u.a.heatMap}))),o.a.createElement("div",{className:"d-flex justify-content-between mt-2"},o.a.createElement("strong",null,l("engagement")),o.a.createElement("div",{className:"w-33"},o.a.createElement(a.b,null))))}},1199:function(e,t,n){e.exports={heatMap:"_29m1b"}},1200:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(0),o=n(8),i=n(42),a=n(32),c=n(97),u=n(60),l=n(43),s=n(1080),f=n(193);function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e,t)||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 y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e){var t=(0,Object(c.a)().hasPermissions)(u.a.ViewCustomerAnalytics),n=Object(f.b)(),y=o.a.useBasicFetch(a.a.currentUser()),h=t&&!!y.data&&!!n,d=o.a.useBasicFetch(h&&s.a.individualEngagement(e,{start:null==n?void 0:n.start,end:null==n?void 0:n.end},y.data.id)),b=p(Object(i.a)(l.a.AUDIENCE_FILTER_SUGGESTIONS),2)[1];Object(r.useEffect)((function(){var e;d.data&&b("users",null===(e=d.data)||void 0===e?void 0:e.data.map((function(e){return e.userId})))}),[d.isFetching])}},1203:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(7),a=n(1075),c=(n(1248),n(1159)),u="cv-persisttest",l=function(){try{return window.localStorage.setItem(u,"cv-player-storage-test"),window.localStorage.removeItem(u),!0}catch(e){return!1}},s=function(e){return window.localStorage.getItem(e)},f=function(e,t){window.localStorage.setItem(e,t)},p=function(e){window.localStorage.removeItem(e)};function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=a.a.getPlugin("plugin"),w="cvplayer-mute",O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(i,e);var t,n,r,o=b(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,e)).player.ready((function(){return t.initialize()})),t}return t=i,(n=[{key:"initialize",value:function(){var e=this;if(l()){this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.one("dispose",(function(){e.player.off("volumechange",e.saveVolumeState)}));var t=s("cvplayer-volume"),n=s(w);t&&this.player.volume(+t),n&&this.player.muted("true"===n)}}},{key:"saveVolumeState",value:function(){f("cvplayer-volume",this.player.volume().toString()),f(w,this.player.muted().toString())}}])&&h(t.prototype,n),r&&h(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(g);function C(e){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function j(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E(e);if(t){var o=E(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return P(this,n)}}function P(e,t){if(t&&("object"===C(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}a.a.registerPlugin("persistVolumePlugin",O);var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}(i,e);var t,n,r,o=S(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,e)).hasScreenOrientation()&&t.player.supportsFullScreen()?(t.onRotate=t.onRotate.bind(k(t)),t.onFullscreenChange=t.onFullscreenChange.bind(k(t)),t.player.ready((function(){return t.initialize()})),t):P(t)}return t=i,(n=[{key:"initialize",value:function(){var e=this;window.addEventListener("orientationchange",this.onRotate),this.hasScreenLock()&&this.player.on("fullscreenchange",this.onFullscreenChange),this.one("dispose",(function(){window.removeEventListener("orientationchange",e.onRotate),e.hasScreenLock()&&e.player.off("fullscreenchange",e.onFullscreenChange)}))}},{key:"onFullscreenChange",value:function(){!this.getAngle()&&this.player.isFullscreen()?window.screen.orientation.lock("portrait-primary"):window.screen.orientation.unlock()}},{key:"onRotate",value:function(){var e=this.getAngle();90===e||-90===e||270===e?this.player.requestFullscreen():this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"hasScreenOrientation",value:function(){var e,t;return"function"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.lock)}},{key:"hasScreenLock",value:function(){var e,t;return"function"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.lock)}},{key:"getAngle",value:function(){var e,t;return"number"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.angle)?window.screen.orientation.angle:0}}])&&j(t.prototype,n),r&&j(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));a.a.registerPlugin("fullscreenOnRotatePlugin",T);var R="\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";n(1160);function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=A(e);if(t){var o=A(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return N(this,n)}}function N(e,t){if(t&&("object"===x(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return M(e)}function M(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var D=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B(e,t)}(i,e);var t,n,r,o=I(i);function i(e,t){var n,r,a,c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).update=(r=n.update.bind(M(n)),a=1e3,c=window.performance.now(),function(){var e=window.performance.now();e-c>=a&&(r.apply(void 0,arguments),c=e)}),e.on("timeupdate",n.update),e.one("dispose",(function(){e.off("timeupdate",n.update),n.el_.removeEventListener("click",n.pause)})),n}return t=i,(n=[{key:"update",value:function(){var e=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(e)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var e={innerHTML:R,className:this.buildCSSClass()},t={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=a.a.dom.createEl("a",e,t);return this.createControlTextEl(n),n.addEventListener("click",this.pause.bind(this)),n}},{key:"pause",value:function(){this.player_.pause()}}])&&L(t.prototype,n),r&&L(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Button"));function F(e){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function V(e,t){return(V=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function U(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=q(e);if(t){var o=q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return H(this,n)}}function H(e,t){if(t&&("object"===F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}D.prototype.controlText_="Open in ClickView",a.a.registerComponent("OpenExternallyButton",D);var W=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}(i,e);var t,n,r,o=U(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=i,(n=[{key:"onReady",value:function(){var e=this.player.getChild("collapserator"),t=e.getChild("customControlSpacer"),n=e.children_.indexOf(t);e.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&z(t.prototype,n),r&&z(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));a.a.registerPlugin("openExternallyPlugin",W);n(1161);function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function K(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Q(){return(Q="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Z(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Z(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=X(e)););return e}function $(e,t){return($=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=X(e);if(t){var o=X(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return J(this,n)}}function J(e,t){if(t&&("object"===G(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function X(e){return(X=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$(e,t)}(i,e);var t,n,r,o=Y(i);function i(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e,t)}return t=i,(n=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(Q(X(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Q(X(i.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"setUi",value:function(e,t){var n=this,r=e>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*e,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){n.removeText()}),t)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&K(t.prototype,n),r&&K(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("component"));function te(e){return(te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function re(){return(re="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=oe(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function oe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ue(e)););return e}function ie(e,t){return(ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ue(e);if(t){var o=ue(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ce(this,n)}}function ce(e,t){if(t&&("object"===te(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ue(e){return(ue=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}a.a.registerComponent("TouchControls",ee);var le=a.a.getPlugin("plugin"),se=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ie(e,t)}(i,e);var t,n,r,o=ae(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,e)).doubleTouchCount=0,t.seekStartTime=0,t.directionModifier=0,t.bindFunctions(),t.player.ready((function(){return t.initialize()})),t}return t=i,(n=[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this)}},{key:"initialize",value:function(){var e=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",(function(){e.player.off("ready",e.reBindEventListeners)})),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.on(this.tech,"touchstart",this.onTouchStart),this.on(this.tech,"touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&(this.off(this.tech,"touchstart",this.onTouchStart),this.off(this.tech,"touchend",this.onTouchEnd))}},{key:"dispose",value:function(){re(ue(i.prototype),"dispose",this).call(this),this.unBindEventListeners()}},{key:"onTouchStart",value:function(e){this.touchStartTime=e.timeStamp}},{key:"onTouchEnd",value:function(e){var t=this;if(e.changedTouches.length){if(e.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(e),void(this.lastTouchTime=e.timeStamp);this.resetProperties(),this.lastTouchTime=e.timeStamp,e.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){t.doubleTouchCount||(t.player.paused()?t.player.play():t.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(e){var t=this.player.el().getBoundingClientRect(),n=t.left+t.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),e.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))}}])&&ne(t.prototype,n),r&&ne(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(le);function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}a.a.registerPlugin("touchControls",se);var pe=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=n.id,this.plugin=t,this.source=n,this.enabled=this.enabled.bind(this)}var t,n,r;return t=e,(n=[{key:"enabled",value:function(e){return void 0===e?this.plugin.currentSource===this.source:(e&&this.plugin.setSource(this.source.id),e)}}])&&fe(t.prototype,n),r&&fe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ye(e){return(ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function he(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function de(e,t){return(de=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function be(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=me(e);if(t){var o=me(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ve(this,n)}}function ve(e,t){if(t&&("object"===ye(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function me(e){return(me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ge=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(i,e);var t,n,r,o=be(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e)).options_=t,n.player.ready((function(){return n.initialize()})),n}return t=i,(n=[{key:"initialize",value:function(){this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources)}},{key:"currentSource",get:function(){return this._currentSource}},{key:"setSource",value:function(e){var t=this,n=this.getSourceById(e);if(null===n)return this.currentSource;var r=this.player.currentTime(),o=!this.player.paused();return this._currentSource=n,this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",(function(){t.player.currentTime()!==r&&t.player.currentTime(r),o&&t.player.play()})),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(e){return this.sources.find((function(t){return t.id===e}))}},{key:"sortSources",value:function(e){return e.sort((function(e,t){return e.id===t.id?0:+e.id>+t.id?-1:1}))}},{key:"populateSources",value:function(e){var t=this,n=null;(e=this.sortSources(e)).forEach((function(e){t.qualityLevels.addQualityLevel(new pe(t,e)),t.sources.push(e),t.trigger({event:"addsource",source:e}),e.default&&(n=e)})),null===n&&(n=this.sources[0]),null!==n&&this.setSource(n.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(e){for(var t=this.qualityLevels,n=-1,r=0;r<t.length;r++)if(t[r].id===e.id){n=r;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})}}])&&he(t.prototype,n),r&&he(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));function we(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}a.a.registerPlugin("progressiveFiles",ge);var Oe=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))},Ce=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.name,this.playbackProfile=t.playbackProfile,this.address=new URL(t.httpsAddress)}var t,n,r;return t=e,(n=[{key:"getUrl",value:function(e){return e?this.address+"cache?file="+encodeURIComponent(e):null}},{key:"ping",value:function(){return Oe(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new AbortController,n=setTimeout((function(){return t.abort()}),1e3),e.prev=3,e.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:t.signal});case 6:return r=e.sent,e.next=9,r.text();case 9:return o=e.sent,clearTimeout(n),e.abrupt("return","PONG"===o);case 14:return e.prev=14,e.t0=e.catch(3),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,this,[[3,14]])})))}}])&&we(t.prototype,n),r&&we(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var _e=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(e,t){var n=e.getQualityLevelById(t);if(n||(n=this.getNextBestQuality(e,t)),!n)return null;for(var r=0;r<e.length;r++){var o=e[r];o.enabled=n.id===o.id}return n}},{key:"getNextBestQuality",value:function(e,t){var n=this.getKnownProfiles(),r=n.indexOf(t);if(r>=0){for(var o=r+1;o<n.length;o++){var i=n[o],a=e.getQualityLevelById(i);if(a)return a}for(var c=r-1;c>0;c--){var u=n[c],l=e.getQualityLevelById(u);if(l)return l}}return null}}],(n=null)&&je(t.prototype,n),r&&je(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Pe=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))},ke=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.logger=a.a.log.createLogger("localcache")}var t,n,r;return t=e,(n=[{key:"setSource",value:function(e,t){return Pe(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.player.localCache||void 0===(null==e?void 0:e.src)){n.next=5;break}return n.next=3,this.player.localCache().getActiveLocalCache();case 3:null!==(r=n.sent)&&(this.logger.debug("Using Local Cache",r),e.src=r.getUrl(e.src));case 5:t(null,e);case 6:case"end":return n.stop()}}),n,this)})))}}])&&Se(t.prototype,n),r&&Se(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();a.a.use("*",(function(e){return new ke(e)}));n(1162);function Ee(e){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Re(){return(Re="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=xe(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function xe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Me(e)););return e}function Le(e,t){return(Le=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Be(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Me(e);if(t){var o=Me(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ie(this,n)}}function Ie(e,t){if(t&&("object"===Ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ne(e)}function Ne(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Me(e){return(Me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ae=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))},De='<?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>',Fe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Le(e,t)}(i,e);var t,n,r,o=Be(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).hide(),n.onLocalCacheChange=n.onLocalCacheChange.bind(Ne(n)),e.ready((function(){n.initialize()})),n}return t=i,(n=[{key:"createEl",value:function(){return Re(Me(i.prototype),"createEl",this).call(this,"div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(De,"</div>"),title:"Streaming from ClickView Local Cache"})}},{key:"initialize",value:function(){var e=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){e.localCachePlugin.off("localcachechanged",e.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return Ae(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.localCachePlugin.getActiveLocalCache();case 2:e.sent?this.show():this.hide();case 4:case"end":return e.stop()}}),e,this)})))}}])&&Te(t.prototype,n),r&&Te(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));function ze(e){return(ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ue(){return(Ue="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=He(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function He(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Qe(e)););return e}function qe(e,t){return(qe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function We(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qe(e);if(t){var o=Qe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ge(this,n)}}function Ge(e,t){if(t&&("object"===ze(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ke(e)}function Ke(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qe(e){return(Qe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}a.a.registerComponent("localCacheIndicator",Fe);var Ze=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))},$e=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qe(e,t)}(i,e);var t,n,r,o=We(i);function i(e,t){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e)).logger_=a.a.log.createLogger("localcache"),void 0===t)throw Error("no options defined");return n.onPlayerError=n.onPlayerError.bind(Ke(n)),n.localCaches_=t.localCacheAddresses.map((function(e){return new Ce(e)})),n.player.ready((function(){n.initialize(),t.enabled&&n.enable()})),n}return t=i,(n=[{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:"dispose",value:function(){this.player.off("error",this.onPlayerError),Ue(Qe(i.prototype),"dispose",this).call(this)}},{key:"initialize",value:function(){this.player.on("error",this.onPlayerError),this.player.controlBar.addChild("localCacheIndicator")}},{key:"onPlayerError",value:function(){var e;(null===(e=this.player.error())||void 0===e?void 0:e.code)===MediaError.MEDIA_ERR_NETWORK&&this.resetActiveLocalCache()}},{key:"getActiveLocalCacheInternal",value:function(){return Ze(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],n=function(e){return Ze(o,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.ping();case 2:if(!n.sent){n.next=4;break}t.push(e);case 4:case"end":return n.stop()}}),n)})))},e.next=4,Promise.all(this.localCaches_.map((function(e){return n(e)})));case 4:if(!(t.length>0)){e.next=8;break}return r=t[0],this.onLocalCacheChange(r),e.abrupt("return",r);case 8:return e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,this)})))}},{key:"onLocalCacheChange",value:function(e){this.logger_.debug("Local Cache changed",e),this.trigger("localcachechanged",{localCache:e});var t=!1;e&&e.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",e.playbackProfile),_e.enableProfileOrNextBest(this.player.qualityLevels(),e.playbackProfile),t=!0),t||this.player.src(this.player.src())}}])&&Ve(t.prototype,n),r&&Ve(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));function Ye(e){return(Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xe(e,t){return(Xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function et(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=nt(e);if(t){var o=nt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tt(this,n)}}function tt(e,t){if(t&&("object"===Ye(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function nt(e){return(nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}a.a.registerPlugin("localCache",$e);var rt=a.a.getPlugin("plugin"),ot=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xe(e,t)}(i,e);var t,n,r,o=et(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e)).options=t,n.initialize(),n}return t=i,(n=[{key:"initialize",value:function(){if(this.player.textTracks().length){this.bindEventListeners();var e=!!this.options.showSubtitles,t=this.safeGet("cvplayer-show-subtitles");if("true"===t&&(e=!0),"false"===t&&(e=!1),e){var n=this.guessWhichTrack();n&&(n.mode="showing")}var r=this.safeGet("cvplayer-subtitle-size");r||(r=this.options.subtitleSize),r&&this.player.textTrackSettings.setSizeSetting(r)}}},{key:"safeGet",value:function(e){if(l())return s(e)}},{key:"onSelectedLanguageChange",value:function(){for(var e=this.player.textTracks(),t=0;t<e.length;t++){var n=e[t];if("showing"===n.mode)return f("cvplayer-show-subtitles","true"),void f("cvplayer-selected-language",n.language)}f("cvplayer-show-subtitles","false"),p("cvplayer-selected-language")}},{key:"bindEventListeners",value:function(){var e=this;l()&&(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(){e.player.off("cv:languageselected",e.onSelectedLanguageChange),e.player.off("changesubtitlesize",e.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var e=this.player.textTrackSettings.getSizeSetting();f("cvplayer-subtitle-size",e)}},{key:"guessWhichTrack",value:function(){for(var e,t,n=this.safeGet("cvplayer-selected-language")||window.navigator.language,r=this.getLanguageParts(n),o=r.language,i=r.country,a=this.player.textTracks(),c=0;c<a.length;c++){var u=a[c],l=this.getLanguageParts(u.language),s=l.language,f=l.country;if(s===o&&(e=u,f||(t=u),f===i))return e}return t||e||null}},{key:"getLanguageParts",value:function(e){var t=e.toLowerCase().split("-");return{language:t[0],country:t[1]}}}])&&Je(t.prototype,n),r&&Je(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(rt);function it(e){return(it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function at(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ct(e,t){return(ct=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ut(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=st(e);if(t){var o=st(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return lt(this,n)}}function lt(e,t){if(t&&("object"===it(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function st(e){return(st=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}a.a.registerPlugin("persistSubtitleSettingsPlugin",ot);var ft=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))},pt=a.a.getPlugin("plugin"),yt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ct(e,t)}(i,e);var t,n,r,o=ut(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e)).options=t,n.player.ready((function(){return n.initialize()})),n}return t=i,(n=[{key:"initialize",value:function(){return ft(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,o,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getActiveLocalCache();case 2:if(t=e.sent,(n=t?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(n="1080"),l()&&(r=s(this.getStorageKey(!!t)))&&(n=r),o=this.player.qualityLevels(),(null==t?void 0:t.playbackProfile)||_e.enableProfileOrNextBest(o,n),l()){e.next=10;break}return e.abrupt("return");case 10:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),o.on("change",this.onQualityLevelsChange),this.on("dispose",(function(){o.off("change",i.onQualityLevelsChange)}));case 13:case"end":return e.stop()}}),e,this)})))}},{key:"onQualityLevelsChange",value:function(){return ft(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isLocalCacheActive();case 2:t=e.sent,n=this.player.qualityLevels(),r=n[n.selectedIndex],f(this.getStorageKey(t),r.id);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"isLocalCacheActive",value:function(){return ft(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.player.localCache().getActiveLocalCache();case 2:return e.abrupt("return",!!e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(e){return e?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&at(t.prototype,n),r&&at(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(pt);a.a.registerPlugin("persistQualitySettingsPlugin",yt);n(1163);function ht(e){return(ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dt(e){return function(e){if(Array.isArray(e))return bt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return bt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bt(e,t)}(e)||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 bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gt(e,t,n){return t&&mt(e.prototype,t),n&&mt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ot(e,t)}function Ot(e,t){return(Ot=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ct(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_t(e);if(t){var o=_t(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return jt(this,n)}}function jt(e,t){if(t&&("object"===ht(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _t(e){return(_t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var St=a.a.getComponent("Component"),Pt=function(e){wt(n,e);var t=Ct(n);function n(e,r){return vt(this,n),t.call(this,e,r)}return gt(n,[{key:"createEl",value:function(){return a.a.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var e=this.options_.event,t=this.player_.duration(),n=(e.end.time-e.start.time)/t;this.el_.style.width=100*n+"%";var r=e.start.time/t;this.el_.style.left=100*r+"%"}}]),n}(St),kt=function(e){wt(n,e);var t=Ct(n);function n(){var e;return vt(this,n),(e=t.apply(this,arguments)).events_=[],e}return gt(n,[{key:"update",value:function(){for(var e=this,t=this.children(),n=t.length;n>0;n--)this.removeChild(t[n]);this.events_.forEach((function(t){var n=new Pt(e.player(),{event:t});e.addChild(n),n.update()}))}},{key:"addEvents",value:function(e){var t;(t=this.events_).push.apply(t,dt(e)),this.update()}},{key:"createEl",value:function(){return a.a.dom.createEl("div",{className:"cv-progress-reporter-display"})}}]),n}(St);function Et(e){return(Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xt(e,t){return(xt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Lt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=It(e);if(t){var o=It(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Bt(this,n)}}function Bt(e,t){if(t&&("object"===Et(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function It(e){return(It=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Nt=a.a.getPlugin("plugin"),Mt="play",At="playing",Dt="pause",Ft="seeking",zt="seekstart",Vt="seekend",Ut="ended",Ht="pausedseek",qt="timeupdate",Wt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xt(e,t)}(i,e);var t,n,r,o=Lt(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).eventBuffer=[],n.latestTime=0,n.lastPlayingTime=0,n.isPlaying=!1,n.isSeeking=!1,n.hasEnded=!1,n.shouldLogPlayOnTimeUpdate=!1,n.options=t,n.player.ready((function(){return n.initialize()})),n}return t=i,(n=[{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 e,t=this,n=(Tt(e={},Mt,(function(){return t.onPlay()})),Tt(e,Dt,(function(){return t.onPause()})),Tt(e,qt,(function(){return t.onTimeUpdate()})),Tt(e,Ft,(function(){return t.onSeeking()})),Tt(e,Ut,(function(){return t.onEnded()})),Tt(e,At,(function(){return t.onPlaying()})),e),r=Object.keys(n);r.forEach((function(e){return t.player.on(e,n[e])})),this.one("dispose",(function(){r.forEach((function(e){return t.player.off(e,n[e])}))}))}},{key:"startInterval",value:function(){var e=this,t=this.options.interval||5e3;this.interval=window.setInterval((function(){return e.flushBuffer()}),t),this.player.one("dispose",(function(){return window.clearInterval(e.interval)}))}},{key:"addEasterEgg",value:function(){var e,t,n=this,r="",o=function(t){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(r+=t.key)&&n.addDisplay(),window.clearTimeout(e),e=window.setTimeout((function(){r=""}),500)},i=!1,a=function(){i=!0,t=window.setTimeout((function(){i&&n.addDisplay()}),1e4)};function c(){i=!1,window.clearTimeout(t)}this.player.el().addEventListener("keyup",o);var u=this.player.getChild("Collapserator").getChild("PlayToggle");u.on("touchstart",a),u.on("touchend",c),this.player.one("dispose",(function(){var e,t;null===(t=null===(e=n.player)||void 0===e?void 0:e.el())||void 0===t||t.removeEventListener("keyup",o),u.off("touchstart",a),u.off("touchend",c)}))}},{key:"addDisplay",value:function(){var e=this;this.progressReporterDisplay||(this.progressReporterDisplay=new kt(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",(function(){e.progressReporterDisplay=void 0})))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent(Vt),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(Mt)}},{key:"onPause",value:function(){var e=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){e.isPlaying=!1,e.logEvent(Dt),delete e.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(Mt)),this.isPlaying&&!this.isSeeking&&this.logEvent(At)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(Ht),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(zt))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(Ut)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(e){if(this.player){var t=this.player.currentTime();e===zt&&(t=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:t,type:e})}}},{key:"shouldUseCarriedOverTime",value:function(e){return this.lastPlayingTime&&(e===At||e===Mt)}},{key:"shouldSaveCarriedOverTime",value:function(e){return e===At||e===Dt}},{key:"shouldClearCarriedOverTime",value:function(e){return e===Ut||e===Ht}},{key:"flushBuffer",value:function(){for(var e,t,n=[],r={};this.eventBuffer.length;){var o=this.eventBuffer.shift();this.shouldClearCarriedOverTime(o.type)?delete this.lastPlayingTime:r.start?o.type===At&&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===(e=this.player)||void 0===e||e.trigger("progressflush"),null===(t=this.progressReporterDisplay)||void 0===t||t.addEvents(n))}},{key:"validateEvents",value:function(e){var t=0;e.forEach((function(e){t+=e.end.time-e.start.time}));var n=this.options.interval||5e3;return n/=1e3,n+=.5,n*=this.player.playbackRate(),t<n}}])&&Rt(t.prototype,n),r&&Rt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(Nt);a.a.registerPlugin("progressReporterPlugin",Wt);n(1164);function Gt(e){return(Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zt(e,t){return(Zt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $t(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Jt(e);if(t){var o=Jt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Yt(this,n)}}function Yt(e,t){if(t&&("object"===Gt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Jt(e){return(Jt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zt(e,t)}(i,e);var t,n,r,o=$t(i);function i(){return Kt(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"createEl",value:function(){return a.a.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&Qt(t.prototype,n),r&&Qt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Component")),en=["top","left","right","bottom"],tn={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};n(1165);function nn(e){return(nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function on(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function an(e,t,n){return t&&on(e.prototype,t),n&&on(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cn(){return(cn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=un(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function un(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=yn(e)););return e}function ln(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sn(e,t)}function sn(e,t){return(sn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yn(e);if(t){var o=yn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return pn(this,n)}}function pn(e,t){if(t&&("object"===nn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function yn(e){return(yn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hn=a.a.getComponent("Component"),dn=function(e){ln(n,e);var t=fn(n);function n(e,r){var o;return rn(this,n),(o=t.call(this,e,r)).bindEventListeners(),o}return an(n,[{key:"createEl",value:function(){return cn(yn(n.prototype),"createEl",this).call(this,"div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)})}},{key:"bindEventListeners",value:function(){var e=this,t=this.el(),n=function(t){t.preventDefault(),t.dataTransfer.dropEffect="move",e.addClass("cv-drag-over")},r=function(t){t.preventDefault(),e.removeClass("cv-drag-over"),e.player_.whiteboardModePlugin().setWhiteboardMode(e.options_.side)},o=function(){e.removeClass("cv-drag-over")};t.addEventListener("dragover",n),t.addEventListener("drop",r),t.addEventListener("dragleave",o),this.on("dispose",(function(){t.removeEventListener("dragover",n),t.removeEventListener("drop",r),t.removeEventListener("dragleave",o)}))}}]),n}(hn),bn=function(e){ln(n,e);var t=fn(n);function n(e,r){var o;return rn(this,n),(o=t.call(this,e,r)).addChildren(),o}return an(n,[{key:"addChildren",value:function(){var e=this;en.forEach((function(t){e.addChild(new dn(e.player_,{side:t}))}))}}]),n}(hn);function vn(e){return(vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gn(){return(gn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=wn(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function wn(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_n(e)););return e}function On(e,t){return(On=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_n(e);if(t){var o=_n(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return jn(this,n)}}function jn(e,t){if(t&&("object"===vn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _n(e){return(_n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Sn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&On(e,t)}(i,e);var t,n,r,o=Cn(i);function i(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e,t)}return t=i,(n=[{key:"createEl",value:function(){return a.a.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(e){var t=this;gn(_n(i.prototype),"handleClick",this).call(this,e),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("cogButton").pressButton()}))}}])&&mn(t.prototype,n),r&&mn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("MenuItem"));function Pn(e){return(Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function En(e,t){return(En=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xn(e);if(t){var o=xn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Rn(this,n)}}function Rn(e,t){if(t&&("object"===Pn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function xn(e){return(xn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ln=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&En(e,t)}(i,e);var t,n,r,o=Tn(i);function i(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e,t)}return t=i,(n=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&kn(t.prototype,n),r&&kn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("MenuItem"));function Bn(e){return(Bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function In(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mn(){return(Mn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=An(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function An(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Vn(e)););return e}function Dn(e,t){return(Dn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Vn(e);if(t){var o=Vn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zn(this,n)}}function zn(e,t){if(t&&("object"===Bn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Vn(e){return(Vn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Un=a.a.getComponent("MenuButton"),Hn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dn(e,t)}(i,e);var t,n,r,o=Fn(i);function i(){var e;return In(this,i),(e=o.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=i,(n=[{key:"createItems",value:function(){var e=this,t=this.player_.whiteboardModePlugin().side,n=[new Sn(this.player_,{label:"Video Controls"})];return en.forEach((function(r){n.push(new Ln(e.player_,{side:r,label:tn[r],selectable:!0,multiSelectable:!1,selected:r===t}))})),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Mn(Vn(i.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.whiteboardModePlugin().side;return tn[e]}},{key:"showInCollabsibleMenu",value:function(){return this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){Un.prototype.handleClick.apply(this)}}])&&Nn(t.prototype,n),r&&Nn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(Un);n(1166);function qn(e){return(qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gn(e,t){return(Gn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Kn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Zn(e);if(t){var o=Zn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Qn(this,n)}}function Qn(e,t){if(t&&("object"===qn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Zn(e){return(Zn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $n="cv-whiteboard-side",Yn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gn(e,t)}(i,e);var t,n,r,o=Kn(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,e)).side="bottom",t.player.ready((function(){t.initialize()})),t}return t=i,(n=[{key:"initialize",value:function(){if(l()){var e=s($n);e&&(this.side=e)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}},{key:"initCollapserator",value:function(){var e=this,t=this.player.getChild("collapserator"),n=new Xt(this.player);this.button=new Hn(this.player),t.addChild(n),t.addChild(this.button),this.player.trigger("cv-updatecog");var r=function(){t.el().setAttribute("draggable","true")},o=function(){t.el().setAttribute("draggable","false")},i=function(t){e.player.addClass("cv-dragging"),t.dataTransfer.setData("text/plain","handle")},a=function(){e.player.removeClass("cv-dragging"),t.el().setAttribute("draggable","false")};n.el().addEventListener("mousedown",r),n.el().addEventListener("mouseup",o),t.el().addEventListener("dragstart",i),t.el().addEventListener("dragend",a),this.on("dispose",(function(){n.el().removeEventListener("mousedown",r),n.el().removeEventListener("mouseup",o),t.el().removeEventListener("dragstart",i),t.el().removeEventListener("dragend",a)}))}},{key:"initDragTargets",value:function(){this.player.addChild(new bn(this.player))}},{key:"initFullscreenListener",value:function(){var e=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.one("dispose",(function(){e.player.off("fullscreenchange",e.update)}))}},{key:"setWhiteboardMode",value:function(e){this.side=e,this.button.update(),l()&&f($n,e),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"update",value:function(){this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),a.a.dom.removeClass(window.document.documentElement,"cv-whiteboard-html-font-size"),this.player.trigger("resizemenus"),this.player.isFullscreen()&&"bottom"!==this.side&&(this.player.addClass("cv-whiteboard-".concat(this.side)),a.a.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}}])&&Wn(t.prototype,n),r&&Wn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));a.a.registerPlugin("whiteboardModePlugin",Yn);var Jn=n(1249);function Xn(e){return(Xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function er(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nr(){return(nr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=rr(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function rr(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=cr(e)););return e}function or(e,t){return(or=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ir(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cr(e);if(t){var o=cr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ar(this,n)}}function ar(e,t){if(t&&("object"===Xn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function cr(e){return(cr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ur=a.a.getComponent("Menu"),lr=ur.prototype,sr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&or(e,t)}(i,e);var t,n,r,o=ir(i);function i(){return er(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"createEl",value:function(){var e=nr(cr(i.prototype),"createEl",this).call(this);return this.simpleBar=new Jn.a(this.contentEl(),{autoHide:!1}),e}},{key:"contentEl",value:function(){return this.simpleBar?this.simpleBar.getContentElement():nr(cr(i.prototype),"contentEl",this).call(this)}},{key:"dispose",value:function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),nr(cr(i.prototype),"dispose",this).call(this)}},{key:"addItem",value:function(e){nr(cr(i.prototype),"addItem",this).call(this,e),this.simpleBar.recalculate()}},{key:"lockShowing",value:function(){nr(cr(i.prototype),"lockShowing",this).call(this),this.simpleBar.recalculate()}},{key:"recalculateScrollBar",value:function(){this.simpleBar.recalculate()}},{key:"handleBlur",value:function(e){var t=e.relatedTarget||document.activeElement;this.el().contains(t)||lr.handleBlur.call(this,e)}}])&&tr(t.prototype,n),r&&tr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(ur);function fr(e){return(fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hr(e,t){return(hr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vr(e);if(t){var o=vr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return br(this,n)}}function br(e,t){if(t&&("object"===fr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function vr(e){return(vr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ur.prototype=sr.prototype,a.a.registerComponent("Menu",sr);var mr=a.a.getComponent("Component"),gr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hr(e,t)}(i,e);var t,n,r,o=dr(i);function i(){return pr(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"createMenu",value:function(){var e,t=new sr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=a.a.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(e=this.options_.title,"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var r=new mr(this.player_,{el:n});t.addItem(r)}if(this.items=this.createItems(),this.items)for(var o=0;o<this.items.length;o++)t.addItem(this.items[o]);return t}}])&&yr(t.prototype,n),r&&yr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("MenuButton"));a.a.registerComponent("MenuButton",gr);n(1167);function wr(e){return(wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Or(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jr(){return(jr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=_r(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function _r(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Er(e)););return e}function Sr(e,t){return(Sr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Er(e);if(t){var o=Er(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return kr(this,n)}}function kr(e,t){if(t&&("object"===wr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Er(e){return(Er=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Tr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sr(e,t)}(i,e);var t,n,r,o=Pr(i);function i(){return Or(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(jr(Er(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return jr(Er(i.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}}])&&Cr(t.prototype,n),r&&Cr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));Tr.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},a.a.registerComponent("TimeWrapper",Tr);n(1168);function Rr(e){return(Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Br(e,t,n){return t&&Lr(e.prototype,t),n&&Lr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ir(){return(Ir="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Nr(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Nr(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=zr(e)););return e}function Mr(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ar(e,t)}function Ar(e,t){return(Ar=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=zr(e);if(t){var o=zr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Fr(this,n)}}function Fr(e,t){if(t&&("object"===Rr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function zr(e){return(zr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vr=function(e){Mr(n,e);var t=Dr(n);function n(e,r){return xr(this,n),t.call(this,e,r)}return Br(n,[{key:"handleClick",value:function(e){var t=this;Ir(zr(n.prototype),"handleClick",this).call(this,e),this.requestAnimationFrame((function(){t.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(e,t,r){if(!this.options_.item)return Ir(zr(n.prototype),"createEl",this).call(this,e,t,r);var o=this.options_.item.getCollabsibleName(),i=this.options_.item.getCollabsibleValue(),c='<span class="vjs-menu-item-text">'.concat(o,"</span>");this.valueHolder_=a.a.dom.createEl("span",{innerHTML:i});var u=Ir(zr(n.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item ".concat(i?"cv-has-cog-value":""),innerHTML:c},r);return u.appendChild(this.valueHolder_),u}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}]),n}(a.a.getComponent("MenuItem")),Ur=function(e){Mr(n,e);var t=Dr(n);function n(e,r){return xr(this,n),t.call(this,e,r)}return Br(n,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(Ir(zr(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(Ir(zr(n.prototype),"buildCSSClass",this).call(this))}},{key:"pressButton",value:function(){this.menu.children_.forEach((function(e){e.updateCollapsibleValue&&e.updateCollapsibleValue()})),Ir(zr(n.prototype),"pressButton",this).call(this)}},{key:"createItems",value:function(){for(var e,t=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 Vr(this.player_,{item:o})))}return(null===(e=this.additionalItems)||void 0===e?void 0:e.length)&&this.additionalItems.forEach((function(e){var r,o=new e.ctor(t.player_,Object.assign(Object.assign({},t.options_),null!==(r=e.options)&&void 0!==r?r:{}));n.splice(e.index,0,o)})),n}},{key:"update",value:function(){Ir(zr(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(e){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some((function(t){return t.name===e.name}))||(this.additionalItems.push(e),this.update())}}]),n}(a.a.getComponent("MenuButton"));function Hr(e){return(Hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qr(){return(qr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Wr(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Wr(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Xr(e)););return e}function Gr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qr(e,t,n){return t&&Kr(e.prototype,t),n&&Kr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zr(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$r(e,t)}function $r(e,t){return($r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xr(e);if(t){var o=Xr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Jr(this,n)}}function Jr(e,t){if(t&&("object"===Hr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Xr(e){return(Xr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}a.a.registerComponent("cogButton",Ur);var eo=a.a.getComponent("MenuItem"),to=a.a.getComponent("MenuButton"),no=["large","medium","small"],ro=function(e){Zr(n,e);var t=Yr(n);function n(e,r){return Gr(this,n),t.call(this,e,r)}return Qr(n,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}]),n}(eo),oo=function(e){Zr(n,e);var t=Yr(n);function n(e,r){var o;return Gr(this,n),(o=t.call(this,e,r)).alwaysCollapsed=!0,o.isCollapsed=!1,o.isCollabsible=!0,o.player_.ready((function(){o.update()})),o}return Qr(n,[{key:"createItems",value:function(){var e=this,t=this.player_.textTrackSettings;if(t){var n=t.getSizeSetting(),r=[new Sn(this.player_,{label:"Caption Text Size",onClickBack:function(){e.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()}))}})];return no.map((function(t){r.push(new ro(e.player_,{label:t.charAt(0).toUpperCase()+t.substring(1),selectable:!0,multiSelectable:!1,selected:t===n,value:t}))})),r}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(qr(Xr(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){to.prototype.handleClick.apply(this)}}]),n}(to);function io(e,t,n,r){e.kind===t&&(n&&e.label!==n||(e.loaded_?r(e):e.one("loadeddata",(function(){r(e)}))))}a.a.registerComponent("SubtitleSizeButton",oo);var ao=function(e,t,n,r){var o=function(e){io(e.track,t,n,r)},i=e.textTracks(),a=function(e,t,n){if(e.length)for(var r=e.length-1;r>=0;r--){var o=e[r];if(o.kind===t){if(n&&o.label!==n)continue;return o}}}(i,t,n);a?io(a,t,n,r):(i.addEventListener("addtrack",o),e.one("dispose",(function(){i.removeEventListener("addtrack",o)})))},co=function(e){if(!e)return null;for(var t=e.textTracks(),n=0;n<t.length;n++){var r=t[n];if("showing"===r.mode)return r}return null};function uo(e){return(uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function so(e,t){return(so=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yo(e);if(t){var o=yo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return po(this,n)}}function po(e,t){if(t&&("object"===uo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function yo(e){return(yo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ho=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&so(e,t)}(i,e);var t,n,r,o=fo(i);function i(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e,t)}return t=i,(n=[{key:"update",value:function(e,t){var n=this;if(null==e?void 0:e.length){var r=[],o=0;e.forEach((function(e){var i=n.options_.label.substr(o,e);i&&r.push(i),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(e,t)),r.push("</span>"),o=e+t})),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(e){e.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&lo(t.prototype,n),r&&lo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("MenuItem"));function bo(e){return(bo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mo(){return(mo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=go(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function go(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_o(e)););return e}function wo(e,t){return(wo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Oo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_o(e);if(t){var o=_o(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Co(this,n)}}function Co(e,t){if(t&&("object"===bo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return jo(e)}function jo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _o(e){return(_o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var So=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wo(e,t)}(i,e);var t,n,r,o=Oo(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).onChange=function(e,t,n){var r,o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){i.clearTimeout(r),r=null},c=function(){for(var a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];var l=function(){r=null,l=null,n||e.apply(this,c)};!r&&n&&e.apply(o,c),i.clearTimeout(r),r=i.setTimeout(l,t)};return c.cancel=a,c}(n.onChange,100,!1,jo(n)),n.bindEventListeners(),n}return t=i,(n=[{key:"createEl",value:function(){return mo(_o(i.prototype),"createEl",this).call(this,"li",{innerHTML:'\n <div class="cv-subtitle-search-input">\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="Search" type="text" autocomplete="off" spellcheck="false" aria-label="Search" />\n </div>\n '})}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("input");this.onChange=this.onChange.bind(this),t.addEventListener("keyup",this.onChange),t.addEventListener("blur",(function(t){e.options_.menuButton.menu.handleBlur(t)}))}},{key:"onChange",value:function(e){var t=e.target;this.options_.menuButton.search(t.value)}}])&&vo(t.prototype,n),r&&vo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("MenuItem"));n(1169);function Po(e){return(Po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ko(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function To(e,t,n){return t&&Eo(e.prototype,t),n&&Eo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ro(){return(Ro="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=xo(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function xo(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ao(e)););return e}function Lo(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bo(e,t)}function Bo(e,t){return(Bo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Io(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ao(e);if(t){var o=Ao(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return No(this,n)}}function No(e,t){if(t&&("object"===Po(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Mo(e)}function Mo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ao(e){return(Ao=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Do=a.a.getComponent("MenuItem"),Fo=a.a.getComponent("MenuButton"),zo=function(e){Lo(n,e);var t=Io(n);function n(){return ko(this,n),t.apply(this,arguments)}return To(n,[{key:"createEl",value:function(e,t,r){return Ro(Ao(n.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:"vjs-menu-item cv-no-results"}),r)}}]),n}(Do),Vo=function(e){Lo(n,e);var t=Io(n);function n(e,r){var o;return ko(this,n),(o=t.call(this,e,r)).alwaysCollapsed=!0,o.isCollapsed=!1,o.isCollabsible=!0,o.update=o.update.bind(Mo(o)),o.player_.textTracks().addEventListener("selectedlanguagechange",o.update),o}return To(n,[{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.update),e.addEventListener("loadeddata",this.update),this.player_.one("dispose",(function(){e.removeEventListener("loadeddata",t.update)}))}},{key:"createItems",value:function(){var e,t=co(this.player_);if(t){if(null===(e=t.cues)||void 0===e?void 0:e.length){for(var n=[new So(this.player_,{menuButton:this})],r=0;r<t.cues.length;r++){var o=t.cues[r];n.push(new ho(this.player_,{cue:o,label:o.text,selected:!1,multiSelectable:!1}))}var i=new zo(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return i.hide(),n.push(i),n}this.bindTrackEvents(t)}}},{key:"search",value:function(e){var t;e=e.trim();var n=co(this.player_);if(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length){var r=this.findMatches(e,n);this.toggleItemVisibility(e,r),this.toggleNoResults(e,r)}}},{key:"findMatches",value:function(e,t){var n={};if(!e)return n;for(var r=new RegExp(e,"gi"),o=0;o<t.cues.length;o++){for(var i=t.cues[o].text,a=[],c=void 0;c=r.exec(i);)a.push(c.index);a.length&&(n[o]=a)}return n}},{key:"toggleItemVisibility",value:function(e,t){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(n,r){!e||t[r]?n.show():n.hide(),n.update(t[r],e.length)}))}},{key:"toggleNoResults",value:function(e,t){var n=this.menu.children_[this.menu.children_.length-1];!e||Object.keys(t).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(Ro(Ao(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"update",value:function(){Ro(Ao(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){Ro(Ao(n.prototype),"pressButton",this).call(this);var e=this.menu.children_[0];(null==e?void 0:e.focus)&&(null==e||e.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){Fo.prototype.handleClick.apply(this)}}]),n}(Fo);a.a.registerComponent("subtitleSearchButton",Vo);n(1170);function Uo(e){return(Uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ho(){return(Ho="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=qo(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function qo(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Jo(e)););return e}function Wo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Go(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ko(e,t,n){return t&&Go(e.prototype,t),n&&Go(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qo(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zo(e,t)}function Zo(e,t){return(Zo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Jo(e);if(t){var o=Jo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Yo(this,n)}}function Yo(e,t){if(t&&("object"===Uo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Jo(e){return(Jo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xo=a.a.getComponent("MenuItem"),ei=a.a.getComponent("MenuButton"),ti=[{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"}],ni=function(e){Qo(n,e);var t=$o(n);function n(e,r){return Wo(this,n),t.call(this,e,r)}return Ko(n,[{key:"createEl",value:function(){return a.a.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(e){switch(e){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">⇑</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">⇓</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>'}return""}}]),n}(Xo),ri=function(e){Qo(n,e);var t=$o(n);function n(){var e;return Wo(this,n),(e=t.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return Ko(n,[{key:"createItems",value:function(){var e=this,t=[];return t.push(new Sn(this.player_,{label:"Keyboard Shortcuts"})),ti.forEach((function(n){t.push(new ni(e.player_,n))})),t}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat(Ho(Jo(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Keyboard Shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){ei.prototype.handleClick.apply(this)}}]),n}(ei);a.a.registerComponent("KeyboardShortcutsButton",ri);n(1171),n(1172);function oi(e){return(oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ii(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ai(){return(ai="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=ci(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function ci(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=pi(e)););return e}function ui(e,t){return(ui=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function li(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pi(e);if(t){var o=pi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return si(this,n)}}function si(e,t){if(t&&("object"===oi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fi(e)}function fi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pi(e){return(pi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ui(e,t)}(i,e);var t,n,r,o=li(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).addChild("cogButton",{items:n.children_},n.children_.length-1),n.update=n.update.bind(fi(n)),n.player_.on("cv-updatecog",n.update),n.player_.on("playerresize",n.update),n.player_.on("dispose",(function(){n.player_.off("cv-updatecog",n.update),n.player_.off("playerresize",n.update)})),n}return t=i,(n=[{key:"togglehidden",value:function(e){for(var t=0;t<this.children_.length;t++){var n=this.children_[t];n.isCollabsible&&(n.alwaysCollapsed||e?(n.isCollapsed=!0,n.addClass("cv-collapsed")):(n.isCollapsed=!1,n.removeClass("cv-collapsed")))}this.getChild("cogButton").update()}},{key:"update",value:function(){var e=this.player_.el().getBoundingClientRect();0!==e.width&&(this.addClass("cv-collapsorator-ready"),this.togglehidden(e.width<600))}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(ai(pi(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return ai(pi(i.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}}])&&ii(t.prototype,n),r&&ii(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));function hi(e){return(hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function di(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vi(e,t){return(vi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wi(e);if(t){var o=wi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return gi(this,n)}}function gi(e,t){if(t&&("object"===hi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function wi(e){return(wi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}yi.prototype.options_={children:["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"]},a.a.registerComponent("collapserator",yi);var Oi=a.a.getComponent("SeekBar"),Ci=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vi(e,t)}(i,e);var t,n,r,o=mi(i);function i(){return di(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"handleMouseDown",value:function(e){Oi.prototype.handleMouseDown.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback")}},{key:"handleMouseUp",value:function(e){var t=this;Oi.prototype.handleMouseUp.call(this,e),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&bi(t.prototype,n),r&&bi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(Oi);a.a.registerComponent("SeekBar",Ci);n(1173);function ji(e){return(ji="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Si(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pi(){return(Pi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=ki(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function ki(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=xi(e)););return e}function Ei(e,t){return(Ei=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ti(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xi(e);if(t){var o=xi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ri(this,n)}}function Ri(e,t){if(t&&("object"===ji(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function xi(e){return(xi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Li=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ei(e,t)}(i,e);var t,n,r,o=Ti(i);function i(){return _i(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(Pi(xi(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Pi(xi(i.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(e){e.update()}))}},{key:"updateBuffered",value:function(){var e=this;this.children_.forEach((function(t){t.updateBuffered(function(e){for(var t=e.buffered(),n=e.currentTime(),r=0,o=0;o<t.length;o++){var i=t.start(o),a=t.end(o);if(i<=n&&a>=n){r=a;break}}return r}(e.player_))}))}}])&&Si(t.prototype,n),r&&Si(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));function Bi(e){return(Bi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ii(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ni(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mi(){return(Mi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ai(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Ai(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Vi(e)););return e}function Di(e,t){return(Di=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Vi(e);if(t){var o=Vi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zi(this,n)}}function zi(e,t){if(t&&("object"===Bi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Vi(e){return(Vi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ui=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Di(e,t)}(i,e);var t,n,r,o=Fi(i);function i(){return Ii(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Mi(Vi(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Mi(Vi(i.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(e){this.el_.style.width=100*e+"%"}}])&&Ni(t.prototype,n),r&&Ni(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));function Hi(e){return(Hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gi(){return(Gi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ki(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Ki(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Yi(e)););return e}function Qi(e,t){return(Qi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Yi(e);if(t){var o=Yi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $i(this,n)}}function $i(e,t){if(t&&("object"===Hi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Yi(e){return(Yi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ji=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qi(e,t)}(i,e);var t,n,r,o=Zi(i);function i(){return qi(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(Gi(Yi(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Gi(Yi(i.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(e){e>0&&e<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*e+"%"}}])&&Wi(t.prototype,n),r&&Wi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));function Xi(e){return(Xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ea(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ta(){return(ta="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=na(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function na(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=aa(e)););return e}function ra(e,t){return(ra=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function oa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=aa(e);if(t){var o=aa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ia(this,n)}}function ia(e,t){if(t&&("object"===Xi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function aa(e){return(aa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ca=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ra(e,t)}(i,e);var t,n,r,o=oa(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).playProgress=new Ji(n.player_),n.addChild(n.playProgress),n.loadProgress=new Ui(n.player_),n.addChild(n.loadProgress),n.update(),n.updateBuffered(0),n}return t=i,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(ta(aa(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return ta(aa(i.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var e=this.player_.duration()||3600,t=this.options_.endTime-this.options_.startTime;if(e!==this.duration_){var n=t/e;this.el_.style.width=100*n+"%";var r=this.options_.startTime/e;this.el_.style.left=100*r+"%",this.duration_=e}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)/t)}},{key:"updateBuffered",value:function(e){var t=this.options_.endTime-this.options_.startTime;e<this.options_.startTime?this.loadProgress.update(0):e>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((e-this.options_.startTime)/t)}}])&&ea(t.prototype,n),r&&ea(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));function ua(e){return(ua="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function la(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sa(){return(sa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=fa(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function fa(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ba(e)););return e}function pa(e,t){return(pa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ya(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ba(e);if(t){var o=ba(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ha(this,n)}}function ha(e,t){if(t&&("object"===ua(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return da(e)}function da(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ba(e){return(ba=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var va=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pa(e,t)}(i,e);var t,n,r,o=ya(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).onDurationChange=n.onDurationChange.bind(da(n)),n.createChapterItems=n.createChapterItems.bind(da(n)),n.updateBuffered=n.updateBuffered.bind(da(n)),ao(n.player_,"chapters",null,n.createChapterItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("progress",n.updateBuffered),n.createChapterItems(),n.update(),n}return t=i,(n=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),sa(ba(i.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){return a.a.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar")})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var e=sa(ba(i.prototype),"update",this).call(this);return this.chapterBarItems&&this.chapterBarItems.update(),e}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"createChapterItems",value:function(e){var t,n;e&&(this.track_=e);var r=new Li(this.player_);if((null===(n=null===(t=this.track_)||void 0===t?void 0:t.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],a=i.startTime,c=i.endTime,u=this.player_.duration();u&&(o===this.track_.cues.length-1&&i.endTime<this.player_.duration()&&(c=this.player_.duration()),c>u&&(c=u));var l=new ca(this.player_,{startTime:a,endTime:c});if(r.addChild(l),u&&c===u)break}else r.addChild(new ca(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&la(t.prototype,n),r&&la(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("SeekBar"));va.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},a.a.browser.IS_IOS||a.a.browser.IS_ANDROID||va.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),a.a.registerComponent("ChapterSeekBar",va);n(1174);function ma(e){return(ma="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ga(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oa(){return(Oa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ca(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Ca(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Pa(e)););return e}function ja(e,t){return(ja=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Pa(e);if(t){var o=Pa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Sa(this,n)}}function Sa(e,t){if(t&&("object"===ma(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Pa(e){return(Pa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ka=a.a.getComponent("ProgressControl"),Ea=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ja(e,t)}(i,e);var t,n,r,o=_a(i);function i(){var e;return ga(this,i),(e=o.apply(this,arguments)).seekBarName_="seekBar",e}return t=i,(n=[{key:"setSeekBarName",value:function(e){this.seekBarName_=e}},{key:"getChild",value:function(e){return(null==e?void 0:e.toLowerCase())==="seekBar".toLowerCase()&&(e=this.seekBarName_),Oa(Pa(i.prototype),"getChild",this).call(this,e)}}])&&wa(t.prototype,n),r&&wa(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(ka);function Ta(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),o=Math.floor(e/3600),i=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(o=r=n="-"),(o=o>0||a>0?o+":":"")+(r=((o||i>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)}Ea.prototype.options_={children:[]},a.a.registerComponent("ProgressControl",Ea);n(1175);function Ra(e){return(Ra="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function La(){return(La="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ba(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Ba(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Aa(e)););return e}function Ia(e,t){return(Ia=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Na(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Aa(e);if(t){var o=Aa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ma(this,n)}}function Ma(e,t){if(t&&("object"===Ra(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Aa(e){return(Aa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Da=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ia(e,t)}(i,e);var t,n,r,o=Na(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).hasCustomChapterText=!1,ao(n.player_,"chapters",!1,(function(e){n.track_=e})),n}return t=i,(n=[{key:"createEl",value:function(){var e=La(Aa(i.prototype),"createEl",this).call(this);return this.chapter_=a.a.dom.createEl("div"),e.appendChild(this.chapter_),this.time_=a.a.dom.createEl("div"),e.appendChild(this.time_),e}},{key:"updateTime",value:function(e){var t=this.player_.duration();if(a.a.dom.textContent(this.time_,Ta(e,t)),this.track_&&!this.hasCustomChapterText){for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],o=r.endTime||t;if(r.startTime<=e&&o>=e)return void a.a.dom.textContent(this.chapter_,r.text)}a.a.dom.textContent(this.chapter_,"")}}},{key:"setCustomChapterText",value:function(e){this.hasCustomChapterText=!!e,a.a.dom.textContent(this.chapter_,null!=e?e:"")}}])&&xa(t.prototype,n),r&&xa(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("TimeTooltip"));a.a.registerComponent("TimeTooltip",Da);n(1176);function Fa(e){return(Fa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function za(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Va(){return(Va="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ua(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Ua(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ga(e)););return e}function Ha(e,t){return(Ha=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ga(e);if(t){var o=Ga(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Wa(this,n)}}function Wa(e,t){if(t&&("object"===Fa(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ga(e){return(Ga=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ka=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ha(e,t)}(i,e);var t,n,r,o=qa(i);function i(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e,t)}return t=i,(n=[{key:"setTrack",value:function(e){this.track_=e}},{key:"createEl",value:function(){var e=Va(Ga(i.prototype),"createEl",this).call(this,"div",{className:"cv-thumbnail-display"});return this.img_=a.a.dom.createEl("img"),e.appendChild(this.img_),e}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(e){var t=e.indexOf("#");if(-1===t)return{src:e,w:0,h:0,x:0,y:0};var n=e.substr(0,t),r=e.substr(t+1);if("xywh="!==r.substr(0,5))return{src:e,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 e=this.options_.scaleFactor,t=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==t&&(e*=2),e}},{key:"update",value:function(e){var t,n;if(null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length){for(var r,o=e,i=0;i<this.track_.cues.length;){var a=this.track_.cues[i];if(a.startTime<=o&&a.endTime>=o){r=this.parseImageLink(a.text);break}i++}if(null==r?void 0:r.src){this.enable();var c=r,u=c.src,l=c.w,s=c.h,f=c.x,p=c.y,y=this.getScale();this.img_.src=u,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()}}}])&&za(t.prototype,n),r&&za(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));Ka.prototype.options_={scaleFactor:1},a.a.registerComponent("ThumbnailDisplay",Ka);n(1177);function Qa(e){return(Qa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Za(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $a(e,t){return($a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ya(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ec(e);if(t){var o=ec(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ja(this,n)}}function Ja(e,t){if(t&&("object"===Qa(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Xa(e)}function Xa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ec(e){return(ec=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$a(e,t)}(i,e);var t,n,r,o=Ya(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),n=o.call(this,e,t),ao(n.player_,"metadata","thumbnails",(function(e){n.getChild("ThumbnailDisplay").setTrack(e)})),n.update=n.update.bind(Xa(n)),n.player_.on("durationchange",n.update),n.player_.one("dispose",(function(){n.player_.off("durationchange",n.update)})),n}return t=i,(n=[{key:"update",value:function(e,t){var n=this;this.requestAnimationFrame((function(){var r=t*n.player_.duration();n.getChild("ThumbnailDisplay").update(r),n.getChild("TimeTooltip").updateTime(r);var o=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-o.width/2+"px";var i=e.width*t;i<o.width/2?n.el_.style.left=o.width/2+"px":i>e.width-o.width/2?n.el_.style.left=e.width-o.width/2+"px":n.el_.style.left=e.width*t+"px"}))}},{key:"forceShow",value:function(){this.addClass("cv-mouse-time-display-force-show")}},{key:"removeForceShow",value:function(){this.removeClass("cv-mouse-time-display-force-show")}}])&&Za(t.prototype,n),r&&Za(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("MouseTimeDisplay"));tc.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},a.a.registerComponent("MouseTimeDisplay",tc);n(1178);function nc(e){return(nc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oc(){return(oc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=ic(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function ic(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=lc(e)););return e}function ac(e,t){return(ac=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function cc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=lc(e);if(t){var o=lc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return uc(this,n)}}function uc(e,t){if(t&&("object"===nc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function lc(e){return(lc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sc=a.a.getComponent("ChaptersTrackMenuItem"),fc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ac(e,t)}(i,e);var t,n,r,o=cc(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).nonIconControl=!1,n.thumbnailDisplay=new Ka(n.player_,{scaleFactor:.5}),n.el().insertBefore(n.thumbnailDisplay.el(),n.el().firstChild),ao(n.player_,"metadata","thumbnails",(function(e){n.addClass("cv-has-thumbnails"),n.thumbnailDisplay.setTrack(e),n.thumbnailDisplay.update(n.options_.cue.startTime)})),n}return t=i,(n=[{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(e,t,n){return this.nonIconControl=!0,oc(lc(i.prototype),"createEl",this).call(this,"li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},t),n)}},{key:"getInnerHTML",value:function(){var e=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(Ta(this.options_.cue.startTime,e),")</p>")+"</span>"}}])&&rc(t.prototype,n),r&&rc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(sc);n(1179);function pc(e){return(pc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hc(){return(hc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=dc(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function dc(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=wc(e)););return e}function bc(e,t){return(bc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wc(e);if(t){var o=wc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return mc(this,n)}}function mc(e,t){if(t&&("object"===pc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return gc(e)}function gc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wc(e){return(wc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Oc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bc(e,t)}(i,e);var t,n,r,o=vc(i);function i(e,t,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,e,t,n)).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(gc(r)),r.player_.on("cv-whiteboard-change",r.update),r.player_.on("fullscreenchange",r.update),r.player_.on("dispose",(function(){r.player_.off("cv-whiteboard-change",r.update),r.player_.off("fullscreenchange",r.update)})),r}return t=i,(n=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(hc(wc(i.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(hc(wc(i.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var o=t[n],i=new fc(this.player_,{track:this.track_,cue:o});e.push(i)}return e}},{key:"setTrack",value:function(e){var t=this;hc(wc(i.prototype),"setTrack",this).call(this,e),this.track_&&"chapters"===this.track_.kind&&e.one("loadeddata",(function(){t.update()}))}},{key:"update",value:function(e){hc(wc(i.prototype),"update",this).call(this,e)}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var e=this.track_.activeCues[0];return(null==e?void 0:e.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var e=this.track_.cues;return!(!e||!e.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&yc(t.prototype,n),r&&yc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("ChaptersButton"));function Cc(e){return(Cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sc(){return(Sc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Pc(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Pc(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Rc(e)););return e}function kc(e,t){return(kc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ec(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Rc(e);if(t){var o=Rc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Tc(this,n)}}function Tc(e,t){if(t&&("object"===Cc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Rc(e){return(Rc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}a.a.registerComponent("ChaptersButton",Oc);var xc=a.a.getComponent("OffTextTrackMenuItem"),Lc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kc(e,t)}(i,e);var t,n,r,o=Ec(i);function i(){return jc(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"handleClick",value:function(e){xc.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(e,t,n){return Sc(Rc(i.prototype),"createEl",this).call(this,"li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},t),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),n)}}])&&_c(t.prototype,n),r&&_c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(xc);function Bc(e){return(Bc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ic(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mc(e,t){return(Mc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ac(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Fc(e);if(t){var o=Fc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Dc(this,n)}}function Dc(e,t){if(t&&("object"===Bc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Fc(e){return(Fc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}a.a.registerComponent("OffTextTrackMenuItem",Lc);var zc=a.a.getComponent("TextTrackButton"),Vc=a.a.getComponent("TextTrackMenuItem"),Uc=a.a.getComponent("OffTextTrackMenuItem"),Hc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mc(e,t)}(i,e);var t,n,r,o=Ac(i);function i(){return Ic(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"createItems",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Vc;this.label_&&(e="".concat(this.label_," off")),t.push(new Uc(this.player_,{kinds:this.kinds_,kind:this.kind_,label:e})),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 a=new n(this.player_,{track:i,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(i.kind,"-menu-item")),t.push(a)}}return t}}])&&Nc(t.prototype,n),r&&Nc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(zc);function qc(e){return(qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kc(e,t){return(Kc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$c(e);if(t){var o=$c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Zc(this,n)}}function Zc(e,t){if(t&&("object"===qc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function $c(e){return($c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}a.a.registerComponent("TextTrackButton",Hc);var Yc=a.a.getComponent("SubsCapsMenuItem"),Jc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kc(e,t)}(i,e);var t,n,r,o=Qc(i);function i(){return Wc(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"handleClick",value:function(e){Yc.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}}])&&Gc(t.prototype,n),r&&Gc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(Yc);function Xc(e){return(Xc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tu(e,t){return(tu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ou(e);if(t){var o=ou(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ru(this,n)}}function ru(e,t){if(t&&("object"===Xc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ou(e){return(ou=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var iu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tu(e,t)}(i,e);var t,n,r,o=nu(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var n={};return n.track={player:e,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSizeMenuItem",(t=o.call(this,e,n)).addClass("vjs-texttrack-settings"),t.addClass("cv-divider-after-menu-item"),t.addClass("cv-subtitle-size-menu-item"),t.controlText(", opens subtitle size settings"),t}return t=i,(n=[{key:"handleClick",value:function(){var e=this;this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])&&eu(t.prototype,n),r&&eu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("TextTrackMenuItem"));function au(e){return(au="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uu(e,t){return(uu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pu(e);if(t){var o=pu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return su(this,n)}}function su(e,t){if(t&&("object"===au(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fu(e)}function fu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pu(e){return(pu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uu(e,t)}(i,e);var t,n,r,o=lu(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var n={};n.track={player:e,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSearchMenuItem",(t=o.call(this,e,n)).addClass("vjs-texttrack-settings"),t.addClass("cv-subtitle-search-menu-item"),t.controlText(", opens subtitle search"),t.toggleEnabled=t.toggleEnabled.bind(fu(t));var r=t.player_.textTracks();return r.addEventListener("selectedlanguagechange",t.toggleEnabled),t.player_.one("dispose",(function(){r.removeEventListener("selectedlanguagechange",t.toggleEnabled)})),t.toggleEnabled(),t}return t=i,(n=[{key:"toggleEnabled",value:function(){var e;if(this.player_){var t=co(this.player_);t?(null===(e=t.cues)||void 0===e?void 0:e.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(t),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.toggleEnabled),e.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",(function(){e.removeEventListener("loadeddata",t.toggleEnabled)}))}},{key:"handleClick",value:function(){var e,t=this,n=co(this.player_);(null===(e=null==n?void 0:n.cues)||void 0===e?void 0:e.length)&&this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])&&cu(t.prototype,n),r&&cu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("TextTrackMenuItem"));n(1180);function hu(e){return(hu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function du(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vu(){return(vu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=mu(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function mu(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Cu(e)););return e}function gu(e,t){return(gu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Cu(e);if(t){var o=Cu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ou(this,n)}}function Ou(e,t){if(t&&("object"===hu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Cu(e){return(Cu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ju=a.a.getComponent("TextTrackButton"),_u=a.a.getComponent("SubsCapsButton"),Su=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gu(e,t)}(i,e);var t,n,r,o=wu(i);function i(){var e;return du(this,i),(e=o.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=i,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(vu(Cu(i.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[new yu(this.player_),new iu(this.player_)];return this.hideThreshold_=this.hideThreshold_+2,ju.prototype.createItems.call(this,e,Jc)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){_u.prototype.handleClick.apply(this)}}])&&bu(t.prototype,n),r&&bu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(_u);function Pu(e){return(Pu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ku(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Eu(e,t){return(Eu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Lu(e);if(t){var o=Lu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ru(this,n)}}function Ru(e,t){if(t&&("object"===Pu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return xu(e)}function xu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lu(e){return(Lu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}a.a.registerComponent("SubsCapsButton",Su);var Bu=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))},Iu="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(De,"</span>"),Nu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eu(e,t)}(i,e);var t,n,r,o=Tu(i);function i(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).qualityId=t.qualityId;var r=e.qualityLevels(),a=n.handleQualityChange.bind(xu(n));return r.on("change",a),e.one("dispose",(function(){r.off("change",a)})),n.handleLocalCacheChange=n.handleLocalCacheChange.bind(xu(n)),n.player_.ready((function(){n.player_&&(n.player_.on("localcachechanged",n.handleLocalCacheChange),n.player_.one("dispose",(function(){var e;null===(e=n.player_)||void 0===e||e.off("localcachechanged",n.handleLocalCacheChange)})),n.handleLocalCacheChange())})),n}return t=i,(n=[{key:"handleLocalCacheChange",value:function(){return Bu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.player_.localCache(),e.next=3,t.getActiveLocalCache();case 3:if(null==(n=e.sent)?void 0:n.playbackProfile){e.next=9;break}return this.show(),this.enable(),this.setLabel(this.options_.label),e.abrupt("return");case 9:n.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+Iu);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"setLabel",value:function(e){var t=this.$(".vjs-menu-item-text");t&&(t.innerHTML=e)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var e=this.player_.qualityLevels(),t=0;t<e.length;t++){var n=e[t];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var e=this.player_.qualityLevels(),t=e[e.selectedIndex],n=t&&t.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&ku(t.prototype,n),r&&ku(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("MenuItem"));n(1181);function Mu(e){return(Mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Au(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Du(){return(Du="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Fu(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Fu(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=qu(e)););return e}function zu(e,t){return(zu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qu(e);if(t){var o=qu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Uu(this,n)}}function Uu(e,t){if(t&&("object"===Mu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Hu(e)}function Hu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qu(e){return(qu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wu={240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},Gu=a.a.getComponent("MenuButton"),Ku=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zu(e,t)}(i,e);var t,n,r,o=Vu(i);function i(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0;var r=n.player_.qualityLevels(),a=n.update.bind(Hu(n));return r.on("addqualitylevel",a),r.on("removequalitylevel",a),e.one("dispose",(function(){r.removeEventListener("addqualitylevel",a),r.removeEventListener("removequalitylevel",a)})),n}return t=i,(n=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(Du(qu(i.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(Du(qu(i.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[],t=this.player_.qualityLevels();e.push(new Sn(this.player_,{label:"Quality"}));for(var n=0;n<t.length;n++){var r=t[n];if(r){var o=Wu[r.id];o&&e.push(new Nu(this.player_,{qualityId:r.id,label:o,selectable:!0,multiSelectable:!1}))}}return e}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.qualityLevels(),t=e[e.selectedIndex];return t?Wu[t.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){Gu.prototype.handleClick.apply(this)}}])&&Au(t.prototype,n),r&&Au(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(Gu);a.a.registerComponent("QualityButton",Ku);n(1182);function Qu(e){return(Qu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yu(){return(Yu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ju(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Ju(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=nl(e)););return e}function Xu(e,t){return(Xu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function el(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=nl(e);if(t){var o=nl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tl(this,n)}}function tl(e,t){if(t&&("object"===Qu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function nl(e){return(nl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rl=a.a.getComponent("Menu"),ol=a.a.getComponent("MenuButton"),il=a.a.getComponent("PlaybackRateMenuItem"),al=a.a.getComponent("PlaybackRateMenuButton"),cl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xu(e,t)}(i,e);var t,n,r,o=el(i);function i(){var e;return Zu(this,i),(e=o.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=i,(n=[{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=ol.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Yu(nl(i.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createMenu",value:function(){var e=new rl(this.player(),{menuButton:this});e.addItem(new Sn(this.player_,{label:"Playback Speed"}));var t=this.playbackRates();if(t)for(var n=0;n<t.length;n++){var r=t[n]+"x";1===t[n]&&(r+=" (Normal)"),e.addItem(new il(this.player(),{rate:r}))}return e}},{key:"handleClick",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=ol.prototype.handleClick).apply.apply(e,[this].concat(n))}},{key:"updateLabel",value:function(){var e;this.setupLabelEl();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=al.prototype.updateLabel).apply.apply(e,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var e=this.$("button");e&&(this.labelEl_=a.a.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.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)}}])&&$u(t.prototype,n),r&&$u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(al);function ul(e){return(ul="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ll(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fl(e,t){return(fl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=hl(e);if(t){var o=hl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return yl(this,n)}}function yl(e,t){if(t&&("object"===ul(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function hl(e){return(hl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}a.a.registerComponent("PlaybackRateMenuButton",cl);var dl=a.a.getComponent("TextTrackSettings"),bl={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},vl={small:bl,medium:Object.assign(Object.assign({},bl),{fontPercent:1.5}),large:Object.assign(Object.assign({},bl),{fontPercent:2})},ml=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fl(e,t)}(i,e);var t,n,r,o=pl(i);function i(){return ll(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"setSizeSetting",value:function(e){this.size_=e,this.player_.getChild("textTrackDisplay").updateDisplay(),this.player_.getChild("collapserator").getChild("subtitleSizeButton").update(),this.player_.trigger("resizemenus"),this.player_.trigger("changesubtitlesize",this.size_)}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return vl[this.size_]?vl[this.size_]:bl}}])&&sl(t.prototype,n),r&&sl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(dl);a.a.registerComponent("TextTrackSettings",ml);n(1183);function gl(e){return(gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ol(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cl(){return(Cl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=jl(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function jl(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=kl(e)););return e}function _l(e,t){return(_l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kl(e);if(t){var o=kl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Pl(this,n)}}function Pl(e,t){if(t&&("object"===gl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function kl(e){return(kl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var El=window.navigator&&window.navigator.userAgent||"",Tl=(/iPod/i.test(El),/Android/i.test(El),a.a.getComponent("Player")),Rl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_l(e,t)}(i,e);var t,n,r,o=Sl(i);function i(){return wl(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"lock",value:function(e){this.callback_=e}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(e,t){var n=this;if("number"!=typeof e||!this.callback_||t)return Cl(kl(i.prototype),"currentTime",this).call(this,e);this.callback_((function(){n.unlock(),n.currentTime(e)}))}},{key:"play",value:function(){var e=this;if(!this.callback_)return Cl(kl(i.prototype),"play",this).call(this);this.callback_((function(){e.unlock(),e.play()}))}},{key:"updateStyleEl_",value:function(){if(Tl.prototype.updateStyleEl_.call(this),this.options_.fluid){var e=this.el_.parentNode;if(e&&this.options_.setMaxHeight){var t=this.aspectRatio();void 0!==t&&"auto"!==t||(t=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9");var n=t.split(":"),r=+n[1]/+n[0];e.style.maxWidth=85/r+"vh",e.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var e=this;Tl.prototype.listenForUserActivity_.call(this);var t=this.getChild("collapserator");t.on("mouseenter",(function(){e.player().cache_.inactivityTimeout=e.player().options_.inactivityTimeout,e.player().options_.inactivityTimeout=0})),t.on("mouseleave",(function(){e.player().options_.inactivityTimeout=e.player().cache_.inactivityTimeout}))}}])&&Ol(t.prototype,n),r&&Ol(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(Tl);Rl.prototype.options_=Object.assign(Object.assign({},Tl.prototype.options_),{setMaxHeight:!0}),a.a.registerComponent("player",Rl);n(1184);function xl(e){return(xl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ll(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bl(e,t){return(Bl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Il(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Al(e);if(t){var o=Al(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Nl(this,n)}}function Nl(e,t){if(t&&("object"===xl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ml(e)}function Ml(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Al(e){return(Al=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Dl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bl(e,t)}(i,e);var t,n,r,o=Il(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).player_.addClass("cv-disable-play-pause-feedback"),n.onFirstPlay=n.onFirstPlay.bind(Ml(n)),n.player_.one("firstplay",n.onFirstPlay),n}return t=i,(n=[{key:"dispose",value:function(){this.player_.off("firstplay",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var e=this;window.setTimeout((function(){e.player_.isDisposed()||e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"createEl",value:function(){return a.a.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&Ll(t.prototype,n),r&&Ll(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));a.a.registerComponent("PlayPauseFeedback",Dl);n(1185);function Fl(e){return(Fl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ul(e,t){return(Ul=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Wl(e);if(t){var o=Wl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ql(this,n)}}function ql(e,t){if(t&&("object"===Fl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Wl(e){return(Wl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gl=a.a.getComponent("PlayToggle"),Kl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ul(e,t)}(i,e);var t,n,r,o=Hl(i);function i(){return zl(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"handleClick",value:function(e){var t=this;Gl.prototype.handleClick.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&Vl(t.prototype,n),r&&Vl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(Gl);a.a.registerComponent("PlayToggle",Kl);n(1186),n(1187),n(1188),n(1189),n(1190);var Ql,Zl=n(1217),$l=n.n(Zl);function Yl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jl(e){e.paused()?e.play():e.pause()}function Xl(e,t){e.currentTime(e.currentTime()+t)}function es(e,t){e.volume(e.volume()+t)}var ts=(Yl(Ql={},"f",(function(e){document[e.fsApi_.fullscreenEnabled]&&(e.isFullscreen()?e.exitFullscreen():e.requestFullscreen())})),Yl(Ql,"m",(function(e){var t=e.volume(),n=e.lastVolume_();if(0===t){var r=n<.1?.1:n;e.volume(r),e.muted(!1)}else e.muted(!e.muted())})),Yl(Ql,"k",Jl),Yl(Ql,"space",Jl),Yl(Ql,"left",(function(e){return Xl(e,-5)})),Yl(Ql,"right",(function(e){return Xl(e,5)})),Yl(Ql,"j",(function(e){return Xl(e,-10)})),Yl(Ql,"l",(function(e){return Xl(e,10)})),Yl(Ql,"up",(function(e){return es(e,.05)})),Yl(Ql,"down",(function(e){return es(e,-.05)})),Ql);function ns(e){var t=$l()(e);ts[t]&&(["space"].includes(t)&&(e.preventDefault(),e.stopPropagation()),ts[t](this,e))}function rs(e){return(rs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function os(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function is(e,t){if(t&&("object"===rs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function as(e){var t="function"==typeof Map?new Map:void 0;return(as=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return cs(e,arguments,ss(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ls(r,e)})(e)}function cs(e,t,n){return(cs=us()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&ls(o,n.prototype),o}).apply(null,arguments)}function us(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ls(e,t){return(ls=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ss(e){return(ss=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ls(e,t)}(c,e);var t,n,r,o,i,a=(t=c,n=us(),function(){var e,r=ss(t);if(n){var o=ss(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return is(this,e)});function c(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(n=a.call(this,e)).url=t,n}return r=c,o&&os(r.prototype,o),i&&os(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}(as(Error));function ps(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ys=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))},hs=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tokens={gateway:null}}var t,n,r;return t=e,(n=[{key:"get",value:function(e,t){return ys(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=this,n.next=3,fetch(e,{method:"GET",mode:"cors",headers:this.getHeaders(t)});case 3:return n.t1=n.sent,n.next=6,n.t0.parseResponse.call(n.t0,n.t1);case 6:return n.abrupt("return",n.sent);case 7:case"end":return n.stop()}}),n,this)})))}},{key:"delete",value:function(e,t){return ys(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,fetch(e,{method:"DELETE",headers:this.getHeaders(t)});case 2:case"end":return n.stop()}}),n,this)})))}},{key:"post",value:function(e,t,n){return ys(this,void 0,void 0,regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(e,{method:"POST",headers:this.getHeaders(n),body:t,mode:"cors"});case 3:return r.t1=r.sent,r.next=6,r.t0.parseResponse.call(r.t0,r.t1);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"put",value:function(e,t,n){return ys(this,void 0,void 0,regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(e,{method:"PUT",headers:this.getHeaders(n),body:t,mode:"cors"});case 3:return r.t1=r.sent,r.next=6,r.t0.parseResponse.call(r.t0,r.t1);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"setToken",value:function(e,t){this.tokens[e]=t}},{key:"getHeaders",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={"Content-Type":"application/json"};return this.tokens[e.tokenName]&&(t.authorization="Bearer ".concat(this.tokens[e.tokenName])),t}},{key:"parseResponse",value:function(e){return ys(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(404!==e.status){t.next=2;break}return t.abrupt("return",null);case 2:if(e.ok){t.next=4;break}throw new fs("Ajax error",e.url);case 4:return t.next=6,e.json();case 6:return n=t.sent,t.abrupt("return",n);case 8:case"end":return t.stop()}}),t)})))}}])&&ps(t.prototype,n),r&&ps(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()),ds=n(110),bs=n(315),vs=n(3),ms=n(257);function gs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ws=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))},Os=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()}var t,n,r;return t=e,(n=[{key:"logStream",value:function(){var e="v:".concat(this.options.videoId);ds.a.cacheExists(e)||(this.collectionApiClient.log({type:vs.UserAction.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:vs.EventVersion.V2}),ds.a&&ds.a.cacheSet(e,null,300))}},{key:"logVideoProgress",value:function(e){var t=this,n=this.getAnalyticsData();this.collectionApiClient.log(e.map((function(e){return{type:vs.UserAction.StreamProgress,actionContext:t.getActionContext(),data:Object.assign(Object.assign({},n),{progress:e}),eventVersion:vs.EventVersion.V1}})))}},{key:"logUserAction",value:function(e,t){var n=Object.assign(Object.assign({},this.getAnalyticsData()),e);this.collectionApiClient.log({type:t.actionType,data:n,actionContext:{productArea:t.productArea,location:this.getLocationContext(),entity:t.entity,descriptor:t.descriptor,workflowPhase:t.workflowPhase},eventVersion:vs.EventVersion.V1})}},{key:"getAnalyticsData",value:function(){var e=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(e.video.shareId=this.options.shareId);var t=this.getEntityType();return t===vs.EntityType.Interactive?e.interactive={id:+this.options.mediaId}:t===vs.EntityType.Clip&&(e.clip={id:+this.options.mediaId}),e}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var e=this;this.collectionApiClient=new bs.a({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return e.getCurrentUser()},shouldLog:ms.a.shouldLog,formatData:ms.a.formatData})}},{key:"getCurrentUser",value:function(){return ws(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{id:this.options.userId,customerId:this.options.customerId});case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?vs.PlayerDescriptor.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return vs.EntityType.Video;case"MasterInteractive":return vs.EntityType.Interactive;case"MasterClip":return vs.EntityType.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return vs.LocationContext.Player;case"interactive-player":return vs.LocationContext.InteractivePlayer;case"create-clip-player":return vs.LocationContext.CreateClipPlayer}}}])&&gs(t.prototype,n),r&&gs(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Cs(e){return(Cs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function js(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _s(){return(_s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ss(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Ss(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ts(e)););return e}function Ps(e,t){return(Ps=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ks(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ts(e);if(t){var o=Ts(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Es(this,n)}}function Es(e,t){if(t&&("object"===Cs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ts(e){return(Ts=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Rs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ps(e,t)}(i,e);var t,n,r,o=ks(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).options_=t,n}return t=i,(n=[{key:"createEl",value:function(e,t,n){var r="<h1>".concat(this.options_.title,"</h1>");if(!this.options_.seriesName)return _s(Ts(i.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n);var o=this.buildSeasonEpisodeString();return o?(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase()," ").concat(o,"</div>")+r,_s(Ts(i.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n)):(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+r,_s(Ts(i.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var e=this.padNumber(this.options_.seasonNumber,2),t=this.padNumber(this.options_.episodeNumber,2);return"S".concat(e," • E").concat(t)}},{key:"padNumber",value:function(e,t){var n=e.toString();if(n.length>=t)return n;for(t-=n.length;t>0;)n="0"+n,t--;return n}}])&&js(t.prototype,n),r&&js(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));function xs(e){return(xs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ls(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bs(){return(Bs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Is(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Is(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ds(e)););return e}function Ns(e,t){return(Ns=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ms(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ds(e);if(t){var o=Ds(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return As(this,n)}}function As(e,t){if(t&&("object"===xs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ds(e){return(Ds=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ns(e,t)}(i,e);var t,n,r,o=Ms(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).options_=t,n}return t=i,(n=[{key:"buildCSSClass",value:function(){return"cv-splash-warning-container ".concat(Bs(Ds(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){var r=Bs(Ds(i.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n);if(!this.options_.ratingCode)return r;var o=this.mapCodeToColourClass(this.options_.ratingCode);return r.appendChild(a.a.dom.createEl("div",{className:"cv-splash-rating badge rating-badge ".concat(o),innerHTML:this.options_.ratingCode})),this.options_.warning&&r.appendChild(a.a.dom.createEl("div",{className:"cv-splash-warning",innerHTML:this.options_.warning})),r}},{key:"mapCodeToColourClass",value:function(e){switch(e){case"E":return"bg-purple";case"G":return"bg-green";case"PG":return"bg-info";case"M":return"bg-red";case"MA15+":return"bg-pink";case"R18+":return"bg-yellow"}}}])&&Ls(t.prototype,n),r&&Ls(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));function zs(e){return(zs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Us(e,t){return(Us=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ws(e);if(t){var o=Ws(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return qs(this,n)}}function qs(e,t){if(t&&("object"===zs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ws(e){return(Ws=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Us(e,t)}(i,e);var t,n,r,o=Hs(i);function i(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e,t)}return t=i,(n=[{key:"createEl",value:function(){var e=a.a.dom.createEl("div",{className:"cv-splash-metadata ".concat(this.options_.embed?"cv-embed-splash-metadata":"")});return this.options_.embed&&e.appendChild(new Rs(this.player_,{title:this.options_.title,seriesName:this.options_.seriesName,seasonNumber:this.options_.seasonNumber,episodeNumber:this.options_.episodeNumber}).el()),e.appendChild(new Fs(this.player_,{warning:this.options_.warning,ratingCode:this.options_.ratingCode}).el()),e}}])&&Vs(t.prototype,n),r&&Vs(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));n(1191);function Ks(e){return(Ks="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zs(){return(Zs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=$s(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function $s(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ef(e)););return e}function Ys(e,t){return(Ys=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Js(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ef(e);if(t){var o=ef(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xs(this,n)}}function Xs(e,t){if(t&&("object"===Ks(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ef(e){return(ef=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ys(e,t)}(i,e);var t,n,r,o=Js(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).addChild(new Gs(n.player_,n.options_)),n}return t=i,(n=[{key:"createEl",value:function(e,t,n){var r="<div class='cv-player-mask'></div>";return this.options_.embed&&(r+="<div class='cv-embed-logo'>".concat(R,"</div>")),Zs(ef(i.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass(),innerHTML:r}),n)}}])&&Qs(t.prototype,n),r&&Qs(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Component")),nf=n(102);function rf(e){return function(e){if(Array.isArray(e))return of(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return of(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return of(e,t)}(e)||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 of(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function af(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var cf,uf=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))},lf=a.a.getComponent("Player"),sf=450,ff=function(){function e(t,n){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamLogged=!1,this.options=a.a.mergeOptions({},e.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(t),this.buildVideoJs(),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready((function(){r._configurePlugins(),r.options.setup&&r.options.setup(r.options,r.player),r.fetch().catch((function(e){r.player.error(e.message),r.options.onError&&r.options.onError(e)}))}))}var t,n,r;return t=e,(n=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),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(e){var t;null===(t=this.analyticsService)||void 0===t||t.logVideoProgress(e)}},{key:"buildVideoJs",value:function(){return this.player=Object(a.a)(this.el,this.getPlayerOptions())}},{key:"getPlayerOptions",value:function(){var e=lf.prototype.options_.children;return e=e.filter((function(e){return"bigPlayButton"!==e&&"posterImage"!==e})),{controls:this.options.controls,fluid:!this.options.embed,fill:!!this.options.embed,inactivityTimeout:500,controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(rf(e),["collapserator","playPauseFeedback"]),userActions:{hotkeys:ns},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio}}},{key:"fetch",value:function(){var e,t,n;return uf(this,void 0,void 0,regeneratorRuntime.mark((function r(){var o,i,a,c=this;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o=this.options.fetch,void 0===this.options.fetch&&(o=function(e){var t="".concat(c.options.playerApi.origin,"/api/playback?viewKey=").concat(e);return hs.get(t)}),this.options.viewKey){r.next=4;break}throw new Error("Please specify a viewKey or a fetch function");case 4:return r.next=6,o(this.options.viewKey);case 6:if(i=r.sent){r.next=9;break}throw new Error("Error fetching playback object");case 9:i.chapters.list.length>0&&(a=this.player.addTextTrack("chapters"),i.chapters.list.forEach((function(e){a.addCue({startTime:e.timestamp,endTime:e.endTimestamp,text:e.name})})),a.trigger({type:"loadeddata",target:a})),this.player.localCache({localCacheAddresses:i.localCacheAddresses,enabled:null===(e=this.options.enableLocalCache)||void 0===e||e}),this.player.progressiveFiles({sources:i.files.progressive.map((function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}}))}),i.subtitles.list.length>0&&(i.subtitles.list.forEach((function(e){"text/vtt"===e.mimeType&&c.player.addRemoteTextTrack({kind:"subtitles",src:e.url,language:e.language,label:e.label},!0)})),this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(t=i.settings)||void 0===t?void 0:t.showSubtitles,subtitleSize:null===(n=i.settings)||void 0===n?void 0:n.playbackSubtitleSizeDefault})),i.posterUrl&&this.player.poster(i.posterUrl),this.options.autoplay||this.setupSplash(i),this.additionalSetup(i),this.options.autoplay&&this.player.ready((function(){c.player.play().catch((function(){c.setupSplash(i)}))})),this.options.startTime&&this.player.currentTime(this.options.startTime);case 18:case"end":return r.stop()}}),r,this)})))}},{key:"fetchConfig",value:function(){var e=this;if(!cf&&!this.options.fetch){var t="".concat(this.options.playerApi.origin,"/api/config");hs.get(t).then((function(t){cf=t,e.trigger("config:loaded")}))}}},{key:"additionalSetup",value:function(e){var t,n,r,o=this;this.player.persistQualitySettingsPlugin({playbackProfile:null===(t=e.settings)||void 0===t?void 0:t.playbackProfile,playbackProfileLocalCache:null===(n=e.settings)||void 0===n?void 0:n.playbackProfileLocalCache}),this.player.whiteboardModePlugin();var i=this.options.enableLocalCache&&!!(null===(r=e.localCacheAddresses)||void 0===r?void 0:r.length);cf?this.setupAnalyticsService(e,i):this.one("config:loaded",(function(){return o.setupAnalyticsService(e,i)}))}},{key:"setupAnalyticsService",value:function(e,t){this.analyticsService=new Os({collectionApiUrls:cf.collectionApi.urls,collectionApiClientId:cf.collectionApi.clientId,productVersion:c.a,videoId:e.videoId,mediaId:e.mediaId,userId:e.viewerId,shareId:e.shareId,customerId:e.viewerCustomerId,mediaType:e.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:!!this.options.embed,isUsingLocalCache:t,additionalAnalyticsData:this.getAdditionalAnalyticsData(e),regionName:e.instanceRegion||this.options.sharerInstanceRegion||nf.a.CvApSoutheast1}),this.on("timeupdate",this.logStream)}},{key:"getAdditionalAnalyticsData",value:function(e){return{}}},{key:"logStream",value:function(){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(e){var t;"string"==typeof e?(e=function(e){return 0===e.indexOf("#")?e.slice(1):e}(e),t=a.a.dom.$("#"+e)):t=e;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=a.a.dom.createEl("video",{},{class:n}),t.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(e,t){this.player.on(e,t)}},{key:"one",value:function(e,t){this.player.one(e,t)}},{key:"off",value:function(e,t){this.player.off(e,t)}},{key:"trigger",value:function(e,t){return this.player.trigger(e,t)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(e){this.player.ready(e)}},{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(e){return this.player.currentTime(e)}},{key:"duration",value:function(){return this.player.duration()}},{key:"bindEventListeners",value:function(){var e=this,t=function(){return e.configureMenuDimensions()};if(this.player.ready(t),this.on("resize",t),this.on("fullscreenchange",t),this.one("play",t),this.on("resizemenus",t),this.player.one("dispose",(function(){e.off("resize",t),e.off("fullscreenchange",t),e.off("resizemenus",t)})),this.options.hotkeyElQuerySelector){var n=a.a.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.one("dispose",(function(){e.player.off(n,"keydown",e.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var e=this.getSeekBarName(),t=this.player.controlBar.getChild("progressControl");t.addChild(e,this.getSeekBarOptions()),t.setSeekBarName(e)}},{key:"setupSplash",value:function(e){var t=this.player.addChild("posterImage");this.player.addChild("bigPlayButton");var n=new tf(this.player,{embed:this.options.embed,posterUrl:e.posterUrl,title:e.title,ratingCode:e.ratingCode,seriesName:e.seriesName,seasonNumber:e.seasonNumber,episodeNumber:e.episodeNumber});t.addChild(n),t.show()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}},{key:"configureMenuDimensions",value:function(){var e=this;if(this.player.isFullscreen()){var t=this.player.whiteboardModePlugin().side;if("top"===t){var n=this.player.getChild("collapserator"),r=n.getChild("volumePanel"),o=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:!1},o),this.player.trigger("volumechange")}else{var i=this.player.getChild("collapserator"),a=i.getChild("volumePanel"),c=i.children_.indexOf(a);i.removeChild(a),i.addChild("volumePanel",{inline:!0},c),this.player.trigger("volumechange")}if("left"===t||"right"===t||"top"===t){var u=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(e){e.style.paddingTop=null,e.style.marginBottom=null,e.style.width="calc(".concat(u,"px - 4em)")}))}}var l=this.player.currentWidth(),s=this.player.currentHeight()/l*100,f=this.player.el().querySelector(".cv-collapsorator"),p=this.player.el().querySelectorAll(".vjs-menu"),y=f&&f.offsetHeight;y?("CreateClipSeekBar"===this.getSeekBarName()&&(y+=22),p&&p.length&&p.forEach((function(t){t.style.paddingTop="calc(".concat(s,"% - ").concat(y,"px)"),t.style.marginBottom="".concat(y,"px"),t.style.width=null,t.querySelector(".vjs-menu-content")&&(l<=sf?e.player.addClass("cv-player-small"):e.player.removeClass("cv-player-small"))}))):this.one("play",(function(){return e.configureMenuDimensions()}))}}])&&af(t.prototype,n),r&&af(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();ff.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};var pf=n(1096),yf=n.n(pf),hf=n(1250),df=n.n(hf),bf=n(1122);function vf(e){var t,n=e.interactive.timepoints.find((function(t){var n=t.visibleAt/1e3;return Math.floor(e.time)===Math.floor(n)||Math.ceil(e.time)===Math.ceil(n)}));if(!(null===(t=null==n?void 0:n.interactions)||void 0===t?void 0:t.length))return o.a.createElement(o.a.Fragment,null);var r=n.interactions.length>3?n.interactions.slice(0,2):n.interactions,i=n.interactions.length-r.length;return o.a.createElement("div",{className:"d-flex justify-content-end ml-2"},r.map((function(e,t){return o.a.createElement(bf.a,{key:t,interaction:e,showQuestion:!1,iconClassName:"ml-1"})})),!!i&&o.a.createElement("div",{className:"interaction-type-icon d-flex justify-content-center align-items-center border border-dark text-body ml-1"},"+".concat(i)))}function mf(e){return function(e){if(Array.isArray(e))return gf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return gf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gf(e,t)}(e)||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 gf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var wf={title:{text:null},xAxis:{visible:!1,minPadding:0,maxPadding:0},legend:{enabled:!1},credits:{enabled:!1},defs:{gradient:{tagName:"linearGradient",id:"area-gradient",x1:0,y1:1,x2:0,y2:0,children:[{tagName:"stop",offset:0},{tagName:"stop",offset:1}]}}};function Of(e,t){return{styledMode:!0,spacing:[15,0,0,0],width:e,height:t}}function Cf(e){return{formatter:function(){var t=e?function(e,t){return df.a.renderToStaticMarkup(o.a.createElement(vf,{time:t,interactive:e}))}(e,this.x):"";return'<div class="cv-engagement-tooltip bg-white rounded"><div class="d-flex justify-content-between">'+"<strong>".concat(Ta(this.x),"</strong>")+"".concat(t)+'</div><div class="d-flex justify-content-between rounded bg-light cv-view-count-container">'+'<strong>Views</strong> <span class="cv-view-count">'.concat(this.y,"</span>")+"</div></div>"},positioner:function(e,t,n){var r=this.chart.plotWidth-e,o=n.plotX-e/2;return{x:Math.min(Math.max(o,0),r),y:this.chart.plotTop}},useHTML:!0,padding:0}}n(1192);function jf(e){return(jf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sf(){return(Sf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Pf(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Pf(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Rf(e)););return e}function kf(e,t){return(kf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ef(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Rf(e);if(t){var o=Rf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Tf(this,n)}}function Tf(e,t){if(t&&("object"===jf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Rf(e){return(Rf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xf=a.a.getComponent("Component");yf.a.AST.allowedTags.push("g"),yf.a.AST.allowedAttributes.push("viewBox","transform");var Lf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kf(e,t)}(i,e);var t,n,r,o=Ef(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).initialize(),n.bindListeners(),n}return t=i,(n=[{key:"initialize",value:function(){var e=this;this.player().ready((function(){return e.buildChart()}))}},{key:"buildCSSClass",value:function(){return"cv-engagement-overlay"}},{key:"createEl",value:function(e,t,n){return Sf(Rf(i.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass(),innerHTML:'<div class="cv-engagement-chart"></div><div class="cv-engagement-timepoint-indicator"></div>'}),n)}},{key:"toggleChart",value:function(e){e?this.buildChart():this.destroyChart()}},{key:"bindListeners",value:function(){var e=this;this.handleClick=this.handleClick.bind(this),this.resizeChart=this.resizeChart.bind(this),this.player().on("playerresize",this.resizeChart),this.on(this.el(),"mouseup",this.handleClick),this.player().on("dispose",(function(){e.player().off("playerresize",e.resizeChart),e.off(e.el(),"mouseup",e.handleClick)}))}},{key:"handleClick",value:function(e){a.a.dom.isSingleLeftClick(e)&&(this.player().paused()?this.player().play():this.player().pause())}},{key:"buildChart",value:function(){var e=this;if(!this.chart){var t=this.getChartDimensions();if(t){var n=this.el().querySelector(".cv-engagement-chart");this.chart=yf.a.chart(n,this.getHighchartOptions(t))}else this.player().one("play",(function(){return e.buildChart()}))}}},{key:"resizeChart",value:function(){var e=this.getChartDimensions();this.chart&&e&&this.chart.setSize(e.width,e.height)}},{key:"destroyChart",value:function(){var e;null===(e=this.chart)||void 0===e||e.destroy(),this.chart=null}},{key:"getChartDimensions",value:function(){var e=this.player().getChild("collapserator"),t=null==e?void 0:e.currentHeight(),n=this.el().clientWidth;return t&&n?{width:n,height:this.player().currentDimensions().height-t}:null}},{key:"getHighchartOptions",value:function(e){var t,n,r=e.width,o=e.height;return Object.assign(Object.assign({},wf),{chart:Of(r,o),yAxis:(n=this.options_.heatMap,{max:1.05*Math.max.apply(Math,mf(n)),min:0,minPadding:0,maxPadding:0,allowDecimals:!0,startOnTick:!1,endOnTick:!1,visible:!1}),tooltip:Cf(this.options_.interactive),plotOptions:(t=this.moveTimepointIndicator.bind(this),{area:{point:{events:{mouseOver:function(){t(this.x)},mouseOut:function(){t(null)}}}},series:{marker:{enabled:!1}}}),series:[{type:"area",data:this.options_.heatMap}]})}},{key:"moveTimepointIndicator",value:function(e){this.options_.onTimepointHover&&this.options_.onTimepointHover(e);var t=this.el().querySelector(".cv-engagement-timepoint-indicator");null!==e?(a.a.dom.addClass(t,"cv-engagement-timepoint-indicator-visible"),t.style.left="".concat(e/this.options_.heatMap.length*100,"%")):a.a.dom.removeClass(t,"cv-engagement-timepoint-indicator-visible")}}])&&_f(t.prototype,n),r&&_f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(xf);function Bf(e){return(Bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function If(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nf(){return(Nf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Mf(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Mf(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=zf(e)););return e}function Af(e,t){return(Af=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Df(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=zf(e);if(t){var o=zf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ff(this,n)}}function Ff(e,t){if(t&&("object"===Bf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function zf(e){return(zf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}a.a.registerComponent("EngagementOverlay",Lf);var Vf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Af(e,t)}(i,e);var t,n,r,o=Df(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).overlayVisible=t.overlayVisible,n.toggle(n.overlayVisible),n}return t=i,(n=[{key:"handleToggle",value:function(){this.toggle(!this.overlayVisible)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){a.a.dom.addClass(this.toggleEl,"on"),this.overlayVisible=!0,this.player().engagementOverlayPlugin().toggleOverlay(this.overlayVisible),this.player().addClass("cv-reports-player-overlay-visible")}},{key:"toggleOff",value:function(){a.a.dom.removeClass(this.toggleEl,"on"),this.overlayVisible=!1,this.player().engagementOverlayPlugin().toggleOverlay(this.overlayVisible),this.player().removeClass("cv-reports-player-overlay-visible")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=a.a.dom.createEl("div",{className:"custom-toggle toggle-option float-right",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=Nf(zf(i.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Heat Map</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&If(t.prototype,n),r&&If(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("MenuItem"));function Uf(e){return(Uf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qf(e,t){return(qf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Kf(e);if(t){var o=Kf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Gf(this,n)}}function Gf(e,t){if(t&&("object"===Uf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Kf(e){return(Kf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}a.a.registerComponent("EngagementOverlayMenuItem",Vf);var Qf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qf(e,t)}(i,e);var t,n,r,o=Wf(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).options=t,e.ready((function(){n.initialize()})),n}return t=i,(n=[{key:"initialize",value:function(){var e;this.hasHeatMapData()&&(this.player.addChild("engagementOverlay",{heatMap:this.options.heatMap,interactive:this.options.interactive,onTimepointHover:this.options.onTimepointHover}),(null===(e=this.player.getChild("collapserator"))||void 0===e?void 0:e.getChild("cogButton")).addItem({index:0,ctor:Vf,name:"EngagementOverlayMenuItem",options:{overlayVisible:!0}}))}},{key:"toggleOverlay",value:function(e){var t=this.player.getChild("engagementOverlay");null==t||t.toggleChart(e)}},{key:"hasHeatMapData",value:function(){var e;return(null===(e=this.options.heatMap)||void 0===e?void 0:e.reduce((function(e,t){return e+t}),0))>0}}])&&Hf(t.prototype,n),r&&Hf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));function Zf(e){return(Zf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yf(){return(Yf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Jf(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Jf(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=rp(e)););return e}function Xf(e,t){return(Xf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ep(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rp(e);if(t){var o=rp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tp(this,n)}}function tp(e,t){if(t&&("object"===Zf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return np(e)}function np(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rp(e){return(rp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}a.a.registerPlugin("engagementOverlayPlugin",Qf);var op=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xf(e,t)}(i,e);var t,n,r,o=ep(i);function i(e,t){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),n=o.call(this,e),void 0===t.startTime)throw Error("Invalid clip start");if(void 0===t.endTime)throw Error("Invalid clip end");if(t.startTime>t.endTime)throw Error("Clip start cannot be greater than clip end");return n._clipStart=parseFloat(t.startTime.toPrecision(4)),n._clipEnd=parseFloat(t.endTime.toPrecision(4)),n.playerEndedFn=n.player.ended.bind(e),n.playerDurationFn=n.player.duration.bind(e),n.playerCurrentTimeFn=n.player.currentTime.bind(e),n.playerbufferedFn=n.player.buffered.bind(e),n.player.ended=n.ended.bind(np(n)),n.player.duration=n.duration.bind(np(n)),n.player.currentTime=n.currentTime.bind(np(n)),n.player.buffered=n.buffered.bind(np(n)),n.initialize(),n.player.ready((function(){n.player.trigger("durationchange")})),n}return t=i,(n=[{key:"clipStart",get:function(){var e=this.playerDurationFn();return this._clipStart>e?e:this._clipStart}},{key:"clipEnd",get:function(){var e=this.playerDurationFn();return this._clipEnd>e?e:this._clipEnd}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.player.off("play",this.onPlay),this.player.ended=this.playerEndedFn,this.player.duration=this.playerDurationFn,this.player.currentTime=this.playerCurrentTimeFn,this.player.buffered=this.playerbufferedFn,this.player.trigger("durationchange"),Yf(rp(i.prototype),"dispose",this).call(this)}},{key:"initialize",value:function(){this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay)}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var e=this.getCurrentTime(!1);e>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,e<this.clipStart&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(e){return void 0!==e&&this.playerDurationFn(e),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(e){if(void 0===e)return this.getCurrentTime(!0);for(var t=e+this.clipStart,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.playerCurrentTimeFn.apply(this,[t].concat(r))}},{key:"getCurrentTime",value:function(e){var t=this.playerCurrentTimeFn(),n=0;return t>=this.clipStart&&(n=t-this.clipStart),this.player.getCache().currentTime=n,e?n:t}},{key:"buffered",value:function(){for(var e=this.playerbufferedFn(),t=[],n=0;n<e.length;n++)t[n]=[Math.max(0,e.start(n)-this.clipStart),Math.min(Math.max(0,e.end(n)-this.clipStart),this.player.duration())];return a.a.createTimeRanges(t)}}])&&$f(t.prototype,n),r&&$f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));a.a.registerPlugin("clipPlugin",op);var ip=n(1123);n(1193);function ap(e){return(ap="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function up(){return(up="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=lp(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function lp(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=yp(e)););return e}function sp(e,t){return(sp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yp(e);if(t){var o=yp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return pp(this,n)}}function pp(e,t){if(t&&("object"===ap(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function yp(e){return(yp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sp(e,t)}(i,e);var t,n,r,o=fp(i);function i(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).timepoint_=t.timepoint,n.time_=t.timepoint.visibleAt/1e3;var r=t.timepoint.interactions[0];r||n.hide();var a=ip.a.getTypeInfo(r.typeId).bgClassName;return n.$(".vjs-icon-placeholder").classList.add(a),n.controlText(r.name),n.update(),n}return t=i,(n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-item ".concat(up(yp(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return up(yp(i.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),Object.assign(Object.assign({},n),{tabIndex:0}))}},{key:"update",value:function(){var e=this.player_.duration(),t=this.time_/e;this.el().style.left=100*t+"%",t>100||t<0?this.hide():this.show()}},{key:"handleClick",value:function(e){e.stopPropagation(),this.player_.currentTime(this.time_)}}])&&cp(t.prototype,n),r&&cp(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Button"));n(1194);function dp(e){return(dp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bp(e){return function(e){if(Array.isArray(e))return vp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return vp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vp(e,t)}(e)||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 vp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gp(){return(gp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=wp(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function wp(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Sp(e)););return e}function Op(e,t){return(Op=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Sp(e);if(t){var o=Sp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return jp(this,n)}}function jp(e,t){if(t&&("object"===dp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _p(e)}function _p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sp(e){return(Sp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Op(e,t)}(i,e);var t,n,r,o=Cp(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t)).track_=t.track,n.interactive_=t.interactive,n.onDurationChange=n.onDurationChange.bind(_p(n)),n.createInteractionItems=n.createInteractionItems.bind(_p(n)),n.createInteractionItems(),n.track_.on("cv:cuechange",n.createInteractionItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("dispose",(function(){n.track_.off("cv:cuechange"),n.player_.off("durationchange",n.onDurationChange)})),n}return t=i,(n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-items ".concat(gp(Sp(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return gp(Sp(i.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(e){e.update()}))}},{key:"createInteractionItems",value:function(){var e,t=this;if(this.track_){bp(this.children_).forEach((function(e){t.removeChild(e)}));for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],o=this.getTimepointById(r.text);o&&(null===(e=o.interactions)||void 0===e?void 0:e.length)&&this.addChild(new hp(this.player_,{timepoint:o}))}}}},{key:"onDurationChange",value:function(){this.update()}},{key:"getTimepointById",value:function(e){var t;return null===(t=this.interactive_.timepoints)||void 0===t?void 0:t.find((function(t){return t.id.toString()===e.toString()}))}}])&&mp(t.prototype,n),r&&mp(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));n(1195);function kp(e){return(kp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ep(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tp(e,t){return(Tp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bp(e);if(t){var o=Bp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return xp(this,n)}}function xp(e,t){if(t&&("object"===kp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Lp(e)}function Lp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bp(e){return(Bp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ip=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tp(e,t)}(i,e);var t,n,r,o=Rp(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e)).options=t,n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize.bind(Lp(n)))})),n}return t=i,(n=[{key:"initialize",value:function(){ao(this.player,"metadata","interactive",this.onTrackLoaded.bind(this)),this.player.addClass("cv-interactive-plugin")}},{key:"onTrackLoaded",value:function(e){this.addChildren(e)}},{key:"addChildren",value:function(e){this.player.controlBar.getChild("progressControl").getChild("SeekBar").addChild(new Pp(this.player,{interactive:this.options.interactive,track:e}))}}])&&Ep(t.prototype,n),r&&Ep(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));a.a.registerPlugin("interactiveSeekBarPlugin",Ip);var Np=function(e,t){var n,r=e.addTextTrack("metadata","interactive"),o=t.additionalData.interactive,i=null===(n=t.additionalData.clipData)||void 0===n?void 0:n.startTime;return o.timepoints.forEach((function(e){var t,n=e.visibleAt/1e3,o=e.visibleFor?n+e.visibleFor/1e3:n+1;i&&(n+=i,o+=i),(null===(t=e.interactions)||void 0===t?void 0:t.length)&&r.addCue({startTime:n-.001,endTime:o,text:e.id})})),r};n(1196);function Mp(e){return(Mp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ap(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dp(){return(Dp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Fp(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Fp(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Hp(e)););return e}function zp(e,t){return(zp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Hp(e);if(t){var o=Hp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Up(this,n)}}function Up(e,t){if(t&&("object"===Mp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Hp(e){return(Hp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qp=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))},Wp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zp(e,t)}(i,e);var t,n,r,o=Vp(i);function i(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e,t)}return t=i,(n=[{key:"getPlayerClassName",value:function(){return"cv-reports-player"}},{key:"getAnalyticsPlayerType",value:function(){return"reports-player"}},{key:"additionalSetup",value:function(e){var t=this,n=Object.create(null,{additionalSetup:{get:function(){return Dp(Hp(i.prototype),"additionalSetup",t)}}});return qp(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n.additionalSetup.call(this,e),this.setupEngagementOverlayPlugin(e),this.setupUpClipPlugin(e),this.setupInteractiveSeekBarPlugin(e);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"setupEngagementOverlayPlugin",value:function(e){var t;this.player.engagementOverlayPlugin({heatMap:this.options.heatMap,interactive:null===(t=e.additionalData)||void 0===t?void 0:t.interactive,onTimepointHover:this.options.onTimepointHover})}},{key:"setupUpClipPlugin",value:function(e){if("MasterClip"===e.mediaType){var t=e.additionalData;if(null===t)throw Error("Invalid clip data");this.player.clipPlugin({startTime:t.startTime,endTime:t.endTime})}}},{key:"setupInteractiveSeekBarPlugin",value:function(e){var t,n,r=null===(t=e.additionalData)||void 0===t?void 0:t.interactive;(null===(n=e.additionalData)||void 0===n?void 0:n.interactive)&&(this.track=Np(this.player,e),this.player.interactiveSeekBarPlugin({interactive:r}))}},{key:"getSeekBarOptions",value:function(){return{ignoreChapters:!0}}}])&&Ap(t.prototype,n),r&&Ap(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(ff);function Gp(e){var t=o.a.useRef(),n=o.a.useRef();return o.a.useEffect((function(){n.current=new Wp(t.current,e)}),[]),o.a.createElement("div",{ref:t})}var Kp=n(1135),Qp=n(1121),Zp=n(1136),$p=n.n(Zp);n.d(t,"a",(function(){return Jp}));var Yp=i.a.encloseNamespace("shared.videoEngagementOverlay");function Jp(e){var t=o.a.useRef(),n=Object(Kp.a)(e.engagement);return o.a.createElement("div",{className:"bg-white rounded p-2 h-100"},o.a.createElement("div",{className:"mb-2 position-relative"},o.a.createElement("div",{className:$p.a.playerPlaceholder}),o.a.createElement("div",{className:$p.a.playerContainer},o.a.createElement(Gp,{viewKey:e.viewKey,playerApi:new URL(e.playerApiUrl),hotkeyElQuerySelector:"body",heatMap:n,onTimepointHover:function(e){var r=t.current;r&&(null!==e?(r.classList.add($p.a.heatMapTimepointIndicatorVisible),r.style.left="".concat(e/n.length*100,"%")):r.classList.remove($p.a.heatMapTimepointIndicatorVisible))}}))),o.a.createElement("div",{className:$p.a.heatMapContainer},o.a.createElement("div",{className:"position-relative"},o.a.createElement(Qp.a,{engagement:e.engagement,className:$p.a.heatMap}),o.a.createElement("div",{ref:t,className:$p.a.heatMapTimepointIndicator}))),o.a.createElement("div",{className:"d-flex justify-content-between mt-2"},o.a.createElement("strong",null,Yp("engagement")),o.a.createElement("div",{className:"w-33"},o.a.createElement(Qp.b,null))))}},1204:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(1106),a=n(7),c=n(42),u=n(43),l=n(1081),s=n(1082),f=n(1121),p=n(1199),y=n.n(p);function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||b(e,t)||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 d(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||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 b(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var m=a.a.encloseNamespace("shared.engagementTable");function g(e){var t;return o.a.createElement("div",{className:"p-2 ".concat(null!==(t=e.className)&&void 0!==t?t:"")},e.children)}function w(e){return o.a.createElement(g,{className:"d-inline-block ".concat(e.column.isSorted?"font-weight-bold":"")},m(e.phraseKey))}function O(e){var t=h(Object(c.a)(u.a.ANONYMISE_USERS),1)[0];return o.a.useMemo((function(){var n=function(e){var t=0;return e.forEach((function(e){var n=Math.max.apply(Math,d(e.heatMap));n>t&&(t=n)})),t}(e);return[{Header:function(e){var t=e.column;return o.a.createElement(w,{column:t,phraseKey:"name"})},width:8,accessor:"user",sortType:function(e,n){return Object(l.a)(e.values.user,t)>Object(l.a)(n.values.user,t)?1:-1},Cell:function(e){var n=e.value;return o.a.createElement(g,{className:"text-truncate"},Object(l.a)(n,t))}},{Header:function(e){var t=e.column;return o.a.createElement(w,{column:t,phraseKey:"views"})},accessor:"viewCount",width:4,sortType:"basic",sortDescFirst:!0,Cell:function(e){var t=e.value;return o.a.createElement(g,null,t)}},{Header:function(e){var t=e.column;return o.a.createElement(w,{column:t,phraseKey:"engagement"})},accessor:"engagementRate",width:8,sortType:"basic",sortDescFirst:!0,Cell:function(e){var t=e.value;return o.a.createElement(g,{className:"w-33"},o.a.createElement(s.a,{percentage:t,layout:s.b.LabelBefore}))}},{Header:function(e){var t=e.column;return o.a.createElement(w,{column:t,phraseKey:"heatMap"})},accessor:"heatMap",width:15,disableSortBy:!0,Cell:function(e){var t=e.row.original;return o.a.createElement(g,{className:"d-flex align-items-center h-100"},o.a.createElement(f.a,{engagement:t,max:n,className:"".concat(y.a.heatMap," flex-grow-1")}))}}]}),[t])}n.d(t,"a",(function(){return j}));var C={table:"bg-white rounded",header:"border-bottom"};function j(e){var t,n,r=O(e.engagement),a=(t=e.engagement,n=e.users,o.a.useMemo((function(){var e=[];return t.forEach((function(t){var r=null==n?void 0:n.find((function(e){return e.id===t.userId}));r&&e.push(Object.assign(Object.assign({},t),{user:r}))})),e}),[]));return a.length?o.a.createElement(i.a,{columns:r,data:a,theme:C,enableSort:!0}):o.a.createElement(o.a.Fragment,null)}},1246:function(e,t){},1247:function(e,t){},1259:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={clip:function(e,t,n,r){return{url:"{gateway}/v1/objects/".concat(e),key:"clip:".concat(e),success:t,error:n,always:r}}}},1260:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(0),o=n.n(r),i=n(7),a=n(5),c=n(15),u=n(1095),l=n(193),s=i.a.encloseNamespace("reportsClips.clipNav");function f(e){var t,n,r,i=Object(l.a)(),f=(t=e.id,n=i,r=[t],[{label:s("overview"),appLink:{application:a.a.CLIPS,action:c.a.Clips.OVERVIEW,args:r,params:n}},{label:s("engagement"),appLink:{application:a.a.CLIPS,action:c.a.Clips.ENGAGEMENT,args:r,params:n}}]);return o.a.createElement(u.a,{items:f})}},1560:function(e,t,n){e.exports={viewCountContainer:"_3Mzzo",engagementPercentageContainer:"Tynjv",engagementGraphContainer:"_1R4_p",partialTable:"_1yzW7"}},1571:function(e,t,n){"use strict";n.r(t),n.d(t,"ClipEngagementView",(function(){return M}));var r=n(0),o=n.n(r),i=n(8),a=n(7),c=n(287),u=n(1157),l=n(107),s=n(32),f=n(1158),p=n(97),y=n(60),h=n(1076),d=n(1259),b=n(1083),v=n(250),m=n(1087),g=n(1080),w=n(193),O=n(1120),C=n(1094),j=n(1086),_=n(1112),S=n(1104),P=n(1127),k=n(1203),E=n(1198),T=n(1204),R=n(1115),x=n(1200),L=n(1260),B=n(1560),I=n.n(B),N=a.a.encloseNamespace("reportsClips.clipEngagement");function M(e){var t,n,r=Object(w.a)(),a=Object(w.b)(),B=!(0,Object(p.a)().hasPermissions)(y.a.ViewCustomerAnalytics),M=i.a.useBasicFetch(B&&s.a.currentUser()),A=i.a.useBasicFetch(d.a.clip(e.id)),D=i.a.useBasicFetch(!!a&&(B?!!M.data&&g.a.aggregateEngagement(e.id,a,M.data.id):g.a.aggregateEngagement(e.id,a))),F=i.a.useBasicFetch(!!a&&(B?!!M.data&&g.a.individualEngagement(e.id,a,M.data.id):g.a.individualEngagement(e.id,a))),z=i.a.useBasicFetch((null===(t=F.data)||void 0===t?void 0:t.data.length)&&v.a.getById(F.data.data.map((function(e){return e.userId})))),V=i.a.useBasicFetch(u.a.createViewKey(e.id,f.a.MasterObject)),U=i.a.useBasicFetch(l.a.config());Object(c.a)(A.data?N("pageTitle",{clip:A.data.name}):""),Object(b.a)(null===(n=A.data)||void 0===n?void 0:n.name),Object(_.a)(Object(R.a)(A.data)),Object(x.a)(e.id),Object(j.a)(F),Object(m.a)(A),Object(h.a)([V,D,F]);var H=!!(A.data&&D.data&&V.data&&U.data),q=!(!F.data||F.data.data.length&&!z.data);return o.a.createElement("div",{className:"pb-3"},o.a.createElement(L.a,{id:e.id}),o.a.createElement("div",{className:"d-flex pb-3"},o.a.createElement("div",{className:"pr-2 ".concat(I.a.viewCountContainer)},o.a.createElement(C.a,{useSharerId:B,objectId:e.id,className:"h-100"})),o.a.createElement("div",{className:"px-2 ".concat(I.a.engagementPercentageContainer)},o.a.createElement(P.a,{objectId:e.id,useSharerId:B,className:"h-100",layout:"vertical"})),o.a.createElement("div",{className:"pl-2 ".concat(I.a.engagementGraphContainer)},H?o.a.createElement(k.a,{key:Object(O.a)(r),engagement:D.data,viewKey:V.data.viewKey,imageCdnUrl:U.data.imageCdnUrl,playerApiUrl:U.data.playerApiUrl}):o.a.createElement(E.a,null))),q?o.a.createElement(T.a,{key:Object(O.a)(r),engagement:F.data.data,users:z.data}):o.a.createElement(S.a,{className:I.a.partialTable}))}}}]);
|