@clickview/reports 0.0.5 → 0.0.6-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +1 -1
- package/dist/css/{10-reports-393fb17693.chunk.css → 10-reports-7d06497c24.chunk.css} +2 -6
- package/dist/css/11-reports-414c365b79.chunk.css +8 -0
- package/dist/css/13-reports-5fb383eefa.chunk.css +10 -0
- package/dist/css/{6-reports-2b55dbfcbc.chunk.css → 6-reports-e6558eeeb4.chunk.css} +3 -5
- package/dist/css/9-reports-4129517002.chunk.css +10 -0
- package/dist/en.json +1 -1
- package/dist/scripts/{0-c9b7066515-reports.chunk.js → 0-abc99a8593-reports.chunk.js} +1 -1
- package/dist/scripts/{2-baab085682-reports.chunk.js → 1-7926cd7b82-reports.chunk.js} +1 -1
- package/dist/scripts/10-cab88bc9bb-reports.chunk.js +1 -0
- package/dist/scripts/11-857b749feb-reports.chunk.js +1 -0
- package/dist/scripts/{12-08050a8ad2-reports.chunk.js → 12-46243c3e28-reports.chunk.js} +1 -1
- package/dist/scripts/13-5db86822d4-reports.chunk.js +1 -0
- package/dist/scripts/{13-fa3fe75156-reports.chunk.js → 14-2872b97cad-reports.chunk.js} +1 -1
- package/dist/scripts/15-9e138150c6-reports.chunk.js +1 -0
- package/dist/scripts/{15-24d52eff0b-reports.chunk.js → 16-5c748d4692-reports.chunk.js} +1 -1
- package/dist/scripts/{16-2a1c718d21-reports.chunk.js → 17-3ec2f7a010-reports.chunk.js} +1 -1
- package/dist/scripts/{17-86b6e0659b-reports.chunk.js → 18-e75b6f20e8-reports.chunk.js} +1 -1
- package/dist/scripts/{18-6f09ce48ef-reports.chunk.js → 19-6f37959cc4-reports.chunk.js} +1 -1
- package/dist/scripts/2-a6a9f50ed7-reports.chunk.js +1 -0
- package/dist/scripts/{19-9d03cff42a-reports.chunk.js → 20-0fc2e6790b-reports.chunk.js} +1 -1
- package/dist/scripts/{20-d745b935df-reports.chunk.js → 21-bfa8f469d9-reports.chunk.js} +1 -1
- package/dist/scripts/{3-fd804439c5-reports.chunk.js → 3-866eb4c077-reports.chunk.js} +1 -1
- package/dist/scripts/4-0b0a21f0af-reports.chunk.js +1 -0
- package/dist/scripts/6-ae5125cde3-reports.chunk.js +1 -0
- package/dist/scripts/{7-1a77e289c6-reports.chunk.js → 7-d7f707bd79-reports.chunk.js} +14 -14
- package/dist/scripts/8-e9185dcdd1-reports.chunk.js +1 -0
- package/dist/scripts/9-9e96476e4b-reports.chunk.js +1 -0
- package/dist/scripts/reports-app-7848f4a9b6.min.js +19 -0
- package/package.json +52 -52
- package/dist/css/11-reports-6ea8bcfacf.chunk.css +0 -12
- package/dist/css/9-reports-6c450cdae8.chunk.css +0 -14
- package/dist/scripts/1-fef46140ca-reports.chunk.js +0 -1
- package/dist/scripts/10-09f112151f-reports.chunk.js +0 -1
- package/dist/scripts/11-a71302c78a-reports.chunk.js +0 -1
- package/dist/scripts/14-838e7620e8-reports.chunk.js +0 -1
- package/dist/scripts/4-ccec73bfaa-reports.chunk.js +0 -1
- package/dist/scripts/6-982824c478-reports.chunk.js +0 -1
- package/dist/scripts/6-dc99b08080-reports.chunk.js +0 -1
- package/dist/scripts/8-e03e099e5a-reports.chunk.js +0 -1
- package/dist/scripts/9-0ca25c3207-reports.chunk.js +0 -1
- package/dist/scripts/reports-app-773338053a.min.js +0 -19
- package/dist/scripts/reports-app-dad621588a.min.js +0 -19
- /package/dist/css/{13-reports-5dacf3345f.chunk.css → 14-reports-5dacf3345f.chunk.css} +0 -0
- /package/dist/css/{14-reports-c822f03e9f.chunk.css → 15-reports-c822f03e9f.chunk.css} +0 -0
- /package/dist/css/{15-reports-fb15dad959.chunk.css → 16-reports-fb15dad959.chunk.css} +0 -0
- /package/dist/css/{17-reports-b5e731ba4c.chunk.css → 19-reports-b5e731ba4c.chunk.css} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_reports=window.webpackJsonp_clickview_reports||[]).push([[6],Array(491).concat([function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(0),o=n(19),i=n(147);function a(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=r.useContext(i.a),c=n.setPageTitle;r.useEffect((function(){"boolean"!=typeof t&&o.a.isFunction(c)&&(t||(t=""),c(t))}),[t].concat(a(e)))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return f}));var r,o=n(701),i=n(6),a=n(146),c=n(505),u=i.a.encloseNamespace("reportsShared.utils");function l(t,e){return e?Object(o.c)(function(t){var e=+"".concat(t.id).concat(Math.floor((new Date).getMinutes()/5));return{dictionaries:[o.b,o.a],separator:" ",length:2,style:"capital",seed:e}}(t)):a.a.getFullName(t)}function s(t){var e="";return"string"==typeof(null==t?void 0:t.userType)&&(e=t.userType),"number"==typeof(null==t?void 0:t.userType)&&(e=r[t.userType]),null==e?void 0:e.toLowerCase()}function f(t){switch(t.toLowerCase()){case c.a.Learner:return u("student");case c.a.Staff:return u("staff");default:return t}}!function(t){t[t.Unknown=0]="Unknown",t[t.Staff=1]="Staff",t[t.Learner=2]="Learner"}(r||(r={}))},,function(t,e,n){"use strict";var r=n(0),o=n.n(r),i=n(514),a=n.n(i);function c(t){var e;return o.a.createElement("img",{alt:"",role:"presentation",src:t.src,className:"".concat(a.a.image," ").concat(null!==(e=t.className)&&void 0!==e?e:"")})}var u=n(2),l=n(19),s=n(125),f=n(37);function p(t){var e=t.className||"btn btn-dark";if(!t.icon){if(t.appLink&&!l.a.isFunction(t.onClick))return o.a.createElement(f.a,{appLink:t.appLink,className:e},t.text);return o.a.createElement("button",{onClick:function(){l.a.isFunction(t.onClick)&&t.onClick(),t.appLink&&u.a.AppLinkHelper.trigger(t.appLink)},className:e},t.text)}return o.a.createElement(s.a,{className:e,onClick:t.onClick,appLink:t.appLink,svgName:t.icon},t.text)}function y(t){var e;return o.a.createElement("div",{className:"text-center d-flex flex-column align-items-center ".concat(null!==(e=t.className)&&void 0!==e?e:"")},t.children)}n.d(e,"a",(function(){return y})),y.defaultProps={className:"pt-5"},y.Image=function(t){return o.a.createElement(c,Object.assign({},t))},y.Cta=function(t){return o.a.createElement(p,Object.assign({},t))},y.Heading=function(t){return o.a.createElement("h2",{className:t.className||"h6"},t.children)},y.Info=function(t){return o.a.createElement("p",{className:t.className||"mb-3 w-50"},t.children)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(61),o=n(501);function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){var n=Object(o.a)(e);return n?t+":".concat(n):t}function u(t){var e,n;return{userId:t.users,groupId:[].concat(i(null!==(e=t.classrooms)&&void 0!==e?e:[]),i(null!==(n=t.classroomGroups)&&void 0!==n?n:[])),start:t.from,end:t.to}}var l={views:function(t,e,n,o,i){var a="video:views";return e&&(a+=":".concat(e)),{url:r.a.urlBuilder("{gateway}/v1/analytics/views",Object.assign({objectId:e},u(t))),key:c(a,t),normalize:!1,success:n,error:o,always:i}},individualEngagement:function(t,e,n,o,i){return{url:r.a.urlBuilder("{gateway}/v1/analytics/heat-map",Object.assign({objectId:t},u(e))),key:c("engagement:".concat(t),e),formatData:function(t){var e;return Object.assign(Object.assign({},t),{data:null===(e=t.data)||void 0===e?void 0:e.map((function(t){var e;return Object.assign(Object.assign({},t),{heatMap:null!==(e=t.heatMap)&&void 0!==e?e:[]})}))})},normalize:!1,success:n,error:o,always:i}},aggregateEngagement:function(t,e,n,o,i){return{url:r.a.urlBuilder("{gateway}/v1/analytics/heat-map/aggregate",Object.assign({objectId:t},u(e))),key:c("aggregate:engagement:".concat(t),e),formatData:function(t){var e;return Object.assign(Object.assign({},t),{heatMap:null!==(e=t.heatMap)&&void 0!==e?e:[]})},normalize:!1,success:n,error:o,always:i}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(0),o=n(21),i=n(22);function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t){var e=a(Object(o.a)(i.a.HEADER_TITLE),2)[1];Object(r.useEffect)((function(){return e(t),function(){e(null)}}),[t])}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r={EmptyStates:{Dashboard:{ComingSoon:"/images/empty-states/reports/coming-soon.png"},Interactives:{ViewCount:"/images/empty-states/reports/view-count.png",StudentInsights:"/images/empty-states/reports/student-insights.png",SelectQuestion:"/images/empty-states/reports/select-question.png",NoResponses:"/images/empty-states/reports/no-responses.png"}}}},,,function(t,e,n){"use strict";var r,o,i=n(0),a=n.n(i),c=n(540),u=n(691),l=n.n(u);function s(t){var e=t===r.Large?5.8:2,n=t===r.Large?.36:.2;return"".concat(e/2-2*n,"rem")}function f(t){return t>=c.a.HIGH?"text-success":t>=c.a.MODERATE?"text-warning":"text-danger"}function p(t,e){var n="d-inline-block ".concat(l.a.circleContainer);return t===r.Large&&(n+=" ".concat(l.a.lgCircleContainer)),y(e)&&(n+=" ".concat(l.a.pendingCircle)),n}function y(t){return"number"!=typeof t}function h(t){var e,n=a.a.useCallback((function(e){if(e){var n=e.r.baseVal.value,r=2*Math.PI*n,o=r-t.percentage*r;e.style.strokeDasharray="".concat(r," ").concat(r),e.style.strokeDashoffset=o.toString()}}),[]);return a.a.createElement("svg",null,a.a.createElement("circle",{r:s(t.size),className:l.a.backgroundCircle}),!y(t.percentage)&&a.a.createElement("circle",{ref:n,r:s(t.size),className:(e=t.percentage,e>=c.a.HIGH?l.a.circleSuccess:e>=c.a.MODERATE?l.a.circleWarning:l.a.circleDanger)}))}function d(t){var e,n,i=t.layout===o.LabelInside?r.Large:r.Small,c=t.customLabel||(y(n=t.percentage)?"--%":"".concat(Math.round(100*n),"%"));return t.layout===o.LabelOnly?a.a.createElement("span",{className:f(t.percentage)},c):a.a.createElement("div",{className:"d-flex align-items-center justify-content-between ".concat(null!==(e=t.className)&&void 0!==e?e:"")},t.layout===o.LabelBefore&&a.a.createElement("span",{className:"mr-2"},c),a.a.createElement("div",{className:p(i,t.percentage)},a.a.createElement(h,{percentage:t.percentage,size:i}),t.layout===o.LabelInside&&a.a.createElement("span",{className:l.a.centredPercentageText},c)))}!function(t){t.Small="small",t.Large="large"}(r||(r={})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return d})),function(t){t.CircleOnly="circle_only",t.LabelOnly="label_only",t.LabelBefore="label_before",t.LabelInside="label_inside"}(o||(o={})),d.defaultProps={layout:o.CircleOnly}},function(t,e,n){"use strict";function r(t){var e=[];return Object.keys(t).forEach((function(n){var r=t[n];r&&e.push("".concat(n,":").concat(Array.isArray(r)?r.join(","):r))})),e.join(":")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(27),o=n(501);function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t){var e=[];return t.classrooms&&e.push.apply(e,i(t.classrooms)),t.classroomGroups&&e.push.apply(e,i(t.classroomGroups)),{dateRange:{start:t.from,end:t.to},userIds:t.users,classroomsAndGroups:e}}var u={interactiveMetadata:function(t,e,n,r){return{url:"{gateway}/v1/objects/".concat(t,"?query=video[thumbnail],clip[video[thumbnail]],thumbnail"),key:"interactive:metadata:".concat(t),success:e,error:n,always:r}},interactive:function(t,e,n,r){return{url:"/api/domain/v1/interactives/".concat(t),key:"interactive:".concat(t),success:e,error:n,always:r}},interactiveResultSet:function(t,e,n,i,a,u){var l="interactive:result:set:".concat(t,":").concat(e),s=Object(o.a)(n);return s&&(l+=":".concat(s)),{url:"/api/domain/v2/analytics/interactives/".concat(t,"/metadata/").concat(e),key:l,data:c(n),type:r.a.POST,normalize:!1,success:i,error:a,always:u}},userInteractiveResultSet:function(t,e,n,r,o,i,a){var c=Object.assign(Object.assign({},r),{users:[n]});return u.interactiveResultSet(t,e,c,o,i,a)},mark:function(t,e,n,o,i,a,c){return{url:"/api/domain/v1/analytics/answers/".concat(n),key:"mark:answer:".concat(n,":").concat(o.resultId),type:r.a.PUT,data:o,normalize:!1,invalidationKeys:"interactive:result:set:".concat(t,":").concat(e),success:i,error:a,always:c}}}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(0),o=n(21),i=n(22);function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t){var e,n=a(Object(o.a)(i.a.AUDIENCE_FILTER_SELECTED_COUNT),2)[1];Object(r.useEffect)((function(){t.data?n(t.data.count):n(null)}),[null===(e=t.data)||void 0===e?void 0:e.count])}},function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t.Unknown="unknown",t.Staff="staff",t.Learner="learner"}(r||(r={}))},function(t,e,n){t.exports={totalViews:"_2NyXp",chartContainer:"_10U1R",emptyState:"_3XuMt"}},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(21),o=n(22);function i(){Object(r.a)(o.a.LEFT_NAV_STATE)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=["#FF9300","#38A2E8","#7A76E8","#B679C7","#F7847B","#D9584F","#FFCD52","#5DC786","#40BCC3","#40C2BB"];function o(t){return t.map((function(t,e){return Object.assign(Object.assign({},t),{color:r[e%r.length]})}))}},,,,function(t,e,n){t.exports={image:"_3T3Ux"}},,,function(t,e,n){"use strict";var r=n(551);n.o(r,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return r.InteractionTypeId}));var o=n(580);n.o(o,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return o.InteractionTypeId}));var i=n(656);n.o(i,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return i.InteractionTypeId}));var a=n(658);n.o(a,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return a.InteractionTypeId}));var c=n(671);n.o(c,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return c.InteractionTypeId}));var u=n(674);n.o(u,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return u.InteractionTypeId}));n(699);var l=n(682);n.o(l,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return l.InteractionTypeId}));var s=n(683);n.o(s,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return s.InteractionTypeId}));var f=n(684);n.o(f,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return f.InteractionTypeId}));var p=n(522);n.o(p,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return p.InteractionTypeId}));var y=n(685);n.o(y,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return y.InteractionTypeId}));var h=n(686);n.o(h,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return h.InteractionTypeId})),n.o(p,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return p.InteractionTypeId}));var d=n(687);n.o(d,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return d.InteractionTypeId}));var v=n(688);n.o(v,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return v.InteractionTypeId}));var b=n(689);n.o(b,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return b.InteractionTypeId}));var m=n(690);n.o(m,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return m.InteractionTypeId}))},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(0),o=n.n(r),i=n(527),a=n.n(i);function c(t){var e;return o.a.createElement("div",{className:"bg-white rounded p-3 position-relative d-flex flex-column ".concat(null!==(e=t.className)&&void 0!==e?e:"")},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.heading)}),o.a.createElement("div",{className:"partial-loading-background ".concat(a.a.count)})),o.a.createElement("div",{className:"partial-loading-background rounded ".concat(a.a.selector)})))}},,,,function(t,e,n){t.exports={heading:"_2IrUd",selector:"D4R0x",count:"_2mxhp"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n(0),o=n.n(r),i=n(13),a=n(37),c=n(60),u=n(529),l=n.n(u);function s(t){var e,n,r="nav-link pl-0 pt-0 pr-2 text-dark";return t.appLink.action===(null===(n=null===(e=c.a.getCurrentRoute())||void 0===e?void 0:e.appLink)||void 0===n?void 0:n.action)?"".concat(r," active font-weight-bold ").concat(l.a.active):r}function f(t){return o.a.createElement(i.Navbar,{className:"p-0 pb-2"},o.a.createElement(i.Nav,null,t.items.map((function(t,e){return o.a.createElement(i.Nav.Item,{key:e},o.a.createElement(a.a,{appLink:t.appLink,className:s(t)},t.label))}))))}},function(t,e,n){t.exports={active:"_3Qdep"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(0),o=n.n(r),i=n(531),a=n.n(i);function c(t){var e,n;return o.a.createElement("div",{className:"bg-white rounded ".concat(a.a.table," ").concat(null!==(e=t.className)&&void 0!==e?e:"")},o.a.createElement("div",{className:"border-bottom ".concat(a.a.header," ").concat(null!==(n=t.headerClassName)&&void 0!==n?n:"")}),t.children)}},function(t,e,n){t.exports={table:"_3XPjZ",header:"_1hiMB"}},,function(t,e,n){t.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"}},function(t,e,n){t.exports={sortIndicator:"_3ac-N",scrollContainer:"i_8jB"}},function(t,e,n){"use strict";var r=n(0),o=n.n(r),i=n(20),a=n(495),c=n(145),u=n(124),l=n(504),s=n(523),f=n(513),p=n.n(f),y=n(526),h=n.n(y),d=n(13),v=n(6),b=n(509),m=n(40),g=n(505),w=n(492),C=n(510),O={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}}},I=v.a.encloseNamespace("shared.viewCountPieChart");function T(t){return Object.assign(Object.assign({},O),{series:[{type:"pie",name:I("plays"),data:t}]})}var S=n(494),_=n(497),k=n(506),E=n.n(k),j=v.a.encloseNamespace("shared.viewCountPieChart");function P(t){return o.a.createElement(S.a,{className:"".concat(E.a.emptyState," flex-grow-1 justify-content-center")},o.a.createElement(S.a.Image,{src:_.a.EmptyStates.Interactives.ViewCount,className:"w-75"}),o.a.createElement(S.a.Heading,null,j("emptyStateSubheading")),o.a.createElement(S.a.Info,{className:"w-100"},j(t.singular?"emptyStateDescriptionSingular":"emptyStateDescriptionMultiple")))}function R(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var L=v.a.encloseNamespace("shared.viewCountPieChart"),A=["yearGroup","userType"],B={yearGroup:"yearGroups",userType:"userType"};function N(t){return o.a.createElement(d.Dropdown,{alignRight:!0},o.a.createElement(d.Dropdown.Toggle,{id:"group-by-dropdown",variant:"outline-dark",className:"no-caret"},L("yearGroup"===t.selectedOption?"yearGroups":"userType")),o.a.createElement(d.Dropdown.Menu,null,A.map((function(e,n){return t.selectedOption!==e&&o.a.createElement(d.Dropdown.Item,{key:n,onSelect:function(){return t.onSelect(e)}},L(B[e]))}))))}function M(t){var e=R(o.a.useState("yearGroup"),2),n=e[0],r=e[1];Object(b.a)();var i,a,c,u,l="yearGroup"===n?(i=t.views,a=t.users,c=m.a.toObject(a,"id"),u={},i.forEach((function(t){var e,n,r,o,i=c[t.userId];if(Object(w.b)(i)===g.a.Learner){var a=null!==(r=null===(n=null===(e=null==i?void 0:i._yearGroup)||void 0===e?void 0:e.value)||void 0===n?void 0:n.name)&&void 0!==r?r:I("unknown");a&&(u[a]=null!==(o=u[a])&&void 0!==o?o:0,u[a]+=t.count)}})),Object(C.a)(m.a.sortBy(Object.keys(u).map((function(t){return{name:t,y:u[t],type:"pie"}})),"name"))):function(t,e){var n=m.a.toObject(e,"id"),r={};return t.forEach((function(t){var e,o,i=n[t.userId],a=null!==(e=Object(w.b)(i))&&void 0!==e?e:I("unknown");r[a]=null!==(o=r[a])&&void 0!==o?o:0,r[a]+=t.count})),Object(C.a)(m.a.sortBy(Object.keys(r).map((function(t){return{name:Object(w.c)(t),y:r[t],type:"pie"}})),"name"))}(t.views,t.users);return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"d-flex align-items-start justify-content-between w-100"},o.a.createElement("div",null,o.a.createElement("h6",{className:"m-0"},L("yearGroup"===n?"totalStudentPlays":"totalPlays")),o.a.createElement("strong",{className:E.a.totalViews},function(t){return t.reduce((function(t,e){return t+e.y}),0)}(l))),o.a.createElement(N,{selectedOption:n,onSelect:r})),l.length?o.a.createElement(h.a,{highcharts:p.a,options:T(l),containerProps:{className:"".concat(E.a.chartContainer," position-absolute w-100 h-75 flex-grow-1")}}):o.a.createElement(P,{singular:!!t.objectId}))}function D(t){var e,n,r,f,p=Object(c.a)(),y=i.a.useBasicFetch(a.a.views(p,t.objectId)),h=i.a.useBasicFetch((null===(e=y.data)||void 0===e?void 0:e.data.length)&&u.a.getById(y.data.data.map((function(t){return t.userId}))));return Object(l.a)(y),((null===(n=y.data)||void 0===n?void 0:n.data.length)?!!h.data:!!y.data)?o.a.createElement("div",{className:"bg-white rounded p-3 position-relative d-flex flex-column ".concat(null!==(r=t.className)&&void 0!==r?r:"")},o.a.createElement(M,{views:y.data.data,users:null!==(f=h.data)&&void 0!==f?f:[],objectId:t.objectId})):o.a.createElement(s.a,{className:t.className})}n.d(e,"a",(function(){return D}))},function(t,e,n){"use strict";var r,o=n(0),i=n.n(o),a=n(525),c=n(11),u=n(14),l=n(533),s=n.n(l);!function(t){t[t.Left=0]="Left",t[t.Right=1]="Right"}(r||(r={}));var f=o.memo((function(t){var e,n,i=t.direction===r.Left,a=i?u.b.ChevronLeft:u.b.ChevronRight,l=(t.contents,e=i,n=s.a.topPos,n+=e?" "+s.a.left:" "+s.a.right);return t.hide?o.createElement(o.Fragment,null):o.createElement(o.Fragment,null,o.createElement("div",{role:"button",className:"".concat(l," ").concat(s.a.button," ").concat(t.className||""),onClick:t.onClick},t.hoverText&&o.createElement("span",{className:"pl-3 pr-2 ".concat(s.a.hoverText)},t.hoverText),o.createElement(c.a,{svgName:a,size:c.b.Medium,className:"svg-container d-inline-block ".concat(s.a.chevron)})),t.useGradientBackdrop&&o.createElement("div",{className:i?s.a.gradientLeft:s.a.gradientRight}),!t.hideExtendedClickableArea&&o.createElement("div",{role:"button",onClick:t.onClick,className:i?s.a.extendedClickableAreaLeft:s.a.extendedClickableAreaRight}))})),p=n(19);function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function d(t){var e,n,r,o;return{canScrollLeft:(null===(e=t.current)||void 0===e?void 0:e.scrollLeft)>0,canScrollRight:(null===(n=t.current)||void 0===n?void 0:n.scrollLeft)<(null===(r=t.current)||void 0===r?void 0:r.scrollWidth)-(null===(o=t.current)||void 0===o?void 0:o.clientWidth)}}var v=n(534),b=n.n(v);function m(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,"a",(function(){return O}));var w=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function C(t){var e,n,r,o,l,s,f,p,y={columns:t.columns,data:t.data,disableSortBy:!t.enableSort,manualSortBy:t.manualSort};t.initialSelectedRowIds&&(y.initialState={selectedRowIds:(f=t.initialSelectedRowIds,p={},f.forEach((function(t){return p[t]=!0})),p)}),t.getRowId&&(y.getRowId=t.getRowId);var h=a.useTable.apply(void 0,[y].concat(m([a.useFlexLayout,a.useSortBy,a.useRowSelect]))),d=h.getTableProps,v=h.getTableBodyProps,g=h.headerGroups,w=h.rows,C=h.prepareRow,O=h.toggleAllRowsSelected,I=h.state.sortBy;return i.a.useEffect((function(){t.onSort&&t.onSort(I)}),[I]),i.a.createElement("div",Object.assign({},d(),{className:null!==(n=null===(e=t.theme)||void 0===e?void 0:e.table)&&void 0!==n?n:""}),i.a.createElement("div",{className:null!==(o=null===(r=t.theme)||void 0===r?void 0:r.header)&&void 0!==o?o:""},g.map((function(e){var n,r;return i.a.createElement("div",Object.assign({},e.getHeaderGroupProps(),{className:null!==(r=null===(n=t.theme)||void 0===n?void 0:n.headerRow)&&void 0!==r?r:""}),e.headers.map((function(e){var n,r,o,a;return i.a.createElement("div",Object.assign({},e.getHeaderProps(e.getSortByToggleProps()),{className:null!==(r=null===(n=t.theme)||void 0===n?void 0:n.headerCell)&&void 0!==r?r:""}),e.render("Header"),!!e.canSort&&i.a.createElement("span",{className:"".concat(b.a.sortIndicator,"\n ").concat(e.isSorted?"":"text-muted","\n ").concat(null!==(a=null===(o=t.theme)||void 0===o?void 0:o.sortIndicator)&&void 0!==a?a:"")},i.a.createElement(c.a,{svgName:e.isSortedDesc||!e.isSorted?u.b.ArrowRight:u.b.ArrowLeft,size:c.b.Small})))})))}))),i.a.createElement("div",Object.assign({},v(),{className:null!==(s=null===(l=t.theme)||void 0===l?void 0:l.body)&&void 0!==s?s:""}),w.map((function(e){var n,r,o,a;C(e);var c=null!==(r=null===(n=t.theme)||void 0===n?void 0:n.row)&&void 0!==r?r:"";return e.isSelected&&(null===(o=t.theme)||void 0===o?void 0:o.selectedRow)&&(c+=" ".concat(null===(a=t.theme)||void 0===a?void 0:a.selectedRow)),t.onSelectRow&&(c+=" cursor-pointer"),i.a.createElement("div",Object.assign({},e.getRowProps(),{className:c,onClick:function(){t.onSelectRow&&(t.allowSelectMultipleRows||O(!1),t.onSelectRow(e),e.toggleRowSelected(!0))},onMouseOver:t.onRowMouseOver&&function(){return t.onRowMouseOver(e)},onMouseLeave:t.onRowMouseLeave&&function(){return t.onRowMouseLeave(e)}}),e.cells.map((function(e){var n,r,o=null!==(r=null===(n=t.theme)||void 0===n?void 0:n.cell)&&void 0!==r?r:"";return t.onSelectCell&&(o+=" cursor-pointer"),i.a.createElement("div",Object.assign({},e.getCellProps(),{className:o,onClick:function(){t.onSelectCell&&t.onSelectCell(e)}}),e.render("Cell"))})))}))))}function O(t){var e=t.enableSlider,n=t.scrollIncrement,o=w(t,["enableSlider","scrollIncrement"]),a=function(){var t=i.a.useRef(),e=y(i.a.useState(d(t)),2),n=e[0],r=e[1];function o(){r(d(t))}return i.a.useEffect((function(){if(t.current){var e=p.a.throttle(o,200);return r(d(t)),t.current.addEventListener("scroll",e),function(){t.current.removeEventListener("scroll",e)}}}),[t.current]),{ref:t,scrollState:n,scroll:function(e){var n;null===(n=t.current)||void 0===n||n.scrollBy({left:e,top:0,behavior:"smooth"})}}}(),c=a.ref,u=a.scrollState,l=a.scroll;if(!e)return i.a.createElement(C,Object.assign({},o));function s(t){c.current&&l(n*("right"===t?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:b.a.scrollContainer,ref:c},i.a.createElement(C,Object.assign({},o))),i.a.createElement(f,{direction:r.Right,onClick:function(){return s("right")},hide:!u.canScrollRight}))))}O.defaultProps={scrollIncrement:250}},function(t,e,n){"use strict";var r=n(0),o=n.n(r),i=n(517),a=n(700);function c(t){if(t)return(t=function(t){if(t)return t.replace(/<a.*?>/g,"").replace("</a>","")}(t=function(t){if(t)return t.replace(/<p>/g,"").replace(/<\/p>/g,"<br>")}(t=function(t,e){if(t&&e)return e.forEach((function(e){t=t.replace("<"+e+">","").replace("</"+e+">","")})),t}(t,["b","i","u","ul","li","old"])))).split("<br>")[0]||"Annotation"}function u(t){var e=a.a.getTypeInfo(t.interaction.typeId),n=e.name,r=e.bgClassName,u=e.Svg,l=t.questionNumber?"".concat(t.questionNumber,". "):"",s="interaction-type-icon ".concat(r);return t.smallIcon&&(s+=" sm"),(t.showQuestion||t.showTypeName)&&(s+=t.smallIcon?" mr-1":" mr-2"),t.iconClassName&&(s+=" ".concat(t.iconClassName)),o.a.createElement(o.a.Fragment,null,!!t.showIcon&&o.a.createElement("span",{className:s},o.a.createElement(u,null)),!!t.showTypeName&&o.a.createElement("span",{className:t.typeNameClassName},o.a.createElement("strong",null,l,n)),!!t.showQuestion&&o.a.createElement("span",{className:t.questionClassName},t.interaction.typeId===i.InteractionTypeId.Annotation?o.a.createElement("span",{dangerouslySetInnerHTML:{__html:c(t.interaction.data.annotation)}}):t.interaction.name))}n.d(e,"a",(function(){return u})),u.defaultProps={showIcon:!0,showQuestion:!0}},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r={HIGH:.8,MODERATE:.6}},,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(0),o=n(21),i=n(22);function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t){var e=a(Object(o.a)(i.a.HEADER_ACTIONS),2)[1];Object(r.useEffect)((function(){return e(t),function(){e(null)}}),[])}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n(0),o=n.n(r),i=n(6),a=n(10),c=n(30),u=n(528),l=n(145),s=i.a.encloseNamespace("interactives.interactiveNav");function f(t){var e,n,r,i=Object(l.a)(),f=(e=t.interactiveMetadataId,n=i,r=[e],[{label:s("overview"),appLink:{application:a.a.INTERACTIVES,action:c.a.Interactives.OVERVIEW,args:r,params:n}},{label:s("engagement"),appLink:{application:a.a.INTERACTIVES,action:c.a.Interactives.ENGAGEMENT,args:r,params:n}},{label:s("results"),appLink:{application:a.a.INTERACTIVES,action:c.a.Interactives.RESULTS,args:r,params:n}},{label:s("questionList"),appLink:{application:a.a.INTERACTIVES,action:c.a.Interactives.QUESTION_LIST,args:r,params:n}}]);return o.a.createElement(u.a,{items:f})}},function(t,e,n){"use strict";var r=n(552);n.o(r,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return r.InteractionTypeId}));var o=n(554);n.o(o,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return o.InteractionTypeId}));var i=n(555);n.o(i,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return i.InteractionTypeId}));var a=n(556);n.o(a,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return a.InteractionTypeId}));var c=n(557);n.o(c,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return c.InteractionTypeId}));var u=n(558);n.o(u,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return u.InteractionTypeId}));var l=n(518);n.o(l,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return l.InteractionTypeId}));var s=n(559);n.o(s,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return s.InteractionTypeId}));var f=n(560);n.o(f,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return f.InteractionTypeId}));var p=n(561);n.o(p,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return p.InteractionTypeId}));var y=n(562);n.o(y,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return y.InteractionTypeId}));var h=n(563);n.o(h,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return h.InteractionTypeId}));var d=n(564);n.o(d,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return d.InteractionTypeId})),n.o(l,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return l.InteractionTypeId}));var v=n(565);n.o(v,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return v.InteractionTypeId}));var b=n(566);n.o(b,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return b.InteractionTypeId}));var m=n(567);n.o(m,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return m.InteractionTypeId}));var g=n(568);n.o(g,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return g.InteractionTypeId}));var w=n(569);n.o(w,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return w.InteractionTypeId}));var C=n(570);n.o(C,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return C.InteractionTypeId}));var O=n(571);n.o(O,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return O.InteractionTypeId}));var I=n(572);n.o(I,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return I.InteractionTypeId}));var T=n(573);n.o(T,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return T.InteractionTypeId}));var S=n(574);n.o(S,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return S.InteractionTypeId}));var _=n(575);n.o(_,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return _.InteractionTypeId}));var k=n(576);n.o(k,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return k.InteractionTypeId}));var E=n(577);n.o(E,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return E.InteractionTypeId}));var j=n(578);n.o(j,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return j.InteractionTypeId}));var P=n(579);n.o(P,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return P.InteractionTypeId}))},function(t,e,n){"use strict";var r=n(553);n.o(r,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return r.InteractionTypeId}))},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e,n){"use strict";var r=n(581);n.o(r,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return r.InteractionTypeId}));var o=n(584);n.o(o,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return o.InteractionTypeId}));var i=n(590);n.o(i,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return i.InteractionTypeId}));var a=n(596);n.o(a,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return a.InteractionTypeId}));var c=n(597);n.o(c,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return c.InteractionTypeId}));var u=n(598);n.o(u,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return u.InteractionTypeId}));var l=n(599);n.o(l,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return l.InteractionTypeId}));var s=n(600);n.o(s,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return s.InteractionTypeId}));var f=n(601);n.o(f,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return f.InteractionTypeId}));var p=n(602);n.o(p,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return p.InteractionTypeId}));n(603);var y=n(604);n.o(y,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return y.InteractionTypeId}));var h=n(605);n.o(h,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return h.InteractionTypeId}));var d=n(606);n.o(d,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return d.InteractionTypeId}));var v=n(607);n.o(v,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return v.InteractionTypeId}));var b=n(519);n.o(b,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return b.InteractionTypeId}));var m=n(608);n.o(m,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return m.InteractionTypeId}));var g=n(609);n.o(g,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return g.InteractionTypeId}));var w=n(610);n.o(w,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return w.InteractionTypeId}));var C=n(611);n.o(C,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return C.InteractionTypeId}));var O=n(612);n.o(O,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return O.InteractionTypeId}));var I=n(613);n.o(I,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return I.InteractionTypeId}));var T=n(520);n.o(T,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return T.InteractionTypeId}));var S=n(614);n.o(S,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return S.InteractionTypeId})),n.o(T,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return T.InteractionTypeId}));var _=n(615);n.o(_,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return _.InteractionTypeId}));var k=n(616);n.o(k,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return k.InteractionTypeId}));var E=n(617);n.o(E,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return E.InteractionTypeId}));var j=n(618);n.o(j,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return j.InteractionTypeId}));var P=n(619);n.o(P,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return P.InteractionTypeId}));var R=n(521);n.o(R,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return R.InteractionTypeId}));n(620);var x=n(621);n.o(x,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return x.InteractionTypeId}));var L=n(622);n.o(L,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return L.InteractionTypeId}));var A=n(623);n.o(A,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return A.InteractionTypeId}));var B=n(624);n.o(B,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return B.InteractionTypeId}));var N=n(625);n.o(N,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return N.InteractionTypeId}));var M=n(626);n.o(M,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return M.InteractionTypeId}));var D=n(627);n.o(D,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return D.InteractionTypeId}));var U=n(628);n.o(U,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return U.InteractionTypeId}));var F=n(629);n.o(F,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return F.InteractionTypeId}));var V=n(630);n.o(V,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return V.InteractionTypeId}));var z=n(631);n.o(z,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return z.InteractionTypeId}));var H=n(632);n.o(H,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return H.InteractionTypeId}));var G=n(633);n.o(G,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return G.InteractionTypeId}));var W=n(634);n.o(W,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return W.InteractionTypeId}));var q=n(635);n.o(q,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return q.InteractionTypeId}));var K=n(636);n.o(K,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return K.InteractionTypeId}));var Q=n(637);n.o(Q,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return Q.InteractionTypeId}));var Z=n(638);n.o(Z,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return Z.InteractionTypeId})),n.o(R,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return R.InteractionTypeId}));var $=n(639);n.o($,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return $.InteractionTypeId}));var X=n(640);n.o(X,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return X.InteractionTypeId}));var J=n(641);n.o(J,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return J.InteractionTypeId}));var Y=n(642);n.o(Y,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return Y.InteractionTypeId})),n.o(b,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return b.InteractionTypeId}));var tt=n(643);n.o(tt,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return tt.InteractionTypeId}));var et=n(644);n.o(et,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return et.InteractionTypeId}));var nt=n(645);n.o(nt,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return nt.InteractionTypeId}));var rt=n(646);n.o(rt,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return rt.InteractionTypeId}));var ot=n(647);n.o(ot,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return ot.InteractionTypeId}));var it=n(648);n.o(it,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return it.InteractionTypeId}));var at=n(649);n.o(at,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return at.InteractionTypeId}));var ct=n(650);n.o(ct,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return ct.InteractionTypeId}));var ut=n(651);n.o(ut,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return ut.InteractionTypeId}));var lt=n(652);n.o(lt,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return lt.InteractionTypeId}));var st=n(653);n.o(st,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return st.InteractionTypeId}));var ft=n(654);n.o(ft,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return ft.InteractionTypeId}));var pt=n(655);n.o(pt,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return pt.InteractionTypeId}))},function(t,e,n){"use strict";var r=n(582);n.o(r,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return r.InteractionTypeId}));var o=n(583);n.o(o,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return o.InteractionTypeId}))},function(t,e){},function(t,e){},function(t,e,n){"use strict";var r=n(585);n.o(r,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return r.InteractionTypeId}));var o=n(586);n.o(o,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return o.InteractionTypeId}));var i=n(587);n.d(e,"InteractionTypeId",(function(){return i.a}));n(588),n(589)},function(t,e){},function(t,e){},function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t[t.MultipleChoice=1]="MultipleChoice",t[t.ShortAnswer=2]="ShortAnswer",t[t.TrueOrFalse=3]="TrueOrFalse",t[t.Annotation=4]="Annotation",t[t.Image=5]="Image",t[t.MissingWord=6]="MissingWord"}(r||(r={}))},function(t,e){},function(t,e){},function(t,e,n){"use strict";var r=n(591);n.o(r,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return r.InteractionTypeId}));var o=n(592);n.o(o,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return o.InteractionTypeId}));var i=n(593);n.o(i,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return i.InteractionTypeId}));var a=n(594);n.o(a,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return a.InteractionTypeId}));var c=n(595);n.o(c,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return c.InteractionTypeId}))},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e,n){"use strict";var r;!function(t){t.Pink="colour:0",t.Orange="colour:1",t.Green="colour:2",t.Blue="colour:3",t.Purple="colour:4",t.Indigo="colour:5"}(r||(r={}))},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e,n){"use strict";var r;!function(t){t[t.Row=0]="Row",t[t.LargeRow=1]="LargeRow",t[t.Hero=2]="Hero",t[t.ResourcesTile=3]="ResourcesTile"}(r||(r={}))},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e,n){"use strict";var r=n(657);n.o(r,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return r.InteractionTypeId}))},function(t,e){},function(t,e,n){"use strict";var r=n(659);n.o(r,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return r.InteractionTypeId}));var o=n(660);n.o(o,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return o.InteractionTypeId}));var i=n(661);n.o(i,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return i.InteractionTypeId}));var a=n(662);n.o(a,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return a.InteractionTypeId}));var c=n(663);n.o(c,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return c.InteractionTypeId}));var u=n(664);n.o(u,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return u.InteractionTypeId}));var l=n(665);n.o(l,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return l.InteractionTypeId}));var s=n(666);n.o(s,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return s.InteractionTypeId}));var f=n(667);n.o(f,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return f.InteractionTypeId}));var p=n(668);n.o(p,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return p.InteractionTypeId}));var y=n(669);n.o(y,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return y.InteractionTypeId}));n(670)},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e,n){"use strict"},function(t,e,n){"use strict";var r=n(672);n.o(r,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return r.InteractionTypeId}));var o=n(673);n.o(o,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return o.InteractionTypeId}))},function(t,e){},function(t,e){},function(t,e,n){"use strict";var r=n(675);n.o(r,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return r.InteractionTypeId}));var o=n(676);n.o(o,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return o.InteractionTypeId}));var i=n(677);n.o(i,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return i.InteractionTypeId}));var a=n(678);n.o(a,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return a.InteractionTypeId}));var c=n(679);n.o(c,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return c.InteractionTypeId}));var u=n(680);n.o(u,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return u.InteractionTypeId}));var l=n(681);n.o(l,"InteractionTypeId")&&n.d(e,"InteractionTypeId",(function(){return l.InteractionTypeId}))},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e,n){t.exports={circleContainer:"_3xehl",backgroundCircle:"_3cBLD",circleSuccess:"_3o9el",circleWarning:"_1_El8",circleDanger:"_1Gugl",lgCircleContainer:"v4B9z",pendingCircle:"_1VB9b",centredPercentageText:"_3Jgjf"}},,,,,,function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(106),a=n(105),c=n(107),u=n(6),l=n(49);function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(t,e){return(p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(t){var e=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(t){return!1}}();return function(){var n,r=d(t);if(e){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(t,e){return!e||"object"!==s(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var v="shared.privateResourceError",b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}(i,t);var e,n,r,o=y(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,u.a.getPhrase(v,"title"))}return e=i,(n=[{key:"name",get:function(){return"PrivateResourceError"}},{key:"heading",get:function(){return u.a.getPhrase(v,"heading")}},{key:"description",get:function(){return u.a.getPhrase(v,"description")}}])&&f(e.prototype,n),r&&f(e,r),i}(l.a);function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function w(t,e){return(w=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function C(t){var e=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(t){return!1}}();return function(){var n,r=I(t);if(e){var o=I(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O(this,n)}}function O(t,e){return!e||"object"!==m(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function I(t){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var T=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&w(t,e)}(i,t);var e,n,r,o=C(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,u.a.getPhrase("shared.regionLockedResourceError","title"))}return e=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(e.prototype,n),r&&g(e,r),i}(l.a),S={notFound:a.a,forbidden:{rating:b,yearLevel:b,region:T,privacy:b},badRequest:c.a};function _(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign(Object.assign({},S),n);if(t){var a=+(null===(e=null==t?void 0:t.toString())||void 0===e?void 0:e.substr(0,1));a!==i.b.ClientError&&a!==i.b.ServerError||(t!==i.a.NotFound?t!==i.a.Forbidden?o.a.ErrorHelper.throw(new r.badRequest):o.a.ErrorHelper.throw(new r.forbidden.privacy):o.a.ErrorHelper.throw(new r.notFound))}}var k=n(151);n.d(e,"a",(function(){return j}));var E={notFound:k.a};function j(t){var e,n;e=t,n=E,Object(r.useEffect)((function(){_(null==e?void 0:e.statusCode,n)}),[null==e?void 0:e.statusCode,n])}},function(t,e,n){"use strict";var r=n(0),o=n.n(r),i=n(6),a=n(21);function c(t){return o.a.createElement("div",Object.assign({},t,{role:"button",tabIndex:0,className:"".concat(t.className?t.className:""," cursor-pointer"),onKeyDown:t.onKeyDown?t.onKeyDown:function(e){return"Enter"===e.key&&t.onClick(e)},onClick:t.onClick,style:t.style?t.style:{}}),t.children)}function u(t){var e=t.on&&!t.disabled?"on":"",n=t.disabled?"disabled":"",r=t.hideOutline?"outline-none":"";return o.a.createElement(c,{onClick:function(){t.disabled||t.onClick.apply(t,arguments)},className:"".concat("d-inline-block float-right align-top custom-toggle toggle-option"," ").concat(e," ").concat(n," ").concat(r)},o.a.createElement("span",{className:"handle"}))}var l=n(22);function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var p=i.a.encloseNamespace("reportsShared.anonymiseAction");function y(){var t=s(Object(a.a)(l.a.ANONYMISE_USERS,!1),2),e=t[0],n=t[1];return o.a.createElement("div",{className:"d-flex align-items center justify-content-between",onClick:function(){return n(!e)}},o.a.createElement("span",{className:"mr-3"},p("hideNames")),o.a.createElement(u,{on:e,onClick:function(){}}))}function h(){return[{label:function(){return o.a.createElement(y,null)}}]}n.d(e,"a",(function(){return h}))},function(t,e,n){"use strict"},function(t,e,n){"use strict";var r=n(2),o=n(6),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(517),d=n(16);function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return g}));var b=o.a.encloseNamespace("shared.interactionTypes"),m=(v(y={},h.InteractionTypeId.Annotation,(function(){return{name:b("annotationName"),bgClassName:"bg-pink",Svg:p,typeName:"annotation"}})),v(y,h.InteractionTypeId.Image,(function(){return{name:b("imageName"),bgClassName:"bg-orange",Svg:f,typeName:"image"}})),v(y,h.InteractionTypeId.MissingWord,(function(){return{name:b("missingWordName"),prompt:b("missingWordPrompt"),bgClassName:"bg-teal",Svg:l,typeName:"missing-word"}})),v(y,h.InteractionTypeId.MultipleChoice,(function(){return{name:b("multipleChoiceName"),prompt:b("multipleChoicePrompt"),bgClassName:"bg-blue",Svg:s,typeName:"multiple-choice"}})),v(y,h.InteractionTypeId.ShortAnswer,(function(){return{name:b("shortAnswerName"),prompt:b("shortAnswerPrompt"),bgClassName:"bg-green",Svg:u,typeName:"short-answer"}})),v(y,h.InteractionTypeId.TrueOrFalse,(function(){return{name:b("trueOrFalseName"),prompt:b("trueOrFalsePrompt"),bgClassName:"bg-purple",Svg:c,typeName:"true-or-false"}})),y),g={getTypeInfo:function(t){var e=m[t];if(e)return e();r.a.ErrorHelper.throw(new d.a("No type info defined for typeId: ".concat(t)))}}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(0),o=n.n(r),i=n(500);function a(t){return o.a.createElement(i.a,{layout:t.layout,className:t.className,percentage:0,customLabel:"--%"})}},,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var r=n(0),o=n.n(r),i=n(20),a=n(6),c=n(145),u=n(495),l=n(500),s=n(702),f=a.a.encloseNamespace("interactives.engagementOverviewCard");function p(t){var e,n,r=Object(c.a)(),a=!r.users&&!r.classrooms&&!r.classroomGroups,p=i.a.useBasicFetch(!!t.objectId&&u.a.aggregateEngagement(t.objectId,r)),y=(null===(e=p.data)||void 0===e?void 0:e.engagementRate)>0?p.data.engagementRate:null;return o.a.createElement("div",{className:"d-flex flex-column rounded bg-white p-3 ".concat(null!==(n=t.className)&&void 0!==n?n:"")},o.a.createElement("h6",{className:"mb-2"},f("heading")),o.a.createElement("div",{className:"d-flex align-items-center flex-grow-1\n ".concat("vertical"===t.layout?" flex-column justify-content-center text-center":"")},!!p.data&&o.a.createElement(o.a.Fragment,null,o.a.createElement(l.a,{percentage:y,layout:l.b.LabelInside}),o.a.createElement("p",{className:"horizontal"===t.layout?"ml-2":""},"number"==typeof y?f(a?"descriptionEveryone":"descriptionSome",{percentage:Math.round(100*p.data.engagementRate)}):f("descriptionNoData"))),!p.data&&o.a.createElement(o.a.Fragment,null,o.a.createElement(s.a,{layout:l.b.LabelInside}),"vertical"===t.layout&&o.a.createElement("p",null," "))))}},,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return c}));var r=n(0),o=n(6),i=n(18),a=r.createContext(""),c=r.memo((function(t){var e=t.phrase,n=t.namespace,i=t.options,c=r.useContext(a),u=n||c,l=o.a.getPhrase(u,e,i);return r.createElement("span",{dangerouslySetInnerHTML:{__html:l}})}),(function(t,e){return t.namespace===e.namespace&&t.phrase===e.phrase&&i.a.isEqual(t.options,e.options)}))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){t.exports={heatMapContainer:"_23J5m",heatMap:"_1XzPA",heatMapTimepointIndicator:"FdoYN",heatMapTimepointIndicatorVisible:"_2VCB5",partialLoadingContainer:"_1nMot"}},,,,,,,,,,,,,,,function(t,e){},,,,,,,,function(t,e){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t){t.exports=JSON.parse('{"a":"0.0.9"}')},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},,,function(t){t.exports=JSON.parse('{"a":"1.0.27"}')},function(t,e,n){},,,,function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},,function(t,e,n){t.exports={heatMap:"_1Q1T9",legend:"_1Bntr"}},,function(t,e,n){t.exports={heatMap:"_1jPS3"}},function(t,e,n){t.exports={viewCountContainer:"lA7G_",engagementPercentageContainer:"_1D53y",engagementGraphContainer:"_8US2G",partialTable:"_3UtUn"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.r(e);var r,o=n(0),i=n.n(o),a=n(20),c=n(6),u=n(491),l=n(27),s=function(t,e){return{url:"/api/player/create-view-key",key:"view:key:".concat(t,":").concat(e),type:l.a.POST,data:{mediaId:t.toString(),mediaIdType:e},expiryTime:1/0}},f=n(101);!function(t){t.Share="share",t.MasterObject="masterobject"}(r||(r={}));var p=n(502),y=n(496),h=n(124),d=n(697),v=n(495),b=n(145),m=n(501),g=n(535),w=n(504),C=n(549),O=n(523),I=n(530),T=n(550),S=n(490),_=(n(832),n(833)),k="cv-persisttest",E=function(){try{return window.localStorage.setItem(k,"cv-player-storage-test"),window.localStorage.removeItem(k),!0}catch(t){return!1}},j=function(t){return window.localStorage.getItem(t)},P=function(t,e){window.localStorage.setItem(t,e)},R=function(t){window.localStorage.removeItem(t)};function x(t){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function L(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function A(t,e){return(A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function B(t){var e=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(t){return!1}}();return function(){var n,r=M(t);if(e){var o=M(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return N(this,n)}}function N(t,e){return!e||"object"!==x(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function M(t){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var D=S.a.getPlugin("plugin"),U="cvplayer-mute",F=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&A(t,e)}(i,t);var e,n,r,o=B(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).player.ready((function(){return e.initialize()})),e}return e=i,(n=[{key:"initialize",value:function(){var t=this;if(E()){this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.one("dispose",(function(){t.player.off("volumechange",t.saveVolumeState)}));var e=j("cvplayer-volume"),n=j(U);e&&this.player.volume(+e),n&&this.player.muted("true"===n)}}},{key:"saveVolumeState",value:function(){P("cvplayer-volume",this.player.volume().toString()),P(U,this.player.muted().toString())}}])&&L(e.prototype,n),r&&L(e,r),i}(D);function V(t){return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function z(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function H(t,e){return(H=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function G(t){var e=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(t){return!1}}();return function(){var n,r=K(t);if(e){var o=K(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return W(this,n)}}function W(t,e){return!e||"object"!==V(e)&&"function"!=typeof e?q(t):e}function q(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function K(t){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}S.a.registerPlugin("persistVolumePlugin",F);var Q=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&H(t,e)}(i,t);var e,n,r,o=G(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).hasScreenOrientation()&&e.player.supportsFullScreen()?(e.onRotate=e.onRotate.bind(q(e)),e.onFullscreenChange=e.onFullscreenChange.bind(q(e)),e.player.ready((function(){return e.initialize()})),e):W(e)}return e=i,(n=[{key:"initialize",value:function(){var t=this;window.addEventListener("orientationchange",this.onRotate),this.hasScreenLock()&&this.player.on("fullscreenchange",this.onFullscreenChange),this.one("dispose",(function(){window.removeEventListener("orientationchange",t.onRotate),t.hasScreenLock()&&t.player.off("fullscreenchange",t.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 t=this.getAngle();90===t||-90===t||270===t?this.player.requestFullscreen():this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"hasScreenOrientation",value:function(){var t,e;return"function"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.lock)}},{key:"hasScreenLock",value:function(){var t,e;return"function"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.lock)}},{key:"getAngle",value:function(){var t,e;return"number"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.angle)?window.screen.orientation.angle:0}}])&&z(e.prototype,n),r&&z(e,r),i}(S.a.getPlugin("plugin"));S.a.registerPlugin("fullscreenOnRotatePlugin",Q);var Z="\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(834);function $(t){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function J(t,e){return(J=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Y(t){var e=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(t){return!1}}();return function(){var n,r=nt(t);if(e){var o=nt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tt(this,n)}}function tt(t,e){return!e||"object"!==$(e)&&"function"!=typeof e?et(t):e}function et(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nt(t){return(nt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var rt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&J(t,e)}(i,t);var e,n,r,o=Y(i);function i(t,e){var n,r,a,c;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).update=(r=n.update.bind(et(n)),a=1e3,c=window.performance.now(),function(){var t=window.performance.now();t-c>=a&&(r.apply(void 0,arguments),c=t)}),t.on("timeupdate",n.update),t.one("dispose",(function(){t.off("timeupdate",n.update),n.el_.removeEventListener("click",n.pause)})),n}return e=i,(n=[{key:"update",value:function(){var t=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(t)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var t={innerHTML:Z,className:this.buildCSSClass()},e={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=S.a.dom.createEl("a",t,e);return this.createControlTextEl(n),n.addEventListener("click",this.pause.bind(this)),n}},{key:"pause",value:function(){this.player_.pause()}}])&&X(e.prototype,n),r&&X(e,r),i}(S.a.getComponent("Button"));function ot(t){return(ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function it(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function at(t,e){return(at=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ct(t){var e=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(t){return!1}}();return function(){var n,r=lt(t);if(e){var o=lt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ut(this,n)}}function ut(t,e){return!e||"object"!==ot(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function lt(t){return(lt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}rt.prototype.controlText_="Open in ClickView",S.a.registerComponent("OpenExternallyButton",rt);var st=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&at(t,e)}(i,t);var e,n,r,o=ct(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).options=e,t.ready((function(){return n.onReady()})),n}return e=i,(n=[{key:"onReady",value:function(){var t=this.player.getChild("collapserator"),e=t.getChild("customControlSpacer"),n=t.children_.indexOf(e);t.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&it(e.prototype,n),r&&it(e,r),i}(S.a.getPlugin("plugin"));S.a.registerPlugin("openExternallyPlugin",st);n(835);function ft(t){return(ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yt(t,e,n){return(yt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=bt(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function ht(t,e){return(ht=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function dt(t){var e=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(t){return!1}}();return function(){var n,r=bt(t);if(e){var o=bt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vt(this,n)}}function vt(t,e){return!e||"object"!==ft(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function bt(t){return(bt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var mt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ht(t,e)}(i,t);var e,n,r,o=dt(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(yt(bt(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return yt(bt(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"setUi",value:function(t,e){var n=this,r=t>0,o=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(o,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*t,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){n.removeText()}),e)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&pt(e.prototype,n),r&&pt(e,r),i}(S.a.getComponent("component"));function gt(t){return(gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ct(t,e,n){return(Ct="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=St(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Ot(t,e){return(Ot=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function It(t){var e=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(t){return!1}}();return function(){var n,r=St(t);if(e){var o=St(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Tt(this,n)}}function Tt(t,e){return!e||"object"!==gt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function St(t){return(St=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}S.a.registerComponent("TouchControls",mt);var _t=S.a.getPlugin("plugin"),kt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ot(t,e)}(i,t);var e,n,r,o=It(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).doubleTouchCount=0,e.seekStartTime=0,e.directionModifier=0,e.bindFunctions(),e.player.ready((function(){return e.initialize()})),e}return e=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 t=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",(function(){t.player.off("ready",t.reBindEventListeners)})),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.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(){Ct(St(i.prototype),"dispose",this).call(this),this.unBindEventListeners()}},{key:"onTouchStart",value:function(t){this.touchStartTime=t.timeStamp}},{key:"onTouchEnd",value:function(t){var e=this;if(t.changedTouches.length){if(t.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(t),void(this.lastTouchTime=t.timeStamp);this.resetProperties(),this.lastTouchTime=t.timeStamp,t.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){e.doubleTouchCount||(e.player.paused()?e.player.play():e.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(t){var e=this.player.el().getBoundingClientRect(),n=e.left+e.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),t.changedTouches[0].pageX<n?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}])&&wt(e.prototype,n),r&&wt(e,r),i}(_t);function Et(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}S.a.registerPlugin("touchControls",kt);var jt=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=n.id,this.plugin=e,this.source=n,this.enabled=this.enabled.bind(this)}var e,n,r;return e=t,(n=[{key:"enabled",value:function(t){return void 0===t?this.plugin.currentSource===this.source:(t&&this.plugin.setSource(this.source.id),t)}}])&&Et(e.prototype,n),r&&Et(e,r),t}();function Pt(t){return(Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Rt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function xt(t,e){return(xt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Lt(t){var e=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(t){return!1}}();return function(){var n,r=Bt(t);if(e){var o=Bt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return At(this,n)}}function At(t,e){return!e||"object"!==Pt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Bt(t){return(Bt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Nt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&xt(t,e)}(i,t);var e,n,r,o=Lt(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t)).options_=e,n.player.ready((function(){return n.initialize()})),n}return e=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(t){var e=this,n=this.getSourceById(t);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(){e.player.currentTime()!==r&&e.player.currentTime(r),o&&e.player.play()})),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(t){return this.sources.find((function(e){return e.id===t}))}},{key:"sortSources",value:function(t){return t.sort((function(t,e){return t.id===e.id?0:+t.id>+e.id?-1:1}))}},{key:"populateSources",value:function(t){var e=this,n=null;(t=this.sortSources(t)).forEach((function(t){e.qualityLevels.addQualityLevel(new jt(e,t)),e.sources.push(t),e.trigger({event:"addsource",source:t}),t.default&&(n=t)})),null===n&&(n=this.sources[0]),null!==n&&this.setSource(n.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(t){for(var e=this.qualityLevels,n=-1,r=0;r<e.length;r++)if(e[r].id===t.id){n=r;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:"change"})}}])&&Rt(e.prototype,n),r&&Rt(e,r),i}(S.a.getPlugin("plugin"));function Mt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}S.a.registerPlugin("progressiveFiles",Nt);var Dt=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},Ut=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e.name,this.playbackProfile=e.playbackProfile,this.address=new URL(e.httpsAddress)}var e,n,r;return e=t,(n=[{key:"getUrl",value:function(t){return t?this.address+"cache?file="+encodeURIComponent(t):null}},{key:"ping",value:function(){return Dt(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new AbortController,n=setTimeout((function(){return e.abort()}),1e3),t.prev=3,t.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:e.signal});case 6:return r=t.sent,t.next=9,r.text();case 9:return o=t.sent,clearTimeout(n),t.abrupt("return","PONG"===o);case 14:return t.prev=14,t.t0=t.catch(3),t.abrupt("return",!1);case 17:case"end":return t.stop()}}),t,this,[[3,14]])})))}}])&&Mt(e.prototype,n),r&&Mt(e,r),t}();function Ft(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Vt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,r=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(t,e){var n=t.getQualityLevelById(e);if(n||(n=this.getNextBestQuality(t,e)),!n)return null;for(var r=0;r<t.length;r++){var o=t[r];o.enabled=n.id===o.id}return n}},{key:"getNextBestQuality",value:function(t,e){var n=this.getKnownProfiles(),r=n.indexOf(e);if(r>=0){for(var o=r+1;o<n.length;o++){var i=n[o],a=t.getQualityLevelById(i);if(a)return a}for(var c=r-1;c>0;c--){var u=n[c],l=t.getQualityLevelById(u);if(l)return l}}return null}}],(n=null)&&Ft(e.prototype,n),r&&Ft(e,r),t}();function zt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Ht=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},Gt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.player=e,this.logger=S.a.log.createLogger("localcache")}var e,n,r;return e=t,(n=[{key:"setSource",value:function(t,e){return Ht(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e(null,t),n.abrupt("return");case 5:null!==(r=n.sent)&&(this.logger.debug("Using Local Cache",r),t.src=r.getUrl(t.src));case 7:e(null,t);case 8:case"end":return n.stop()}}),n,this)})))}}])&&zt(e.prototype,n),r&&zt(e,r),t}();S.a.use("*",(function(t){return new Gt(t)}));n(836);function Wt(t){return(Wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kt(t,e,n){return(Kt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Jt(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Qt(t,e){return(Qt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Zt(t){var e=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(t){return!1}}();return function(){var n,r=Jt(t);if(e){var o=Jt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $t(this,n)}}function $t(t,e){return!e||"object"!==Wt(e)&&"function"!=typeof e?Xt(t):e}function Xt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jt(t){return(Jt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Yt=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},te=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Qt(t,e)}(i,t);var e,n,r,o=Zt(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).hide(),n.onLocalCacheChange=n.onLocalCacheChange.bind(Xt(n)),t.ready((function(){n.initialize()})),n}return e=i,(n=[{key:"createEl",value:function(){return Kt(Jt(i.prototype),"createEl",this).call(this,"div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat('<?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>',"</div>"),title:"Streaming from ClickView Local Cache"})}},{key:"initialize",value:function(){var t=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){t.localCachePlugin.off("localcachechanged",t.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return Yt(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.localCachePlugin.getActiveLocalCache();case 2:t.sent?this.show():this.hide();case 4:case"end":return t.stop()}}),t,this)})))}}])&&qt(e.prototype,n),r&&qt(e,r),i}(S.a.getComponent("Component"));function ee(t){return(ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ne(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function re(t,e,n){return(re="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ue(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function oe(t,e){return(oe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ie(t){var e=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(t){return!1}}();return function(){var n,r=ue(t);if(e){var o=ue(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ae(this,n)}}function ae(t,e){return!e||"object"!==ee(e)&&"function"!=typeof e?ce(t):e}function ce(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ue(t){return(ue=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}S.a.registerComponent("localCacheIndicator",te);var le=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},se=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&oe(t,e)}(i,t);var e,n,r,o=ie(i);function i(t,e){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t)).logger_=S.a.log.createLogger("localcache"),void 0===e)throw Error("no options defined");return n.onPlayerError=n.onPlayerError.bind(ce(n)),n.localCaches_=e.localCacheAddresses.map((function(t){return new Ut(t)})),n.player.ready((function(){n.initialize(),e.enabled&&n.enable()})),n}return e=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),re(ue(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 t;(null===(t=this.player.error())||void 0===t?void 0:t.code)===MediaError.MEDIA_ERR_NETWORK&&this.resetActiveLocalCache()}},{key:"getActiveLocalCacheInternal",value:function(){return le(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n,r,o=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[],n=function(t){return le(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,t.ping();case 2:if(!n.sent){n.next=4;break}e.push(t);case 4:case"end":return n.stop()}}),n)})))},t.next=4,Promise.all(this.localCaches_.map((function(t){return n(t)})));case 4:if(!(e.length>0)){t.next=8;break}return r=e[0],this.onLocalCacheChange(r),t.abrupt("return",r);case 8:return t.abrupt("return",null);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"onLocalCacheChange",value:function(t){this.logger_.debug("Local Cache changed",t),this.trigger("localcachechanged",{localCache:t});var e=!1;t&&t.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",t.playbackProfile),Vt.enableProfileOrNextBest(this.player.qualityLevels(),t.playbackProfile),e=!0),e||this.player.src(this.player.src())}}])&&ne(e.prototype,n),r&&ne(e,r),i}(S.a.getPlugin("plugin"));function fe(t){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ye(t,e){return(ye=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function he(t){var e=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(t){return!1}}();return function(){var n,r=ve(t);if(e){var o=ve(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return de(this,n)}}function de(t,e){return!e||"object"!==fe(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ve(t){return(ve=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}S.a.registerPlugin("localCache",se);var be=S.a.getPlugin("plugin"),me=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ye(t,e)}(i,t);var e,n,r,o=he(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t)).options=e,n.initialize(),n}return e=i,(n=[{key:"initialize",value:function(){if(this.player.textTracks().length){this.bindEventListeners();var t=!!this.options.showSubtitles,e=this.safeGet("cvplayer-show-subtitles");if("true"===e&&(t=!0),"false"===e&&(t=!1),t){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(t){if(E())return j(t)}},{key:"onSelectedLanguageChange",value:function(){for(var t=this.player.textTracks(),e=0;e<t.length;e++){var n=t[e];if("showing"===n.mode)return P("cvplayer-show-subtitles","true"),void P("cvplayer-selected-language",n.language)}P("cvplayer-show-subtitles","false"),R("cvplayer-selected-language")}},{key:"bindEventListeners",value:function(){var t=this;E()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",(function(){t.player.off("cv:languageselected",t.onSelectedLanguageChange),t.player.off("changesubtitlesize",t.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var t=this.player.textTrackSettings.getSizeSetting();P("cvplayer-subtitle-size",t)}},{key:"guessWhichTrack",value:function(){for(var t,e,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&&(t=u,f||(e=u),f===i))return t}return e||t||null}},{key:"getLanguageParts",value:function(t){var e=t.toLowerCase().split("-");return{language:e[0],country:e[1]}}}])&&pe(e.prototype,n),r&&pe(e,r),i}(be);function ge(t){return(ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function we(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ce(t,e){return(Ce=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Oe(t){var e=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(t){return!1}}();return function(){var n,r=Te(t);if(e){var o=Te(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ie(this,n)}}function Ie(t,e){return!e||"object"!==ge(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Te(t){return(Te=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}S.a.registerPlugin("persistSubtitleSettingsPlugin",me);var Se=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},_e=S.a.getPlugin("plugin"),ke=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ce(t,e)}(i,t);var e,n,r,o=Oe(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t)).options=e,n.player.ready((function(){return n.initialize()})),n}return e=i,(n=[{key:"initialize",value:function(){return Se(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n,r,o,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.isLocalCacheActive();case 2:if(e=t.sent,n=e?this.options.playbackProfileLocalCache:this.options.playbackProfile,E()&&(r=j(this.getStorageKey(e)))&&(n=r),o=this.player.qualityLevels(),Vt.enableProfileOrNextBest(o,n),E()){t.next=9;break}return t.abrupt("return");case 9:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),o.on("change",this.onQualityLevelsChange),this.on("dispose",(function(){o.off("change",i.onQualityLevelsChange)}));case 12:case"end":return t.stop()}}),t,this)})))}},{key:"onQualityLevelsChange",value:function(){return Se(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.isLocalCacheActive();case 2:e=t.sent,n=this.player.qualityLevels(),r=n[n.selectedIndex],P(this.getStorageKey(e),r.id);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"isLocalCacheActive",value:function(){return Se(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.localCache().getActiveLocalCache();case 2:return t.abrupt("return",!!t.sent);case 3:case"end":return t.stop()}}),t,this)})))}},{key:"getStorageKey",value:function(t){return t?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&we(e.prototype,n),r&&we(e,r),i}(_e);function Ee(t){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function je(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Re(t,e){return(Re=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function xe(t){var e=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(t){return!1}}();return function(){var n,r=Ae(t);if(e){var o=Ae(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Le(this,n)}}function Le(t,e){return!e||"object"!==Ee(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Ae(t){return(Ae=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}S.a.registerPlugin("persistQualitySettingsPlugin",ke);var Be=S.a.getPlugin("plugin"),Ne="play",Me="playing",De="pause",Ue="seeking",Fe="seekstart",Ve="seekend",ze="ended",He="pausedseek",Ge="timeupdate",We=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Re(t,e)}(i,t);var e,n,r,o=xe(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).eventBuffer=[],n.latestTime=0,n.lastPlayingTime=0,n.isPlaying=!1,n.isSeeking=!1,n.hasEnded=!1,n.shouldLogPlayOnTimeUpdate=!1,n.options=e,n.player.ready((function(){return n.initialize()})),n}return e=i,(n=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var t,e=this,n=(je(t={},Ne,(function(){return e.onPlay()})),je(t,De,(function(){return e.onPause()})),je(t,Ge,(function(){return e.onTimeUpdate()})),je(t,Ue,(function(){return e.onSeeking()})),je(t,ze,(function(){return e.onEnded()})),t),r=Object.keys(n);r.forEach((function(t){return e.player.on(t,n[t])})),this.one("dispose",(function(){r.forEach((function(t){return e.player.off(t,n[t])}))}))}},{key:"startInterval",value:function(){var t=this,e=this.options.interval||5e3;setInterval((function(){return t.flushBuffer()}),e)}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent(Ve),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(Ne)}},{key:"onPause",value:function(){var t=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){t.isPlaying=!1,t.logEvent(De),delete t.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(Ne)),this.isPlaying&&!this.isSeeking&&this.logEvent(Me)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(He),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(Fe))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(ze)}},{key:"logEvent",value:function(t){if(this.player){var e=this.player.currentTime();t===Fe&&(e=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:e,type:t})}}},{key:"shouldUseCarriedOverTime",value:function(t){return this.lastPlayingTime&&(t===Me||t===Ne)}},{key:"shouldSaveCarriedOverTime",value:function(t){return t===Me||t===De}},{key:"shouldClearCarriedOverTime",value:function(t){return t===ze||t===He}},{key:"flushBuffer",value:function(){for(var t,e=[],n={};this.eventBuffer.length;){var r=this.eventBuffer.shift();this.shouldClearCarriedOverTime(r.type)?delete this.lastPlayingTime:n.start?r.type===Me&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(r.type)&&(this.lastPlayingTime=r.time),n.end=r,e.push(n),n={}):(this.shouldUseCarriedOverTime(r.type)&&(r.time=this.lastPlayingTime,delete this.lastPlayingTime),n.start=r)}this.eventBuffer=[],e.length&&(this.options.onFlush(e),null===(t=this.player)||void 0===t||t.trigger("progressflush"))}}])&&Pe(e.prototype,n),r&&Pe(e,r),i}(Be);S.a.registerPlugin("progressReporterPlugin",We);n(837);function qe(t){return(qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ke(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ze(t,e){return(Ze=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $e(t){var e=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(t){return!1}}();return function(){var n,r=Je(t);if(e){var o=Je(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xe(this,n)}}function Xe(t,e){return!e||"object"!==qe(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Je(t){return(Je=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ye=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ze(t,e)}(i,t);var e,n,r,o=$e(i);function i(){return Ke(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"createEl",value:function(){return S.a.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&Qe(e.prototype,n),r&&Qe(e,r),i}(S.a.getComponent("Component")),tn=["top","left","right","bottom"],en={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};n(838);function nn(t){return(nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function on(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function an(t,e,n){return e&&on(t.prototype,e),n&&on(t,n),t}function cn(t,e,n){return(cn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=pn(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function un(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ln(t,e)}function ln(t,e){return(ln=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function sn(t){var e=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(t){return!1}}();return function(){var n,r=pn(t);if(e){var o=pn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return fn(this,n)}}function fn(t,e){return!e||"object"!==nn(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function pn(t){return(pn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var yn=S.a.getComponent("Component"),hn=function(t){un(n,t);var e=sn(n);function n(t,r){var o;return rn(this,n),(o=e.call(this,t,r)).bindEventListeners(),o}return an(n,[{key:"createEl",value:function(){return cn(pn(n.prototype),"createEl",this).call(this,"div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)})}},{key:"bindEventListeners",value:function(){var t=this,e=this.el(),n=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move",t.addClass("cv-drag-over")},r=function(e){e.preventDefault(),t.removeClass("cv-drag-over"),t.player_.whiteboardModePlugin().setWhiteboardMode(t.options_.side)},o=function(){t.removeClass("cv-drag-over")};e.addEventListener("dragover",n),e.addEventListener("drop",r),e.addEventListener("dragleave",o),this.on("dispose",(function(){e.removeEventListener("dragover",n),e.removeEventListener("drop",r),e.removeEventListener("dragleave",o)}))}}]),n}(yn),dn=function(t){un(n,t);var e=sn(n);function n(t,r){var o;return rn(this,n),(o=e.call(this,t,r)).addChildren(),o}return an(n,[{key:"addChildren",value:function(){var t=this;tn.forEach((function(e){t.addChild(new hn(t.player_,{side:e}))}))}}]),n}(yn);function vn(t){return(vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function mn(t,e,n){return(mn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=On(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function gn(t,e){return(gn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function wn(t){var e=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(t){return!1}}();return function(){var n,r=On(t);if(e){var o=On(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Cn(this,n)}}function Cn(t,e){return!e||"object"!==vn(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function On(t){return(On=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var In=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&gn(t,e)}(i,t);var e,n,r,o=wn(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,(n=[{key:"createEl",value:function(){return S.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(t){var e=this;mn(On(i.prototype),"handleClick",this).call(this,t),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("cogButton").pressButton()}))}}])&&bn(e.prototype,n),r&&bn(e,r),i}(S.a.getComponent("MenuItem"));function Tn(t){return(Tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Sn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _n(t,e){return(_n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function kn(t){var e=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(t){return!1}}();return function(){var n,r=jn(t);if(e){var o=jn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return En(this,n)}}function En(t,e){return!e||"object"!==Tn(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function jn(t){return(jn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Pn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_n(t,e)}(i,t);var e,n,r,o=kn(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,(n=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Sn(e.prototype,n),r&&Sn(e,r),i}(S.a.getComponent("MenuItem"));function Rn(t){return(Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ln(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function An(t,e,n){return(An="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Dn(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Bn(t,e){return(Bn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Nn(t){var e=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(t){return!1}}();return function(){var n,r=Dn(t);if(e){var o=Dn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Mn(this,n)}}function Mn(t,e){return!e||"object"!==Rn(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Dn(t){return(Dn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Un=S.a.getComponent("MenuButton"),Fn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Bn(t,e)}(i,t);var e,n,r,o=Nn(i);function i(){var t;return xn(this,i),(t=o.apply(this,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return e=i,(n=[{key:"createItems",value:function(){var t=this,e=this.player_.whiteboardModePlugin().side,n=[new In(this.player_,{label:"Video Controls"})];return tn.forEach((function(r){n.push(new Pn(t.player_,{side:r,label:en[r],selectable:!0,multiSelectable:!1,selected:r===e}))})),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(An(Dn(i.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.whiteboardModePlugin().side;return en[t]}},{key:"showInCollabsibleMenu",value:function(){return this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){Un.prototype.handleClick.apply(this)}}])&&Ln(e.prototype,n),r&&Ln(e,r),i}(Un);n(839);function Vn(t){return(Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Hn(t,e){return(Hn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Gn(t){var e=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(t){return!1}}();return function(){var n,r=qn(t);if(e){var o=qn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Wn(this,n)}}function Wn(t,e){return!e||"object"!==Vn(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function qn(t){return(qn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Kn="cv-whiteboard-side",Qn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Hn(t,e)}(i,t);var e,n,r,o=Gn(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).side="bottom",e.player.ready((function(){e.initialize()})),e}return e=i,(n=[{key:"initialize",value:function(){if(E()){var t=j(Kn);t&&(this.side=t)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}},{key:"initCollapserator",value:function(){var t=this,e=this.player.getChild("collapserator"),n=new Ye(this.player);this.button=new Fn(this.player),e.addChild(n),e.addChild(this.button),this.player.trigger("cv-updatecog");var r=function(){e.el().setAttribute("draggable","true")},o=function(){e.el().setAttribute("draggable","false")},i=function(e){t.player.addClass("cv-dragging"),e.dataTransfer.setData("text/plain","handle")},a=function(){t.player.removeClass("cv-dragging"),e.el().setAttribute("draggable","false")};n.el().addEventListener("mousedown",r),n.el().addEventListener("mouseup",o),e.el().addEventListener("dragstart",i),e.el().addEventListener("dragend",a),this.on("dispose",(function(){n.el().removeEventListener("mousedown",r),n.el().removeEventListener("mouseup",o),e.el().removeEventListener("dragstart",i),e.el().removeEventListener("dragend",a)}))}},{key:"initDragTargets",value:function(){this.player.addChild(new dn(this.player))}},{key:"initFullscreenListener",value:function(){var t=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.one("dispose",(function(){t.player.off("fullscreenchange",t.update)}))}},{key:"setWhiteboardMode",value:function(t){this.side=t,this.button.update(),E()&&P(Kn,t),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"),this.player.trigger("resizemenus"),this.player.isFullscreen()&&"bottom"!==this.side&&this.player.addClass("cv-whiteboard-".concat(this.side))}}])&&zn(e.prototype,n),r&&zn(e,r),i}(S.a.getPlugin("plugin"));function Zn(t){return(Zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Xn(t,e,n){return(Xn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=er(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Jn(t,e){return(Jn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Yn(t){var e=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(t){return!1}}();return function(){var n,r=er(t);if(e){var o=er(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tr(this,n)}}function tr(t,e){return!e||"object"!==Zn(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function er(t){return(er=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}S.a.registerPlugin("whiteboardModePlugin",Qn),window.__onGCastApiAvailable=function(t){t&&(nr=new rr)},window.videojs=S.a;var nr,rr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Jn(t,e)}(i,t);var e,n,r,o=Yn(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,null)).setOptions(),t.remotePlayer=new cast.framework.RemotePlayer,t.remotePlayerController=new cast.framework.RemotePlayerController(t.remotePlayer),t.bindListeners(),t}return e=i,(n=[{key:"play",value:function(){}},{key:"castConext",get:function(){return cast.framework.CastContext.getInstance()}},{key:"setOptions",value:function(){this.castConext.setOptions({receiverApplicationId:chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED})}},{key:"castState",get:function(){return this.castConext.getCastState()}},{key:"castSession",get:function(){return nr.castConext.getCurrentSession()}},{key:"isConnected",value:function(){return this.castState===cast.framework.CastState.CONNECTED&&this.remotePlayer.isConnected}},{key:"bindListeners",value:function(){this.onCastStateChange=this.onCastStateChange.bind(this),this.onIsConnectedChanged=this.onIsConnectedChanged.bind(this),this.castConext.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,this.onCastStateChange),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED,this.onIsConnectedChanged)}},{key:"onIsConnectedChanged",value:function(){try{this.trigger("isconnectedchanged",this.remotePlayer.isConnected)}catch(t){console.log(t)}console.log(this.remotePlayer.isConnected)}},{key:"dispose",value:function(){Xn(er(i.prototype),"dispose",this).call(this),this.castConext.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,this.onCastStateChange),this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED,this.onIsConnectedChanged)}},{key:"onCastStateChange",value:function(t){this.hasAvailableDevices(t.castState)?this.trigger("devicesAvailable"):this.trigger("devicesUnabailable")}},{key:"stopCasting",value:function(){this.castConext.getCurrentSession().endSession(!0)}},{key:"getDeviceName",value:function(){var t,e;return null===(e=null===(t=this.castConext.getCurrentSession())||void 0===t?void 0:t.getCastDevice())||void 0===e?void 0:e.friendlyName}},{key:"hasAvailableDevices",value:function(t){return t||(t=this.castConext.getCastState()),t===cast.framework.CastState.NOT_CONNECTED||t===cast.framework.CastState.CONNECTING||t===cast.framework.CastState.CONNECTED}}])&&$n(e.prototype,n),r&&$n(e,r),i}(S.a.getComponent("Component"));n(840);function or(t){return(or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ir(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ar(t,e,n){return(ar="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=sr(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function cr(t,e){return(cr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ur(t){var e=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(t){return!1}}();return function(){var n,r=sr(t);if(e){var o=sr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return lr(this,n)}}function lr(t,e){return!e||"object"!==or(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function sr(t){return(sr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var fr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&cr(t,e)}(i,t);var e,n,r,o=ur(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,null)).update(),t}return e=i,(n=[{key:"play",value:function(){}},{key:"createEl",value:function(){return ar(sr(i.prototype),"createEl",this).call(this,"div",{className:"cv-chromecast-tech"})}},{key:"setTitle",value:function(t){this.title=t,this.update()}},{key:"setPoster",value:function(t){this.poster=t,this.update()}},{key:"disconnect",value:function(t){t.stopPropagation(),nr.stopCasting()}},{key:"update",value:function(){this.el_.innerHTML='\n <div class="cv-chromecast-content">\n '.concat(this.title?"<h1>".concat(this.title,"</h1>"):"","\n <p>Currently playing on: ").concat(nr.getDeviceName(),'</p>\n </div>\n <div class="cv-chromecast-background" style="background-image: url(').concat(this.poster,')"></div>\n ');var t=document.createElement("div");t.className="btn btn-primary cursor-pointer",t.onclick=this.disconnect.bind(this),t.innerHTML="Stop casting",this.el_.querySelector(".cv-chromecast-content").appendChild(t)}}])&&ir(e.prototype,n),r&&ir(e,r),i}(S.a.getComponent("Component"));function pr(t){return(pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function hr(t,e,n){return(hr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=mr(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function dr(t,e){return(dr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function vr(t){var e=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(t){return!1}}();return function(){var n,r=mr(t);if(e){var o=mr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return br(this,n)}}function br(t,e){return!e||"object"!==pr(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function mr(t){return(mr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var gr=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},wr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&dr(t,e)}(i,t);var e,n,r,o=vr(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),n=o.call(this,t,e),nr.isConnected()&&t.source&&n.setSource(t.source),n.bindEventListeners(),t.poster&&n.setPoster(t.poster),n.triggerReady(),n}return e=i,r=[{key:"canPlaySource",value:function(){return nr.isConnected()}},{key:"isSupported",value:function(){return!!nr&&nr.isConnected()}}],(n=[{key:"createEl",value:function(){return this.ui=new fr,this.ui.el()}},{key:"bindEventListeners",value:function(){this.onPlayerStateChanged=this.onPlayerStateChanged.bind(this),this.onVolumeLevelChanged=this.onVolumeLevelChanged.bind(this),this.onCurrentTimeChanged=this.onCurrentTimeChanged.bind(this),this.onDurationChanged=this.onDurationChanged.bind(this);var t=cast.framework.RemotePlayerEventType,e=nr.remotePlayerController;e.addEventListener(t.PLAYER_STATE_CHANGED,this.onPlayerStateChanged),e.addEventListener(t.VOLUME_LEVEL_CHANGED,this.onVolumeLevelChanged),e.addEventListener(t.IS_MUTED_CHANGED,this.onVolumeLevelChanged),e.addEventListener(t.CURRENT_TIME_CHANGED,this.onCurrentTimeChanged),e.addEventListener(t.DURATION_CHANGED,this.onDurationChanged)}},{key:"dispose",value:function(){var t=cast.framework.RemotePlayerEventType,e=nr.remotePlayerController;e.removeEventListener(t.PLAYER_STATE_CHANGED,this.onPlayerStateChanged),e.removeEventListener(t.VOLUME_LEVEL_CHANGED,this.onVolumeLevelChanged),e.removeEventListener(t.IS_MUTED_CHANGED,this.onVolumeLevelChanged),e.removeEventListener(t.CURRENT_TIME_CHANGED,this.onCurrentTimeChanged),e.removeEventListener(t.DURATION_CHANGED,this.onDurationChanged),hr(mr(i.prototype),"dispose",this).call(this)}},{key:"onPlayerStateChanged",value:function(){var t=nr.remotePlayer.playerState;t===chrome.cast.media.PlayerState.PLAYING?(this.trigger("play"),this.trigger("playing")):t===chrome.cast.media.PlayerState.PAUSED?this.trigger("pause"):t===chrome.cast.media.PlayerState.BUFFERING?this.trigger("waiting"):t===chrome.cast.media.PlayerState.IDLE&&this.ended()&&this.trigger("ended")}},{key:"stopCasting",value:function(){var t=window.setTimeout((function(){nr.stopCasting()}),1e4);this.on("dispose",(function(){window.clearTimeout(t)}))}},{key:"setPoster",value:function(t){this.poster_=t,this.ui.setPoster(t)}},{key:"poster",value:function(){return this.poster_}},{key:"setTitle",value:function(t){this.ui.setTitle(t)}},{key:"onVolumeLevelChanged",value:function(){this.trigger("volumechange")}},{key:"onCurrentTimeChanged",value:function(){this.trigger("timeupdate")}},{key:"onDurationChanged",value:function(){this.trigger("durationchange")}},{key:"setSource",value:function(t){var e,n;return gr(this,void 0,void 0,regeneratorRuntime.mark((function r(){var o,i,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o=nr.castSession.getMediaSession(),this.trigger("waiting"),(null===(e=null==o?void 0:o.media)||void 0===e?void 0:e.contentId)!==t.src||(null===(n=null==o?void 0:o.media)||void 0===n?void 0:n.contentType)!==t.type){r.next=5;break}return this.triggerLoaded(),r.abrupt("return");case 5:return i=new chrome.cast.media.MediaInfo(t.src,t.type),(a=new chrome.cast.media.LoadRequest(i)).autoplay=!0,a.currentTime=this.currentTime()||this.options_.startTime||0,r.prev=9,r.next=12,nr.castSession.loadMedia(a);case 12:r.next=17;break;case 14:r.prev=14,r.t0=r.catch(9),this.trigger("error");case 17:this.triggerLoaded();case 18:case"end":return r.stop()}}),r,this,[[9,14]])})))}},{key:"triggerLoaded",value:function(){var t=this,e=function(){t.trigger("loadstart"),t.trigger("loadeddata"),t.trigger("play"),t.trigger("playing")};if(this.duration())e();else{var n=nr.remotePlayerController,r=cast.framework.RemotePlayerEventType,o=function t(){e(),n.removeEventListener(r.DURATION_CHANGED,t),n.removeEventListener(r.CURRENT_TIME_CHANGED,t)};n.addEventListener(r.DURATION_CHANGED,o),n.addEventListener(r.CURRENT_TIME_CHANGED,o)}}},{key:"play",value:function(){this.paused()&&nr.remotePlayerController.playOrPause()}},{key:"pause",value:function(){!this.paused()&&nr.remotePlayer.canPause&&nr.remotePlayerController.playOrPause()}},{key:"paused",value:function(){return nr.remotePlayer.isPaused||this.ended()||null===nr.remotePlayer.playerState}},{key:"ended",value:function(){var t,e=null===(t=nr.castSession)||void 0===t?void 0:t.getMediaSession();return!e||e.idleReason===chrome.cast.media.IdleReason.FINISHED}},{key:"setCurrentTime",value:function(t){var e=this.duration();t>e||!nr.remotePlayer.canSeek||(nr.remotePlayer.currentTime=Math.min(e-1,t),nr.remotePlayerController.seek(),this.trigger("timeupdate"))}},{key:"currentTime",value:function(){return nr.remotePlayer.currentTime}},{key:"duration",value:function(){return this.durationCache_=nr.remotePlayer.duration,this.durationCache_}},{key:"volume",value:function(){return nr.remotePlayer.volumeLevel}},{key:"setVolume",value:function(t){nr.remotePlayer.volumeLevel=t,nr.remotePlayerController.setVolumeLevel(),this.trigger("volumechange")}},{key:"muted",value:function(){return nr.remotePlayer.isMuted}},{key:"setMuted",value:function(t){this.muted()===t&&nr.remotePlayerController.muteOrUnmute()}},{key:"buffered",value:function(){}},{key:"seekable",value:function(){return S.a.createTimeRanges(0,this.duration())}},{key:"controls",value:function(){return!1}},{key:"playsinline",value:function(){return!0}},{key:"supportsFullScreen",value:function(){return!0}},{key:"setAutoplay",value:function(){}},{key:"preload",value:function(){}},{key:"load",value:function(){}},{key:"setPlaybackRate",value:function(){}},{key:"playbackRate",value:function(){var t=nr.castSession.getMediaSession();return t?t.playbackRate:1}},{key:"readyState",value:function(){return nr.remotePlayer.playerState===chrome.cast.media.PlayerState.IDLE||nr.remotePlayer.playerState===chrome.cast.media.PlayerState.BUFFERING?0:4}}])&&yr(e.prototype,n),r&&yr(e,r),i}(S.a.getComponent("Tech")),Cr=wr.prototype;Cr.featuresVolumeControl=!0,Cr.featuresPlaybackRate=!1,Cr.movingMediaElementInDOM=!1,Cr.featuresFullscreenResize=!0,Cr.featuresTimeupdateEvents=!0,Cr.featuresProgressEvents=!1,Cr.featuresNativeTextTracks=!1,Cr.featuresNativeAudioTracks=!1,Cr.featuresNativeVideoTracks=!1,S.a.registerTech("chromecast",wr);n(841);function Or(t){return(Or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ir(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Tr(t,e,n){return(Tr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=jr(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Sr(t,e){return(Sr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _r(t){var e=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(t){return!1}}();return function(){var n,r=jr(t);if(e){var o=jr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return kr(this,n)}}function kr(t,e){return!e||"object"!==Or(e)&&"function"!=typeof e?Er(t):e}function Er(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jr(t){return(jr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Pr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Sr(t,e)}(i,t);var e,n,r,o=_r(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e.onDevicesAvailable=e.onDevicesAvailable.bind(Er(e)),e.onDevicesUnavailable=e.onDevicesUnavailable.bind(Er(e)),nr.on("devicesAvailable",e.onDevicesAvailable),nr.on("devicesUnabailable",e.onDevicesUnavailable),e.player_.one("dispose",(function(){nr.off("devicesAvailable",e.onDevicesAvailable),nr.off("devicesUnabailable",e.onDevicesUnavailable)})),nr.hasAvailableDevices()||e.hide(),e}return e=i,(n=[{key:"onDevicesAvailable",value:function(){this.show()}},{key:"onDevicesUnavailable",value:function(){this.hide()}},{key:"buildCSSClass",value:function(){return"cv-chromecast-button"}},{key:"createEl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Tr(jr(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{innerHTML:'\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <google-cast-launcher></google-cast-launcher>\n '}),n)}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){Tr(jr(i.prototype),"handleClick",this).call(this,null)}}])&&Ir(e.prototype,n),r&&Ir(e,r),i}(S.a.getComponent("Button"));function Rr(t){return(Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Lr(t,e){return(Lr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ar(t){var e=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(t){return!1}}();return function(){var n,r=Nr(t);if(e){var o=Nr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Br(this,n)}}function Br(t,e){return!e||"object"!==Rr(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Nr(t){return(Nr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Pr.prototype.controlText_="Chromecast",S.a.registerComponent("ChromecastButton",Pr);var Mr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Lr(t,e)}(i,t);var e,n,r,o=Ar(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).options=e,nr?(t.ready((function(){return n.onReady()})),n):Br(n)}return e=i,(n=[{key:"onReady",value:function(){var t,e=this,n=this.player.getChild("collapserator"),r=null===(t=null==n?void 0:n.children())||void 0===t?void 0:t.findIndex((function(t){return"CustomControlSpacer"===t.name()}));r&&-1!==r&&(n.addChild("ChromecastButton",{},r+1),this.onIsConnectedChanged=this.onIsConnectedChanged.bind(this),nr.on("isconnectedchanged",this.onIsConnectedChanged),this.one("dispose",(function(){nr.off("isconnectedchanged",e.onIsConnectedChanged)})),this.setTechTitle())}},{key:"setTechTitle",value:function(){var t=this.player.tech();"ChromecastTech"===t.name()&&t.setTitle(this.options.title)}},{key:"onIsConnectedChanged",value:function(){var t=this,e=this.player.currentTime(),n=this.player.paused();this.player.src(this.player.currentSources()),this.player.ready((function(){t.player.currentTime(e),n?t.player.pause():t.player.play(),t.setTechTitle()}))}}])&&xr(e.prototype,n),r&&xr(e,r),i}(S.a.getPlugin("plugin"));S.a.registerPlugin("chromecast",Mr);var Dr=n(842);function Ur(t){return(Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Fr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function zr(t,e,n){return(zr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=qr(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Hr(t,e){return(Hr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Gr(t){var e=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(t){return!1}}();return function(){var n,r=qr(t);if(e){var o=qr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Wr(this,n)}}function Wr(t,e){return!e||"object"!==Ur(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function qr(t){return(qr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Kr=S.a.getComponent("Menu"),Qr=Kr.prototype,Zr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Hr(t,e)}(i,t);var e,n,r,o=Gr(i);function i(){return Fr(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"createEl",value:function(){var t=zr(qr(i.prototype),"createEl",this).call(this);return this.simpleBar=new Dr.a(this.contentEl(),{autoHide:!1}),t}},{key:"contentEl",value:function(){return this.simpleBar?this.simpleBar.getContentElement():zr(qr(i.prototype),"contentEl",this).call(this)}},{key:"dispose",value:function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),zr(qr(i.prototype),"dispose",this).call(this)}},{key:"addItem",value:function(t){zr(qr(i.prototype),"addItem",this).call(this,t),this.simpleBar.recalculate()}},{key:"lockShowing",value:function(){zr(qr(i.prototype),"lockShowing",this).call(this),this.simpleBar.recalculate()}},{key:"recalculateScrollBar",value:function(){this.simpleBar.recalculate()}},{key:"handleBlur",value:function(t){var e=t.relatedTarget||document.activeElement;this.el().contains(e)||Qr.handleBlur.call(this,t)}}])&&Vr(e.prototype,n),r&&Vr(e,r),i}(Kr);function $r(t){return($r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Yr(t,e){return(Yr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function to(t){var e=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(t){return!1}}();return function(){var n,r=no(t);if(e){var o=no(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return eo(this,n)}}function eo(t,e){return!e||"object"!==$r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function no(t){return(no=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Kr.prototype=Zr.prototype,S.a.registerComponent("Menu",Zr);var ro=S.a.getComponent("Component"),oo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Yr(t,e)}(i,t);var e,n,r,o=to(i);function i(){return Xr(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"createMenu",value:function(){var t,e=new Zr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=S.a.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(t=this.options_.title,"string"!=typeof t?t:t.replace(/./,(function(t){return t.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var r=new ro(this.player_,{el:n});e.addItem(r)}if(this.items=this.createItems(),this.items)for(var o=0;o<this.items.length;o++)e.addItem(this.items[o]);return e}}])&&Jr(e.prototype,n),r&&Jr(e,r),i}(S.a.getComponent("MenuButton"));S.a.registerComponent("MenuButton",oo);n(895);function io(t){return(io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ao(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function co(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function uo(t,e,n){return(uo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=po(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function lo(t,e){return(lo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function so(t){var e=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(t){return!1}}();return function(){var n,r=po(t);if(e){var o=po(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return fo(this,n)}}function fo(t,e){return!e||"object"!==io(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function po(t){return(po=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var yo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&lo(t,e)}(i,t);var e,n,r,o=so(i);function i(){return ao(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(uo(po(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return uo(po(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}}])&&co(e.prototype,n),r&&co(e,r),i}(S.a.getComponent("Component"));yo.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},S.a.registerComponent("TimeWrapper",yo);n(896);function ho(t){return(ho="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function mo(t,e,n){return e&&bo(t.prototype,e),n&&bo(t,n),t}function go(t,e,n){return(go="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=To(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function wo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Co(t,e)}function Co(t,e){return(Co=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Oo(t){var e=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(t){return!1}}();return function(){var n,r=To(t);if(e){var o=To(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Io(this,n)}}function Io(t,e){return!e||"object"!==ho(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function To(t){return(To=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var So=function(t){wo(n,t);var e=Oo(n);function n(t,r){return vo(this,n),e.call(this,t,r)}return mo(n,[{key:"handleClick",value:function(t){var e=this;go(To(n.prototype),"handleClick",this).call(this,t),this.requestAnimationFrame((function(){e.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(t,e,r){if(!this.options_.item)return go(To(n.prototype),"createEl",this).call(this,t,e,r);var o=this.options_.item.getCollabsibleName(),i=this.options_.item.getCollabsibleValue(),a='<span class="vjs-menu-item-text">'.concat(o,"</span>");this.valueHolder_=S.a.dom.createEl("span",{innerHTML:i});var c=go(To(n.prototype),"createEl",this).call(this,t,{className:"vjs-menu-item cv-cog-menu-item ".concat(i?"cv-has-cog-value":""),innerHTML:a},r);return c.appendChild(this.valueHolder_),c}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}]),n}(S.a.getComponent("MenuItem")),_o=function(t){wo(n,t);var e=Oo(n);function n(t,r){return vo(this,n),e.call(this,t,r)}return mo(n,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(go(To(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(go(To(n.prototype),"buildCSSClass",this).call(this))}},{key:"pressButton",value:function(){this.menu.children_.forEach((function(t){t.updateCollapsibleValue&&t.updateCollapsibleValue()})),go(To(n.prototype),"pressButton",this).call(this)}},{key:"createItems",value:function(){for(var t,e=this,n=[],r=0;r<this.options_.items.length;r++){var o=this.options_.items[r];o.isCollabsible&&(o.showInCollabsibleMenu()&&o.isCollapsed&&n.push(new So(this.player_,{item:o})))}return(null===(t=this.additionalItems)||void 0===t?void 0:t.length)&&this.additionalItems.forEach((function(t){var r,o=new t.ctor(e.player_,Object.assign(Object.assign({},e.options_),null!==(r=t.options)&&void 0!==r?r:{}));n.splice(t.index,0,o)})),n}},{key:"update",value:function(){go(To(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(t){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some((function(e){return e.name===t.name}))||(this.additionalItems.push(t),this.update())}}]),n}(S.a.getComponent("MenuButton"));function ko(t){return(ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Eo(t,e,n){return(Eo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=No(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function jo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Po(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ro(t,e,n){return e&&Po(t.prototype,e),n&&Po(t,n),t}function xo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Lo(t,e)}function Lo(t,e){return(Lo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ao(t){var e=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(t){return!1}}();return function(){var n,r=No(t);if(e){var o=No(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Bo(this,n)}}function Bo(t,e){return!e||"object"!==ko(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function No(t){return(No=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}S.a.registerComponent("cogButton",_o);var Mo=S.a.getComponent("MenuItem"),Do=S.a.getComponent("MenuButton"),Uo=["large","medium","small"],Fo=function(t){xo(n,t);var e=Ao(n);function n(t,r){return jo(this,n),e.call(this,t,r)}return Ro(n,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}]),n}(Mo),Vo=function(t){xo(n,t);var e=Ao(n);function n(t,r){var o;return jo(this,n),(o=e.call(this,t,r)).alwaysCollapsed=!0,o.isCollapsed=!1,o.isCollabsible=!0,o.player_.ready((function(){o.update()})),o}return Ro(n,[{key:"createItems",value:function(){var t=this,e=this.player_.textTrackSettings;if(e){var n=e.getSizeSetting(),r=[new In(this.player_,{label:"Caption Text Size",onClickBack:function(){t.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()}))}})];return Uo.map((function(e){r.push(new Fo(t.player_,{label:e.charAt(0).toUpperCase()+e.substring(1),selectable:!0,multiSelectable:!1,selected:e===n,value:e}))})),r}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Eo(No(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(){Do.prototype.handleClick.apply(this)}}]),n}(Do);function zo(t,e,n,r){t.kind===e&&(n&&t.label!==n||(t.loaded_?r(t):t.one("loadeddata",(function(){r(t)}))))}S.a.registerComponent("SubtitleSizeButton",Vo);var Ho=function(t,e,n,r){var o=function(t){zo(t.track,e,n,r)},i=t.textTracks(),a=function(t,e,n){if(t.length)for(var r=t.length-1;r>=0;r--){var o=t[r];if(o.kind===e){if(n&&o.label!==n)continue;return o}}}(i,e,n);a?zo(a,e,n,r):(i.addEventListener("addtrack",o),t.one("dispose",(function(){i.removeEventListener("addtrack",o)})))},Go=function(t){if(!t)return null;for(var e=t.textTracks(),n=0;n<e.length;n++){var r=e[n];if("showing"===r.mode)return r}return null};function Wo(t){return(Wo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ko(t,e){return(Ko=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Qo(t){var e=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(t){return!1}}();return function(){var n,r=$o(t);if(e){var o=$o(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Zo(this,n)}}function Zo(t,e){return!e||"object"!==Wo(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function $o(t){return($o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Xo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ko(t,e)}(i,t);var e,n,r,o=Qo(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,(n=[{key:"update",value:function(t,e){var n=this;if(null==t?void 0:t.length){var r=[],o=0;t.forEach((function(t){var i=n.options_.label.substr(o,t);i&&r.push(i),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(t,e)),r.push("</span>"),o=t+e})),r.push(this.options_.label.substring(o,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(r.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&qo(e.prototype,n),r&&qo(e,r),i}(S.a.getComponent("MenuItem"));function Jo(t){return(Jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Yo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ti(t,e,n){return(ti="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ii(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function ei(t,e){return(ei=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ni(t){var e=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(t){return!1}}();return function(){var n,r=ii(t);if(e){var o=ii(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ri(this,n)}}function ri(t,e){return!e||"object"!==Jo(e)&&"function"!=typeof e?oi(t):e}function oi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ii(t){return(ii=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ai=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ei(t,e)}(i,t);var e,n,r,o=ni(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).onChange=function(t,e,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||t.apply(this,c)};!r&&n&&t.apply(o,c),i.clearTimeout(r),r=i.setTimeout(l,e)};return c.cancel=a,c}(n.onChange,100,!1,oi(n)),n.bindEventListeners(),n}return e=i,(n=[{key:"createEl",value:function(){return ti(ii(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(t){t.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var t=this,e=this.$("input");this.onChange=this.onChange.bind(this),e.addEventListener("keyup",this.onChange),e.addEventListener("blur",(function(e){t.options_.menuButton.menu.handleBlur(e)}))}},{key:"onChange",value:function(t){var e=t.target;this.options_.menuButton.search(e.value)}}])&&Yo(e.prototype,n),r&&Yo(e,r),i}(S.a.getComponent("MenuItem"));n(897);function ci(t){return(ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ui(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function li(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function si(t,e,n){return e&&li(t.prototype,e),n&&li(t,n),t}function fi(t,e,n){return(fi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=bi(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function pi(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&yi(t,e)}function yi(t,e){return(yi=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function hi(t){var e=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(t){return!1}}();return function(){var n,r=bi(t);if(e){var o=bi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return di(this,n)}}function di(t,e){return!e||"object"!==ci(e)&&"function"!=typeof e?vi(t):e}function vi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bi(t){return(bi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var mi=S.a.getComponent("MenuItem"),gi=S.a.getComponent("MenuButton"),wi=function(t){pi(n,t);var e=hi(n);function n(){return ui(this,n),e.apply(this,arguments)}return si(n,[{key:"createEl",value:function(t,e,r){return fi(bi(n.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:"vjs-menu-item cv-no-results"}),r)}}]),n}(mi),Ci=function(t){pi(n,t);var e=hi(n);function n(t,r){var o;return ui(this,n),(o=e.call(this,t,r)).alwaysCollapsed=!0,o.isCollapsed=!1,o.isCollabsible=!0,o.update=o.update.bind(vi(o)),o.player_.textTracks().addEventListener("selectedlanguagechange",o.update),o}return si(n,[{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.update),t.addEventListener("loadeddata",this.update),this.player_.one("dispose",(function(){t.removeEventListener("loadeddata",e.update)}))}},{key:"createItems",value:function(){var t,e=Go(this.player_);if(e){if(null===(t=e.cues)||void 0===t?void 0:t.length){for(var n=[new ai(this.player_,{menuButton:this})],r=0;r<e.cues.length;r++){var o=e.cues[r];n.push(new Xo(this.player_,{cue:o,label:o.text,selected:!1,multiSelectable:!1}))}var i=new wi(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return i.hide(),n.push(i),n}this.bindTrackEvents(e)}}},{key:"search",value:function(t){var e;t=t.trim();var n=Go(this.player_);if(null===(e=null==n?void 0:n.cues)||void 0===e?void 0:e.length){var r=this.findMatches(t,n);this.toggleItemVisibility(t,r),this.toggleNoResults(t,r)}}},{key:"findMatches",value:function(t,e){var n={};if(!t)return n;for(var r=new RegExp(t,"gi"),o=0;o<e.cues.length;o++){for(var i=e.cues[o].text,a=[],c=void 0;c=r.exec(i);)a.push(c.index);a.length&&(n[o]=a)}return n}},{key:"toggleItemVisibility",value:function(t,e){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(n,r){!t||e[r]?n.show():n.hide(),n.update(e[r],t.length)}))}},{key:"toggleNoResults",value:function(t,e){var n=this.menu.children_[this.menu.children_.length-1];!t||Object.keys(e).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(fi(bi(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"update",value:function(){fi(bi(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){fi(bi(n.prototype),"pressButton",this).call(this);var t=this.menu.children_[0];(null==t?void 0:t.focus)&&(null==t||t.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){gi.prototype.handleClick.apply(this)}}]),n}(gi);S.a.registerComponent("subtitleSearchButton",Ci);n(898);function Oi(t){return(Oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ii(t,e,n){return(Ii="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ri(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Ti(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Si(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _i(t,e,n){return e&&Si(t.prototype,e),n&&Si(t,n),t}function ki(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ei(t,e)}function Ei(t,e){return(Ei=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ji(t){var e=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(t){return!1}}();return function(){var n,r=Ri(t);if(e){var o=Ri(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Pi(this,n)}}function Pi(t,e){return!e||"object"!==Oi(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Ri(t){return(Ri=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var xi=S.a.getComponent("MenuItem"),Li=S.a.getComponent("MenuButton"),Ai=[{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"}],Bi=function(t){ki(n,t);var e=ji(n);function n(t,r){return Ti(this,n),e.call(this,t,r)}return _i(n,[{key:"createEl",value:function(){return S.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(t){switch(t){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">⇑</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}(xi),Ni=function(t){ki(n,t);var e=ji(n);function n(){var t;return Ti(this,n),(t=e.apply(this,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return _i(n,[{key:"createItems",value:function(){var t=this,e=[];return e.push(new In(this.player_,{label:"Keyboard Shortcuts"})),Ai.forEach((function(n){e.push(new Bi(t.player_,n))})),e}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat(Ii(Ri(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(){Li.prototype.handleClick.apply(this)}}]),n}(Li);S.a.registerComponent("KeyboardShortcutsButton",Ni);n(899),n(900);function Mi(t){return(Mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Di(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ui(t,e,n){return(Ui="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Gi(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Fi(t,e){return(Fi=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Vi(t){var e=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(t){return!1}}();return function(){var n,r=Gi(t);if(e){var o=Gi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zi(this,n)}}function zi(t,e){return!e||"object"!==Mi(e)&&"function"!=typeof e?Hi(t):e}function Hi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Gi(t){return(Gi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Wi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Fi(t,e)}(i,t);var e,n,r,o=Vi(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).addChild("cogButton",{items:n.children_},n.children_.length-1),n.update=n.update.bind(Hi(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 e=i,(n=[{key:"togglehidden",value:function(t){for(var e=0;e<this.children_.length;e++){var n=this.children_[e];n.isCollabsible&&(n.alwaysCollapsed||t?(n.isCollapsed=!0,n.addClass("cv-collapsed")):(n.isCollapsed=!1,n.removeClass("cv-collapsed")))}this.getChild("cogButton").update()}},{key:"update",value:function(){var t=this.player_.el().getBoundingClientRect();0!==t.width&&(this.addClass("cv-collapsorator-ready"),this.togglehidden(t.width<600))}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(Ui(Gi(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return Ui(Gi(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}}])&&Di(e.prototype,n),r&&Di(e,r),i}(S.a.getComponent("Component"));function qi(t){return(qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ki(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Zi(t,e){return(Zi=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $i(t){var e=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(t){return!1}}();return function(){var n,r=Ji(t);if(e){var o=Ji(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xi(this,n)}}function Xi(t,e){return!e||"object"!==qi(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Ji(t){return(Ji=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Wi.prototype.options_={children:["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"]},S.a.registerComponent("collapserator",Wi);var Yi=S.a.getComponent("SeekBar"),ta=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Zi(t,e)}(i,t);var e,n,r,o=$i(i);function i(){return Ki(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"handleMouseDown",value:function(t){Yi.prototype.handleMouseDown.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback")}},{key:"handleMouseUp",value:function(t){var e=this;Yi.prototype.handleMouseUp.call(this,t),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&Qi(e.prototype,n),r&&Qi(e,r),i}(Yi);S.a.registerComponent("SeekBar",ta);n(901);function ea(t){return(ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function na(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ra(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function oa(t,e,n){return(oa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ua(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function ia(t,e){return(ia=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function aa(t){var e=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(t){return!1}}();return function(){var n,r=ua(t);if(e){var o=ua(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ca(this,n)}}function ca(t,e){return!e||"object"!==ea(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ua(t){return(ua=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var la=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ia(t,e)}(i,t);var e,n,r,o=aa(i);function i(){return na(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(oa(ua(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return oa(ua(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(t){t.update()}))}},{key:"updateBuffered",value:function(){var t=this;this.children_.forEach((function(e){e.updateBuffered(function(t){for(var e=t.buffered(),n=t.currentTime(),r=0,o=0;o<e.length;o++){var i=e.start(o),a=e.end(o);if(i<=n&&a>=n){r=a;break}}return r}(t.player_))}))}}])&&ra(e.prototype,n),r&&ra(e,r),i}(S.a.getComponent("Component"));function sa(t){return(sa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function fa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ya(t,e,n){return(ya="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ba(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function ha(t,e){return(ha=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function da(t){var e=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(t){return!1}}();return function(){var n,r=ba(t);if(e){var o=ba(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return va(this,n)}}function va(t,e){return!e||"object"!==sa(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ba(t){return(ba=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ma=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ha(t,e)}(i,t);var e,n,r,o=da(i);function i(){return fa(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(ya(ba(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return ya(ba(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(t){this.el_.style.width=100*t+"%"}}])&&pa(e.prototype,n),r&&pa(e,r),i}(S.a.getComponent("Component"));function ga(t){return(ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ca(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Oa(t,e,n){return(Oa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_a(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Ia(t,e){return(Ia=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ta(t){var e=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(t){return!1}}();return function(){var n,r=_a(t);if(e){var o=_a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Sa(this,n)}}function Sa(t,e){return!e||"object"!==ga(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function _a(t){return(_a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ka=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ia(t,e)}(i,t);var e,n,r,o=Ta(i);function i(){return wa(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(Oa(_a(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return Oa(_a(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(t){t>0&&t<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*t+"%"}}])&&Ca(e.prototype,n),r&&Ca(e,r),i}(S.a.getComponent("Component"));function Ea(t){return(Ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ja(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Pa(t,e,n){return(Pa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Aa(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Ra(t,e){return(Ra=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function xa(t){var e=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(t){return!1}}();return function(){var n,r=Aa(t);if(e){var o=Aa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return La(this,n)}}function La(t,e){return!e||"object"!==Ea(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Aa(t){return(Aa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ba=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ra(t,e)}(i,t);var e,n,r,o=xa(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).playProgress=new ka(n.player_),n.addChild(n.playProgress),n.loadProgress=new ma(n.player_),n.addChild(n.loadProgress),n.update(),n.updateBuffered(0),n}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(Pa(Aa(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return Pa(Aa(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var t=this.player_.duration()||3600,e=this.options_.endTime-this.options_.startTime;if(t!==this.duration_){var n=e/t;this.el_.style.width=100*n+"%";var r=this.options_.startTime/t;this.el_.style.left=100*r+"%",this.duration_=t}var o=this.getCurrentTime();o<this.options_.startTime?this.playProgress.update(0):o>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((o-this.options_.startTime)/e)}},{key:"updateBuffered",value:function(t){var e=this.options_.endTime-this.options_.startTime;t<this.options_.startTime?this.loadProgress.update(0):t>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((t-this.options_.startTime)/e)}}])&&ja(e.prototype,n),r&&ja(e,r),i}(S.a.getComponent("Component"));function Na(t){return(Na="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ma(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Da(t,e,n){return(Da="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ha(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Ua(t,e){return(Ua=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Fa(t){var e=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(t){return!1}}();return function(){var n,r=Ha(t);if(e){var o=Ha(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Va(this,n)}}function Va(t,e){return!e||"object"!==Na(e)&&"function"!=typeof e?za(t):e}function za(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ha(t){return(Ha=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ga=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ua(t,e)}(i,t);var e,n,r,o=Fa(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).onDurationChange=n.onDurationChange.bind(za(n)),n.createChapterItems=n.createChapterItems.bind(za(n)),n.updateBuffered=n.updateBuffered.bind(za(n)),Ho(n.player_,"chapters",null,n.createChapterItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("progress",n.updateBuffered),n.createChapterItems(),n.update(),n}return e=i,(n=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),Da(Ha(i.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){return S.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 t=Da(Ha(i.prototype),"update",this).call(this);return this.chapterBarItems&&this.chapterBarItems.update(),t}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"createChapterItems",value:function(t){var e,n;t&&(this.track_=t);var r=new la(this.player_);if((null===(n=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===n?void 0:n.length)&&!this.options_.ignoreChapters)for(var o=0;o<this.track_.cues.length;o++){var i=this.track_.cues[o],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 Ba(this.player_,{startTime:a,endTime:c});if(r.addChild(l),u&&c===u)break}else r.addChild(new Ba(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&Ma(e.prototype,n),r&&Ma(e,r),i}(S.a.getComponent("SeekBar"));Ga.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},S.a.browser.IS_IOS||S.a.browser.IS_ANDROID||Ga.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),S.a.registerComponent("ChapterSeekBar",Ga);n(902);function Wa(t){return(Wa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ka(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Qa(t,e,n){return(Qa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ja(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Za(t,e){return(Za=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $a(t){var e=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(t){return!1}}();return function(){var n,r=Ja(t);if(e){var o=Ja(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xa(this,n)}}function Xa(t,e){return!e||"object"!==Wa(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Ja(t){return(Ja=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ya=S.a.getComponent("ProgressControl"),tc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Za(t,e)}(i,t);var e,n,r,o=$a(i);function i(){var t;return qa(this,i),(t=o.apply(this,arguments)).seekBarName_="seekBar",t}return e=i,(n=[{key:"setSeekBarName",value:function(t){this.seekBarName_=t}},{key:"getChild",value:function(t){return(null==t?void 0:t.toLowerCase())==="seekBar".toLowerCase()&&(t=this.seekBarName_),Qa(Ja(i.prototype),"getChild",this).call(this,t)}}])&&Ka(e.prototype,n),r&&Ka(e,r),i}(Ya);function ec(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;t=t<0?0:t;var n=Math.floor(t%60),r=Math.floor(t/60%60),o=Math.floor(t/3600),i=Math.floor(e/60%60),a=Math.floor(e/3600);return(isNaN(t)||t===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)}tc.prototype.options_={children:[]},S.a.registerComponent("ProgressControl",tc);n(903);function nc(t){return(nc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function oc(t,e,n){return(oc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=uc(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function ic(t,e){return(ic=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ac(t){var e=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(t){return!1}}();return function(){var n,r=uc(t);if(e){var o=uc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return cc(this,n)}}function cc(t,e){return!e||"object"!==nc(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function uc(t){return(uc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var lc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ic(t,e)}(i,t);var e,n,r,o=ac(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).hasCustomChapterText=!1,Ho(n.player_,"chapters",!1,(function(t){n.track_=t})),n}return e=i,(n=[{key:"createEl",value:function(){var t=oc(uc(i.prototype),"createEl",this).call(this);return this.chapter_=S.a.dom.createEl("div"),t.appendChild(this.chapter_),this.time_=S.a.dom.createEl("div"),t.appendChild(this.time_),t}},{key:"updateTime",value:function(t){var e=this.player_.duration();if(S.a.dom.textContent(this.time_,ec(t,e)),this.track_&&!this.hasCustomChapterText){for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],o=r.endTime||e;if(r.startTime<=t&&o>=t)return void S.a.dom.textContent(this.chapter_,r.text)}S.a.dom.textContent(this.chapter_,"")}}},{key:"setCustomChapterText",value:function(t){this.hasCustomChapterText=!!t,S.a.dom.textContent(this.chapter_,null!=t?t:"")}}])&&rc(e.prototype,n),r&&rc(e,r),i}(S.a.getComponent("TimeTooltip"));S.a.registerComponent("TimeTooltip",lc);n(904);function sc(t){return(sc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function fc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function pc(t,e,n){return(pc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=vc(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function yc(t,e){return(yc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function hc(t){var e=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(t){return!1}}();return function(){var n,r=vc(t);if(e){var o=vc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return dc(this,n)}}function dc(t,e){return!e||"object"!==sc(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function vc(t){return(vc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var bc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&yc(t,e)}(i,t);var e,n,r,o=hc(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,(n=[{key:"setTrack",value:function(t){this.track_=t}},{key:"createEl",value:function(){var t=pc(vc(i.prototype),"createEl",this).call(this,"div",{className:"cv-thumbnail-display"});return this.img_=S.a.dom.createEl("img"),t.appendChild(this.img_),t}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(t){var e=t.indexOf("#");if(-1===e)return{src:t,w:0,h:0,x:0,y:0};var n=t.substr(0,e),r=t.substr(e+1);if("xywh="!==r.substr(0,5))return{src:t,w:0,h:0,x:0,y:0};var o=this.getScale(),i=r.substr(5).split(",");return{src:n,w:parseInt(i[2])*o,h:parseInt(i[3])*o,x:parseInt(i[0])*o,y:parseInt(i[1])*o}}},{key:"getScale",value:function(){var t=this.options_.scaleFactor,e=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==e&&(t*=2),t}},{key:"update",value:function(t){var e,n;if(null===(n=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===n?void 0:n.length){for(var r,o=t,i=0;i<this.track_.cues.length;){var 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()}}}])&&fc(e.prototype,n),r&&fc(e,r),i}(S.a.getComponent("Component"));bc.prototype.options_={scaleFactor:1},S.a.registerComponent("ThumbnailDisplay",bc);n(905);function mc(t){return(mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function gc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function wc(t,e){return(wc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Cc(t){var e=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(t){return!1}}();return function(){var n,r=Tc(t);if(e){var o=Tc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Oc(this,n)}}function Oc(t,e){return!e||"object"!==mc(e)&&"function"!=typeof e?Ic(t):e}function Ic(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Tc(t){return(Tc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Sc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&wc(t,e)}(i,t);var e,n,r,o=Cc(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),n=o.call(this,t,e),Ho(n.player_,"metadata","thumbnails",(function(t){n.getChild("ThumbnailDisplay").setTrack(t)})),n.update=n.update.bind(Ic(n)),n.player_.on("durationchange",n.update),n.player_.one("dispose",(function(){n.player_.off("durationchange",n.update)})),n}return e=i,(n=[{key:"update",value:function(t,e){var n=this;this.requestAnimationFrame((function(){var r=e*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=t.width*e;i<o.width/2?n.el_.style.left=o.width/2+"px":i>t.width-o.width/2?n.el_.style.left=t.width-o.width/2+"px":n.el_.style.left=t.width*e+"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")}}])&&gc(e.prototype,n),r&&gc(e,r),i}(S.a.getComponent("MouseTimeDisplay"));Sc.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},S.a.registerComponent("MouseTimeDisplay",Sc);n(906);function _c(t){return(_c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function kc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ec(t,e,n){return(Ec="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=xc(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function jc(t,e){return(jc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Pc(t){var e=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(t){return!1}}();return function(){var n,r=xc(t);if(e){var o=xc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Rc(this,n)}}function Rc(t,e){return!e||"object"!==_c(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function xc(t){return(xc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Lc=S.a.getComponent("ChaptersTrackMenuItem"),Ac=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&jc(t,e)}(i,t);var e,n,r,o=Pc(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).nonIconControl=!1,n.thumbnailDisplay=new bc(n.player_,{scaleFactor:.5}),n.el().insertBefore(n.thumbnailDisplay.el(),n.el().firstChild),Ho(n.player_,"metadata","thumbnails",(function(t){n.addClass("cv-has-thumbnails"),n.thumbnailDisplay.setTrack(t),n.thumbnailDisplay.update(n.options_.cue.startTime)})),n}return e=i,(n=[{key:"update",value:function(){this.player_&&Lc.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(t,e,n){return this.nonIconControl=!0,Ec(xc(i.prototype),"createEl",this).call(this,"li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},e),n)}},{key:"getInnerHTML",value:function(){var t=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat(ec(this.options_.cue.startTime,t),")</p>")+"</span>"}}])&&kc(e.prototype,n),r&&kc(e,r),i}(Lc);n(907);function Bc(t){return(Bc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Mc(t,e,n){return(Mc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=zc(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Dc(t,e){return(Dc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Uc(t){var e=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(t){return!1}}();return function(){var n,r=zc(t);if(e){var o=zc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Fc(this,n)}}function Fc(t,e){return!e||"object"!==Bc(e)&&"function"!=typeof e?Vc(t):e}function Vc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function zc(t){return(zc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Hc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Dc(t,e)}(i,t);var e,n,r,o=Uc(i);function i(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,n)).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(Vc(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 e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(Mc(zc(i.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(Mc(zc(i.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var n=0,r=e.length;n<r;n++){var o=e[n],i=new Ac(this.player_,{track:this.track_,cue:o});t.push(i)}return t}},{key:"setTrack",value:function(t){var e=this;Mc(zc(i.prototype),"setTrack",this).call(this,t),this.track_&&"chapters"===this.track_.kind&&t.one("loadeddata",(function(){e.update()}))}},{key:"update",value:function(t){Mc(zc(i.prototype),"update",this).call(this,t)}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var t=this.track_.activeCues[0];return(null==t?void 0:t.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var t=this.track_.cues;return!(!t||!t.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&Nc(e.prototype,n),r&&Nc(e,r),i}(S.a.getComponent("ChaptersButton"));function Gc(t){return(Gc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kc(t,e){return(Kc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Qc(t){var e=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(t){return!1}}();return function(){var n,r=$c(t);if(e){var o=$c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Zc(this,n)}}function Zc(t,e){return!e||"object"!==Gc(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function $c(t){return($c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}S.a.registerComponent("ChaptersButton",Hc);var Xc=S.a.getComponent("OffTextTrackMenuItem"),Jc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Kc(t,e)}(i,t);var e,n,r,o=Qc(i);function i(){return Wc(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"handleClick",value:function(t){Xc.prototype.handleClick.call(this,t),this.player_.trigger("cv:languageselected")}}])&&qc(e.prototype,n),r&&qc(e,r),i}(Xc);function Yc(t){return(Yc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function eu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function nu(t,e){return(nu=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ru(t){var e=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(t){return!1}}();return function(){var n,r=iu(t);if(e){var o=iu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ou(this,n)}}function ou(t,e){return!e||"object"!==Yc(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function iu(t){return(iu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}S.a.registerComponent("OffTextTrackMenuItem",Jc);var au=S.a.getComponent("TextTrackButton"),cu=S.a.getComponent("TextTrackMenuItem"),uu=S.a.getComponent("OffTextTrackMenuItem"),lu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&nu(t,e)}(i,t);var e,n,r,o=ru(i);function i(){return tu(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"createItems",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cu;this.label_&&(t="".concat(this.label_," off")),e.push(new uu(this.player_,{kinds:this.kinds_,kind:this.kind_,label:t})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var o=0;o<r.length;o++){var i=r[o];if(this.kinds_.indexOf(i.kind)>-1){var 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")),e.push(a)}}return e}}])&&eu(e.prototype,n),r&&eu(e,r),i}(au);function su(t){return(su="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function fu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yu(t,e){return(yu=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function hu(t){var e=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(t){return!1}}();return function(){var n,r=vu(t);if(e){var o=vu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return du(this,n)}}function du(t,e){return!e||"object"!==su(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function vu(t){return(vu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}S.a.registerComponent("TextTrackButton",lu);var bu=S.a.getComponent("SubsCapsMenuItem"),mu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&yu(t,e)}(i,t);var e,n,r,o=hu(i);function i(){return fu(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"handleClick",value:function(t){bu.prototype.handleClick.call(this,t),this.player_.trigger("cv:languageselected")}}])&&pu(e.prototype,n),r&&pu(e,r),i}(bu);function gu(t){return(gu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Cu(t,e){return(Cu=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ou(t){var e=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(t){return!1}}();return function(){var n,r=Tu(t);if(e){var o=Tu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Iu(this,n)}}function Iu(t,e){return!e||"object"!==gu(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Tu(t){return(Tu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Su=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Cu(t,e)}(i,t);var e,n,r,o=Ou(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var n={};return n.track={player:t,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSizeMenuItem",(e=o.call(this,t,n)).addClass("vjs-texttrack-settings"),e.addClass("cv-divider-after-menu-item"),e.addClass("cv-subtitle-size-menu-item"),e.controlText(", opens subtitle size settings"),e}return e=i,(n=[{key:"handleClick",value:function(){var t=this;this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])&&wu(e.prototype,n),r&&wu(e,r),i}(S.a.getComponent("TextTrackMenuItem"));function _u(t){return(_u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ku(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Eu(t,e){return(Eu=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ju(t){var e=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(t){return!1}}();return function(){var n,r=xu(t);if(e){var o=xu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Pu(this,n)}}function Pu(t,e){return!e||"object"!==_u(e)&&"function"!=typeof e?Ru(t):e}function Ru(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xu(t){return(xu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Lu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Eu(t,e)}(i,t);var e,n,r,o=ju(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var n={};n.track={player:t,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSearchMenuItem",(e=o.call(this,t,n)).addClass("vjs-texttrack-settings"),e.addClass("cv-subtitle-search-menu-item"),e.controlText(", opens subtitle search"),e.toggleEnabled=e.toggleEnabled.bind(Ru(e));var r=e.player_.textTracks();return r.addEventListener("selectedlanguagechange",e.toggleEnabled),e.player_.one("dispose",(function(){r.removeEventListener("selectedlanguagechange",e.toggleEnabled)})),e.toggleEnabled(),e}return e=i,(n=[{key:"toggleEnabled",value:function(){var t;if(this.player_){var e=Go(this.player_);e?(null===(t=e.cues)||void 0===t?void 0:t.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(e),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.toggleEnabled),t.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",(function(){t.removeEventListener("loadeddata",e.toggleEnabled)}))}},{key:"handleClick",value:function(){var t,e=this,n=Go(this.player_);(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length)&&this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])&&ku(e.prototype,n),r&&ku(e,r),i}(S.a.getComponent("TextTrackMenuItem"));function Au(t){return(Au="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Bu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Mu(t,e,n){return(Mu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Vu(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Du(t,e){return(Du=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Uu(t){var e=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(t){return!1}}();return function(){var n,r=Vu(t);if(e){var o=Vu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Fu(this,n)}}function Fu(t,e){return!e||"object"!==Au(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Vu(t){return(Vu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var zu=S.a.getComponent("OffTextTrackMenuItem"),Hu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Du(t,e)}(i,t);var e,n,r,o=Uu(i);function i(){return Bu(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"createEl",value:function(t,e,n){return Mu(Vu(i.prototype),"createEl",this).call(this,"li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},e),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),n)}}])&&Nu(e.prototype,n),r&&Nu(e,r),i}(zu);zu.prototype=Hu.prototype,S.a.registerComponent("OffTextTrackMenuItem",Hu);n(908);function Gu(t){return(Gu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ku(t,e,n){return(Ku="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Xu(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Qu(t,e){return(Qu=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Zu(t){var e=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(t){return!1}}();return function(){var n,r=Xu(t);if(e){var o=Xu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $u(this,n)}}function $u(t,e){return!e||"object"!==Gu(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Xu(t){return(Xu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ju=S.a.getComponent("TextTrackButton"),Yu=S.a.getComponent("SubsCapsButton"),tl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Qu(t,e)}(i,t);var e,n,r,o=Zu(i);function i(){var t;return Wu(this,i),(t=o.apply(this,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t}return e=i,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Ku(Xu(i.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var t=[new Lu(this.player_),new Su(this.player_)];return this.hideThreshold_=this.hideThreshold_+2,Ju.prototype.createItems.call(this,t,mu)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var n=t[e];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var n=t[e];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){Yu.prototype.handleClick.apply(this)}}])&&qu(e.prototype,n),r&&qu(e,r),i}(Yu);function el(t){return(el="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function nl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function rl(t,e){return(rl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ol(t){var e=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(t){return!1}}();return function(){var n,r=cl(t);if(e){var o=cl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return il(this,n)}}function il(t,e){return!e||"object"!==el(e)&&"function"!=typeof e?al(t):e}function al(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function cl(t){return(cl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}S.a.registerComponent("SubsCapsButton",tl);var ul=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&rl(t,e)}(i,t);var e,n,r,o=ol(i);function i(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).qualityId=e.qualityId;var r=t.qualityLevels(),a=n.handleQualityChange.bind(al(n));return r.on("change",a),t.one("dispose",(function(){r.off("change",a)})),n}return e=i,(n=[{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var t=this.player_.qualityLevels(),e=0;e<t.length;e++){var n=t[e];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var t=this.player_.qualityLevels(),e=t[t.selectedIndex],n=e&&e.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&nl(e.prototype,n),r&&nl(e,r),i}(S.a.getComponent("MenuItem"));n(909);function ll(t){return(ll="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function fl(t,e,n){return(fl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=vl(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function pl(t,e){return(pl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function yl(t){var e=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(t){return!1}}();return function(){var n,r=vl(t);if(e){var o=vl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return hl(this,n)}}function hl(t,e){return!e||"object"!==ll(e)&&"function"!=typeof e?dl(t):e}function dl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function vl(t){return(vl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var bl={240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},ml=S.a.getComponent("MenuButton"),gl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&pl(t,e)}(i,t);var e,n,r,o=yl(i);function i(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0;var r=n.player_.qualityLevels(),a=n.update.bind(dl(n));return r.on("addqualitylevel",a),r.on("removequalitylevel",a),t.one("dispose",(function(){r.removeEventListener("addqualitylevel",a),r.removeEventListener("removequalitylevel",a)})),n}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(fl(vl(i.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(fl(vl(i.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var t=[],e=this.player_.qualityLevels();t.push(new In(this.player_,{label:"Quality"}));for(var n=0;n<e.length;n++){var r=e[n];if(r){var o=bl[r.id];o&&t.push(new ul(this.player_,{qualityId:r.id,label:o,selectable:!0,multiSelectable:!1}))}}return t}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.qualityLevels(),e=t[t.selectedIndex];return e?bl[e.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){ml.prototype.handleClick.apply(this)}}])&&sl(e.prototype,n),r&&sl(e,r),i}(ml);S.a.registerComponent("QualityButton",gl);n(910);function wl(t){return(wl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Cl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ol(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Il(t,e,n){return(Il="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=kl(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Tl(t,e){return(Tl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Sl(t){var e=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(t){return!1}}();return function(){var n,r=kl(t);if(e){var o=kl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _l(this,n)}}function _l(t,e){return!e||"object"!==wl(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function kl(t){return(kl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var El=S.a.getComponent("Menu"),jl=S.a.getComponent("MenuButton"),Pl=S.a.getComponent("PlaybackRateMenuItem"),Rl=S.a.getComponent("PlaybackRateMenuButton"),xl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Tl(t,e)}(i,t);var e,n,r,o=Sl(i);function i(){var t;return Cl(this,i),(t=o.apply(this,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return e=i,(n=[{key:"createEl",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=jl.prototype.createEl).apply.apply(t,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Il(kl(i.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createMenu",value:function(){var t=new El(this.player(),{menuButton:this});t.addItem(new In(this.player_,{label:"Playback Speed"}));var e=this.playbackRates();if(e)for(var n=0;n<e.length;n++){var r=e[n]+"x";1===e[n]&&(r+=" (Normal)"),t.addItem(new Pl(this.player(),{rate:r}))}return t}},{key:"handleClick",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=jl.prototype.handleClick).apply.apply(t,[this].concat(n))}},{key:"updateLabel",value:function(){var t;this.setupLabelEl();for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=Rl.prototype.updateLabel).apply.apply(t,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var t=this.$("button");t&&(this.labelEl_=S.a.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&Ol(e.prototype,n),r&&Ol(e,r),i}(Rl);function Ll(t){return(Ll="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Al(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Nl(t,e){return(Nl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ml(t){var e=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(t){return!1}}();return function(){var n,r=Ul(t);if(e){var o=Ul(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Dl(this,n)}}function Dl(t,e){return!e||"object"!==Ll(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Ul(t){return(Ul=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}S.a.registerComponent("PlaybackRateMenuButton",xl);var Fl=S.a.getComponent("TextTrackSettings"),Vl={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},zl={small:Vl,medium:Object.assign(Object.assign({},Vl),{fontPercent:1.5}),large:Object.assign(Object.assign({},Vl),{fontPercent:2})},Hl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Nl(t,e)}(i,t);var e,n,r,o=Ml(i);function i(){return Al(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"setSizeSetting",value:function(t){this.size_=t,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 zl[this.size_]?zl[this.size_]:Vl}}])&&Bl(e.prototype,n),r&&Bl(e,r),i}(Fl);S.a.registerComponent("TextTrackSettings",Hl);n(911);function Gl(t){return(Gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ql(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kl(t,e,n){return(Kl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Xl(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Ql(t,e){return(Ql=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Zl(t){var e=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(t){return!1}}();return function(){var n,r=Xl(t);if(e){var o=Xl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $l(this,n)}}function $l(t,e){return!e||"object"!==Gl(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Xl(t){return(Xl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Jl=window.navigator&&window.navigator.userAgent||"",Yl=(/iPod/i.test(Jl),/Android/i.test(Jl),S.a.getComponent("Player")),ts=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ql(t,e)}(i,t);var e,n,r,o=Zl(i);function i(){return Wl(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"lock",value:function(t){this.callback_=t}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(t,e){var n=this;if("number"!=typeof t||!this.callback_||e)return Kl(Xl(i.prototype),"currentTime",this).call(this,t);this.callback_((function(){n.unlock(),n.currentTime(t)}))}},{key:"play",value:function(){var t=this;if(!this.callback_)return Kl(Xl(i.prototype),"play",this).call(this);this.callback_((function(){t.unlock(),t.play()}))}},{key:"updateStyleEl_",value:function(){if(Yl.prototype.updateStyleEl_.call(this),this.options_.fluid){var t=this.el_.parentNode;if(t&&this.options_.setMaxHeight){var e=this.aspectRatio();void 0!==e&&"auto"!==e||(e=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9");var n=e.split(":"),r=+n[1]/+n[0];t.style.maxWidth=85/r+"vh",t.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var t=this;Yl.prototype.listenForUserActivity_.call(this);var e=this.getChild("collapserator");e.on("mouseenter",(function(){t.player().cache_.inactivityTimeout=t.player().options_.inactivityTimeout,t.player().options_.inactivityTimeout=0})),e.on("mouseleave",(function(){t.player().options_.inactivityTimeout=t.player().cache_.inactivityTimeout}))}}])&&ql(e.prototype,n),r&&ql(e,r),i}(Yl);ts.prototype.options_=Object.assign(Object.assign({},Yl.prototype.options_),{setMaxHeight:!0}),S.a.registerComponent("player",ts);n(912);function es(t){return(es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ns(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function rs(t,e){return(rs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function os(t){var e=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(t){return!1}}();return function(){var n,r=cs(t);if(e){var o=cs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return is(this,n)}}function is(t,e){return!e||"object"!==es(e)&&"function"!=typeof e?as(t):e}function as(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function cs(t){return(cs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var us=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&rs(t,e)}(i,t);var e,n,r,o=os(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).player_.addClass("cv-disable-play-pause-feedback"),n.onFirstPlay=n.onFirstPlay.bind(as(n)),n.player_.one("firstplay",n.onFirstPlay),n}return e=i,(n=[{key:"dispose",value:function(){this.player_.off("firstplay",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var t=this;window.setTimeout((function(){t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"createEl",value:function(){return S.a.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&ns(e.prototype,n),r&&ns(e,r),i}(S.a.getComponent("Component"));S.a.registerComponent("PlayPauseFeedback",us);n(913);function ls(t){return(ls="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ss(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ps(t,e){return(ps=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ys(t){var e=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(t){return!1}}();return function(){var n,r=ds(t);if(e){var o=ds(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return hs(this,n)}}function hs(t,e){return!e||"object"!==ls(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ds(t){return(ds=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var vs=S.a.getComponent("PlayToggle"),bs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ps(t,e)}(i,t);var e,n,r,o=ys(i);function i(){return ss(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"handleClick",value:function(t){var e=this;vs.prototype.handleClick.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&fs(e.prototype,n),r&&fs(e,r),i}(vs);S.a.registerComponent("PlayToggle",bs);n(914),n(915),n(916),n(917),n(918);var ms,gs=n(740),ws=n.n(gs);function Cs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Os(t){t.paused()?t.play():t.pause()}function Is(t,e){t.currentTime(t.currentTime()+e)}function Ts(t,e){t.volume(t.volume()+e)}var Ss=(Cs(ms={},"f",(function(t){document[t.fsApi_.fullscreenEnabled]&&(t.isFullscreen()?t.exitFullscreen():t.requestFullscreen())})),Cs(ms,"m",(function(t){var e=t.volume(),n=t.lastVolume_();if(0===e){var r=n<.1?.1:n;t.volume(r),t.muted(!1)}else t.muted(!t.muted())})),Cs(ms,"k",Os),Cs(ms,"space",Os),Cs(ms,"left",(function(t){return Is(t,-5)})),Cs(ms,"right",(function(t){return Is(t,5)})),Cs(ms,"j",(function(t){return Is(t,-10)})),Cs(ms,"l",(function(t){return Is(t,10)})),Cs(ms,"up",(function(t){return Ts(t,.05)})),Cs(ms,"down",(function(t){return Ts(t,-.05)})),ms);function _s(t){var e=ws()(t);Ss[e]&&(["space"].includes(e)&&(t.preventDefault(),t.stopPropagation()),Ss[e](this,t))}function ks(t){return(ks="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Es(t,e){return!e||"object"!==ks(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function js(t){var e="function"==typeof Map?new Map:void 0;return(js=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return Ps(t,arguments,Ls(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),xs(r,t)})(t)}function Ps(t,e,n){return(Ps=Rs()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&xs(o,n.prototype),o}).apply(null,arguments)}function Rs(){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(t){return!1}}function xs(t,e){return(xs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ls(t){return(Ls=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var As=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&xs(t,e)}(o,t);var e,n,r=(e=o,n=Rs(),function(){var t,r=Ls(e);if(n){var o=Ls(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Es(this,t)});function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=r.call(this,t)).url=e,n}return o}(js(Error));function Bs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Ns=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},Ms=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tokens={gateway:null}}var e,n,r;return e=t,(n=[{key:"get",value:function(t,e){return Ns(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(t,{method:"GET",mode:"cors",headers:this.getHeaders(e)});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(t,e){return Ns(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(t,{method:"DELETE",headers:this.getHeaders(e)});case 2:case"end":return n.stop()}}),n,this)})))}},{key:"post",value:function(t,e,n){return Ns(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(t,{method:"POST",headers:this.getHeaders(n),body:e,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(t,e,n){return Ns(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(t,{method:"PUT",headers:this.getHeaders(n),body:e,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(t,e){this.tokens[t]=e}},{key:"getHeaders",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={"Content-Type":"application/json"};return this.tokens[t.tokenName]&&(e.authorization="Bearer ".concat(this.tokens[t.tokenName])),e}},{key:"parseResponse",value:function(t){return Ns(this,void 0,void 0,regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(404!==t.status){e.next=2;break}return e.abrupt("return",null);case 2:if(t.ok){e.next=4;break}throw new As("Ajax error",t.url);case 4:return e.next=6,t.json();case 6:return n=e.sent,e.abrupt("return",n);case 8:case"end":return e.stop()}}),e)})))}}])&&Bs(e.prototype,n),r&&Bs(e,r),t}()),Ds=n(120),Us=(n(919),n(920)),Fs=n.n(Us),Vs=n(921);function zs(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Hs(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hs(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hs(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Gs={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i};function Ws(t,e,n){var r=zs(e.exec(n)||[],1)[0];return r||(r="Unknown"),{name:t,version:r}}function qs(t,e,n){if(!e)return{name:t,version:"Unknown"};var r=e.exec(n);return{name:t,version:r&&r.length?r[0].trim():"Unknown"}}var Ks=function(){var t=window.navigator.userAgent;return Gs.android.test(t)?qs("Android",Gs.androidVersion,t):Gs.iphone.test(t)||Gs.ipad.test(t)?qs("iOS",Gs.iosVersion,t):Gs.linux.test(t)?qs("Linux",null,t):Gs.unix.test(t)?qs("Unix",null,t):Gs.mac.test(t)?qs("Macintosh",Gs.osxVersion,t):Gs.windows.test(t)?function(t,e){var n={name:t,version:null};return Gs.win2000.test(e)&&(n.version="2000"),Gs.winXP.test(e)&&(n.version="XP"),Gs.winVista.test(e)&&(n.version="Vista"),Gs.win7.test(e)&&(n.version="7"),Gs.win8.test(e)&&(n.version="8"),Gs.win81.test(e)&&(n.version="8.1"),Gs.win10.test(e)&&(n.version="10"),n.version||(n.version="Unknown"),n}("Windows",t):Gs.blackberry.test(t)?qs("BlackBerry",Gs.blackberryVersion,t):Gs.windowsPhone.test(t)?qs("Windows Phone",Gs.windowsPhoneVersion,t):{name:"Unknown",version:"Unknown"}},Qs=function(){var t=window.navigator.userAgent;return Gs.chrome.test(t)?Ws("Chrome",Gs.generalVersion,t):Gs.firefox.test(t)?Ws("Firefox",Gs.generalVersion,t):Gs.safari.test(t)?Ws("Safari",Gs.generalVersion,t):Gs.ie.test(t)?Ws("Internet Explorer",Gs.ieVersion,t):Gs.edge.test(t)?Ws("Edge",Gs.edgeVersion,t):Gs.opera.test(t)?Ws("Opera",Gs.operaVersion,t):{name:"Unknown",version:"Unknown"}};function Zs(t){return(Zs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var $s,Xs=function(t){var e=Zs(t);return"function"===e||"object"===e&&!!t},Js=function(t){return"function"==typeof t},Ys=function(t,e){if(t){var n=t;return t.endsWith("/")||(n+="/"),e?n+=e.startsWith("/")?e.slice(1):e:n}},tf=n(150);!function(t){t.CvApSoutheast1="cv-ap-southeast-1",t.CvApSoutheast2="cv-ap-southeast-2",t.CvEuWest1="cv-eu-west-1",t.CvNaWest1="cv-na-west-1"}($s||($s={}));var ef={CvApSoutheast1:{systemName:$s.CvApSoutheast1},CvApSoutheast2:{systemName:$s.CvApSoutheast2},CvEuWest1:{systemName:$s.CvEuWest1},CvNaWest1:{systemName:$s.CvNaWest1}};function nf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var rf=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},of=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.initialize()}var e,n,r;return e=t,(n=[{key:"initialize",value:function(){this.validateOptions()}},{key:"name",get:function(){return"CollectionApiClient"}},{key:"log",value:function(t){return rf(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Array.isArray(t)){e.next=2;break}return e.abrupt("return",this.logBulk(t));case 2:if(this.shouldLog(t)){e.next=4;break}return e.abrupt("return");case 4:return this.validateEvent(t),e.t0=this,e.next=8,this.formatData(t);case 8:return e.t1=e.sent,e.next=11,e.t0.postData.call(e.t0,e.t1);case 11:case"end":return e.stop()}}),e,this)})))}},{key:"logBulk",value:function(t){return rf(this,void 0,void 0,regeneratorRuntime.mark((function e(){var n,r,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=t.filter((function(t){return o.shouldLog(t)}))).length){e.next=3;break}return e.abrupt("return");case 3:return n.forEach((function(t){return o.validateEvent(t)})),e.next=6,Promise.all(n.map((function(t){return o.formatData(t)})));case 6:return r=e.sent,e.next=9,this.postData(r);case 9:case"end":return e.stop()}}),e,this)})))}},{key:"validateOptions",value:function(){if(!Js(this.options.getUser))throw new Error("getUser option is required.")}},{key:"shouldLog",value:function(t){return!Js(this.options.shouldLog)||this.options.shouldLog(t)}},{key:"postData",value:function(t){return rf(this,void 0,void 0,regeneratorRuntime.mark((function e(){var n,r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getRegionalUrl(this.options.collectionApiUrls);case 2:return n=e.sent,r=JSON.stringify(t),o=Object.assign({"Content-Type":"application/json"},this.getSignatureHeader(r)),i=Ys(n,"/v1/ingest"),Array.isArray(t)&&(i=Ys(i,"/bulk")),e.next=9,fetch(i,{method:"POST",mode:"cors",headers:o,body:r});case 9:case"end":return e.stop()}}),e,this)})))}},{key:"getSignatureHeader",value:function(t){var e=new Fs.a("SHA-1","TEXT",{hmacKey:{value:"zXJL9nOHxzDlMUDjiP41",format:"TEXT",encoding:"UTF8"}});return e.update(t),{"cv-analytics-signature":"".concat(this.options.collectionApiClientId,".").concat(e.getHash("B64"))}}},{key:"getRegionalUrl",value:function(t){return rf(this,void 0,void 0,regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getRegion();case 2:n=e.sent,e.t0=n.systemName,e.next=e.t0===$s.CvEuWest1?6:e.t0===$s.CvApSoutheast2?7:e.t0===$s.CvNaWest1?8:(e.t0,$s.CvApSoutheast1,9);break;case 6:return e.abrupt("return",t.cvEuWest1);case 7:return e.abrupt("return",t.cvApSoutheast2);case 8:return e.abrupt("return",t.cvNaWest1);case 9:return e.abrupt("return",t.cvApSoutheast1);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"validateEvent",value:function(t){if("string"!=typeof t.type)throw new Error("Event type is required.");if(!Xs(t.actionContext))throw new Error("Event actionContext is required.");if(!t.actionContext.entity)throw new Error("Event actionContext entity is required.")}},{key:"formatData",value:function(t){return rf(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t.type,e.next=3,this.getEventData(t);case 3:return e.t1=e.sent,e.t2=this.getEventMetadata(t),e.abrupt("return",{type:e.t0,data:e.t1,metadata:e.t2});case 6:case"end":return e.stop()}}),e,this)})))}},{key:"getEventData",value:function(t){return rf(this,void 0,void 0,regeneratorRuntime.mark((function e(){var n,r,o,i,a,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.actionContext,e.next=3,this.getUserData();case 3:return r=e.sent,o={user:r,action:n,platform:this.getPlatformMetadata(),product:{name:this.options.productName,version:this.options.productVersion}},i=this.extractData(t),a=Object.keys(o).map((function(t){return t.toLowerCase()})),c=Object.keys(i).map((function(t){return t.toLowerCase()})),a.forEach((function(t){if(c.includes(t))throw Error("".concat(t," is a reserved key."))})),e.abrupt("return",Object.assign(Object.assign({},o),i));case 10:case"end":return e.stop()}}),e,this)})))}},{key:"extractData",value:function(t){return Js(this.options.formatData)?this.options.formatData(t):(e={},n=t.actionContext.entity,r=t.data,n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e);var e,n,r}},{key:"getUserData",value:function(){var t,e;return rf(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.options.getUser();case 2:if(null==(r=n.sent)?void 0:r.id){n.next=5;break}return n.abrupt("return");case 5:return n.t0=r.id,n.t1=(null===(t=r.role)||void 0===t?void 0:t.toLowerCase())||"unknown",n.t2=(null===(e=r.userGroup)||void 0===e?void 0:e.toLowerCase())||tf.a.Unknown,n.t3=this.normalizeYearGroup(r.yearGroup),n.t4=r.customerId,n.t5=r.customerName,n.t6=r.customerGuid,n.t7=r.crmId,n.t8=r.countryCode,n.next=16,this.getRegion();case 16:return n.t9=n.sent,n.t10=r.isOpenCustomer,n.t11={id:n.t4,name:n.t5,customerGuid:n.t6,crmId:n.t7,country:n.t8,region:n.t9,openCustomer:n.t10},n.abrupt("return",{id:n.t0,role:n.t1,userGroup:n.t2,yearGroup:n.t3,customer:n.t11});case 20:case"end":return n.stop()}}),n,this)})))}},{key:"getRegion",value:function(){return rf(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.options.getUser();case 2:if(e=t.sent,n=(null==e?void 0:e.instanceRegion)||this.options.regionName){t.next=6;break}throw Error("RegionName is not set.");case 6:return t.abrupt("return",this.getRegionByName(n.toLowerCase()));case 7:case"end":return t.stop()}}),t,this)})))}},{key:"getPlatformMetadata",value:function(){return{browser:Qs(),os:Ks(),request:{url:window.location.href,referrer:document.referrer},screenResolution:"".concat(window.screen.width,"x").concat(window.screen.height)}}},{key:"getEventMetadata",value:function(t){return{client:{name:"".concat(this.name,".ts"),version:Vs.a,region:this.getRegionByName(this.options.regionName)},timestamp:(new Date).toISOString(),eventVersion:t.eventVersion}}},{key:"getRegionByName",value:function(t){var e;return Object.values(ef).forEach((function(n){n.systemName===t&&(e=n)})),e}},{key:"normalizeYearGroup",value:function(t){return t?t.toLowerCase().split(" ").join("_"):"unknown"}}])&&nf(e.prototype,n),r&&nf(e,r),t}(),af=n(24),cf=function(){return!0},uf=function(){return!1};var lf,sf,ff,pf,yf=function(t){return t},hf={getUploadData:function(t,e){var n=e.actionContext.entity;if(n===af.EntityType.Video)return hf.formatVideoUpload(t,e);if(n===af.EntityType.Resource||n===af.EntityType.Subtitle)return hf.formatResourceUpload(t);if(n===af.EntityType.Banner||n===af.EntityType.Thumbnail)return t;throw new Error("Upload data event not correctly formatted.")},formatVideoUpload:function(t,e){var n=e.actionContext.workflowPhase;return n===af.WorkflowPhase.Start?hf.getStartVideoUploadData(t):n===af.WorkflowPhase.Discard?hf.getDiscardVideoUploadData(t):n===af.WorkflowPhase.Complete?hf.getCompleteUploadData(t):void 0},getStartVideoUploadData:function(t){return t&&t.length?(t instanceof FileList&&(t=Array.from(t)),t.map((function(e){return{fileName:e.name,size:e.size,type:e.type,count:t.length}}))):[]},getDiscardVideoUploadData:function(t){var e=function(e){var n=e.file,r=n.type,o=n.name,i=n.status,a=n.cvUpload,c={fileName:o,count:Array.isArray(t)?t.length:1,type:r,status:i};return e.progress&&(c.progress=e.progress.toFixed(2)),a&&(c.uploadId=a.uploadId),c};return Array.isArray(t)?t.map((function(t){return e(t)})):[e(t)]},getCompleteUploadData:function(t){return t&&t.length?t.map((function(e){return{fileName:e.fileName,libraryId:e.libraryId,folderId:e.folderId,autoCaption:e.autoCaption,count:t.length}})):[]},formatResourceUpload:function(t){var e={id:t.id,name:t.name};return Xs(t.metadata)&&(e.type=t.metadata.type),e}};function df(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var vf=(df(lf={},af.UserAction.Navigate,uf),df(lf,af.UserAction.Click,cf),df(lf,af.UserAction.Search,cf),df(lf,af.UserAction.InstantSearch,cf),df(lf,af.UserAction.Play,cf),df(lf,af.UserAction.Stream,cf),df(lf,af.UserAction.WebPlayerStream,cf),df(lf,af.UserAction.StreamProgress,cf),df(lf,af.UserAction.Rename,cf),df(lf,af.UserAction.Move,cf),df(lf,af.UserAction.Create,cf),df(lf,af.UserAction.Delete,cf),df(lf,af.UserAction.Associate,cf),df(lf,af.UserAction.Dissociate,cf),df(lf,af.UserAction.Filter,cf),df(lf,af.UserAction.Sort,cf),df(lf,af.UserAction.Approve,cf),df(lf,af.UserAction.Reject,cf),df(lf,af.UserAction.Disable,cf),df(lf,af.UserAction.Upload,cf),df(lf,af.UserAction.Download,uf),df(lf,af.UserAction.SetAccess,cf),df(lf,af.UserAction.AddToLocalCache,uf),df(lf,af.UserAction.Share,cf),df(lf,af.UserAction.Unshare,cf),df(lf,af.UserAction.Edit,cf),df(lf,af.UserAction.Suggest,cf),df(lf,af.UserAction.Favourite,cf),df(lf,af.UserAction.ResolveWarning,cf),df(lf,af.UserAction.DismissWarning,cf),df(lf,af.UserAction.EditAssoc,cf),df(lf,af.UserAction.Follow,cf),df(lf,af.UserAction.Print,cf),df(lf,af.UserAction.Copy,cf),df(lf,af.UserAction.Activate,cf),df(lf,af.UserAction.VerifyEmail,cf),df(lf,af.UserAction.ChangePassword,cf),df(lf,af.UserAction.Export,cf),df(lf,af.UserAction.SendEmail,cf),df(lf,af.UserAction.Publish,cf),df(lf,af.UserAction.Answer,cf),df(lf,af.UserAction.Complete,cf),lf),bf=(df(sf={},af.UserAction.Search,yf),df(sf,af.UserAction.InstantSearch,yf),df(sf,af.UserAction.Play,yf),df(sf,af.UserAction.Stream,yf),df(sf,af.UserAction.StreamProgress,yf),df(sf,af.UserAction.Click,yf),df(sf,af.UserAction.Filter,yf),df(sf,af.UserAction.Sort,yf),df(sf,af.UserAction.SetAccess,yf),df(sf,af.UserAction.Approve,yf),df(sf,af.UserAction.Reject,yf),df(sf,af.UserAction.Create,yf),df(sf,af.UserAction.Delete,yf),df(sf,af.UserAction.Rename,yf),df(sf,af.UserAction.Move,yf),df(sf,af.UserAction.Edit,yf),df(sf,af.UserAction.Share,yf),df(sf,af.UserAction.Disable,yf),df(sf,af.UserAction.Suggest,yf),df(sf,af.UserAction.Upload,hf.getUploadData),df(sf,af.UserAction.ResolveWarning,yf),df(sf,af.UserAction.DismissWarning,yf),df(sf,af.UserAction.Follow,yf),df(sf,af.UserAction.Print,yf),df(sf,af.UserAction.Copy,yf),sf),mf=(df(ff={},af.UserAction.Search,(function(){return"search"})),df(ff,af.UserAction.InstantSearch,(function(){return"search"})),df(ff,af.UserAction.Filter,(function(){return"filter"})),df(ff,af.UserAction.Stream,(function(){return af.EntityType.Video})),ff),gf={user:"target_user"},wf=(df(pf={},af.UserAction.StreamProgress,!0),df(pf,af.UserAction.WebPlayerStream,!0),pf),Cf={shouldLog:function(t){return!!vf[t.type](t)},formatData:function(t){var e=bf[t.type],n=Js(e)?e(t.data,t):t.data;if(wf[t.type])return n;var r=t.actionContext.entity;return Js(mf[t.type])&&(r=mf[t.type](t)),gf[r]&&(r=gf[r]),df({},r,n)}};function Of(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var If=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},Tf=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.initialize()}var e,n,r;return e=t,(n=[{key:"logStream",value:function(){var t="v:".concat(this.options.videoId);Ds.a.cacheExists(t)||(this.collectionApiClient.log({type:af.UserAction.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:af.EventVersion.V2}),Ds.a&&Ds.a.cacheSet(t,null,300))}},{key:"logVideoProgress",value:function(t){var e=this,n=this.getAnalyticsData();this.collectionApiClient.log(t.map((function(t){return{type:af.UserAction.StreamProgress,actionContext:e.getActionContext(),data:Object.assign(Object.assign({},n),{progress:t}),eventVersion:af.EventVersion.V1}})))}},{key:"logUserAction",value:function(t,e){var n=Object.assign(Object.assign({},this.getAnalyticsData()),t);this.collectionApiClient.log({type:e.actionType,data:n,actionContext:{productArea:e.productArea,location:this.getLocationContext(),entity:e.entity,descriptor:e.descriptor,workflowPhase:e.workflowPhase},eventVersion:af.EventVersion.V1})}},{key:"getAnalyticsData",value:function(){var t=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(t.video.shareId=this.options.shareId);var e=this.getEntityType();return e===af.EntityType.Interactive?t.interactive={id:this.options.mediaId}:e===af.EntityType.Clip&&(t.clip={id:this.options.mediaId}),t}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var t=this;this.collectionApiClient=new of({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return t.getCurrentUser()},shouldLog:Cf.shouldLog,formatData:Cf.formatData})}},{key:"getCurrentUser",value:function(){return If(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{id:this.options.userId,customerId:this.options.customerId});case 1:case"end":return t.stop()}}),t,this)})))}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?af.PlayerDescriptor.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return af.EntityType.Video;case"MasterInteractive":return af.EntityType.Interactive;case"MasterClip":return af.EntityType.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return af.LocationContext.Player;case"interactive-player":return af.LocationContext.InteractivePlayer;case"create-clip-player":return af.LocationContext.CreateClipPlayer}}}])&&Of(e.prototype,n),r&&Of(e,r),t}();function Sf(t){return(Sf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function kf(t,e,n){return(kf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Rf(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Ef(t,e){return(Ef=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function jf(t){var e=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(t){return!1}}();return function(){var n,r=Rf(t);if(e){var o=Rf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Pf(this,n)}}function Pf(t,e){return!e||"object"!==Sf(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Rf(t){return(Rf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var xf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ef(t,e)}(i,t);var e,n,r,o=jf(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).options_=e,n}return e=i,(n=[{key:"createEl",value:function(t,e,n){var r="<h1>".concat(this.options_.title,"</h1>");if(!this.options_.seriesName)return kf(Rf(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{innerHTML:r}),n);var o=this.buildSeasonEpisodeString();return o?(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase()," ").concat(o,"</div>")+r,kf(Rf(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{innerHTML:r}),n)):(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+r,kf(Rf(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{innerHTML:r}),n))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var t=this.padNumber(this.options_.seasonNumber,2),e=this.padNumber(this.options_.episodeNumber,2);return"S".concat(t," • E").concat(e)}},{key:"padNumber",value:function(t,e){var n=t.toString();if(n.length>=e)return n;for(e-=n.length;e>0;)n="0"+n,e--;return n}}])&&_f(e.prototype,n),r&&_f(e,r),i}(S.a.getComponent("Component"));function Lf(t){return(Lf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Af(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Bf(t,e,n){return(Bf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Uf(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Nf(t,e){return(Nf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Mf(t){var e=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(t){return!1}}();return function(){var n,r=Uf(t);if(e){var o=Uf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Df(this,n)}}function Df(t,e){return!e||"object"!==Lf(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Uf(t){return(Uf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ff=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Nf(t,e)}(i,t);var e,n,r,o=Mf(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).options_=e,n}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-splash-warning-container ".concat(Bf(Uf(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){var r=Bf(Uf(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n);if(!this.options_.ratingCode)return r;var o=this.mapCodeToColourClass(this.options_.ratingCode);return r.appendChild(S.a.dom.createEl("div",{className:"cv-splash-rating badge rating-badge ".concat(o),innerHTML:this.options_.ratingCode})),this.options_.warning&&r.appendChild(S.a.dom.createEl("div",{className:"cv-splash-warning",innerHTML:this.options_.warning})),r}},{key:"mapCodeToColourClass",value:function(t){switch(t){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"}}}])&&Af(e.prototype,n),r&&Af(e,r),i}(S.a.getComponent("Component"));function Vf(t){return(Vf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Hf(t,e){return(Hf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Gf(t){var e=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(t){return!1}}();return function(){var n,r=qf(t);if(e){var o=qf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Wf(this,n)}}function Wf(t,e){return!e||"object"!==Vf(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function qf(t){return(qf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Kf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Hf(t,e)}(i,t);var e,n,r,o=Gf(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,(n=[{key:"createEl",value:function(){var t=S.a.dom.createEl("div",{className:"cv-splash-metadata ".concat(this.options_.embed?"cv-embed-splash-metadata":"")});return this.options_.embed&&t.appendChild(new xf(this.player_,{title:this.options_.title,seriesName:this.options_.seriesName,seasonNumber:this.options_.seasonNumber,episodeNumber:this.options_.episodeNumber}).el()),t.appendChild(new Ff(this.player_,{warning:this.options_.warning,ratingCode:this.options_.ratingCode}).el()),t}}])&&zf(e.prototype,n),r&&zf(e,r),i}(S.a.getComponent("Component"));n(922);function Qf(t){return(Qf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function $f(t,e,n){return($f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=tp(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Xf(t,e){return(Xf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Jf(t){var e=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(t){return!1}}();return function(){var n,r=tp(t);if(e){var o=tp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Yf(this,n)}}function Yf(t,e){return!e||"object"!==Qf(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function tp(t){return(tp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ep=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Xf(t,e)}(i,t);var e,n,r,o=Jf(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).addChild(new Kf(n.player_,n.options_)),n}return e=i,(n=[{key:"createEl",value:function(t,e,n){var r="<div class='cv-player-mask'></div>";return this.options_.embed&&(r+="<div class='cv-embed-logo'>".concat(Z,"</div>")),$f(tp(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass(),innerHTML:r}),n)}}])&&Zf(e.prototype,n),r&&Zf(e,r),i}(S.a.getComponent("Component"));function np(t){return function(t){if(Array.isArray(t))return rp(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return rp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rp(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rp(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function op(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var ip,ap=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},cp=S.a.getComponent("Player"),up=450,lp=function(){function t(e,n){var r=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.streamLogged=!1,this.options=S.a.mergeOptions({},t.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(e),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(t){r.player.error(t.message),r.options.onError&&r.options.onError(t)}))}))}var e,n,r;return e=t,(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(t){var e;null===(e=this.analyticsService)||void 0===e||e.logVideoProgress(t)}},{key:"buildVideoJs",value:function(){return this.player=Object(S.a)(this.el,this.getPlayerOptions())}},{key:"getPlayerOptions",value:function(){var t=cp.prototype.options_.children;return t=t.filter((function(t){return"bigPlayButton"!==t&&"posterImage"!==t})),{controls:this.options.controls,fluid:!this.options.embed,fill:!!this.options.embed,inactivityTimeout:500,controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(np(t),["collapserator","playPauseFeedback"]),userActions:{hotkeys:_s},playbackRates:this.options.playbackRates,techOrder:["chromecast","html5"]}}},{key:"fetch",value:function(){return ap(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n,r,o=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.options.fetch,void 0===this.options.fetch&&(e=function(t){var e="".concat(o.options.playerApi.origin,"/api/playback?viewKey=").concat(t);return Ms.get(e)}),this.options.viewKey){t.next=4;break}throw new Error("Please specify a viewKey or a fetch function");case 4:return t.next=6,e(this.options.viewKey);case 6:if(n=t.sent){t.next=9;break}throw new Error("Error fetching playback object");case 9:n.chapters.list.length>0&&(r=this.player.addTextTrack("chapters"),n.chapters.list.forEach((function(t){r.addCue({startTime:t.timestamp,endTime:t.endTimestamp,text:t.name})})),r.trigger({type:"loadeddata",target:r})),this.player.progressiveFiles({sources:n.files.progressive.map((function(t){return{id:t.profile,mimeType:t.mimeType,url:t.url}}))}),n.subtitles.list.length>0&&(n.subtitles.list.forEach((function(t){"text/vtt"===t.mimeType&&o.player.addRemoteTextTrack({kind:"subtitles",src:t.url,language:t.language,label:t.label},!0)})),this.player.persistSubtitleSettingsPlugin({showSubtitles:n.settings.showSubtitles,subtitleSize:n.settings.playbackSubtitleSizeDefault})),n.posterUrl&&this.player.poster(n.posterUrl),this.options.autoplay||this.setupSplash(n),this.additionalSetup(n),this.options.autoplay&&this.player.ready((function(){o.player.play().catch((function(){o.setupSplash(n)}))})),this.options.startTime&&this.player.currentTime(this.options.startTime);case 17:case"end":return t.stop()}}),t,this)})))}},{key:"fetchConfig",value:function(){var t=this;if(!ip&&!this.options.fetch){var e="".concat(this.options.playerApi.origin,"/api/config");Ms.get(e).then((function(e){ip=e,t.trigger("config:loaded")}))}}},{key:"additionalSetup",value:function(t){var e,n,r=this;this.player.localCache({localCacheAddresses:t.localCacheAddresses,enabled:null===(e=this.options.enableLocalCache)||void 0===e||e}),this.player.persistQualitySettingsPlugin({playbackProfile:t.settings.playbackProfile,playbackProfileLocalCache:t.settings.playbackProfileLocalCache}),this.player.whiteboardModePlugin(),this.player.chromecast({title:t.title});var o=this.options.enableLocalCache&&!!(null===(n=t.localCacheAddresses)||void 0===n?void 0:n.length);ip?this.setupAnalyticsService(t,o):this.one("config:loaded",(function(){return r.setupAnalyticsService(t,o)}))}},{key:"setupAnalyticsService",value:function(t,e){this.analyticsService=new Tf({collectionApiUrls:ip.collectionApi.urls,collectionApiClientId:ip.collectionApi.clientId,productVersion:_.a,regionName:"cv-ap-southeast-1",videoId:t.videoId,mediaId:t.mediaId,userId:t.viewerId,shareId:t.shareId,customerId:t.viewerCustomerId,mediaType:t.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:!!this.options.embed,isUsingLocalCache:e,additionalAnalyticsData:this.getAdditionalAnalyticsData(t)}),this.on("timeupdate",this.logStream)}},{key:"getAdditionalAnalyticsData",value:function(t){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(t){var e;"string"==typeof t?(t=function(t){return 0===t.indexOf("#")?t.slice(1):t}(t),e=S.a.dom.$("#"+t)):e=t;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=S.a.dom.createEl("video",{},{class:n}),e.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(t,e){this.player.on(t,e)}},{key:"one",value:function(t,e){this.player.one(t,e)}},{key:"off",value:function(t,e){this.player.off(t,e)}},{key:"trigger",value:function(t,e){return this.player.trigger(t,e)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(t){this.player.ready(t)}},{key:"play",value:function(){this.player.play()}},{key:"currentTime",value:function(t){return this.player.currentTime(t)}},{key:"bindEventListeners",value:function(){var t=this,e=function(){return t.configureMenuDimensions()};if(this.player.ready(e),this.on("resize",e),this.on("fullscreenchange",e),this.one("play",e),this.on("resizemenus",e),this.player.one("dispose",(function(){t.off("resize",e),t.off("fullscreenchange",e),t.off("resizemenus",e)})),this.options.hotkeyElQuerySelector){var n=S.a.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.one("dispose",(function(){t.player.off(n,"keydown",t.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var t=this.getSeekBarName(),e=this.player.controlBar.getChild("progressControl");e.addChild(t,this.getSeekBarOptions()),e.setSeekBarName(t)}},{key:"setupSplash",value:function(t){var e=this.player.addChild("posterImage");this.player.addChild("bigPlayButton");var n=new ep(this.player,{embed:this.options.embed,posterUrl:t.posterUrl,title:t.title,ratingCode:t.ratingCode,seriesName:t.seriesName,seasonNumber:t.seasonNumber,episodeNumber:t.episodeNumber});e.addChild(n),e.show()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}},{key:"configureMenuDimensions",value:function(){var t=this;if(this.player.isFullscreen()){var e=this.player.whiteboardModePlugin().side;if("top"===e){var n=this.player.getChild("collapserator"),r=n.getChild("volumePanel"),o=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:!1},o)}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)}if("left"===e||"right"===e||"top"===e){var u=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(t){t.style.paddingTop=null,t.style.marginBottom=null,t.style.width="calc(".concat(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(e){e.style.paddingTop="calc(".concat(s,"% - ").concat(y,"px)"),e.style.marginBottom="".concat(y,"px"),e.style.width=null,e.querySelector(".vjs-menu-content")&&(l<=up?t.player.addClass("cv-player-small"):t.player.removeClass("cv-player-small"))}))):this.one("play",(function(){return t.configureMenuDimensions()}))}}])&&op(e.prototype,n),r&&op(e,r),t}();lp.options_={viewKey:null,controls:!0,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0};var sp=n(513),fp=n.n(sp),pp=n(923),yp=n.n(pp),hp=n(537);function dp(t){var e,n=t.interactive.timepoints.find((function(e){var n=e.visibleAt/1e3;return Math.floor(t.time)===Math.floor(n)||Math.ceil(t.time)===Math.ceil(n)}));if(!(null===(e=null==n?void 0:n.interactions)||void 0===e?void 0:e.length))return i.a.createElement(i.a.Fragment,null);var r=n.interactions.length>3?n.interactions.slice(0,2):n.interactions,o=n.interactions.length-r.length;return i.a.createElement("div",{className:"d-flex justify-content-end ml-2"},r.map((function(t,e){return i.a.createElement(hp.a,{key:e,interaction:t,showQuestion:!1,iconClassName:"ml-1"})})),!!o&&i.a.createElement("div",{className:"interaction-type-icon d-flex justify-content-center align-items-center border border-dark text-body ml-1"},"+".concat(o)))}function vp(t){return function(t){if(Array.isArray(t))return bp(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return bp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bp(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bp(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var mp={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 gp(t,e){return{styledMode:!0,spacing:[15,0,0,0],width:t,height:e}}function wp(t){return{formatter:function(){return'<div class="cv-engagement-tooltip bg-white rounded"><div class="d-flex justify-content-between">'+"<strong>".concat(ec(this.x),"</strong>")+"".concat(function(t,e){return yp.a.renderToStaticMarkup(i.a.createElement(dp,{time:e,interactive:t}))}(t,this.x))+'</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(t,e,n){var r=this.chart.plotWidth-t,o=n.plotX-t/2;return{x:Math.min(Math.max(o,0),r),y:this.chart.plotTop}},useHTML:!0,padding:0}}n(926);function Cp(t){return(Cp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Op(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ip(t,e,n){return(Ip="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=kp(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Tp(t,e){return(Tp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Sp(t){var e=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(t){return!1}}();return function(){var n,r=kp(t);if(e){var o=kp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _p(this,n)}}function _p(t,e){return!e||"object"!==Cp(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function kp(t){return(kp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ep=S.a.getComponent("Component");fp.a.AST.allowedTags.push("g"),fp.a.AST.allowedAttributes.push("viewBox","transform");var jp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Tp(t,e)}(i,t);var e,n,r,o=Sp(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).initialize(),n.bindListeners(),n}return e=i,(n=[{key:"initialize",value:function(){var t=this;this.player().ready((function(){return t.buildChart()}))}},{key:"buildCSSClass",value:function(){return"cv-engagement-overlay"}},{key:"createEl",value:function(t,e,n){return Ip(kp(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass(),innerHTML:'<div class="cv-engagement-chart"></div><div class="cv-engagement-timepoint-indicator"></div>'}),n)}},{key:"toggleChart",value:function(t){t?this.buildChart():this.destroyChart()}},{key:"bindListeners",value:function(){var t=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(){t.player().off("playerresize",t.resizeChart),t.off(t.el(),"mouseup",t.handleClick)}))}},{key:"handleClick",value:function(t){S.a.dom.isSingleLeftClick(t)&&(this.player().paused()?this.player().play():this.player().pause())}},{key:"buildChart",value:function(){var t=this;if(!this.chart){var e=this.getChartDimensions();if(e){var n=this.el().querySelector(".cv-engagement-chart");this.chart=fp.a.chart(n,this.getHighchartOptions(e))}else this.player().one("play",(function(){return t.buildChart()}))}}},{key:"resizeChart",value:function(){var t=this.getChartDimensions();this.chart&&t&&this.chart.setSize(t.width,t.height)}},{key:"destroyChart",value:function(){var t;null===(t=this.chart)||void 0===t||t.destroy(),this.chart=null}},{key:"getChartDimensions",value:function(){var t=this.player().getChild("collapserator"),e=null==t?void 0:t.currentHeight(),n=this.el().clientWidth;return e&&n?{width:n,height:this.player().currentDimensions().height-e}:null}},{key:"getHighchartOptions",value:function(t){var e,n,r=t.width,o=t.height;return Object.assign(Object.assign({},mp),{chart:gp(r,o),yAxis:(n=this.options_.heatMap,{max:1.05*Math.max.apply(Math,vp(n)),min:0,minPadding:0,maxPadding:0,allowDecimals:!0,startOnTick:!1,endOnTick:!1,visible:!1}),tooltip:wp(this.options_.interactive),plotOptions:(e=this.moveTimepointIndicator.bind(this),{area:{point:{events:{mouseOver:function(){e(this.x)},mouseOut:function(){e(null)}}}}}),series:[{type:"area",data:this.options_.heatMap}]})}},{key:"moveTimepointIndicator",value:function(t){this.options_.onTimepointHover&&this.options_.onTimepointHover(t);var e=this.el().querySelector(".cv-engagement-timepoint-indicator");null!==t?(S.a.dom.addClass(e,"cv-engagement-timepoint-indicator-visible"),e.style.left="".concat(t/this.options_.heatMap.length*100,"%")):S.a.dom.removeClass(e,"cv-engagement-timepoint-indicator-visible")}}])&&Op(e.prototype,n),r&&Op(e,r),i}(Ep);function Pp(t){return(Pp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Rp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function xp(t,e,n){return(xp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Np(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Lp(t,e){return(Lp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ap(t){var e=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(t){return!1}}();return function(){var n,r=Np(t);if(e){var o=Np(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Bp(this,n)}}function Bp(t,e){return!e||"object"!==Pp(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Np(t){return(Np=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}S.a.registerComponent("EngagementOverlay",jp);var Mp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Lp(t,e)}(i,t);var e,n,r,o=Ap(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).overlayVisible=e.overlayVisible,n.toggle(n.overlayVisible),n}return e=i,(n=[{key:"handleToggle",value:function(){this.toggle(!this.overlayVisible)}},{key:"toggle",value:function(t){t?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){S.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(){S.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(t){t.stopImmediatePropagation()}},{key:"createEl",value:function(t,e,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=S.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=xp(Np(i.prototype),"createEl",this).call(this,t,{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}}])&&Rp(e.prototype,n),r&&Rp(e,r),i}(S.a.getComponent("MenuItem"));function Dp(t){return(Dp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Up(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Fp(t,e){return(Fp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Vp(t){var e=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(t){return!1}}();return function(){var n,r=Hp(t);if(e){var o=Hp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zp(this,n)}}function zp(t,e){return!e||"object"!==Dp(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Hp(t){return(Hp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}S.a.registerComponent("EngagementOverlayMenuItem",Mp);var Gp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Fp(t,e)}(i,t);var e,n,r,o=Vp(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).options=e,t.ready((function(){n.initialize()})),n}return e=i,(n=[{key:"initialize",value:function(){var t;this.hasHeatMapData()&&(this.player.addChild("engagementOverlay",{heatMap:this.options.heatMap,interactive:this.options.interactive,onTimepointHover:this.options.onTimepointHover}),(null===(t=this.player.getChild("collapserator"))||void 0===t?void 0:t.getChild("cogButton")).addItem({index:0,ctor:Mp,name:"EngagementOverlayMenuItem",options:{overlayVisible:!0}}))}},{key:"toggleOverlay",value:function(t){var e=this.player.getChild("engagementOverlay");null==e||e.toggleChart(t)}},{key:"hasHeatMapData",value:function(){var t;return(null===(t=this.options.heatMap)||void 0===t?void 0:t.reduce((function(t,e){return t+e}),0))>0}}])&&Up(e.prototype,n),r&&Up(e,r),i}(S.a.getPlugin("plugin"));function Wp(t){return(Wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kp(t,e,n){return(Kp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Jp(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Qp(t,e){return(Qp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Zp(t){var e=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(t){return!1}}();return function(){var n,r=Jp(t);if(e){var o=Jp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $p(this,n)}}function $p(t,e){return!e||"object"!==Wp(e)&&"function"!=typeof e?Xp(t):e}function Xp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jp(t){return(Jp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}S.a.registerPlugin("engagementOverlayPlugin",Gp);var Yp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Qp(t,e)}(i,t);var e,n,r,o=Zp(i);function i(t,e){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),n=o.call(this,t),void 0===e.startTime)throw Error("Invalid clip start");if(void 0===e.endTime)throw Error("Invalid clip end");if(e.startTime>e.endTime)throw Error("Clip start cannot be greater than clip end");return n._clipStart=e.startTime,n._clipEnd=e.endTime,n.playerEndedFn=n.player.ended.bind(t),n.playerDurationFn=n.player.duration.bind(t),n.playerCurrentTimeFn=n.player.currentTime.bind(t),n.playerbufferedFn=n.player.buffered.bind(t),n.player.ended=n.ended.bind(Xp(n)),n.player.duration=n.duration.bind(Xp(n)),n.player.currentTime=n.currentTime.bind(Xp(n)),n.player.buffered=n.buffered.bind(Xp(n)),n.initialize(),n.player.ready((function(){n.player.trigger("durationchange")})),n}return e=i,(n=[{key:"clipStart",get:function(){var t=this.playerDurationFn();return this._clipStart>t?t:this._clipStart}},{key:"clipEnd",get:function(){var t=this.playerDurationFn();return this._clipEnd>t?t: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"),Kp(Jp(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 t=this.getCurrentTime(!1);t>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,t<this.clipStart&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(t){return void 0!==t&&this.playerDurationFn(t),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(t){if(void 0===t)return this.getCurrentTime(!0);for(var e=t+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,[e].concat(r))}},{key:"getCurrentTime",value:function(t){var e=this.playerCurrentTimeFn(),n=0;return e>=this.clipStart&&(n=e-this.clipStart),this.player.getCache().currentTime=n,t?n:e}},{key:"buffered",value:function(){for(var t=this.playerbufferedFn(),e=[],n=0;n<t.length;n++)e[n]=[Math.max(0,t.start(n)-this.clipStart),Math.min(Math.max(0,t.end(n)-this.clipStart),this.player.duration())];return S.a.createTimeRanges(e)}}])&&qp(e.prototype,n),r&&qp(e,r),i}(S.a.getPlugin("plugin"));S.a.registerPlugin("clipPlugin",Yp);var ty=n(700);n(927);function ey(t){return(ey="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ny(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ry(t,e,n){return(ry="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=cy(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function oy(t,e){return(oy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function iy(t){var e=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(t){return!1}}();return function(){var n,r=cy(t);if(e){var o=cy(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ay(this,n)}}function ay(t,e){return!e||"object"!==ey(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function cy(t){return(cy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var uy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&oy(t,e)}(i,t);var e,n,r,o=iy(i);function i(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).timepoint_=e.timepoint,n.time_=e.timepoint.visibleAt/1e3;var r=e.timepoint.interactions[0];r||n.hide();var a=ty.a.getTypeInfo(r.typeId).bgClassName;return n.$(".vjs-icon-placeholder").classList.add(a),n.controlText(r.name),n.update(),n}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-item ".concat(ry(cy(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return ry(cy(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),Object.assign(Object.assign({},n),{tabIndex:0}))}},{key:"update",value:function(){var t=this.player_.duration(),e=this.time_/t;this.el().style.left=100*e+"%",e>100||e<0?this.hide():this.show()}},{key:"handleClick",value:function(t){t.stopPropagation(),this.player_.currentTime(this.time_)}}])&&ny(e.prototype,n),r&&ny(e,r),i}(S.a.getComponent("Button"));n(928);function ly(t){return(ly="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sy(t){return function(t){if(Array.isArray(t))return fy(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return fy(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fy(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fy(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function py(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yy(t,e,n){return(yy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=my(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function hy(t,e){return(hy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function dy(t){var e=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(t){return!1}}();return function(){var n,r=my(t);if(e){var o=my(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vy(this,n)}}function vy(t,e){return!e||"object"!==ly(e)&&"function"!=typeof e?by(t):e}function by(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function my(t){return(my=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var gy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&hy(t,e)}(i,t);var e,n,r,o=dy(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).track_=e.track,n.interactive_=e.interactive,n.onDurationChange=n.onDurationChange.bind(by(n)),n.createInteractionItems=n.createInteractionItems.bind(by(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 e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-items ".concat(yy(my(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return yy(my(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(t){t.update()}))}},{key:"createInteractionItems",value:function(){var t,e=this;if(this.track_){sy(this.children_).forEach((function(t){e.removeChild(t)}));for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],o=this.getTimepointById(r.text);o&&(null===(t=o.interactions)||void 0===t?void 0:t.length)&&this.addChild(new uy(this.player_,{timepoint:o}))}}}},{key:"onDurationChange",value:function(){this.update()}},{key:"getTimepointById",value:function(t){var e;return null===(e=this.interactive_.timepoints)||void 0===e?void 0:e.find((function(e){return e.id.toString()===t.toString()}))}}])&&py(e.prototype,n),r&&py(e,r),i}(S.a.getComponent("Component"));n(929);function wy(t){return(wy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Cy(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Oy(t,e){return(Oy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Iy(t){var e=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(t){return!1}}();return function(){var n,r=_y(t);if(e){var o=_y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ty(this,n)}}function Ty(t,e){return!e||"object"!==wy(e)&&"function"!=typeof e?Sy(t):e}function Sy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _y(t){return(_y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ky=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Oy(t,e)}(i,t);var e,n,r,o=Iy(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t)).options=e,n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize.bind(Sy(n)))})),n}return e=i,(n=[{key:"initialize",value:function(){Ho(this.player,"metadata","interactive",this.onTrackLoaded.bind(this)),this.player.addClass("cv-interactive-plugin")}},{key:"onTrackLoaded",value:function(t){this.addChildren(t)}},{key:"addChildren",value:function(t){this.player.controlBar.getChild("progressControl").getChild("SeekBar").addChild(new gy(this.player,{interactive:this.options.interactive,track:t}))}}])&&Cy(e.prototype,n),r&&Cy(e,r),i}(S.a.getPlugin("plugin"));S.a.registerPlugin("interactiveSeekBarPlugin",ky);var Ey=function(t,e){var n,r=t.addTextTrack("metadata","interactive"),o=e.additionalData.interactive,i=null===(n=e.additionalData.clipData)||void 0===n?void 0:n.startTime;return o.timepoints.forEach((function(t){var e,n=t.visibleAt/1e3,o=t.visibleFor?n+t.visibleFor/1e3:n+1;i&&(n+=i,o+=i),(null===(e=t.interactions)||void 0===e?void 0:e.length)&&r.addCue({startTime:n-.001,endTime:o,text:t.id})})),r};n(930);function jy(t){return(jy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Py(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ry(t,e,n){return(Ry="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=By(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function xy(t,e){return(xy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ly(t){var e=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(t){return!1}}();return function(){var n,r=By(t);if(e){var o=By(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ay(this,n)}}function Ay(t,e){return!e||"object"!==jy(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function By(t){return(By=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ny=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},My=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&xy(t,e)}(i,t);var e,n,r,o=Ly(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,(n=[{key:"getPlayerClassName",value:function(){return"cv-reports-player"}},{key:"getAnalyticsPlayerType",value:function(){return"reports-player"}},{key:"additionalSetup",value:function(t){var e=this,n=Object.create(null,{additionalSetup:{get:function(){return Ry(By(i.prototype),"additionalSetup",e)}}});return Ny(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.additionalSetup.call(this,t),this.setupEngagementOverlayPlugin(t),this.setupUpClipPlugin(t),this.setupInteractiveSeekBarPlugin(t);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"setupEngagementOverlayPlugin",value:function(t){var e;this.player.engagementOverlayPlugin({heatMap:this.options.heatMap,interactive:null===(e=t.additionalData)||void 0===e?void 0:e.interactive,onTimepointHover:this.options.onTimepointHover})}},{key:"setupUpClipPlugin",value:function(t){var e,n=null===(e=t.additionalData)||void 0===e?void 0:e.clipData;n&&this.player.clipPlugin({startTime:n.startTime,endTime:n.endTime})}},{key:"setupInteractiveSeekBarPlugin",value:function(t){var e,n,r=null===(e=t.additionalData)||void 0===e?void 0:e.interactive;(null===(n=t.additionalData)||void 0===n?void 0:n.interactive)&&(this.track=Ey(this.player,t),this.player.interactiveSeekBarPlugin({interactive:r}))}},{key:"getSeekBarOptions",value:function(){return{ignoreChapters:!0}}}])&&Py(e.prototype,n),r&&Py(e,r),i}(lp);function Dy(t){var e=i.a.useRef(),n=i.a.useRef();return i.a.useEffect((function(){n.current=new My(e.current,t)}),[]),i.a.createElement("div",{ref:e})}function Uy(t){return new Array(t.videoDuration).fill(null).map((function(e,n){return t.heatMap[n]||0}))}var Fy=n(931),Vy=n.n(Fy),zy=n(728),Hy=n(932),Gy=n.n(Hy);function Wy(t){return function(t){if(Array.isArray(t))return qy(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return qy(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qy(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qy(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ky="interactives.engagementHeatMap",Qy=Vy.a.scale(["#daf07d","#08bd1a"]),Zy=[0,.01,.25,.5,.75,1];function $y(t,e){return t?Qy(t/e).hex():"#f1f1f1"}function Xy(t,e){for(var n=[],r=0;r<t.length;r++){var o=r>0&&t[r-1],i=t[r],a=r<t.length-1&&t[r+1];i===o&&i===a||n.push("".concat($y(i,e)," ").concat(100/t.length*r,"%"))}return"linear-gradient(to right, ".concat(n.join(","),")")}function Jy(){var t=Math.max.apply(Math,Zy),e=100/Zy.length;return i.a.createElement("div",{className:"d-flex justify-content-between w-100"},i.a.createElement(zy.b,{namespace:Ky,phrase:"less"}),i.a.createElement("div",{className:"d-flex mx-1 flex-grow-1 ".concat(Gy.a.legend)},Zy.map((function(n,r){return i.a.createElement("div",{key:r,style:{width:"".concat(e,"%"),backgroundColor:$y(n,t)}})}))),i.a.createElement(zy.b,{namespace:Ky,phrase:"more"}))}function Yy(t){var e,n,r=Uy(t.engagement),o=null!==(e=t.max)&&void 0!==e?e:Math.max.apply(Math,Wy(r));return i.a.createElement("div",{className:"border rounded ".concat(Gy.a.heatMap," ").concat(null!==(n=t.className)&&void 0!==n?n:""),style:{background:Xy(r,o)}})}var th=n(779),eh=n.n(th),nh=c.a.encloseNamespace("interactives.videoEngagementOverlay");function rh(t){var e=i.a.useRef(),n=Uy(t.engagement);return i.a.createElement("div",{className:"bg-white rounded p-2 h-100"},i.a.createElement("div",{className:"mb-2"},i.a.createElement(Dy,{viewKey:t.viewKey,playerApi:new URL(t.playerApiUrl),hotkeyElQuerySelector:"body",heatMap:n,onTimepointHover:function(t){var r=e.current;r&&(null!==t?(r.classList.add(eh.a.heatMapTimepointIndicatorVisible),r.style.left="".concat(t/n.length*100,"%")):r.classList.remove(eh.a.heatMapTimepointIndicatorVisible))}})),i.a.createElement("div",{className:eh.a.heatMapContainer},i.a.createElement("div",{className:"position-relative"},i.a.createElement(Yy,{engagement:t.engagement,className:eh.a.heatMap}),i.a.createElement("div",{ref:e,className:eh.a.heatMapTimepointIndicator}))),i.a.createElement("div",{className:"d-flex justify-content-between mt-2"},i.a.createElement("strong",null,nh("engagement")),i.a.createElement("div",{className:"w-33"},i.a.createElement(Jy,null))))}var oh=c.a.encloseNamespace("interactives.videoEngagementOverlay");function ih(){return i.a.createElement("div",{className:"bg-white rounded d-flex flex-column justify-content-end p-2 ".concat(eh.a.partialLoadingContainer)},i.a.createElement("div",{className:eh.a.heatMapContainer},i.a.createElement("div",{className:"position-relative"},i.a.createElement(Yy,{engagement:{heatMap:[]},className:eh.a.heatMap}))),i.a.createElement("div",{className:"d-flex justify-content-between mt-2"},i.a.createElement("strong",null,oh("engagement")),i.a.createElement("div",{className:"w-33"},i.a.createElement(Jy,null))))}var ah=n(536),ch=n(21),uh=n(22),lh=n(492),sh=n(500),fh=n(934),ph=n.n(fh);function yh(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(t,e)||dh(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hh(t){return function(t){if(Array.isArray(t))return vh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||dh(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dh(t,e){if(t){if("string"==typeof t)return vh(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vh(t,e):void 0}}function vh(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var bh=c.a.encloseNamespace("interactives.engagementTable");function mh(t){var e;return i.a.createElement("div",{className:"p-2 ".concat(null!==(e=t.className)&&void 0!==e?e:"")},t.children)}function gh(t){return i.a.createElement(mh,{className:"d-inline-block ".concat(t.column.isSorted?"font-weight-bold":"")},bh(t.phraseKey))}function wh(t){var e=yh(Object(ch.a)(uh.a.ANONYMISE_USERS),1)[0];return i.a.useMemo((function(){var n=function(t){var e=0;return t.forEach((function(t){var n=Math.max.apply(Math,hh(t.heatMap));n>e&&(e=n)})),e}(t);return[{Header:function(t){var e=t.column;return i.a.createElement(gh,{column:e,phraseKey:"name"})},width:8,accessor:"user",sortType:function(t,n){return Object(lh.a)(t.values.user,e)>Object(lh.a)(n.values.user,e)?1:-1},Cell:function(t){var n=t.value;return i.a.createElement(mh,{className:"text-truncate"},Object(lh.a)(n,e))}},{Header:function(t){var e=t.column;return i.a.createElement(gh,{column:e,phraseKey:"views"})},accessor:"viewCount",width:4,sortType:"basic",sortDescFirst:!0,Cell:function(t){var e=t.value;return i.a.createElement(mh,null,e)}},{Header:function(t){var e=t.column;return i.a.createElement(gh,{column:e,phraseKey:"engagement"})},accessor:"engagementRate",width:8,sortType:"basic",sortDescFirst:!0,Cell:function(t){var e=t.value;return i.a.createElement(mh,{className:"w-33"},i.a.createElement(sh.a,{percentage:e,layout:sh.b.LabelBefore}))}},{Header:function(t){var e=t.column;return i.a.createElement(gh,{column:e,phraseKey:"heatMap"})},accessor:"heatMap",width:15,disableSortBy:!0,Cell:function(t){var e=t.row.original;return i.a.createElement(mh,{className:"d-flex align-items-center h-100"},i.a.createElement(Yy,{engagement:e,max:n,className:"".concat(ph.a.heatMap," flex-grow-1")}))}}]}),[e])}var Ch={table:"bg-white rounded",header:"border-bottom"};function Oh(t){var e,n,r=wh(t.engagement),o=(e=t.engagement,n=t.users,i.a.useMemo((function(){return e.map((function(t){return Object.assign(Object.assign({},t),{user:n.find((function(e){return e.id===t.userId}))})}))}),[]));return i.a.createElement(ah.a,{columns:r,data:o,theme:Ch,enableSort:!0})}var Ih=n(715),Th=n(698);function Sh(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return _h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _h(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var kh=n(935),Eh=n.n(kh);n.d(e,"InteractiveEngagementView",(function(){return Ph}));var jh=c.a.encloseNamespace("reportsInteractives.interactiveEngagement");function Ph(t){var e,n,c,l,S,_,k=Object(b.a)(),E=a.a.useBasicFetch(p.a.interactiveMetadata(t.interactiveMetadataId)),j=a.a.useBasicFetch(!!E.data&&p.a.interactive(E.data.interactiveId)),P=a.a.useBasicFetch(v.a.aggregateEngagement(t.interactiveMetadataId,k)),R=a.a.useBasicFetch(v.a.individualEngagement(t.interactiveMetadataId,k)),x=a.a.useBasicFetch((null===(e=R.data)||void 0===e?void 0:e.data.length)&&h.a.getById(R.data.data.map((function(t){return t.userId})))),L=a.a.useBasicFetch(s(t.interactiveMetadataId,r.MasterObject)),A=a.a.useBasicFetch(f.a.config());Object(u.a)(E.data?jh("pageTitle",{interactive:E.data.name}):""),Object(y.a)(null===(n=E.data)||void 0===n?void 0:n.name),Object(C.a)(Object(Th.a)()),c=t.interactiveMetadataId,l=Sh(Object(ch.a)(uh.a.DATE_RANGE_QUERY_PARAMS),1)[0],S=a.a.useBasicFetch(v.a.individualEngagement(c,l)),_=Sh(Object(ch.a)(uh.a.AUDIENCE_FILTER_SUGGESTIONS),2)[1],Object(o.useEffect)((function(){var t;S.isComplete&&_("users",null===(t=S.data)||void 0===t?void 0:t.data.map((function(t){return t.userId})))}),[S.isComplete]),Object(w.a)(R),Object(d.a)(E);var B=!!(j.data&&E.data&&P.data&&L.data&&A.data);return i.a.createElement("div",null,i.a.createElement(T.a,{interactiveMetadataId:t.interactiveMetadataId}),i.a.createElement("div",{className:"d-flex pb-3"},i.a.createElement("div",{className:"pr-2 ".concat(Eh.a.viewCountContainer)},E.data?i.a.createElement(g.a,{objectId:t.interactiveMetadataId,className:"h-100"}):i.a.createElement(O.a,{className:"h-100"})),i.a.createElement("div",{className:"px-2 ".concat(Eh.a.engagementPercentageContainer)},i.a.createElement(Ih.a,{objectId:t.interactiveMetadataId,className:"h-100",layout:"vertical"})),i.a.createElement("div",{className:"pl-2 ".concat(Eh.a.engagementGraphContainer)},B?i.a.createElement(rh,{key:Object(m.a)(k),engagement:P.data,viewKey:L.data.viewKey,imageCdnUrl:A.data.imageCdnUrl,playerApiUrl:A.data.playerApiUrl}):i.a.createElement(ih,null))),i.a.createElement("div",{className:"pb-3"},R.data&&x.data?i.a.createElement(Oh,{key:Object(m.a)(k),engagement:R.data.data,users:x.data}):i.a.createElement(I.a,{className:Eh.a.partialTable})))}}])]);
|