@clickview/library-editor 1.71.0 → 1.72.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +1 -1
- package/dist/languages/en.json +1 -1
- package/dist/scripts/4796-f4e678eab7.chunk.js +2 -0
- package/dist/scripts/{bundle-110ef3014d.min.js → bundle-23c1f71f1a.min.js} +2 -2
- package/package.json +1 -1
- package/dist/scripts/4796-ea5d23ef9b.chunk.js +0 -2
- /package/dist/scripts/{4796-ea5d23ef9b.chunk.js.LICENSE.txt → 4796-f4e678eab7.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-110ef3014d.min.js.LICENSE.txt → bundle-23c1f71f1a.min.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 4796-f4e678eab7.chunk.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[4796],{54096:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var r=n(32735),o=n(21679);function i(e){var t,n;return t=e,n=o.u.getInstance(t),r.useEffect(function(){return function(){o.u.releaseInstance(t)}}),n}},95544:function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return"";var r=t.filter(function(e){return!!e});return r.length?r.join(" "):""}n.d(t,{A:function(){return r}})},40484:function(e,t,n){"use strict";n.d(t,{pO:function(){return o},$m:function(){return i},jj:function(){return r},BC:function(){return s},fi:function(){return u},ZE:function(){return c}});var r=["video","clip","interactive"],o=["playlist","series","clip","classification","interactive","video","company","category"],i=["user"];function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var u,c,l={type:!0},s=["sort","classification","presentation","audience","yearGroup","moviesAndTv","type","rating","interactives","clips","classroom","hasResources","hasSubtitles","productionYear","isHd","producedByClickView","duration","tagOrClassification","status","isAdmin","bulkActionType","userType","filter","channel","dateBroadcast","categoryId","hasInteractives","jobStatus","source","customerStatus","specialEventType","customerType"].reduce(function(e,t){return Object.assign(Object.assign({},e),(n={},o=!l[t],(r=function(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}(r=t))in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n));var n,r,o},{});!function(e){e.MyVideos="my-videos",e.School="school",e.ExchangeArchive="exchange-archive",e.ClickView="clickview"}(u||(u={})),function(e){e.Video="video",e.Series="series",e.Playlist="playlist",e.Classification="classification",e.Clip="clip",e.Interactive="interactive",e.Company="company",e.Category="category"}(c||(c={}))},19442:function(e,t,n){"use strict";n.d(t,{h:function(){return y}});var r=n(32735),o=n(53808),i=n(31647),a=n(95544),u=n(52076),c=n(77105),l=n(39396),s=n(21326),f={iconButton:"aGxoe",iconWithText:"_cjiV",svg:"q6vwS",iconOnly:"T1CzO",iconBorder:"lBPNt"};function p(e){return e.tooltip?r.createElement(s.u,{title:e.tooltip,spanHack:!0,spanHackClassName:e.showBorder?"me-2":""},e.children):r.createElement(r.Fragment,null,e.children)}function y(e){var t="".concat(e.className," ").concat(f.iconButton);r.Children.toArray(e.children).length?t+=" ".concat(f.iconWithText):e.showBorder||e.customSize||(t+=" ".concat(f.iconOnly)),e.showBorder&&(t+=" "+(0,a.A)(f.iconBorder,"btn btn-outline-dark",!e.tooltip&&"me-2")),e.disabled&&(t+=" disabled");var n=r.createElement(l.x,{svgName:e.svgName,className:"svg-container ".concat(f.svg),size:e.svgSize});return e.appLink||e.href?e.href?r.createElement(p,Object.assign({},e),r.createElement("a",{className:t,href:e.href,onClick:function(t){t.preventDefault(),e.analyticsData&&e.analyticsOptions&&u.k.logUserAction(e.analyticsData,e.analyticsOptions),o.q.isFunction(e.onClick)&&e.onClick(t),i.Q.Ab.PageLoad(e.href,e.openInNewTab)},"aria-label":e.ariaLabel,role:e.role},n,e.children)):r.createElement(p,Object.assign({},e),r.createElement(c.F,{appLink:e.appLink,className:t,onClick:e.onClick,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled,ariaLabel:e.ariaLabel,role:e.role},n,e.children)):r.createElement(p,Object.assign({},e),r.createElement("button",{type:"button",className:t,"aria-label":e.ariaLabel,onClick:function(t){e.analyticsData&&e.analyticsOptions&&u.k.logUserAction(e.analyticsData,e.analyticsOptions),o.q.isFunction(e.onClick)&&e.onClick(t)},disabled:e.disabled,role:e.role},n,e.children))}},19650:function(e,t,n){"use strict";n.d(t,{B:function(){return d}});var r=n(32735),o=n(57857),i=n(70065),a=n(77105),u=n(39396),c=n(34658),l=n(85475),s=n(41814),f={seeMore:"yv0FS"},p=o.T.encloseNamespace("shared.widgetHeader");function y(e){return r.createElement("div",{className:"ms-3 ".concat(f.seeMore)},r.createElement(a.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:Object.assign(Object.assign({location:i.LZ.SlidingList},e.analyticsOptions),{descriptor:i._S.SeeMore}),className:"text-decoration-none ".concat(e.appLink?"curated-widget-link":"")},r.createElement("p",{className:"hover-text-underline text-dark curated-widget-heading"},p("seeAll"))))}function d(e){var t,n,o=!!e.description;if(!e.name&&!e.description)return r.createElement(r.Fragment,null);var i=s.d.isBelowContentMinimum(e.content,e.widgetTypeId),f=null!==(n=null===(t=c.u[e.widgetTypeId])||void 0===t?void 0:t.minContent)&&void 0!==n?n:0;return r.createElement("div",{className:"curated-widget-header"},r.createElement("div",{className:"d-flex justify-content-between"},!!e.name&&r.createElement("div",{className:"d-flex align-items-center"},r.createElement(a.F,{appLink:e.appLink,analyticsData:e.analyticsData,className:"text-decoration-none ".concat(e.appLink?"curated-widget-link text-reset":""),onClick:e.onClick},r.createElement("h2",{className:"h4 curated-widget-heading"},e.isPreviewing&&i&&r.createElement(u.x,{svgName:l.vn.WarningOutline,title:"Widget is below the minimum content threshold of ".concat(f," and won't be displayed."),tooltipSpanHack:!0,tooltipSpanHackClassName:"d-inline text-danger me-1"}),e.name)),!!r.isValidElement(e.badgeComponent)&&e.badgeComponent),!!e.appLink&&!o&&!!e.showSeeMoreLink&&r.createElement(y,Object.assign({},e))),o&&r.createElement("div",{className:"d-flex justify-content-between align-items-end"},r.createElement("p",{className:"description curated-widget-description"},r.createElement("span",null,e.description)),!!e.appLink&&!!e.showSeeMoreLink&&r.createElement(y,Object.assign({},e))))}},66016:function(e,t,n){"use strict";n.d(t,{_:function(){return r}});var r={MULTI_PRESENTATION_THRESHOLD:2}},34658:function(e,t,n){"use strict";n.d(t,{u:function(){return U}});var r=n(40221),o=n(10657),i=n(57857),a=n(70065);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t,n){return(t=function(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l={OlympicsTopics:c(c({},"18",{id:"Oq9WnjA",name:"2026 Milano Cortina Winter Olympic Games"}),"9",{id:"EoAYjoR",name:"2026 Milano Cortina Winter Olympic Games"}),PublicTranscriptVideoIds:["78902422","8139055","32102562","36875667","3713657","9900524","48278572","39424302","3712691","54504550","23852726","3713563","3714027","51281358","58785149","7322586","3716774","36554689","54192890","6689791","10749459","3712691","81764158","43772092","43974358","48091365","6430651","3713735","54096131","57977558","78840166","57738254","51666370","49858722"],SpecialEvents:{dlL00b3:{id:"dlL00b3",iconUrl:"https://img.clickviewapp.com/v2/covers/PGbNp0"}},Classifications:{Twig:{EnglandSecondary:{HUB:"yrg5vYN"},ScotlandSecondary:{HUB:"Y69j14M"},InternationalSecondary:{HUB:"MYM6GGM"},NewZealandSecondary:{HUB:"agNmRd9"},CanadaMiddle:{HUB:"RbEbJ4g"},CanadaHigh:{HUB:"xAzA6DP"}},Tigtag:{EnglandPrimary:{HUB:"D1218zx",TIGTAG_HUB:"odldxPJ",TIGTAG_JUNIOR_HUB:"nENExnL"},ScotlandPrimary:{HUB:"JjAONbj",TIGTAG_HUB:"3bNAGl1",TIGTAG_JUNIOR_HUB:"K6GKp43"},InternationalPrimary:{HUB:"W1xqbk2",TIGTAG_HUB:"ek3dJr8",TIGTAG_JUNIOR_HUB:"PGyKzpn"},NewZealandPrimary:{HUB:"odnkREE",TIGTAG_HUB:"kZJ4RPa",TIGTAG_JUNIOR_HUB:"zMg80DR"},CanadaElementary:{HUB:"2mgmJA6",TIGTAG_HUB:"69z9D1A",TIGTAG_JUNIOR_HUB:"ZJvJ1Lg"},CanadaMiddle:{HUB:"Jjajxyd",TIGTAG_HUB:"dq9qbe3",TIGTAG_JUNIOR_HUB:"K6a6qdL"}}},PresentationIds:{DEFAULT:1,DEFAULT_CURRICULUM:10,AU_PRIMARY:18,AU_SECONDARY:9,AU_TERTIARY:81,US_ELEMENTARY:13,US_MIDDLE:14,US_HIGH:15,CA_ELEMENTARY:100,CA_MIDDLE:101,CA_HIGH:102,STREAMABLE_LEARNING:68,ENG_PRIMARY:16,ENG_SECONDARY:47,SCT_PRIMARY:12,SCT_SECONDARY:24,UK_TERTIARY:82,INT_PRIMARY:19,INT_SECONDARY:21,NZ_PRIMARY:96,NZ_SECONDARY:97},Libraries:{LICENCED_CONTENT_COLLECTION:"3700633",AU_PRIMARY:"10066675",AU_SECONDARY:"59401330",AU_TERTIARY:"5836680",US_ELEMENTARY:"38693445",US_MIDDLE:"39642303",US_HIGH:"38693435",CA_ELEMENTARY:"92862332",CA_MIDDLE:"92862334",CA_HIGH:"92862344",STREAMABLE_LEARNING:"78688869",ENG_PRIMARY:"35340580",ENG_SECONDARY:"59889793",SCT_PRIMARY:"33386791",SCT_SECONDARY:"59856733",UK_TERTIARY:"5815036",INT_PRIMARY:"3706428",INT_SECONDARY:"3706459",NZ_PRIMARY:"3705693",NZ_SECONDARY:"3705710",NZ_MTV:"26989676",TWIG:"88117784",TIGTAG:"80333935"},Rostering:{sources:{0:{name:"Unknown",iconUrl:""},1:{name:"Clever",iconUrl:"https://img.clickviewapp.com/v2/logos/LqlKgd"},2:{name:"ClassLink",iconUrl:"https://img.clickviewapp.com/v2/logos/ZA2ew5"},3:{name:"Google",iconUrl:"https://img.clickviewapp.com/v2/logos/l5x0jL"},4:{name:"Microsoft",iconUrl:"https://img.clickviewapp.com/v2/logos/xAxGPP"},5:{name:"Schoology",iconUrl:"https://img.clickviewapp.com/v2/logos/kZNEyz"},6:{name:"PowerSchool",iconUrl:"https://img.clickviewapp.com/v2/logos/m6aDmR"}}},Images:{Level_1:{TOPIC_BANNER:"https://img.clickviewapp.com/v2/banners/dlM73E",TOPIC_COVER:"https://img.clickviewapp.com/v2/covers/WAe8MP",TOPIC_TALL_POSTER:"https://img.clickviewapp.com/v2/tallposters/raRm7E",NEW_RELEASES_BANNER:"https://img.clickviewapp.com/v2/banners/3kzeZ2"},Level_2:{TOPIC_BANNER:"https://img.clickviewapp.com/v2/banners/WAeKvP",TOPIC_COVER:"https://img.clickviewapp.com/v2/covers/9DAZJv",TOPIC_TALL_POSTER:"https://img.clickviewapp.com/v2/tallposters/eKG2bq",NEW_RELEASES_BANNER:"https://img.clickviewapp.com/v2/banners/xyn5eP"},Level_3:{TOPIC_BANNER:"https://img.clickviewapp.com/v2/banners/dl1d0g",TOPIC_COVER:"https://img.clickviewapp.com/v2/covers/R0Pz7A",TOPIC_TALL_POSTER:"https://img.clickviewapp.com/v2/tallposters/8LYZ9R",NEW_RELEASES_BANNER:"https://img.clickviewapp.com/v2/banners/nKDyRj"},Level_4:{TOPIC_BANNER:"https://img.clickviewapp.com/v2/banners/vYJPP5",TOPIC_COVER:"https://img.clickviewapp.com/v2/covers/PGPLLP"},TOPIC_DEFAULT_BANNER:"https://img.clickviewapp.com/v2/banners/yKvoG0",STREAMABLE_TOPIC_BANNER:"https://img.clickviewapp.com/v2/banners/q6gnOn",STREAMABLE_TOPIC_COVER:"https://img.clickviewapp.com/v2/covers/age95g"},Onboarding:{Playlist:{COVER_FILE_ID:"G149g3",BANNER_FILE_ID:"bmPLkn"},LOADING_THUMBNAILS:["https://img.clickviewapp.com/v2/thumbnails/7m34ne","https://img.clickviewapp.com/v2/thumbnails/W1bjqJ","https://img.clickviewapp.com/v2/thumbnails/G14M1e","https://img.clickviewapp.com/v2/thumbnails/2mnv5x","https://img.clickviewapp.com/v2/thumbnails/xAEG91","https://img.clickviewapp.com/v2/thumbnails/agnbyg","https://img.clickviewapp.com/v2/thumbnails/W13emP","https://img.clickviewapp.com/v2/thumbnails/Y6j2vy","https://img.clickviewapp.com/v2/thumbnails/W1MJGE","https://img.clickviewapp.com/v2/thumbnails/OqDJqG","https://img.clickviewapp.com/v2/thumbnails/1My9Wn","https://img.clickviewapp.com/v2/thumbnails/G14MRe","https://img.clickviewapp.com/v2/thumbnails/5bgKpl","https://img.clickviewapp.com/v2/thumbnails/agnbp9","https://img.clickviewapp.com/v2/thumbnails/G147R1","https://img.clickviewapp.com/v2/thumbnails/5bgMz5","https://img.clickviewapp.com/v2/thumbnails/G14Me5","https://img.clickviewapp.com/v2/thumbnails/5bEovE","https://img.clickviewapp.com/v2/thumbnails/odY4oZ","https://img.clickviewapp.com/v2/thumbnails/yrqwqD","https://img.clickviewapp.com/v2/thumbnails/K6pOmR","https://img.clickviewapp.com/v2/thumbnails/vYK3w4","https://img.clickviewapp.com/v2/thumbnails/agnD88","https://img.clickviewapp.com/v2/thumbnails/4rKmp7","https://img.clickviewapp.com/v2/thumbnails/0wM4r3","https://img.clickviewapp.com/v2/thumbnails/69A2jO","https://img.clickviewapp.com/v2/thumbnails/7m3Z3e","https://img.clickviewapp.com/v2/thumbnails/3bGL94","https://img.clickviewapp.com/v2/thumbnails/Y6jwLo","https://img.clickviewapp.com/v2/thumbnails/1MyPby"]}},s=n(13034),f=n(88311),p=n(76044),y=n(51614),d="onboarding:persona",v="onboarding:had:job:title";function h(e,t){return e?"".concat(e,":").concat(t):t}function b(e,t){var n=y.SG.get(t),r=h(e,t);return null!==n&&(y.SG.remove(t),y.SG.set(r,n)),y.SG.get(r)}function m(e,t,n){y.SG.set(h(e,t),n)}var g=function(e,t){var n=p.l.getPersonaFromJobTitle(t);m(e,d,n||"teacher")};function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var O,P={getOnboardingPathway:function(e){var t=e.jobTitle,n=e.userSettings,r=e.presentations,o=e.curriculums,i=e.preferredPresentation,a=e.preferredSubjects,u=e.hasPlaylist,c=e.appLink,l=e.appLinks,s=e.masterUser,y=e.customer,v=e.currentUser,h=e.hasPermissions,m=b(null==v?void 0:v.id,d);!m&&t&&g(null==v?void 0:v.id,t),m&&m!==p.l.getPersonaFromJobTitle(t)&&g(null==v?void 0:v.id,t);var w={jobTitle:t,hasPlaylist:u,masterUser:s,customer:y,presentations:r||[],curriculums:o||[],preferredPresentation:i,preferredSubjects:a,instanceRegion:null==v?void 0:v.instanceRegion,hasPermissions:h,userSettings:n},O=P.getCurrentScreen(c,l),S=Object.values(D),j={},C=null,_=null,k=0,T=0,E=!0;return S.forEach(function(e){var t;if(e.predicate(w)){_||(_=e.id);var r=f.x.get(n,e.setting);r||(E=!1),O||r||(O=e.id),k++,j[e.id]={isComplete:r,next:null,previous:C,number:k,includeInProgressBar:!1},e.includeInProgressBar(w)&&(T++,j[e.id].progressBarNumber=T,j[e.id].includeInProgressBar=!0),(null===(t=e.branches)||void 0===t?void 0:t.length)&&e.branches.forEach(function(t){j[t]={next:e.id,previous:e.id,includeInProgressBar:!1}}),C&&(j[C].next=e.id),C=e.id}}),O||E||(O=_),{screens:j,currentScreen:O,totalScreens:k,totalScreensInProgressBar:T,hasCompletedAllSteps:E}},getNextAppLink:function(e,t){var n=e.screens[e.currentScreen],r=null==n?void 0:n.next;return r?t[r]:null},getPreviousAppLink:function(e,t){var n=e.screens[e.currentScreen],r=null==n?void 0:n.previous;return r?t[r]:null},getCurrentScreen:function(e,t){var n=Object.entries(t).find(function(t){return(n=t,r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(n,r)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}(n,r)||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.")}())[1].action===e.action;var n,r});return n?r.m.first(n):null},getProgress:function(e){var t,n,r,o=null===(t=e.screens[e.currentScreen])||void 0===t?void 0:t.number,i=null===(n=e.screens[e.currentScreen])||void 0===n?void 0:n.progressBarNumber,a=e.totalScreens,u=e.totalScreensInProgressBar,c=i/u*100,l=(o-1)/a*100;return{showProgressBar:null===(r=e.screens[e.currentScreen])||void 0===r?void 0:r.includeInProgressBar,currentStepNumber:o,currentStepProgressBarNumber:i,totalScreens:a,totalScreensInProgressBar:u,progressBarPercentage:c,overallPercentage:l}},hasNonBdmTrial:function(e){return e(s.C.ViewTrialUpgrade)},getOnboardingScreenStates:function(e){var t=[],n=[];return Object.keys(e.screens).forEach(function(r){e.screens[r].isComplete?t.push(r):n.push(r)}),{completedScreens:t,incompleteScreens:n}},shouldRedirectToOnboarding:function(e,t,n,r){var i,a,u,c;return(null==e?void 0:e.dateCreated)>=function(e,t){var n="2024-03-26";return e.some(function(e){return e.id.toString()===l.PresentationIds.AU_TERTIARY.toString()||e.id.toString()===l.PresentationIds.UK_TERTIARY.toString()})?"2024-11-28":o.O.isBefore(null==t?void 0:t.dateCreated,n)?"2024-12-11":n}(r,t)||!!P.hasNonBdmTrial(n)&&(u=null==e?void 0:e.id,c=null===(a=null===(i=null==e?void 0:e.userProfile)||void 0===i?void 0:i.metadata)||void 0===a?void 0:a.jobTitle,"boolean"!=typeof b(u,v)&&m(u,v,!!c),!b(u,v))}},S=n(8371);!function(e){e[e.Level_1=1]="Level_1",e[e.Level_2=2]="Level_2",e[e.Level_3=3]="Level_3",e[e.Level_4=4]="Level_4"}(O||(O={}));var j,C=n(36357);!function(e){e.Root="root"}(j||(j={}));var _,k=n(66016);!function(e){e.Subject="Subject",e.CurriculumAudience="CurriculumAudience",e.CurriculumSubject="CurriculumSubject",e.CurriculumArea="CurriculumArea",e.CurriculumLeaf="CurriculumLeaf",e.CurriculumMetadata="CurriculumMetadata"}(_||(_={}));var T,E=n(16045),R=n(89603),I=n(40215),L=i.T.encloseNamespace("subjects.utils"),x={isPresentation:function(e){return"learningLevel"in e},isTopicClassification:function(e){return(null==e?void 0:e.type)===_.Subject},getMappedPresentationLevel:function(e){return"string"==typeof e?O[e]:e},getMappedPresentationBackgroundColourClass:function(e){switch(x.getMappedPresentationLevel(e)){case O.Level_1:return"bg-indigo";case O.Level_3:return"bg-blue";case O.Level_4:return"bg-navy";default:case O.Level_2:return"bg-green"}},getMappedPresentationBackgroundColourCode:function(e){switch(x.getMappedPresentationLevel(e)){case O.Level_1:return"#7A76E8";case O.Level_3:return"#38A2E8";case O.Level_4:return"#1B2D71";default:case O.Level_2:return"#5DC786"}},getPresentationLevelImage:function(e,t){switch(x.getMappedPresentationLevel(e)){case O.Level_1:if("topic-banner"===t)return l.Images.Level_1.TOPIC_BANNER;if("new-release-banner"===t)return l.Images.Level_1.NEW_RELEASES_BANNER;if("cover"===t)return l.Images.Level_1.TOPIC_COVER;if("tall-poster"===t)return l.Images.Level_1.TOPIC_TALL_POSTER;case O.Level_2:if("topic-banner"===t)return l.Images.Level_2.TOPIC_BANNER;if("new-release-banner"===t)return l.Images.Level_2.NEW_RELEASES_BANNER;if("cover"===t)return l.Images.Level_2.TOPIC_COVER;if("tall-poster"===t)return l.Images.Level_2.TOPIC_TALL_POSTER;default:case O.Level_3:if("topic-banner"===t)return l.Images.Level_3.TOPIC_BANNER;if("new-release-banner"===t)return l.Images.Level_3.NEW_RELEASES_BANNER;if("cover"===t)return l.Images.Level_3.TOPIC_COVER;if("tall-poster"===t)return l.Images.Level_3.TOPIC_TALL_POSTER;case O.Level_4:if("topic-banner"===t)return l.Images.Level_4.TOPIC_BANNER;if("cover"===t)return l.Images.Level_4.TOPIC_COVER}},getExploreAllTopicsTitle:function(e,t){return t<k._.MULTI_PRESENTATION_THRESHOLD?L("exploreAllTopicsHeading"):L("exploreAllTopicsDynamicHeading",{presentationName:e})},getExploreAllTopicsBreadcrumb:function(e,t){return t<k._.MULTI_PRESENTATION_THRESHOLD?L("exploreAllTopicsHeading"):e},isFollowing:function(e){var t,n;return 1===(null===(n=null===(t=null==e?void 0:e.followers)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},isTopLevelTopic:function(e){var t;return!!(null===(t=null==e?void 0:e.parentIds)||void 0===t?void 0:t.includes(j.Root))},canHaveVideoListTab:function(e){var t;return null===(t=null==e?void 0:e.widgets)||void 0===t?void 0:t.some(function(e){var t;return null===(t=e.metadata)||void 0===t?void 0:t.showInTableOfContents})},getActiveTopicTab:function(e,t){return x.isTopLevelTopic(e)?t===I.ku.Classification?"new-releases":"all-topics":t===I.ku.Classification?"curated-topic":"curriculum"},getCounts:function(e){var t,n,r=null!==(n=null===(t=null==e?void 0:e.metadata)||void 0===t?void 0:t.childClassificationCount)&&void 0!==n?n:0;return(null==e?void 0:e.externalMetadata)?{childClassificationCount:r,dashboardVideoCount:e.externalMetadata.dashboardVideoCount||0,childDashboardVideoCount:e.externalMetadata.childDashboardVideoCount||0,dashboardResourceCount:e.externalMetadata.dashboardResourceCount||0,childDashboardResourceCount:e.externalMetadata.childDashboardResourceCount||0,dashboardNewVideosCount:e.externalMetadata.dashboardNewVideosCount||0,childDashboardNewVideoCount:e.externalMetadata.childDashboardNewVideoCount||0}:{childClassificationCount:r,dashboardVideoCount:0,childDashboardVideoCount:0,dashboardResourceCount:0,childDashboardResourceCount:0,dashboardNewVideosCount:0,childDashboardNewVideoCount:0}},isTertiary:function(e){return(null==e?void 0:e.toString())===l.PresentationIds.AU_TERTIARY.toString()||(null==e?void 0:e.toString())===l.PresentationIds.UK_TERTIARY.toString()},isNewZealandTopic:function(e){return(null==e?void 0:e.toString())===l.PresentationIds.NZ_PRIMARY.toString()||(null==e?void 0:e.toString())===l.PresentationIds.NZ_SECONDARY.toString()},isCanadaTopic:function(e){return(null==e?void 0:e.toString())===l.PresentationIds.CA_ELEMENTARY.toString()||(null==e?void 0:e.toString())===l.PresentationIds.CA_MIDDLE.toString()||(null==e?void 0:e.toString())===l.PresentationIds.CA_HIGH.toString()},isInternationalTopic:function(e){return(null==e?void 0:e.toString())===l.PresentationIds.INT_PRIMARY.toString()||(null==e?void 0:e.toString())===l.PresentationIds.INT_SECONDARY.toString()},isMtv:function(e){var t;return!!(null===(t=null==e?void 0:e.tags)||void 0===t?void 0:t.data)&&e.tags.data.some(function(e){return e.tagType===R.Q.Curation&&e.name===E.b.MOVIES_AND_TV})},sortByLearningLevel:function(e,t,n){var r=n.find(function(t){var n;return(null==t?void 0:t.id.toString())===(null===(n=null==e?void 0:e.presentationId)||void 0===n?void 0:n.toString())}),o=n.find(function(e){var n;return(null==e?void 0:e.id.toString())===(null===(n=null==t?void 0:t.presentationId)||void 0===n?void 0:n.toString())});return O[null==r?void 0:r.learningLevel]-O[null==o?void 0:o.learningLevel]}},M=JSON.parse('{"9":{"JpZ05O1":{"name":"English","videoIds":["12293130","30361411","56866418","58438459","47329278","33204878"]},"nK2le8E":{"name":"Personal Development and Health","videoIds":["8789599","60153074","3713674","15492556","3716135","53092493"]},"yKGO31z":{"name":"Business and Economics","videoIds":["47366972","3715870","18845095","36235981","53428226","51407674"]},"m0LrOj4":{"name":"Geography","videoIds":["67277770","3716182","5803343","21143528","3716292","3922246"]},"v47nvEK":{"name":"History","videoIds":["3926454","3716774","3713871","3716594","3716183","3713847"]},"j03MPwr":{"name":"Legal Studies","videoIds":["3102514","1980904","1969843","3716210","3714860","2787675"]},"bbJR9Zn":{"name":"Languages","videoIds":["5449905","42463035","6820509","6027576","47076421","5455635"]},"8L21E3O":{"name":"Mathematics","videoIds":["3715870","3715019","51005229","3714949","3716177","3715365"]},"2jDy2M7":{"name":"Religion and Philosophy","videoIds":["3716229","3716171","41056701","16574869","3716175","50917953"]},"qdo988Y":{"name":"Biological Sciences","videoIds":["3714819","3716265","4683666","3715984","38041517","3779793"]},"0OPpqqo":{"name":"Chemical Sciences","videoIds":["52947827","52948049","3715160","4427422","57870424","47323862"]},"dlMrOdE":{"name":"Physical Sciences","videoIds":["11746875","3716307","39316775","6746382","6812332","6344597"]},"0OZyLGy":{"name":"Technologies","videoIds":["3714027","6863817","3716153","34149622","22733300","10345707"]},"0OZyLYy":{"name":"The Arts","videoIds":["3713730","3716727","3937998","32102569","3716167","32998073"]},"Jp6k7by":{"name":"Aboriginal and Torres Strait Islander Studies","videoIds":["39653785","56866418","3713730","3716831","35848459","3716863"]},"4GRgpve":{"name":"Careers and Vocational Education","videoIds":["8191834","8194999","8194478","8686941","8696292","16168801"]},"Rb4dbm1":{"name":"Civics and Citizenship","videoIds":["5803343","37938448","13106949","22372922","47303205","1521314"]},"DdKR5WL":{"name":"Earth and Space Sciences","videoIds":["3716182","5803343","3716621","4006484","3716170","21148006"]},"0wOxDvl":{"name":"Physical Education","videoIds":["3714278","3714277","3714263","3714261","7709983","3714262"]},"7m2JLPq":{"name":"Psychology","videoIds":["3714892","3714373","3714890","3714891","6590889","3717555"]},"nENmdK1":{"name":"Sociology","videoIds":["3714506","50807954","3714583","38169050","6590951","57771705"]}},"12":{"v45P37g":{"name":"Expressive Arts","videoIds":["8924670","49585075","38370221","47484152","54095899","32102465"]},"GxyLnJn":{"name":"Languages","videoIds":["7486323","36991396","5449905","40919815","48278510","50466413"]},"7PWYrDW":{"name":"Literacy and English","videoIds":["41906926","49581979","61250","52429859","32970218","41938064"]},"eKpbY50":{"name":"Numeracy and Mathematics","videoIds":["3711988","42637723","6682722","58026826","13078019","4991116"]},"k3MlbL9":{"name":"PSHE","videoIds":["7593354","4169937","9900606","37428010","50180637","37857897"]},"wLDW2LL":{"name":"Religious and Philosophical Education","videoIds":["8739794","8733823","8734696","39428437","49159932","49159889"]},"nKGonKL":{"name":"Sciences","videoIds":["3711985","36554684","4108673","3712066","7310225","48022765"]},"eKpbEMy":{"name":"Social Studies","videoIds":["38091407","52436848","8139170","8733988","52601783","51668932"]},"MgqLxwk":{"name":"Technologies","videoIds":["47529961","4108924","3711985","51668853","49834298","37137391"]},"Yv56NaM":{"name":"Biological Systems","videoIds":["3779793","3713221","3713363","3713562","3713236","3716289"]},"8Lv5Na0":{"name":"Citizenship","videoIds":["3959296","3713237","62336","7586599","48522943","22372630"]},"v4MYJ94":{"name":"Forces, Electricity and Waves","videoIds":["3713221","3713695","3713298","3713562","3713342","3713279"]},"1d5Opwv":{"name":"Materials and Substances","videoIds":["3713221","3713562","3716289","7334569","3713286","3716279"]},"raqjNz4":{"name":"Music","videoIds":["50466237","49808227","38134895","30324910","49535315","6412547"]},"eKp93yo":{"name":"People, Past Events and Societies","videoIds":["52436848","8139170","48666851","49159889","54092899","51668932"]},"2jlKbrd":{"name":"People, Place and Environment","videoIds":["50800706","16206702","81764274","80349361","51668517","37938665"]},"xA2zYyP":{"name":"Planet Earth and Space","videoIds":["3713858","3716170","48022455","3713237","3713221","3713761"]},"3bNnxmn":{"name":"Study and Research Skills","videoIds":["3715013","5952919","5892164","8999934","219449","51724289"]}},"13":{"GxAzY0z":{"name":"Arts","videoIds":["6412547","53550381","40919555","50977326","53108637","49858623"]},"Jpy1Edb":{"name":"Computer Science and Technology","videoIds":["39382930","40907539","48236013","48233767","48236100","3712674"]},"NqgPKaG":{"name":"English Language Arts","videoIds":["38945464","39388174","52673932","38945448","60062676","48235940"]},"bbJ74ed":{"name":"Health","videoIds":["39430062","40919434","39362080","39383081","58025600","40919494"]},"Dda6pW3":{"name":"Math","videoIds":["49532295","38943192","49532442","39382723","39388252","38944700"]},"j0a4Arj":{"name":"Physical Education","videoIds":["40919406","48235838","50652589","40919430","48236078","50652575"]},"8LnP7p8":{"name":"Social and Emotional Learning","videoIds":["39451488","48235859","39337317","40964136","42314985","39382748"]},"4Gl1DaK":{"name":"World Languages","videoIds":["40919719","40919802","40919815","40919186","40915325","49858537"]},"Jpy1EP2":{"name":"Civics and Government","videoIds":["50807954","50800622","57355287","38945573","40919591","57978641"]},"ZAl67rb":{"name":"Earth and Space Science","videoIds":["7336963","3713237","3713761","3712190","3779809","39414730"]},"ze5PRD9":{"name":"Economics","videoIds":["57978515","52673893","39386335","80309108","52673959","80309197"]},"GxAzYW1":{"name":"Geography","videoIds":["39382727","39430086","39342430","40919446","79131743","57200758"]},"R0L3j6g":{"name":"History","videoIds":["57948887","84615538","49690616","40911809","51668864","50735582"]},"9DPWnaO":{"name":"Life Science","videoIds":["3713236","7335448","3713268","53044818","50976630","50977361"]},"nKzp19Y":{"name":"Physical Science","videoIds":["3713221","3713695","3713298","38945712","39382930","84609116"]},"7P7n8AR":{"name":"Religion","videoIds":["50800564","38945207","38945680","54093273","50180383","49159058"]}},"14":{"2jrkdLY":{"name":"Arts","videoIds":["38916908","6412547","40919390","40919482","38817643","38817665"]},"g42EN1v":{"name":"Computer Science and Technology","videoIds":["40919434","38917550","50878197","40907190","40907208","39382881"]},"5ROzG7l":{"name":"English Language Arts","videoIds":["39387902","40912179","60062676","40916580","40919438","48234159"]},"ze5J1AE":{"name":"Health","videoIds":["39362404","39430062","51152651","40919426","40919486","48234499"]},"v4qnrzg":{"name":"Math","videoIds":["39361909","51005193","51730147","48715611","39382600","49532478"]},"1dRa6vd":{"name":"Physical Education","videoIds":["40918377","51617459","49533964","42463003","51182678","50652593"]},"xyLWk6w":{"name":"Social and Emotional Learning","videoIds":["40964136","53746175","48172750","48171641","50417923","50418083"]},"DdaRGrq":{"name":"World Languages","videoIds":["40915666","40915325","42486037","40915698","40915345","48040254"]},"yrKZA3y":{"name":"Careers and Technical Education","videoIds":["48172750","52328920","22422792","47488746","51187200","84960065"]},"R0LRx1g":{"name":"Chemical Science","videoIds":["7334569","50876056","52318636","58196676","50837270","47251669"]},"7P7y5bR":{"name":"Civics and Government","videoIds":["50800622","54089250","40919577","81573693","53737737","57978641"]},"g42ENM9":{"name":"Earth and Space Science","videoIds":["39430086","39414730","39414759","50875964","40919857","51264326"]},"LqGREZL":{"name":"Economics","videoIds":["57978515","53737737","51408524","51409809","51779414","48463897"]},"obMmqy5":{"name":"Geography","videoIds":["48234876","81930059","39931606","71810304","47321866","48236170"]},"ZAlrZ11":{"name":"Life Science","videoIds":["48022455","3713236","36554448","9203166","40914938","51863288"]},"obMmqWk":{"name":"Physical Science","videoIds":["3713695","3713298","3713342","3713279","7345732","48233477"]},"5ROzG0o":{"name":"Religion and Ethics","videoIds":["57377971","57355136","57375306","57379661","39904894","78287556"]},"nEN5zAj":{"name":"Science and Engineering Practices","videoIds":["3713221","51724079","50876282","3713711","9203166","40917307"]},"xyLWk4p":{"name":"U.S. History","videoIds":["50168351","53577428","53551209","54090633","49690616","69402165"]},"p3yr17b":{"name":"World History","videoIds":["51415052","51668932","81936739","40913381","50917975","82655889"]}},"15":{"yKZ43dw":{"name":"Arts","videoIds":["38817665","39999270","38808751","40911271","40911232","51581800"]},"p3y82WO":{"name":"Career and Technical Education","videoIds":["52328915","52328920","47488746","47488362","52436904","40917538"]},"KAERnwR":{"name":"Computer Science and Technology","videoIds":["40915847","40916210","51262040","39912587","51250029","58318543"]},"LqGrPwA":{"name":"English Language Arts","videoIds":["40914651","40918236","77544344","51581321","39319556","40912204"]},"8LnamD8":{"name":"Health","videoIds":["51154979","48235793","46984526","39894691","59279809","50996991"]},"Jpyo7W2":{"name":"Math","videoIds":["47595827","51730147","49532658","48715416","48234988","48715584"]},"5RO2ml5":{"name":"Physical Education","videoIds":["49533951","40918509","40918377","51655191","50652593","40908770"]},"ze5d6l9":{"name":"Social and Emotional Learning","videoIds":["48171596","48171968","48171765","50418083","50418241","48235802"]},"KAERnDz":{"name":"World Languages","videoIds":["42486037","48234348","40919186","40919098","40918945","40915898"]},"7P7p05W":{"name":"Business and Economics","videoIds":["51407674","57978515","77649088","51100707","58123778","51407769"]},"laYDvoG":{"name":"Chemistry","videoIds":["48233332","40916556","52318636","58196676","52948049","52938235"]},"LqGrPEj":{"name":"Civics and Government","videoIds":["50800622","50871477","40919577","81574026","77829152","80399681"]},"wLj3A04":{"name":"Earth and Space Science","videoIds":["39927128","40919857","39926995","40915159","51292616","51264452"]},"4GldpJG":{"name":"Geography","videoIds":["51264452","40914544","48449463","81930059","51182016","51240873"]},"dleKgE2":{"name":"Life Sciences","videoIds":["40909818","40910549","50834178","40919211","40908887","50834330"]},"2jre2Oe":{"name":"Physics","videoIds":["6762513","40913948","85029481","81269747","82339649","82340162"]},"W12y493":{"name":"Psychology","videoIds":["40908799","81539973","40908929","81539825","77911442","81540071"]},"yKZ432M":{"name":"Religion and Philosophy","videoIds":["57377971","57375306","57379661","57379674","39904894","78287556"]},"69xJOgr":{"name":"Science and Engineering Practices","videoIds":["50876282","9203166","40917307","57355599","39592894","50962824"]},"jl7Elwx":{"name":"Sociology","videoIds":["81389320","81388819","77911225","47329600","47329600","36508642"]},"Ax2KeMo":{"name":"U.S. History","videoIds":["53487293","50168351","77827742","50793077","50168007","51168977"]},"laYDvwm":{"name":"World History","videoIds":["78902422","39394547","52993554","50917975","51414677","38907954"]}},"16":{"KAEY5GK":{"name":"Art and Design","videoIds":["8924670","49585075","38370221","47484152","54095899","32102465"]},"6wa2YwO":{"name":"Citizenship","videoIds":["57355388","52601783","48522943","22372630","53108585","41992024"]},"R0LK746":{"name":"Computing","videoIds":["26617482","38132678","26619390","36895952","41565288","36895909"]},"9DPkNz6":{"name":"Design and Technology","videoIds":["47529961","4108924","3711985","51668853","49834298","37137391"]},"2jDnan9":{"name":"Drama","videoIds":["51240522","230268","37018426","41939112","51582282","46916103"]},"E06dg2Z":{"name":"English","videoIds":["41906926","49581979","61250","52429859","32970218","41938064"]},"8LnO2Rd":{"name":"Geography","videoIds":["67225999","3713237","4402476","50800706","51666994","48105073"]},"bbJ9Ayb":{"name":"History","videoIds":["52436848","8139170","8733988","48666851","51668932","51731292"]},"Dda4KYL":{"name":"Languages","videoIds":["7486323","36991396","5449905","40919815","48278510","50466413"]},"Ax2Jyoa":{"name":"Mathematics","videoIds":["3711988","42637723","6682722","58026826","13078019","4991116"]},"bbJ9Ap0":{"name":"Music","videoIds":["50466237","6412547","49535315","49808227","30324910","64333"]},"NqgMRWy":{"name":"Physical Education","videoIds":["38132665","39294835","48118056","57372274","53108623","47431467"]},"Yvm5eyp":{"name":"PSHE","videoIds":["7593354","4169937","9900606","37428010","50180637","37857897"]},"8LnO2Je":{"name":"Religious Education","videoIds":["8739794","8733823","8734696","39428437","49159932","49159889"]},"3kmoJ72":{"name":"Science","videoIds":["3711985","36554684","4108673","3712066","7310225","48022765"]}},"18":{"yKP9gOD":{"name":"Civics and Citizenship","videoIds":["7735265","7735497","50679052","51452628","13106949","13107690"]},"7P6JOYb":{"name":"Economics and Business Studies","videoIds":["53428624","37455700","57355319","53428628","43961148","57966130"]},"j0jRJ1Z":{"name":"English","videoIds":["8416974","8417845","3712691","32127566","6673418","52675027"]},"nKDmYEl":{"name":"Geography","videoIds":["58600977","6980722","34591272","4402447","34597058","51437590"]},"WAe601Z":{"name":"History","videoIds":["3713735","6430651","3716829","43772092","51391809","56980377"]},"v4893Yy":{"name":"Languages","videoIds":["5449905","32345978","39623583","6820509","39255442","39254760"]},"nKDmYkl":{"name":"Mathematics","videoIds":["3713828","10749459","32102562","6689791","3713607","48278618"]},"0OeG09l":{"name":"Religion","videoIds":["8740724","8733239","8739706","8734693","8733792","33320133"]},"KAmPJqP":{"name":"Technologies","videoIds":["26619390","4131606","38132678","50720784","57230386","51181861"]},"MgOve7k":{"name":"The Arts","videoIds":["50466237","6412334","8100020","3716220","49808227","32787298"]},"NqkJ495":{"name":"Biological Sciences","videoIds":["3713221","3713363","3711972","5321193","45248896","51271242"]},"NqkJ4xy":{"name":"Chemical Sciences","videoIds":["3712073","48022232","3712074","50800545","50720770","50962883"]},"KAmPJOL":{"name":"Earth and Space Sciences","videoIds":["3716182","34591272","34590945","6683633","6683711","3713739"]},"p0Nm2AY":{"name":"Personal Development and Health","videoIds":["23645932","7593792","7593365","36875667","7587057","9900524"]},"D12Mz8e":{"name":"Physical Education","videoIds":["81770378","38132665","58025996","82328353","47219168","53093878"]},"Oz83dm5":{"name":"Physical Sciences","videoIds":["36554689","3713221","3713695","3713298","84609116","36554677"]}},"24":{"qdarDYp":{"name":"Business and Economics","videoIds":["51623323","47366972","37709668","37709732","3716149","8973838"]},"eKnGDa0":{"name":"English","videoIds":["36191688","33204878","36395402","5758602","35997069","23851791"]},"Yv5dzw5":{"name":"Expressive Arts","videoIds":["3716191","3716247","48134757","32998073","3716167","35601583"]},"ra6m0d1":{"name":"Geography","videoIds":["74135484","9375166","5711759","16206702","3922246","48476601"]},"E0dZqyR":{"name":"History","videoIds":["3926454","9978142","4684604","8372779","3716183","4648523"]},"9DkAaKy":{"name":"Languages","videoIds":["5449905","42463035","6820509","42209168","47076421","5455635"]},"8LOYpl0":{"name":"Numeracy and Mathematics","videoIds":["3716176","3715070","51730710","3715047","4553884","48091307"]},"m0d5D7r":{"name":"Physical Education","videoIds":["7609298","3714120","3714279","49160029","3714263","51667687"]},"g4WgD5l":{"name":"PSE","videoIds":["59279784","3716135","53259069","53259054","983611","16132648"]},"eKnGDdP":{"name":"Religious, Moral and Philosophical Education","videoIds":["3716229","3716171","39379918","33305783","3716175","3716237"]},"2jDd3kx":{"name":"Technologies","videoIds":["50917033","58307508","3716153","74135484","48083353","35004434"]},"4GRN4Eq":{"name":"Biology","videoIds":["3714819","3716182","5803343","3716265","4683666","3779793"]},"6wma2KO":{"name":"Career Education and Skills for Work","videoIds":["8191834","8194999","8686941","8696292","8687327","9312222"]},"LqAlv96":{"name":"Chemistry","videoIds":["3713221","3717296","3716700","3717051","3716289","7334569"]},"8LOYpZR":{"name":"Computing and ICT","videoIds":["3716153","26619390","58307508","26618525","48490433","51731678"]},"3b9r3ka":{"name":"Law","videoIds":["3714675","22372859","5270400","36503787","22220755","57828397"]},"Gx5kpRO":{"name":"Media Studies","videoIds":["3716135","3716275","47244475","3716274","47244664","47244504"]},"6w5zqYO":{"name":"Modern Studies","videoIds":["3716292","5803343","3716190","3713994","3713237","47366972"]},"g78nMPW":{"name":"Physics","videoIds":["6746382","9831360","3716170","6812332","34941552","6762513"]},"3ko2eAw":{"name":"Psychology","videoIds":["6590889","3714392","3714377","39438648","3717555","6590951"]}},"47":{"LqKNnNw":{"name":"Business and Economics","videoIds":["51623323","47366972","37709668","37709732","3716149","8973838"]},"7PgZvEA":{"name":"Careers","videoIds":["9315247","9312222","47104083","3715120","3714944","47159767"]},"la7zdgw":{"name":"English","videoIds":["53466594","77444242","17989642","30340068","24419904","33204878"]},"wLKkMwD":{"name":"Expressive Arts","videoIds":["3716191","3716247","48134757","32998073","3716167","35601583"]},"wLKkMEp":{"name":"Geography","videoIds":["74135484","22687577","5711759","16206702","3922246","19105359"]},"OzZ6vg4":{"name":"History","videoIds":["3926454","9978142","4684604","8372779","3716183","4648523"]},"YvJby7P":{"name":"Mathematics","videoIds":["3716176","3715070","51730710","3715047","4553884","34497285"]},"v41jLmK":{"name":"Modern Foreign Languages","videoIds":["5449905","42463035","6820509","42209168","47076421","5455635"]},"aPG3mRe":{"name":"Physical Education","videoIds":["7609298","3714120","3714279","49160029","3714263","51667687"]},"Gxp3jze":{"name":"PSHE","videoIds":["59279784","3716135","53259069","53259054","983611","16132648"]},"qd2K0qY":{"name":"Religion","videoIds":["3716229","3716171","39379918","33305783","3716175","3716237"]},"nKvyqe1":{"name":"Technology","videoIds":["50917033","58307508","3716153","74135484","48083353","35004434"]},"la7z0eL":{"name":"Biology","videoIds":["3714819","3716182","5803343","4683666","3779793","3716169"]},"wLKkGZY":{"name":"Chemistry","videoIds":["5795485","3717296","3716700","6737003","6737780","9030741"]},"r4YknOP":{"name":"Citizenship","videoIds":["5803343","3716190","3716293","79799081","3716210","79620772"]},"4GzZbpL":{"name":"Computing and ICT","videoIds":["58308441","58307508","48490433","48490093","48611300","59323845"]},"yKjEMbw":{"name":"Law","videoIds":["22372859","54577039","79799081","79620772","5270400","79799099"]},"6wGZWer":{"name":"Media Studies","videoIds":["33204878","47283314","3716275","47244475","3716274","47283102"]},"YvJbwpe":{"name":"Physics","videoIds":["6746382","9831360","6812332","34941552","6762513","37711980"]},"2jak8l9":{"name":"Psychology","videoIds":["38169050","3717591","57771705","6599207","3717590","57771703"]},"8ymN4z8":{"name":"Sociology","videoIds":["6590951","15923455","6599693","3714530","36503787","36508642"]}},"81":{"K6nGJr9":{"name":"Arts and Design","videoIds":["32998073","10916108","3714100","32102569","67277770","3714465"]},"2m2bo9d":{"name":"Business and Marketing","videoIds":["18654895","8973838","12955878","3715697","47583323","22563804"]},"AOe31wj":{"name":"Careers and Work","videoIds":["8194999","8973940","3715805","38132141","45692655","52874679"]},"xA28NqR":{"name":"Community and Youth Services","videoIds":["58155906","3714331","3714510","4144817","43307103","80005094"]},"vY2odPv":{"name":"Education and Training","videoIds":["3715013","49093031","3714891","24103433","3714590","51181808"]},"Jj7AgRb":{"name":"Events, Hospitality, Retail and Tourism","videoIds":["3713992","34061952","52183441","35409925","3716333","77936874"]},"nEeNnbE":{"name":"Foundation Skills and Personal Development","videoIds":["33174549","42500607","9264932","5952919","22713942","48155206"]},"m6eW7Nr":{"name":"Health and Healthcare","videoIds":["3714892","9375166","3714611","3714331","4144817","3714592"]},"kZWnqG6":{"name":"Information and Communications Technology","videoIds":["3716153","7897881","10584560","7869408","58308441","58307508"]},"xA28NgY":{"name":"Mathematics","videoIds":["26063133","3715838","3715050","23853803","23848364","25658497"]},"OqMG72A":{"name":"Science","videoIds":["38041517","38043803","22232723","6812332","3714819","3714462"]},"8ymN5wd":{"name":"Services, Trades and Engineering","videoIds":["52874679","39319138","26063133","20290415","3715837","3715359"]},"Jj7Agyy":{"name":"Society and Culture","videoIds":["18569471","3714314","3714937","49306628","3714486","45334884"]}},"82":{"vY2o59g":{"name":"Arts and Design","videoIds":["32102504","12598560","32998073","83017577","23740459","3716167"]},"Jj7AK52":{"name":"Business and Finance","videoIds":["50247134","8973838","18654895","12598127","71418012","51623323"]},"l5vPyNm":{"name":"Careers and Work","videoIds":["9312222","8191834","45664204","8973940","47579402","52251343"]},"r42NqxG":{"name":"Community and Youth Services","videoIds":["53259063","16132648","47207659","3714506","63984885","57771705"]},"l5vPybd":{"name":"Computing, Technology and Digital","videoIds":["33204878","3716153","35046405","10345707","58308441","48611300"]},"odelM2D":{"name":"Construction, Trades and Services","videoIds":["26063133","48689684","10565525","4146135","3715345","23988515"]},"dqgkNyd":{"name":"Education and Training","videoIds":["3715013","9080279","3714506","3714892","57771705","42500607"]},"7m0271k":{"name":"Engineering, Manufacturing and Electrotechnology","videoIds":["58308441","39319138","26066739","20290415","20306169","3716293"]},"vY2oqWG":{"name":"English Literature and Language","videoIds":["33204878","31993108","9227475","49066628","60059964","5790748"]},"Eol2zjR":{"name":"Functional Skills and Personal Development","videoIds":["9312222","9316945","42515350","5668137","9560804","5952919"]},"4rp97l9":{"name":"Health and Care","videoIds":["10896257","58127362","59279784","49948105","45818245","47198490"]},"yr33MLG":{"name":"Hospitality and Food","videoIds":["22733300","3714027","52183441","23853803","35409925","35410496"]},"G1Ea5n5":{"name":"Languages","videoIds":["9227475","45258243","82093433","82093931","60060323","82092337"]},"3b9N8dE":{"name":"Mathematics","videoIds":["26158674","26444801","48155206","52415295","50288809","51005229"]},"4rppnP7":{"name":"Retail and Sales","videoIds":["7181915","22552850","3715808","22710596","7183122","3716322"]},"RbG4Dm1":{"name":"Science","videoIds":["4683666","45819014","26686718","57887823","13023269","6812332"]},"W19xRxz":{"name":"Social Sciences","videoIds":["47575902","3715869","36220305","5270400","50269716","3714426"]},"8ymNvoR":{"name":"Sport and Leisure","videoIds":["3714261","7609298","57736364","32051772","3714278","3714126"]},"l5vPyM3":{"name":"Travel and Tourism","videoIds":["77720073","3716190","3713902","3716136","78706124","39406754"]}},"96":{"jlvNeWR":{"name":"Continuity and Change","videoIds":["86615390","3713876","3713847","47221954","54089199","54093263"]},"g7nMm5W":{"name":"English","videoIds":["80158955","81989077","83846323","9227475","3716165","41906817"]},"xAz6MEr":{"name":"Health","videoIds":["84954526","81072555","3713123","47177036","47106673","53093908"]},"ek8mbq8":{"name":"Identity, Culture and Organisation","videoIds":["85058309","33204878","16574869","42463035","47303205","3716220"]},"xAz6MMz":{"name":"Learning Languages","videoIds":["42463035","6820509","36689369","37642890","6810760","47076421"]},"zMgokW2":{"name":"Living World","videoIds":["84615984","3713221","3713363","45248896","7735364","51271242"]},"3br3wk2":{"name":"Material World","videoIds":["3713221","7334569","50877364","64098768","41939159","50877778"]},"PGlOJd7":{"name":"Mathematics and Statistics","videoIds":["80553902","25923580","43936635","48278518","42636988","48155955"]},"p0PjPqO":{"name":"Physical Education","videoIds":["84301769","53093878","38133887","51731303","49580107","50652578"]},"Nzm0ZmN":{"name":"Physical World","videoIds":["87005330","3713297","3713298","48022996","3713279","48117006"]},"l53E1xJ":{"name":"Place and Environment","videoIds":["81074045","3716795","3713237","51474669","51444188","38071125"]},"vYz6PzG":{"name":"Planet Earth and Beyond","videoIds":["84733189","7336963","3713212","47303205","48117006","50800584"]},"odnWyjD":{"name":"Religion and Philosophy","videoIds":["16574869","3715985","16630757","16588366","16611019","41056701"]},"5b4Aa90":{"name":"Study and Research Skills","videoIds":["83894192","83894453","8985721","47241826","47146893","51724079"]},"jlvNy46":{"name":"Technology","videoIds":["80734963","26619390","26617482","3716155","10584560","7391744"]},"zMgoGJR":{"name":"The Arts","videoIds":["3716727","32998073","3713842","3716220","49582171","38133111"]},"2mgJG06":{"name":"The Economic World","videoIds":["80309108","80309197","22372745","53428624","35629137","52197899"]}},"97":{"ZJv1MwP":{"name":"Agricultural and Horticultural Science","videoIds":["3714041","3714045","58745804","35226384","35396244","35312243"]},"2mgJOwe":{"name":"Biology","videoIds":["86393409","5803343","4683666","3779793","38041517","26340757"]},"8yRAlM5":{"name":"Business Studies","videoIds":["8191834","18654895","8973838","8973352","45664204","12955878"]},"JjaxboE":{"name":"Chemistry","videoIds":["86392392","3717296","45727359","57887823","22232723","7889149"]},"zMgolY5":{"name":"Earth and Space Science","videoIds":["86393854","80477860","3716170","7336963","3715871","23614105"]},"2mgJOn6":{"name":"Economics","videoIds":["3716292","47366972","3716149","42604877","50217751","50247062"]},"l53Eo7W":{"name":"English","videoIds":["82359369","3716185","5596313","3716233","9560804","23851791"]},"K6aqKL9":{"name":"Geography","videoIds":["80484980","84539107","86393854","5803343","3716200","3922246"]},"69zDgGr":{"name":"Health Education","videoIds":["83101516","3714819","58673657","42500607","3716135","3713123"]},"vYz6rr4":{"name":"History","videoIds":["81504973","3716774","3926454","3716189","4984056","18569471"]},"ek8mdr8":{"name":"Learning Languages","videoIds":["84613432","42463035","5449905","6820509","47075377","6810442"]},"PGlOK4n":{"name":"Legal Studies","videoIds":["80660282","81504973","81504911","47303205","78731895","53708941"]},"W1Epqgz":{"name":"Mathematics and Statistics","videoIds":["79705668","86387151","3715870","3714976","26066739","26158674"]},"p0Pvw1Y":{"name":"Media Studies","videoIds":["84603846","33204878","3716529","3937998","60034238","3716275"]},"69zDexn":{"name":"Physical Education","videoIds":["79061490","84301775","79062447","3714278","3714261","57736364"]},"vYz6wzo":{"name":"Physics","videoIds":["86392981","86014106","6746382","6747369","6812332","11746875"]},"kZJ8w49":{"name":"Psychology","videoIds":["42500607","3714892","42500587","42500472","39438648","16132408"]},"3br3vDa":{"name":"Religion and Philosophy","videoIds":["16574869","3716175","16630757","16588366","3715102","41056701"]},"g7nML2K":{"name":"Social Studies","videoIds":["80660282","7707302","5216877","3716210","22372922","67277770"]},"vYz6wdN":{"name":"Sociology","videoIds":["6590951","57771705","6605596","15923455","57771703","36503891"]},"0wzWnml":{"name":"Study and Research Skills","videoIds":["83894192","85464744","8985721","5952919","77911106","80399453"]},"K6aqWxL":{"name":"Technology","videoIds":["83017625","3714027","3716153","26617069","7897881","10550689"]},"agN12dl":{"name":"The Arts","videoIds":["32998073","10916108","3716167","3716192","3716206","3716220"]},"wNzd0gG":{"name":"Vocational Education and Careers","videoIds":["85795501","8191834","16168801","16237850","45664204","47241826"]}},"100":{"2mgElEp":{"name":"History","videoIds":["88088300","40919362","54092789","40911809","54089199","54093263"]},"5b4Mnlm":{"name":"Mathematics","videoIds":["75167031","39439291","39382723","49532343","42637715","48236233"]},"7mwMWMe":{"name":"Geography","videoIds":["81074045","53252413","51733325","53177091","53028173","50876654"]},"8yRDvle":{"name":"Languages","videoIds":["42486037","40915698","40919098","40919137","40915682","48040254"]},"91mbJbo":{"name":"English Language Arts","videoIds":["80705755","78270152","82622122","39382939","40907483","39342566"]},"MYm3qwO":{"name":"Civics","videoIds":["88088749","57355313","48522947","39382748","40917715","58983274"]},"Y6Wn7ne":{"name":"Life Science","videoIds":["84615984","3713221","40907311","45248852","39439121","53044818"]},"ZJvPnPq":{"name":"Earth and Space Science","videoIds":["50877389","53044878","86685687","49858639","41245074","50977928"]},"agNd4Ee":{"name":"Celebrations, Commemorations and Festivals","videoIds":["83926567","38945207","57252301","38945379","40963423","78840166"]},"bmE2dlb":{"name":"Health and Life Skills","videoIds":["84954526","81072555","39362080","40964136","48171596","53193501"]},"g7nY6Yz":{"name":"Technology","videoIds":["81828439","38918309","38917189","40916260","3712674","38916908"]},"m68g1lk":{"name":"Physical Education","videoIds":["51618352","53193558","40919502","51731303","49858516","50652578"]},"nE7gGLp":{"name":"Religion and Philosophy","videoIds":["39397073","39382748","39396705","39904894","39397031","40963423"]},"q6Wj5vp":{"name":"Environmental Awareness","videoIds":["47309542","3713237","39414658","3713351","57368425","57355132"]},"r4vOqOE":{"name":"Business and Economics","videoIds":["80309108","80309197","39386335","57311898","80309244","57311765"]},"vYzg5Ov":{"name":"Arts","videoIds":["38817665","6409550","40911787","49858602","40919482","88823532"]},"wNzRD0R":{"name":"Physical Science","videoIds":["3713221","7334569","50877364","86969721","39382987","3713298"]}},"101":{"69zjaoO":{"name":"Arts","videoIds":["38817665","40912626","40910511","49162675","40911516","38917210"]},"8yRDY52":{"name":"Physical Science","videoIds":["87100535","47251669","58196676","39414626","40909614","60054130"]},"91mbAKy":{"name":"Physical Education","videoIds":["50400399","81680596","51619736","51182678","50652593","79072709"]},"AOWlblz":{"name":"Languages","videoIds":["48118913","40915325","40915911","48039998","42462913","40918945"]},"EorMZOj":{"name":"Earth and Space Science","videoIds":["39430033","40919857","39383127","85312765","39383083","50875823"]},"Nzmekew":{"name":"History","videoIds":["88542175","48232856","77574545","40910923","51668932","57948814"]},"PGld7n7":{"name":"Business and Economics","videoIds":["85312852","80309197","57311679","51187193","81957429","51240483"]},"agNdzE0":{"name":"Geography","videoIds":["53177091","39438561","39430086","51666988","39386547","53029472"]},"bmE2MG2":{"name":"Life Science","videoIds":["40914938","81558589","45248852","38897178","40914462","50977879"]},"ek8aG90":{"name":"English Language Arts","videoIds":["40916665","40912179","81209854","39387902","39382995","80705755"]},"kZJELma":{"name":"Applied Design and Technology","videoIds":["39382881","60065352","38917189","40910205","40916210","58318543"]},"r4vOmjg":{"name":"Mathematics","videoIds":["80066288","85341394","81957844","47595831","39414603","39362111"]},"vYzg8ON":{"name":"Religion and Ethics","videoIds":["40910786","39396990","38945466","39397073","78284763","57232390"]},"yrz8P0M":{"name":"Health and Life Skills","videoIds":["67342611","51248822","39386641","53193520","39388233","39342046"]}},"102":{"3br6o4E":{"name":"Mathematics","videoIds":["51005058","40918153","85344227","8179764","47582815","39606984"]},"7mwMldq":{"name":"Languages","videoIds":["40919098","42486037","40915325","40915698","40919186","40915666"]},"8yRDO7R":{"name":"Arts","videoIds":["38817858","50900164","40910511","40911271","40911516","92294930"]},"AOWlJKa":{"name":"Physics","videoIds":["39389600","81988952","48233359","82339471","39905652","39206557"]},"AOWlJda":{"name":"Computer Science and Technology","videoIds":["90777399","92296581","92296719","39912587","39916719","48611309"]},"D1El4qY":{"name":"Geography","videoIds":["80484980","84539107","85312765","39928299","49059625","40914544"]},"G1a7NY5":{"name":"Earth and Space Science","videoIds":["85704464","80477860","40910639","39382772","40909420","48234912"]},"G1a7NZ5":{"name":"Psychology","videoIds":["46984526","40908986","46984506","46984391","81539945","39894912"]},"NzmeM75":{"name":"Physical Education","videoIds":["79074486","84763821","79090892","40908728","40908519","57787705"]},"Oqm4yrE":{"name":"Sociology","videoIds":["81389125","58319773","85736766","81389321","58319767","36503891"]},"PGld1be":{"name":"Chemistry","videoIds":["58175166","50837270","47251669","58196676","39604283","39913552"]},"ek8anyD":{"name":"History","videoIds":["81573693","40913499","40914581","40911166","42366232","40917249"]},"jlvg3bm":{"name":"Religion and Philosophy","videoIds":["39397073","40910811","39396705","39904894","48449193","82101988"]},"l53g4Dd":{"name":"Health and Life Skills","videoIds":["86757737","40908887","59279809","46984526","40910072","53193525"]},"q6Wja76":{"name":"English Language Arts","videoIds":["80888991","40915446","40912179","40916665","40918214","84603916"]},"vYzgMZy":{"name":"Business and Economics","videoIds":["39312899","40916491","40916473","40913104","50268372","50269963"]},"vYzl6M5":{"name":"Careers","videoIds":["39934601","40916383","52436904","85513944","84960065","47488362"]},"vYzrzRg":{"name":"Applied Design and Technology","videoIds":["81825501","39389313","40916876","71811318","40917289","52258967"]},"wNzRy3R":{"name":"Biology","videoIds":["52588338","39928299","40914938","40914462","40919211","39570956"]}}}'),A={CreatePlaylist:function(e){return!(e.hasPlaylist||e.preferredPresentation&&!M[e.preferredPresentation.id])}},B=i.T.encloseNamespace("onboarding.constants"),D={"welcome-video":{id:"welcome-video",getPageTitle:function(){return B("welcomeVideoPageTitle")},predicate:function(e){return!!P.shouldRedirectToOnboarding(e.masterUser,e.customer,e.hasPermissions,e.presentations)&&e.instanceRegion===S.b.US},setting:C.E.HasCompletedOnboardingStepWelcomeVideo,analyticsLocation:a.LZ.OnboardingWelcomeVideoScreen,includeInProgressBar:function(){return!1},getWidgetHeading:function(){return B("selectRoleHeading")},getWidgetDescription:function(){return B("selectRoleMessage")}},"select-role":{id:"select-role",getPageTitle:function(){return B("selectRolePageTitle")},predicate:function(e){var t,n;return!P.hasNonBdmTrial(e.hasPermissions)||!e.jobTitle||!!(null===(n=null===(t=e.userSettings)||void 0===t?void 0:t[C.E.HasCompletedOnboardingStepSelectRole])||void 0===n?void 0:n.value)},setting:C.E.HasCompletedOnboardingStepSelectRole,analyticsLocation:a.LZ.OnboardingSelectRoleScreen,includeInProgressBar:function(){return!0},getWidgetHeading:function(){return B("selectRoleHeading")},getWidgetDescription:function(){return B("selectRoleMessage")}},"usage-intention":{id:"usage-intention",getPageTitle:function(){return B("usageIntentionPageTitle")},predicate:function(){return!0},setting:C.E.HasCompletedOnboardingStepUsageIntention,analyticsLocation:a.LZ.OnboardingUsageIntentionScreen,includeInProgressBar:function(){return!0},getWidgetHeading:function(){return B("usageIntentionHeading")},getWidgetDescription:function(){return B("usageIntentionMessage")}},"subjects-summary":{id:"subjects-summary",getPageTitle:function(){return B("subjectsSummaryPageTitle")},predicate:function(e){var t,n,r,o,i,a,u;return!!(null===(t=e.preferredSubjects)||void 0===t?void 0:t.length)&&!((null===(r=null===(n=e.userSettings)||void 0===n?void 0:n[C.E.HasCompletedOnboardingStepSubjects])||void 0===r?void 0:r.value)||(null===(i=null===(o=e.userSettings)||void 0===o?void 0:o[C.E.HasCompletedOnboardingStepSelectCurriculum])||void 0===i?void 0:i.value)||(null===(u=null===(a=e.userSettings)||void 0===a?void 0:a[C.E.HasCompletedOnboardingStepSchoolLevel])||void 0===u?void 0:u.value))},setting:C.E.HasCompletedOnboardingStepSubjectsSummary,analyticsLocation:a.LZ.OnboardingSubjectsSummaryScreen,includeInProgressBar:function(){return!0},getWidgetHeading:function(){return B("subjectsHeading")},getWidgetDescription:function(){return B("subjectsMessage")},branches:["school-level","subjects","select-curriculum"]},"school-level":{id:"school-level",getPageTitle:function(){return B("schoolLevelPageTitle")},predicate:function(e){var t,n;return!(D["subjects-summary"].predicate(e)||(null===(t=e.presentations)||void 0===t?void 0:t.length)<2||(null===(n=e.presentations)||void 0===n?void 0:n.some(function(e){return x.getMappedPresentationLevel(e.learningLevel)===O.Level_4})))},setting:C.E.HasCompletedOnboardingStepSchoolLevel,analyticsLocation:a.LZ.OnboardingSchoolLevelScreen,includeInProgressBar:function(e){return!D["subjects-summary"].predicate(e)},getWidgetHeading:function(e){return B(e?"schoolLevelHeadingKdm":"schoolLevelHeading")},getWidgetDescription:function(e){return B(e?"schoolLevelMessageKdm":"schoolLevelMessage")}},"select-curriculum":{id:"select-curriculum",getPageTitle:function(){return B("selectCurriculumPageTitle")},predicate:function(e){var t;return!(D["subjects-summary"].predicate(e)||(null===(t=e.curriculums)||void 0===t?void 0:t.length)<2)},setting:C.E.HasCompletedOnboardingStepSelectCurriculum,analyticsLocation:a.LZ.OnboardingSelectCurriculumScreen,includeInProgressBar:function(e){return!D["subjects-summary"].predicate(e)},getWidgetHeading:function(){return B("selectCurriculumHeading")},getWidgetDescription:function(){return B("selectCurriculumMessage")}},subjects:{id:"subjects",getPageTitle:function(){return B("subjectsPageTitle")},predicate:function(e){return!D["subjects-summary"].predicate(e)},setting:C.E.HasCompletedOnboardingStepSubjects,analyticsLocation:a.LZ.OnboardingSubjectsScreen,includeInProgressBar:function(e){return!D["subjects-summary"].predicate(e)},getWidgetHeading:function(e){return B(e?"subjectsHeadingKdm":"subjectsHeading")},getWidgetDescription:function(){return B("subjectsMessage")}},"select-videos":{id:"select-videos",getPageTitle:function(){return B("selectVideosPageTitle")},predicate:A.CreatePlaylist,setting:C.E.HasCompletedOnboardingStepSelectVideos,analyticsLocation:a.LZ.OnboardingSelectVideosScreen,includeInProgressBar:function(){return!0},getWidgetHeading:function(){return B("selectVideosHeading")},getWidgetDescription:function(e){return B(e?"selectVideosMessageKdm":"selectVideosMessage")}},"create-playlist":{id:"create-playlist",getPageTitle:function(){return B("createPlaylistPageTitle")},predicate:A.CreatePlaylist,setting:C.E.HasCompletedOnboardingStepCreatePlaylist,analyticsLocation:a.LZ.OnboardingCreatePlaylistScreen,includeInProgressBar:function(){return!0},getWidgetHeading:function(){return B("createPlaylistHeading")},getWidgetDescription:function(){return B("createPlaylistMessage")}}},N=n(40484),z=n(67391),Z=n(33125),F=(n(1268),n(46237),{onSelectCuratedObject:function(e,t){var n=Object.assign(Object.assign({},t.values.data),{objectIds:r.m.addOrRemoveImmutable(t.values.data.objectIds||[],e.id)});t.setFieldValue("data",n),t.setTouched(Object.assign(Object.assign({},t.touched),{data:{objectIds:!0}}))},onRemoveCuratedObject:function(e,t){var n=Object.assign(Object.assign({},t.values.data),{objectIds:t.values.data.objectIds.filter(function(t){return t!==e})});t.setFieldValue("data",n)},getDashboardTarget:function(e){return e.targetType===I.ku.Discover?"discover:presentation:".concat(e.presentationId):e.targetType===I.ku.Classification?"classification:".concat(e.classificationId):e.targetType===I.ku.ClassificationDirectory?"classification:".concat(e.classificationId,":directory"):e.targetType===I.ku.ClassificationCurriculum?"classification:".concat(e.classificationId,":curriculum"):e.targetType===I.ku.MoviesAndTv?"moviesAndTv:presentation:".concat(e.presentationId):e.targetType===I.ku.Company?"company:".concat(e.companyId,":presentation:").concat(e.presentationId):null},getUnknownDashboardTarget:function(e){var t=e.presentationId,n=e.companyId,r=e.targetType,o=e.classificationId;return r===I.ku.Discover?F.getDashboardTarget({targetType:I.ku.Discover,presentationId:t}):r===I.ku.MoviesAndTv?F.getDashboardTarget({targetType:I.ku.MoviesAndTv,presentationId:t}):r===I.ku.Company?F.getDashboardTarget({targetType:I.ku.Company,presentationId:t,companyId:n}):r===I.ku.Classification?F.getDashboardTarget({targetType:I.ku.Classification,classificationId:o}):r===I.ku.ClassificationDirectory?F.getDashboardTarget({targetType:I.ku.ClassificationDirectory,classificationId:o}):r===I.ku.ClassificationCurriculum?F.getDashboardTarget({targetType:I.ku.ClassificationCurriculum,classificationId:o}):void 0},getDashboardTargetInfo:function(e){var t,n=F.getDashboardTargetType(e),r=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.split(":");return n===I.ku.Discover?{targetType:I.ku.Discover,presentationId:r[2]}:n===I.ku.Classification?{targetType:I.ku.Classification,classificationId:r[1]}:n===I.ku.ClassificationDirectory?{targetType:I.ku.ClassificationDirectory,classificationId:r[1]}:n===I.ku.ClassificationCurriculum?{targetType:I.ku.ClassificationCurriculum,classificationId:r[1]}:n===I.ku.MoviesAndTv?{targetType:I.ku.MoviesAndTv,presentationId:r[2]}:n===I.ku.Company?{targetType:I.ku.Company,companyId:r[1],presentationId:r[3]}:null},getDashboardTargetType:function(e){return(null==e?void 0:e.target)?e.target.startsWith("discover")?I.ku.Discover:e.target.startsWith("classification")?e.target.endsWith("directory")?I.ku.ClassificationDirectory:e.target.endsWith("curriculum")?I.ku.ClassificationCurriculum:I.ku.Classification:e.target.startsWith("moviesAndTv")?I.ku.MoviesAndTv:e.target.startsWith("company")?I.ku.Company:null:null},isType:function(e,t){return F.getDashboardTargetType(e)===t},isCuratedDashboard:function(e){var t=e,n=F.getDashboardTargetType(t);return n===I.ku.Discover||n===I.ku.Classification||n===I.ku.ClassificationDirectory||n===I.ku.ClassificationCurriculum||n===I.ku.MoviesAndTv||n===I.ku.Company},getLatestReleasedTimeRange:function(){var e=new Date;return{from:o.O.format(o.O.endOf(o.O.subtract(e,2,"month"),"day"),"YYYY-MM-DD"),to:o.O.format(o.O.endOf(e,"day"),"YYYY-MM-DD")}},getWidgetParams:function(e,t,n,r,o){var i={};return r&&(i.audienceId=r),e===Z.z.ClassificationCurriculumMedia&&(i.curriculumPresentationId=o),Object.assign(Object.assign({},i),U[e].getCustomParams(t,n))},isSystemGeneratedDashboard:function(e){var t=new Set([Z.z.ClassificationFeaturedVideo,Z.z.ClassificationPinnedVideos,Z.z.ClassificationPlaylists,Z.z.ClassificationSeries]);return null==e?void 0:e.some(function(e){return t.has(e.widgetId)})},isClassificationDashboard:function(e){return[I.ku.Classification,I.ku.ClassificationDirectory,I.ku.ClassificationCurriculum].includes(null==e?void 0:e.targetType)}});function V(e){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(e)}function G(e,t,n){return(t=function(e){var t=function(e){if("object"!=V(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=V(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==V(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var U=(G(G(G(G(G(G(G(G(G(G(T={},Z.z.CuratedMedia,{getCustomParams:function(){return{}}}),Z.z.PlaylistMedia,{getCustomParams:function(){return{}}}),Z.z.SeriesMedia,{getCustomParams:function(e){switch(e){case z.f.ThumbnailFixedListMediaLarge:return{limit:2};case z.f.ThumbnailHeroMedia:case z.f.ThumbnailFeaturedMedia:return{limit:1};default:return{limit:12}}},getCollectionAppLink:function(e,t){var n;return null===(n=null==e?void 0:e.series)||void 0===n?void 0:n.call(e,r.m.first(t))}}),Z.z.ClassificationMedia,{getCustomParams:function(){return{}}}),Z.z.LatestReleasedVideos,{getCustomParams:function(){return F.getLatestReleasedTimeRange()}}),Z.z.ContinueWatching,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){var t;return null===(t=null==e?void 0:e.watchHistory)||void 0===t?void 0:t.call(e)}}),Z.z.CompanyLatestReleasedVideo,{getCustomParams:function(){return{}}}),Z.z.CompanyVideos,{getCustomParams:function(){return{}}}),Z.z.ClassificationLatestReleasedVideo,{getCustomParams:function(){return{}}}),Z.z.ClassificationLatestReleasedVideosV2,{getCustomParams:function(){return{limit:12}},minContent:4}),G(G(G(G(G(G(G(G(G(G(T,Z.z.SeasonalClassificationMedia,{getCustomParams:function(){return{limit:12}},minContent:4}),Z.z.CompanyClassificationVideos,{getCustomParams:function(){return{}},minContent:4}),Z.z.TrendingClassificationsMedia,{getCustomParams:function(){return{limit:12}},minContent:4}),Z.z.CuratedClassifications,{getCustomParams:function(){return{}}}),Z.z.TrendingClassifications,{getCustomParams:function(){return{limit:6}},minContent:3}),Z.z.Classifications,{getCustomParams:function(e,t){if(t===I.ku.Discover){if(e===z.f.EditableCoverFixedPillListSmall)return{canBePreferred:!0,isFollowing:!0};if([z.f.PosterSlidingListSmall,z.f.CoverFixedPillListXSmall].includes(e))return{canBePreferred:!0}}return{}}}),Z.z.ClassificationLatestReleasedVideos,{getCustomParams:function(){return F.getLatestReleasedTimeRange()}}),Z.z.SpecialEventClassifications,{getCustomParams:function(){return{from:o.O.format(new Date,"YYYY-MM-DD")}}}),Z.z.LatestReleasedClassifications,{getCustomParams:function(){return{limit:6}},minContent:3}),Z.z.CuratedSeries,{getCustomParams:function(){return{}}}),G(G(G(G(G(G(G(G(G(G(T,Z.z.CuratedPlaylists,{getCustomParams:function(){return{}}}),Z.z.Blurb,{getCustomParams:function(){return{}}}),Z.z.DynamicBlurb,{getCustomParams:function(e){return e===z.f.OnboardingSteps?{customerSetting:[C.E.HasNewOnboarding],userSettings:[].concat((t=Object.values(D).map(function(e){return e.setting}),function(e){if(Array.isArray(e))return H(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return H(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[C.E.HasCompletedOnboardingV2,C.E.HasExitedOnboarding])}:{};var t}}),Z.z.AuthorReviewer,{getCustomParams:function(){return{}}}),Z.z.Faq,{getCustomParams:function(){return{}}}),Z.z.CuratedCompanies,{getCustomParams:function(){return{}}}),Z.z.Ratings,{getCustomParams:function(){return{}}}),Z.z.Presentations,{getCustomParams:function(){return{}}}),Z.z.UpcomingLivestreams,{getCustomParams:function(){return{from:o.O.format(new Date,"YYYY-MM-DD")}}}),Z.z.CuratedMultimedia,{getCustomParams:function(){return{}}}),G(G(G(G(G(G(G(G(G(G(T,Z.z.ClassificationPlaylists,{getCustomParams:function(){return{}}}),Z.z.ClassificationSeries,{getCustomParams:function(){return{}}}),Z.z.ClassificationFeaturedVideo,{getCustomParams:function(){return{}}}),Z.z.ClassificationPinnedVideos,{getCustomParams:function(){return{}}}),Z.z.ClassificationDashboardExternalMedia,{getCustomParams:function(){return{}}}),Z.z.ClassificationDashboardMedia,{getCustomParams:function(){return{}}}),Z.z.SearchRelevantTopics,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[Z.z.SearchRelevantTopics],type:[N.ZE.Classification]})}}),Z.z.SearchCompanies,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[Z.z.SearchCompanies],type:[N.ZE.Company]})}}),Z.z.SearchSeries,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[Z.z.SearchSeries],type:[N.ZE.Series]})}}),Z.z.SearchPlaylists,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[Z.z.SearchPlaylists],type:[N.ZE.Playlist]})}}),G(G(G(G(G(G(G(G(G(G(T,Z.z.SearchMyVideosFolder,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[Z.z.SearchMyVideosFolder],source:[N.fi.MyVideos]})}}),Z.z.SearchMySchoolLibraryFolder,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[Z.z.SearchMySchoolLibraryFolder],source:[N.fi.School]})}}),Z.z.SearchMyVideos,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[Z.z.SearchMyVideos],source:[N.fi.MyVideos]})}}),Z.z.SearchMySchoolLibraryVideos,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[Z.z.SearchMySchoolLibraryVideos],source:[N.fi.School]})}}),Z.z.SearchExchangeArchive,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[Z.z.SearchExchangeArchive],source:[N.fi.ExchangeArchive]})}}),Z.z.SearchRelatedResults,{getCustomParams:function(){return{}}}),Z.z.SearchTopResults,{getCustomParams:function(){return{}}}),Z.z.ClassificationCurriculumMedia,{getCustomParams:function(){return{}}}),Z.z.SearchTags,{getCustomParams:function(){return{}}}),Z.z.SearchCurriculumCode,{getCustomParams:function(){return{}}}),G(T,Z.z.SearchSuggestions,{getCustomParams:function(){return{}}}))},40194:function(e,t,n){"use strict";n.d(t,{g:function(){return i}});var r=n(32735);n(17082),n(74421),n(46121);var o=r.createContext({hasProvider:!1});function i(){return r.useContext(o)}},16045:function(e,t,n){"use strict";var r;n.d(t,{b:function(){return r}}),function(e){e.CLICKVIEW_CURATED="is_clickview_curated",e.MOVIES_AND_TV="is_movies_and_tv",e.STREAMABLE_CURATED="is_streamable_learning_curated"}(r||(r={}))},8371:function(e,t,n){"use strict";var r;n.d(t,{b:function(){return r}}),function(e){e.AU="cv-ap-southeast-1",e.NZ="cv-ap-southeast-2",e.UK="cv-eu-west-1",e.US="cv-na-west-1"}(r||(r={}))},89603:function(e,t,n){"use strict";var r,o;n.d(t,{Q:function(){return r}}),function(e){e.Normal="normal",e.Pedagogy="pedagogy",e.Hidden="hidden",e.Skill="skill",e.Curation="curation"}(r||(r={})),function(e){e[e.Normal=0]="Normal",e[e.Pedagogy=1]="Pedagogy",e[e.Hidden=2]="Hidden",e[e.Skill=3]="Skill",e[e.Curation=4]="Curation"}(o||(o={}))},67391:function(e,t,n){"use strict";var r;n.d(t,{f:function(){return r}}),function(e){e.ThumbnailHeroMedia="thumbnail_hero_media",e.ThumbnailFeaturedMedia="thumbnail_featured_media",e.ThumbnailSlidingListSmall="thumbnail_sliding_list_small",e.ThumbnailSlidingListSmallV2="thumbnail_sliding_list_small_v2",e.ThumbnailSlidingListLarge="thumbnail_sliding_list_large",e.ThumbnailFixedListMediaSmall="thumbnail_fixed_list_media_small",e.ThumbnailFixedListMediaLarge="thumbnail_fixed_list_media_large",e.ThumbnailFixedListFolderSmall="thumbnail_fixed_list_folder_small",e.ThumbnailVerticalList="thumbnail_vertical_list",e.PopoutThumbnailSlidingListLarge="popout_thumbnail_sliding_list_large",e.PopoutThumbnailSlidingListSmall="popout_thumbnail_sliding_list_small",e.FeaturedThumbnailSlidingList="featured_thumbnail_sliding_list",e.ThumbnailFixedListXLarge="thumbnail_fixed_list_xlarge",e.CoverSlidingPillListSmall="cover_sliding_pill_list_small",e.CoverFixedPillListLarge="cover_fixed_pill_list_large",e.StatsCoverFixedPillListLarge="stats_cover_fixed_pill_list_large",e.CoverFixedPillListXSmall="cover_fixed_pill_list_xsmall",e.ThumbnailFixedListLarge="thumbnail_fixed_list_large",e.ThumbnailFixedListSmall="thumbnail_fixed_list_small",e.EditableCoverFixedPillListSmall="editable_cover_fixed_pill_list_small",e.HeroBanner="hero_banner",e.HeroThumbnailSmall="hero_thumbnail_small",e.HeroBlockColourSmall="hero_block_colour_small",e.CurriculumResourcesAccordion="curriculum_resources_accordion",e.CurriculumCodeSearchResults="curriculum_code_search_results",e.CoverFixedTileList="cover_fixed_tile_list",e.PosterSlidingListLarge="poster_sliding_list_large",e.PosterSlidingListMedium="poster_sliding_list_medium",e.PosterSlidingListSmall="poster_sliding_list_small",e.PosterFixedListLarge="poster_fixed_list_large",e.HeroBannerSmall="hero_banner_small",e.Heading="heading",e.AuthorReviewer="author_reviewer",e.Question="question",e.QuestionAccordion="question_accordion",e.OnboardingSteps="onboarding_steps",e.CircleLogoSlidingList="circle_logo_sliding_list",e.FilterSlidingPillListSmall="filter_sliding_pill_list_small",e.EventIconSlidingList="event_icon_sliding_list",e.TagSlidingList="tag_sliding_list",e.SearchSuggestionsBlurb="search_suggestions_blurb"}(r||(r={}))},33125:function(e,t,n){"use strict";var r;n.d(t,{z:function(){return r}}),function(e){e.CuratedMedia="curated_media",e.PlaylistMedia="playlist_media",e.SeriesMedia="series_media",e.ClassificationMedia="classification_media",e.LatestReleasedVideos="latest_released_videos",e.ContinueWatching="continue_watching_videos",e.CompanyLatestReleasedVideo="company_latest_released_video",e.CompanyVideos="company_videos",e.ClassificationLatestReleasedVideo="classification_latest_released_video",e.ClassificationLatestReleasedVideosV2="classification_latest_released_videos_v2",e.CompanyClassificationVideos="company_classification_videos",e.ClassificationDashboardMedia="classification_dashboard_media",e.ClassificationDashboardExternalMedia="classification_dashboard_external_media",e.SeasonalClassificationMedia="seasonal_classification_media",e.TrendingClassificationsMedia="trending_classifications_media",e.ClassificationCurriculumMedia="classification_curriculum_media",e.CuratedClassifications="curated_classifications",e.Classifications="classifications",e.ClassificationLatestReleasedVideos="classification_latest_released_videos",e.SpecialEventClassifications="special_event_classifications",e.LatestReleasedClassifications="latest_released_classifications",e.TrendingClassifications="trending_classifications",e.CuratedSeries="curated_series",e.CuratedPlaylists="curated_playlists",e.Blurb="blurb",e.DynamicBlurb="dynamic_blurb",e.AuthorReviewer="author_reviewer",e.Faq="faq",e.CuratedCompanies="curated_companies",e.Ratings="ratings",e.Presentations="presentations",e.UpcomingLivestreams="upcoming_livestreams",e.CuratedMultimedia="curated_multimedia",e.ClassificationPlaylists="classification_playlists",e.ClassificationSeries="classification_series",e.ClassificationFeaturedVideo="classification_featured_video",e.ClassificationPinnedVideos="classification_pinned_videos",e.SearchRelevantTopics="search_relevant_topics",e.SearchCompanies="search_companies",e.SearchTopResults="search_top_results",e.SearchSeries="search_series",e.SearchPlaylists="search_playlists",e.SearchMyVideosFolder="search_my_videos_folders",e.SearchMySchoolLibraryFolder="search_my_school_library_folders",e.SearchMyVideos="search_my_videos",e.SearchMySchoolLibraryVideos="search_my_school_library_videos",e.SearchExchangeArchive="search_exchange_archive",e.SearchRelatedResults="search_related_results",e.SearchTags="search_tags",e.SearchCurriculumCode="search_curriculum_code",e.SearchSuggestions="search_suggestions"}(r||(r={}))},2491:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(92159),o=n(21186),i=n(54096);function a(){var e=(0,i.G)(r.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:o.NK.Warning,heading:o.R6.Warning,message:t})},info:function(t,n){e.createAlert({heading:t,message:n,type:o.NK.Info})}}}},32557:function(e,t,n){"use strict";n.d(t,{X:function(){return v},L:function(){return h}});var r=n(32735),o=n(53808),i=n(85887),a=function(){var e=r.useRef(!0);return r.useEffect(function(){return function(){e.current=!1}},[]),e};function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var l=275,s=5,f={className:"",delay:0,style:null},p={screenX:0,screenY:0};function y(e,t){var n;e.current&&(t.className&&(null===(n=e.current.classList)||void 0===n||n.add(t.className)),t.style&&Object.keys(t.style).forEach(function(n){e.current.style[n]=t.style[n]}))}function d(e,t){var n;e.current&&(t.className&&(null===(n=e.current.classList)||void 0===n||n.remove(t.className)),t.style&&Object.keys(t.style).forEach(function(t){e.current.style[t]=null}))}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,t=a(),n=u(r.useState(e),2),c=n[0],l=n[1],s=u(r.useState(!1),2),p=s[0],v=s[1],h=r.useRef(null);r.useEffect(function(){i.t.isEqual(e,c)||l(e)},[e]);var b=o.q.throttle(function(){y(h,c),t.current&&v(!0)},c.delay,{leading:!1}),m=function(){o.q.isFunction(b.cancel)&&b.cancel(),d(h,c),t.current&&v(!1)};return r.useLayoutEffect(function(){var e=h.current;if(e)return e.addEventListener("mouseenter",b),e.addEventListener("mouseleave",m),function(){e.removeEventListener("mouseenter",b),e.removeEventListener("mouseleave",m)}},[h.current,c]),[h,p]}function h(e){var t=u(r.useState(e),2),n=t[0],a=t[1],c=r.useRef(Object.assign({},p)),f=r.useRef(!1),v=r.useRef(0),h=r.useRef(null),b=u(r.useState(!1),2),m=b[0],g=b[1];function w(){v.current&&(window.clearTimeout(v.current),v.current=0)}function O(){f.current=!0}function P(e){if(f.current){var t,r,o=Object.assign({},c.current);c.current.screenX=e.screenX,c.current.screenY=e.screenY,function(e,t){return Math.abs(e.screenX-t.screenX)>s||Math.abs(e.screenY-t.screenY)>s}(o,e)&&w(),t=function(){y(h,n),g(!0)},r=n.delay||l,v.current||(v.current=window.setTimeout(t,r))}}function S(){w(),d(h,n),f.current=!1,g(!1)}return r.useEffect(function(){i.t.isEqual(e,n)||a(e)},[e]),r.useLayoutEffect(function(){if(h.current){var e=o.q.throttle(P,25,{leading:!1});return h.current.addEventListener("mouseenter",O),h.current.addEventListener("mousemove",e),h.current.addEventListener("mouseleave",S),function(){h.current&&(h.current.removeEventListener("mouseenter",O),h.current.removeEventListener("mousemove",e),h.current.removeEventListener("mouseleave",S))}}},[h.current,n]),[h,m]}},45344:function(e,t,n){"use strict";n.d(t,{k:function(){return i}});var r=n(32735),o=n(13799);function i(){return r.useContext(o.X)}},87268:function(e,t,n){"use strict";n.d(t,{T:function(){return l}});var r=n(68003),o=n(52076),i=n(70065);function a(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var a=r&&r.prototype instanceof l?r:l,s=Object.create(a.prototype);return u(s,"_invoke",function(n,r,o){var i,a,u,l=0,s=o||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,a=0,u=e,p.n=n,c}};function y(n,r){for(a=n,u=r,t=0;!f&&l&&!o&&t<s.length;t++){var o,i=s[t],y=p.p,d=i[2];n>3?(o=d===r)&&(u=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,p.n=d,a=0))}if(o||n>1)return c;throw f=!0,r}return function(o,s,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,d),a=s,u=d;(t=a<2?e:u)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,u)):p.n=u:p.v=u);try{if(l=2,i){if(a||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((t=(f=p.n<0)?u:n.call(r,p))!==c)break}catch(t){i=e,a=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),s}var c={};function l(){}function s(){}function f(){}t=Object.getPrototypeOf;var p=[][r]?t(t([][r]())):(u(t={},r,function(){return this}),t),y=f.prototype=l.prototype=Object.create(p);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,u(e,o,"GeneratorFunction")),e.prototype=Object.create(y),e}return s.prototype=f,u(y,"constructor",f),u(f,"constructor",s),s.displayName="GeneratorFunction",u(f,o,"GeneratorFunction"),u(y),u(y,o,"Generator"),u(y,r,function(){return this}),u(y,"toString",function(){return"[object Generator]"}),(a=function(){return{w:i,m:d}})()}function u(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}u=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){u(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},u(e,t,n,r)}var c=null,l={getVideoDownloadUrl:function(e,t){return r._.safeUrlConcat(r._.makeHttps(e),"/download?token=".concat(t))},downloadResource:function(e,t,n,r){var a,u=c;c||(u=c=document.createElement("iframe"),document.body.appendChild(u),u.style.display="none"),u.src=e.url,r||o.k.logUserAction(Object.assign({id:null==e?void 0:e.id,name:null==e?void 0:e.name,resourceType:null===(a=null==e?void 0:e.metadata)||void 0===a?void 0:a.resourceType},t),Object.assign({actionType:i.Vw.Download,entity:i.py.Resource,workflowPhase:i.eu.Complete},n))},downloadBlob:function(e,t){return n=this,r=void 0,o=void 0,i=a().m(function n(){var r,o,i,u,c;return a().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,fetch(e);case 1:if((r=n.v).ok){n.n=2;break}throw new Error("Error downloading file");case 2:return u=URL,n.n=3,r.blob();case 3:c=n.v,o=u.createObjectURL.call(u,c),(i=document.createElement("a")).href=o,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),window.setTimeout(function(){return URL.revokeObjectURL(o)},100);case 4:return n.a(2)}},n)}),new(o||(o=Promise))(function(e,t){function a(e){try{c(i.next(e))}catch(e){t(e)}}function u(e){try{c(i.throw(e))}catch(e){t(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o(function(e){e(n)})).then(a,u)}c((i=i.apply(n,r||[])).next())});var n,r,o,i}}},38e3:function(e,t,n){"use strict";n.d(t,{G:function(){return o}});var r=n(74421),o={isType:function(e,t){var n;return(null==e?void 0:e.typeId)?e.typeId===t:(null===(n=null==e?void 0:e.type)||void 0===n?void 0:n.toLowerCase())===r.E[t].toLowerCase()},isResource:function(e){return o.isType(e,r.E.Resource)},isClassification:function(e){return"Subject"===e.type}}},41814:function(e,t,n){"use strict";n.d(t,{d:function(){return v}});var r,o=n(32735),i=n(40221),a=n(70065);!function(e){e[e.Draft=0]="Draft",e[e.Published=1]="Published",e[e.Archived=2]="Archived"}(r||(r={}));var u,c=n(67391),l=n(33125),s=n(40215),f=n(34658),p=n(74421),y=n(38e3);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e.Draft="Draft",e.Published="Published",e.Archived="Archived"}(u||(u={}));var v={getSliderAnalyticsOptions:function(){return{actionType:a.Vw.Click,location:a.LZ.SlidingList,entity:a.py.Widget,descriptor:a._S.Slide}},getSliderItemAnalyticsOptions:function(){return{location:a.LZ.SlidingListItem}},getSliderHeadingAnalyticsOptions:function(){return{actionType:a.Vw.Click,location:a.LZ.SlidingList,entity:a.py.Widget,descriptor:a._S.Title}},useGetContent:function(e,t,n,r,i){return o.useMemo(function(){var o;if(!e)return{content:null,unfilteredContent:null};if(!Array.isArray(e))return{content:e,unfilteredContent:e};var a,u=null!==(o=null==r?void 0:r.reduce(function(e,t){return e[t.id]=t,e},{}))&&void 0!==o?o:{},c=i.reduce(function(e,t){return e[t]=!0,e},{}),l=function(e){if(Array.isArray(e))return d(e)}(a=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(a)||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.")}(),s=l.sort(function(e,t){var n,r,o,i;if(!("id"in e)||!("id"in t))return 0;var a=null!==(r=null===(n=u[e.id])||void 0===n?void 0:n.index)&&void 0!==r?r:l.findIndex(function(t){return"id"in t&&t.id===e.id}),c=null!==(i=null===(o=u[t.id])||void 0===o?void 0:o.index)&&void 0!==i?i:l.findIndex(function(e){return"id"in e&&e.id===t.id});return a<c?-1:a>c?1:0});if(v.isBelowContentMinimum(s,t)&&!n)return{content:[],unfilteredContent:s};var f=s.filter(function(e){var t;return!(null===(t=u["id"in e&&e.id])||void 0===t?void 0:t.hidden)&&!c["id"in e&&e.id]});return{content:f,unfilteredContent:s}},[e,r])},isBelowContentMinimum:function(e,t){var n,r=(null===(n=f.u[t])||void 0===n?void 0:n.minContent)||0;return(null==e?void 0:e.length)<r},getCustomAppLink:function(e){var t,n,r,o,i,a;return"metadata"in e&&"appLinks"in e&&"appLink"in e.metadata?(null===(t=e.metadata)||void 0===t?void 0:t.appLink)===s.OL.LatestReleases&&"latestReleases"in e.appLinks?null===(r=null===(n=e.appLinks)||void 0===n?void 0:n.latestReleases)||void 0===r?void 0:r.call(n):(null===(o=e.metadata)||void 0===o?void 0:o.appLink)===s.OL.ExploreAllTopics&&"allTopics"in e.appLinks&&"presentation"in e?null===(a=null===(i=e.appLinks)||void 0===i?void 0:i.allTopics)||void 0===a?void 0:a.call(i,e.presentation.id):null:null},getWidgetStatus:function(e){var t=e.status;if("string"==typeof t)switch(t){case u.Archived:t=r.Archived;break;case u.Published:t=r.Published;break;case u.Draft:t=r.Draft}return t},formatResponseData:function(e,t){var n=e.content;if(!n)return e;if("author"in n)return e.content=[n],e;switch("data"in n?e.content=n.data:Array.isArray(n)||(e.content=[n]),e.widgetId){case l.z.ClassificationSeries:e.content=e.content.filter(function(e){var t;return"tallPoster"in e&&!!(null===(t=e.tallPoster)||void 0===t?void 0:t.id)});break;case l.z.ClassificationPlaylists:e.content=e.content.filter(function(e){var t;return"cover"in e&&!!(null===(t=e.cover)||void 0===t?void 0:t.id)});break;case l.z.ContinueWatching:e.content=e.content.map(function(e){return"object"in e&&e.object});default:break;case l.z.Presentations:e.content=e.content.filter(function(e){var n;return"id"in e&&e.id.toString()!==(null===(n=null==t?void 0:t.id)||void 0===n?void 0:n.toString())})}return e},isWidgetInTableOfContents:function(e){return!!(null==e?void 0:e.showInTableOfContents)},hasNoContent:function(e){return e===l.z.Blurb},canDisplayOnScreenSize:function(e,t,n){return t!==l.z.Blurb||n!==c.f.HeroBannerSmall||!e.xs&&!e.sm},isCompanyWidget:function(e){switch(e){case l.z.CompanyLatestReleasedVideo:case l.z.CompanyVideos:case l.z.UpcomingLivestreams:return!0;default:return!1}},getVideoContent:function(e){var t=i.m.first(e);return y.G.isType(t,p.E.Series)?t.videos.data:e},showRemoveButton:function(e){return e===l.z.ContinueWatching}}},57e3:function(e,t,n){"use strict";n.d(t,{l:function(){return v}});var r=n(43823),o=n(21161),i=n(31647),a=n(38465);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,s=Object.create(c.prototype);return l(s,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,u=0,c=e,p.n=n,a}};function y(n,r){for(u=n,c=r,t=0;!f&&l&&!o&&t<s.length;t++){var o,i=s[t],y=p.p,d=i[2];n>3?(o=d===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=n<2&&y<i[1])?(u=0,p.v=r,p.n=i[1]):y<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,p.n=d,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,d),u=s,c=d;(t=u<2?e:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),y(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(t){i=e,u=1,c=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),s}var a={};function u(){}function s(){}function f(){}t=Object.getPrototypeOf;var p=[][r]?t(t([][r]())):(l(t={},r,function(){return this}),t),y=f.prototype=u.prototype=Object.create(p);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,o,"GeneratorFunction")),e.prototype=Object.create(y),e}return s.prototype=f,l(y,"constructor",f),l(f,"constructor",s),s.displayName="GeneratorFunction",l(f,o,"GeneratorFunction"),l(y),l(y,o,"Generator"),l(y,r,function(){return this}),l(y,"toString",function(){return"[object Generator]"}),(c=function(){return{w:i,m:d}})()}function l(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}l=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){l(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},l(e,t,n,r)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function f(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var v=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=y(t),function(e,t){if(t&&("object"==u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){var e=this;this.onTimeUpdate=o.default.bind(this._onTimeUpdate,this),this.playbackObject=new Promise(function(t){e.setPlaybackObject=t})}},{key:"name",get:function(){return"PlayerComponent"}},{key:"className",get:function(){return""}},{key:"template",get:function(){return function(){return"<div></div>"}}},{key:"initListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"onDestroy",value:function(){this.player&&(this.player.off("timeupdate",this.onTimeUpdate),this.player.dispose())}},{key:"_onTimeUpdate",value:function(){r.Radio.channel(this.options.channelName).trigger("timeupdate",this.currentTime())}},{key:"currentTime",value:function(e){return this.player.currentTime(e)}},{key:"getChapters",value:function(){var e,t,n,r,o,i;return n=this,r=void 0,o=void 0,i=c().m(function n(){var r;return c().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,this.playbackObject;case 1:return r=n.v,n.a(2,null!==(t=null===(e=r.chapters)||void 0===e?void 0:e.list)&&void 0!==t?t:[])}},n,this)}),new(o||(o=Promise))(function(e,t){function a(e){try{c(i.next(e))}catch(e){t(e)}}function u(e){try{c(i.throw(e))}catch(e){t(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o(function(e){e(n)})).then(a,u)}c((i=i.apply(n,r||[])).next())})}},{key:"setChapters",value:function(e){this.player.setChapters(e)}},{key:"duration",value:function(){return this.player.duration()}},{key:"onRender",value:function(){var e=this;this.player||(this.player=new a.J(this.el,{viewKey:this.model.get("viewKey"),playerApi:new URL(this.options.playerApiUrl),hotkeyElQuerySelector:"body",autoplay:!0,aspectRatio:"16:9",overflowControls:!0,inactivityTimeout:this.options.inactivityTimeout,allowFullscreen:!1}),this.player.one("cv-playback-data-loaded",function(t){e.setPlaybackObject(t)}),this.options.channelName&&this.player.ready(function(){r.Radio.channel(e.options.channelName).trigger("player:loaded"),e.initListeners()}))}}])&&s(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.wA)},10079:function(e,t,n){"use strict";n.d(t,{Q:function(){return X}});var r=n(86027),o=n(53019),i=n(43823),a=n(21161),u="cv-player-play",c="cv-player-pause",l="cv-player-ended",s="cv-player-chapterchange",f="cv-player-timeupdate",p="cv-player-fullscreenchange",y="cv-player-querycallback",d="cv-player-pong",v="_cvwp:fsc",h="_cvwp:devices:click",b="cv-player-seekto",m="cv-player-query",g="cv-player-ping",w="_cv:showdevicesbtn",O="_cv:showfsbtn",P="paused",S="getChapters",j=n(11306),C=n(99249),_=n(68003),k=n(31647),T=n(97779),E=n(52076),R=n(70065);function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.id){var n={id:e.id};return e.name&&!t.ignoreTitle&&(n.title=e.name),n}}var L=n(6723);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,A(r.key),r)}}function A(e){var t=function(e){if("object"!=x(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==x(t)?t:t+""}function B(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(B=function(){return!!e})()}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},D(e)}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}var z=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=D(t),function(e,t){if(t&&("object"==x(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,B()?Reflect.construct(t,n||[],D(e).constructor):t.apply(e,n))}(this,t,[e])).captureInterval=60,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(t,e),n=t,r=[{key:"name",get:function(){return"VideoAnalyticsTracker"}},{key:"initialize",value:function(){this.eventsApi=this.options.eventsApi,this.options.video||k.Q.Ry.throw(new j.H("Video logging requires video to be passed in.")),this.model=this.options.video,this.playbackStatus=this.getNewPlaybackStatus(),this.options.captureInterval&&(this.captureInterval=this.options.captureInterval),this.bindListeners(),this.getChapters()}},{key:"bindListeners",value:function(){this.eventsApi.on(f,a.bind(this.onPlayerTimeUpdate,this)),this.eventsApi.on(l,a.bind(this.onEnd,this)),this.eventsApi.on(p,a.bind(this.onFullScreen,this)),this.eventsApi.on(s,a.bind(this.onChapterChange,this))}},{key:"unbindListeners",value:function(){this.eventsApi.off(f),this.eventsApi.off(l),this.eventsApi.off(p),this.eventsApi.off(s)}},{key:"getChapters",value:function(){var e=this;this.queryWebplayer(S,function(t,n){e.setInitialChapter(n),e.setVideoDuration(n)})}},{key:"queryWebplayer",value:function(e,t){var n=a.uniqueId(this.name),r="".concat(y,"-").concat(n);this.eventsApi.one(r,t),this.eventsApi.trigger(m,e,n)}},{key:"onEnd",value:function(){this.setCurrentPosition(this.playbackStatus.totalDuration),this.logVerbose(R.UX.Finish),this.resetPlaybackStatus()}},{key:"onFullScreen",value:function(e,t){var n=t?R.UX.FullScreenEnter:R.UX.FullScreenExit;this.logVerbose(n)}},{key:"onPlayerTimeUpdate",value:function(e,t){var n=this;this.queryWebplayer(P,function(e,r){n.updateTime(t,r)})}},{key:"onChapterChange",value:function(e,t){a.isObject(t)&&this.setCurrentChapter(t.number)}},{key:"updateTime",value:function(e,t){var n=Math.floor(e);n&&n!==this.getCurrentPositon()&&(this.setCurrentPosition(n),t||(this.playbackHasStarted()||(this.logVerbose(R.UX.Start),this.setPlaybackStarted()),this.incrementWatchTime(),this.getWatchTime()%this.captureInterval===0&&this.logVerbose(R.UX.Playback),8===this.getWatchTime()&&this.logStream()))}},{key:"setInitialChapter",value:function(e){var t=a.find(e,function(e){return!0===e.current});a.isObject(t)&&this.setCurrentChapter(t.number)}},{key:"setVideoDuration",value:function(e){var t=a.reduce(e,function(e,t){return e+t.duration},0);!a.isNaN(t)&&a.isNumber(t)&&(this.playbackStatus.totalDuration=Math.floor(t))}},{key:"setCurrentPosition",value:function(e){this.playbackStatus.position=e}},{key:"getCurrentPositon",value:function(){return this.playbackStatus.position}},{key:"setCurrentChapter",value:function(e){this.playbackStatus.chapter=e}},{key:"setPlaybackStarted",value:function(){this.playbackStatus.hasStarted=!0}},{key:"playbackHasStarted",value:function(){return this.playbackStatus.hasStarted}},{key:"getWatchTime",value:function(){return this.playbackStatus.totalWatched}},{key:"incrementWatchTime",value:function(){this.playbackStatus.totalWatched+=1}},{key:"getNewPlaybackStatus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.duration;return{position:0,chapter:0,hasStarted:!1,totalWatched:e.watched||0,totalDuration:t||0}}},{key:"resetPlaybackStatus",value:function(){var e={duration:this.playbackStatus.totalDuration,watched:this.playbackStatus.totalWatched};this.playbackStatus=this.getNewPlaybackStatus(e)}},{key:"unbindUnload",value:function(){L(window).off("unload")}},{key:"bindUnload",value:function(){L(window).on("unload",a.bind(this.logUnload,this))}},{key:"logUnload",value:function(){this.playbackHasStarted()&&this.logVerbose(R.UX.Terminate)}},{key:"logStream",value:function(){var e,t,n,r,o,i,a,u,c=E.k.buildActionContext(this.options.analyticsOptions),l=(e=this.getPlaybackData(),t=e.model,n={id:t.id.toString(),year:t.productionYear,title:t.name,trackingCode:t.trackingCode},r=function(e){if(e&&e.code)return e.code}(t.rating),o=I(t.series),i=function(e){if(e&&e.length){var t=e[0];return{id:t.id,title:t.name}}}(t.categories),a=I(t.owner,{ignoreTitle:!0}),u=I(t.playlist),r&&(n.rating=r),a&&(n.ownerId=a.id),o&&(n.seriesId=o.id,n.series=o.title),i&&(n.category=i.title),u&&(n.playlist=u),n);T.c.log(R.Vw.Stream,l,c)}},{key:"logVerbose",value:function(e){}},{key:"getPlaybackData",value:function(){return{model:(e=this.model,e instanceof k.Q.Hn||e instanceof k.Q.FE||e instanceof i.Model||e instanceof i.Collection?e.toJSON():e),playbackStatus:a.omit(this.playbackStatus,"hasStarted")};var e}},{key:"onDestroy",value:function(){this.unbindListeners(),this.unbindUnload(),this.logUnload()}}],r&&M(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(k.Q.t6),Z=n(85475),F=n(45390),V=n(61577),G=n.n(V),H={webPlayerContainer:"SlCu8",webPlayer:"NlTKl",svgContainer:"hFe3U"},U=n(6723);function q(e){return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q(e)}function W(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Y(r.key),r)}}function Y(e){var t=function(e){if("object"!=q(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=q(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==q(t)?t:t+""}function K(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(K=function(){return!!e})()}function J(e){return J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},J(e)}function Q(e,t){return Q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Q(e,t)}var X=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=J(t),function(e,t){if(t&&("object"==q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,K()?Reflect.construct(t,n||[],J(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Q(e,t)}(t,e),n=t,(s=[{key:"elements",get:function(){return{iframe:"iframe"}}},{key:"name",get:function(){return"WebPlayerView"}},{key:"template",get:function(){return G()}},{key:"className",get:function(){return"".concat(H.webPlayerContainer," ratio ratio-16x9")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"defaults",get:function(){return{captureAnalytics:!0,showDevicesButton:!1}}},{key:"viewModelDefaults",get:function(){return{width:640,height:360,autoplay:!!this.options.autoplay,parameters:{s:!1,bc:!1,bf:!1,uid:this.options.currentUser.get("id"),cid:this.options.currentUser.get("customerId")},webPlayerHost:this.options.webPlayerUrl}}},{key:"initialize",value:function(){this.enableIeFs=this.isTop(),this.getViewModel()}},{key:"seekTo",value:function(e){this.eventsApi&&this.eventsApi.trigger(b,e)}},{key:"seekToChapter",value:function(e){this.eventsApi&&this.eventsApi.trigger("cv-player-changechapter",e)}},{key:"getViewModel",value:function(){var e=this.model.get("id");e||(e=this.model.get("trackingCode")),this.viewModel=C.r.get("".concat(F._2.NAME,"-").concat(e)),this.viewModel.get("initialized")||this.initViewModel(),this.setUrl()}},{key:"initViewModel",value:function(){var e=this.model.pick("id");e.id||(e=this.model.pick("trackingCode")),e.id||e.trackingCode||k.Q.Ry.throw(new j.H("Must provide either a master id or a tracking code to ".concat(this.name)));var t=a.extend({},this.viewModelDefaults,e,this.viewModel.toJSON(),{initialized:!0});this.viewModel.set(t)}},{key:"initWebPlayerEvents",value:function(){if(this.enableIeFs){var e=this.getUI("iframe");e&&0!==e.length&&e.on("load",this.bindWebPlayerEvents.bind(this))}}},{key:"bindWebPlayerEvents",value:function(){if(!this.iframeReady){var e=this.getUI("iframe").get(0);this.eventsApi=new r.CVEventsApi(e.contentWindow),this.eventsApi.on(d,this.onPong.bind(this)),this.eventsApi.trigger(g),this.eventsApi.on(v,this.onFullscreenChange.bind(this)),this.eventsApi.trigger(O),this.eventsApi.on(f,this.onTimeUpdate.bind(this)),this.eventsApi.on(u,this.onPlay.bind(this)),this.eventsApi.on(c,this.onPause.bind(this)),this.eventsApi.on(l,this.onEnded.bind(this)),this.options.showDevicesButton&&(this.eventsApi.on(h,this.showDeviceToggle.bind(this)),this.eventsApi.trigger(w)),this.options.captureAnalytics&&(this.tracker=new z({video:this.model.toJSON(),eventsApi:this.eventsApi,analyticsOptions:this.options.analyticsOptions}))}}},{key:"unbindWebPlayerEvents",value:function(){this.eventsApi&&(this.eventsApi.off(v),this.eventsApi.off(f),this.eventsApi.off(u),this.eventsApi.off(c),this.eventsApi.off(l),this.eventsApi.off(d),this.eventsApi.off(h))}},{key:"setUrl",value:function(){var e="".concat(this.viewModel.get("webPlayerHost"),"embed"),t=a.omit(this.viewModel.get("parameters"),["p","vid"])||{};t.a=!!this.viewModel.get("autoplay");var n=this.viewModel.get("id");n&&(t.vid=n);var r=this.viewModel.get("trackingCode");r&&(t.p=r),this.viewModel.get("currenttime")&&(t.t=this.viewModel.get("currenttime"),t.a=!this.viewModel.get("paused"));var i=_._.urlBuilder(e,t),u=(0,o.signUrl)(i,{timestamp:!0});this.viewModel.set({url:u})}},{key:"isTop",value:function(){return window.top===window}},{key:"onTimeUpdate",value:function(e,t){this.viewModel.set("ready",!0),this.viewModel.set("currenttime",t)}},{key:"onPlay",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!1)}},{key:"onPause",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!0)}},{key:"onEnded",value:function(){this.viewModel.trigger("ended")}},{key:"onPong",value:function(){this.iframeReady=!0,this.viewModel.set("ready",!0),i.Radio.channel(this.channelName).trigger("loaded"),this.options.parentChannelName&&i.Radio.channel(this.options.parentChannelName).trigger("webplayer:loaded")}},{key:"onFullscreenChange",value:function(e,t,n){t?this.requestFs(n):this.cancelFs(n)}},{key:"requestFs",value:function(e){e||U("html").addClass("player-fullscreen")}},{key:"cancelFs",value:function(e){e||U("html").removeClass("player-fullscreen")}},{key:"showDeviceToggle",value:function(e){this.viewModel.trigger("showDevices",!!e)}},{key:"query",value:function(e,t){var n=this;if(this.iframeReady){var r=a.uniqueId("cveventsapi");this.eventsApi.one("".concat(y,"-").concat(r),function(e,n){t(n)}),this.eventsApi.trigger(m,e,r)}else this.listenToOnce(this.channelName,"loaded",function(){return n.query(e,t)})}},{key:"viewOptions",value:function(){return a.extend({},{styles:H,playSvg:Z.Nj.getSvg(Z.vn.Play)},this.viewModel.toJSON())}},{key:"onRender",value:function(){this.initWebPlayerEvents()}},{key:"onBeforeDestroy",value:function(){this.unbindWebPlayerEvents(),this.tracker&&this.tracker.destroy()}}])&&W(n.prototype,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,s}(k.Q.wA)},12424:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(76032);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function a(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},c.apply(null,arguments)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var f=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=l(t),function(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,n||[],l(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(t,e),n=t,a=[{key:"createEl",value:function(){return r.Z.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(e){var n,r,o,i=this;(n=t,r=this,"function"==typeof(o=c(l(1&3?n.prototype:n),"handleClick",r))?function(e){return o.apply(r,e)}:o)([e]),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame(function(){i.player_.getChild("collapserator").getChild("cogButton").pressButton()})}}],a&&i(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a}(r.Z.getComponent("MenuItem"))},46620:function(e,t,n){"use strict";n.d(t,{W:function(){return i}});var r=n(86777),o=n(76032).Z.getComponent("Menu"),i=o.prototype.createEl;o.prototype.createEl=function(){var e=i.call(this);return this.simpleBar=new r.Z(this.contentEl(),{autoHide:!1}),e};var a=o.prototype.contentEl;o.prototype.contentEl=function(){return this.simpleBar?this.simpleBar.getContentElement():a.call(this)};var u=o.prototype.dispose;o.prototype.dispose=function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),u.call(this)};var c=o.prototype.addItem;o.prototype.addItem=function(e){c.call(this,e),this.simpleBar.recalculate()};var l=o.prototype.lockShowing;o.prototype.lockShowing=function(){l.call(this),this.simpleBar.recalculate()},o.prototype.recalculateScrollBar=function(){this.simpleBar.recalculate()};var s=o.prototype.handleBlur;o.prototype.handleBlur=function(e){var t=e.relatedTarget||document.activeElement;this.el().contains(t)||s.call(this,e)}},29206:function(e,t,n){"use strict";n.d(t,{C:function(){return g},Z:function(){return m}});var r=n(76032),o=n(90244);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function s(e,t,n){return t=d(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function p(e,t,n,r){var o=y(d(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},y.apply(null,arguments)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var b=r.Z.getComponent("MenuItem"),m=function(e){function t(e,n){var r;return a(this,t),(r=s(this,t,[e,n])).onChange=(0,o.Ds)(r.onChange,100,!1,r),r.bindEventListeners(),r}return v(t,e),c(t,[{key:"createEl",value:function(){var e=this.localize("Search");return p(t,"createEl",this,3)(["li",{className:"vjs-menu-item cv-search-input-menu-item-container ".concat(this.options_.className||"").trim(),innerHTML:'\n <div class="cv-search-input-menu-item">\n <span class="cv-search-icon">\n <svg viewBox="0 0 24 24">\n <path d="M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"/>\n </svg>\n </span><input placeholder="'.concat(e,'" type="text" autocomplete="off" spellcheck="false" aria-label="').concat(e,'" />\n </div>\n ')}])}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("input");this.onChange=this.onChange.bind(this),t.addEventListener("keyup",this.onChange),t.addEventListener("blur",function(t){e.options_.menuButton.menu.handleBlur(t)})}},{key:"onChange",value:function(e){var t=e.target;this.options_.search(t.value)}}])}(b);r.Z.registerComponent("SearchInputMenuItem",m);var g=function(e){function t(){return a(this,t),s(this,t,arguments)}return v(t,e),c(t,[{key:"createEl",value:function(e,n,r){return p(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:"vjs-menu-item cv-no-results"}),r])}},{key:"setLabel",value:function(e){var t=this.$(".vjs-menu-item-text");t&&(t.innerHTML=e)}}])}(b);r.Z.registerComponent("NoMatchingResultsMenuItem",g)},61876:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e){var t="function"==typeof Map?new Map:void 0;return o=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(i())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&a(o,n.prototype),o}(e,arguments,u(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),a(n,e)},o(e)}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(i=function(){return!!e})()}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}n.d(t,{M:function(){return c}});var c=function(e){function t(e,n){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(o=function(e,t,n){return t=u(t),function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}(this,t,[(null==n?void 0:n.title)||"Ajax error"])).url=e,o.response=n,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(t,e),n=t,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(o(Error))},2740:function(e,t,n){"use strict";n.d(t,{r:function(){return Mp}}),n(71289);var r=n(76032);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}function s(e,t,n){return t=d(t),function(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function p(e,t,n,r){var o=y(d(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},y.apply(null,arguments)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var b=function(e){function t(e,n){return a(this,t),s(this,t,[e,n])}return v(t,e),c(t,[{key:"handleClick",value:function(e){var n=this;p(t,"handleClick",this,3)([e]),this.requestAnimationFrame(function(){n.options_.item.showCollapsibleMenu()})}},{key:"createEl",value:function(e,n,o){if(!this.options_.item)return p(t,"createEl",this,3)([e,n,o]);var i=this.options_.item.getCollabsibleName(),a=this.options_.item.getCollabsibleValue(),u=this.options_.item.className,c='<span class="vjs-menu-item-text">'.concat(i,"</span>");this.valueHolder_=r.Z.dom.createEl("span",{innerHTML:a});var l=p(t,"createEl",this,3)([e,{className:"vjs-menu-item cv-cog-menu-item ".concat(a?"cv-has-cog-value":""," ").concat(u||"").trim(),innerHTML:c},o]);return l.appendChild(this.valueHolder_),l}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}])}(r.Z.getComponent("MenuItem")),m=function(e){function t(e,n){var r;return a(this,t),(r=s(this,t,[e,n])).controlText("Settings"),r}return v(t,e),c(t,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(p(t,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(p(t,"buildCSSClass",this,3)([]))}},{key:"pressButton",value:function(){this.player_.options_.deferMenus?this.player_.deferMenusPlugin().deferMenu():(this.menu.children_.forEach(function(e){e.updateCollapsibleValue&&e.updateCollapsibleValue()}),p(t,"pressButton",this,3)([]))}},{key:"createItems",value:function(){for(var e,n=this,r=[],o=0;o<this.options_.items.length;o++){var a=this.options_.items[o];a.isCollabsible&&a.showInCollabsibleMenu()&&a.isCollapsed&&r.push(new b(this.player_,{item:a}))}var u;return(null===(e=this.additionalItems)||void 0===e?void 0:e.length)&&(u=this.additionalItems,function(e){if(Array.isArray(e))return i(e)}(u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(u)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(u)||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.")}()).sort(function(e,n){var r=t.additionalItemOrder.indexOf(e.name);return t.additionalItemOrder.indexOf(n.name)-r}).forEach(function(e){var t,o=new e.ctor(n.player_,Object.assign(Object.assign({},n.options_),null!==(t=e.options)&&void 0!==t?t:{}));r.splice(0,0,o)}),r}},{key:"update",value:function(){p(t,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(e){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some(function(t){return t.name===e.name})||(this.additionalItems.push(e),this.update())}}])}(r.Z.getComponent("MenuButton"));m.additionalItemOrder=["EngagementOverlayMenuItem","PointsOfInterestMenuItem","LoopVideoMenuItem","NextVideoMenuItem"],r.Z.registerComponent("cogButton",m);var g=n(12424);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function O(){return O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=T(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},O.apply(null,arguments)}function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C(r.key),r)}}function j(e,t,n){return t&&S(e.prototype,t),n&&S(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e){var t=function(e){if("object"!=w(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==w(t)?t:t+""}function _(e,t,n){return t=T(t),function(e,t){if(t&&("object"==w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,k()?Reflect.construct(t,n||[],T(e).constructor):t.apply(e,n))}function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(k=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function E(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}var I=r.Z.getComponent("MenuItem"),L=r.Z.getComponent("MenuButton"),x=["large","medium","small"],M=function(e){function t(e,n){return P(this,t),_(this,t,[e,n])}return E(t,e),j(t,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}])}(I),A=function(e){function t(e,n){var r;return P(this,t),(r=_(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.player_.ready(function(){r.update()}),r}return E(t,e),j(t,[{key:"createItems",value:function(){var e=this,t=this.player_.textTrackSettings;if(t){var n=t.getSizeSetting(),r=[new g.Z(this.player_,{label:"Caption Text Size",onClickBack:function(){e.requestAnimationFrame(function(){e.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()})}})];return x.map(function(t){r.push(new M(e.player_,{label:t.charAt(0).toUpperCase()+t.substring(1),selectable:!0,multiSelectable:!1,selected:t===n,value:t}))}),r}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((e=t,n=this,"function"==typeof(r=O(T(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){L.prototype.handleClick.apply(this)}}])}(L);r.Z.registerComponent("SubtitleSizeButton",A);var B=n(94878),D=n(29206);function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Z(r.key),r)}}function Z(e){var t=function(e){if("object"!=N(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==N(t)?t:t+""}function F(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(F=function(){return!!e})()}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}function G(e,t){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},G(e,t)}var H=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=V(t),function(e,t){if(t&&("object"==N(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,F()?Reflect.construct(t,n||[],V(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}(t,e),n=t,(r=[{key:"update",value:function(e,t){var n=this;if(null==e?void 0:e.length){var r=[],o=0;e.forEach(function(e){var i=n.options_.label.substr(o,e);i&&r.push(i),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(e,t)),r.push("</span>"),o=e+t}),r.push(this.options_.label.substring(o,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(r.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&z(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("MenuItem"));function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,W(r.key),r)}}function W(e){var t=function(e){if("object"!=U(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==U(t)?t:t+""}function Y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Y=function(){return!!e})()}function K(e,t,n,r){var o=J(Q(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function J(){return J="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Q(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},J.apply(null,arguments)}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},X(e,t)}var $=r.Z.getComponent("MenuButton"),ee=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Q(t),function(e,t){if(t&&("object"==U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Y()?Reflect.construct(t,n||[],Q(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(r),r.search=r.search.bind(r),r.player_.textTracks().addEventListener("selectedlanguagechange",r.update),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}(t,e),n=t,(r=[{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.update),e.addEventListener("loadeddata",this.update),this.player_.one("dispose",function(){e.removeEventListener("loadeddata",t.update)})}},{key:"createItems",value:function(){var e,t=B.O.getCurrentTextTrack(this.player_);if(t){if(null===(e=t.cues)||void 0===e?void 0:e.length){for(var n=[new D.Z(this.player_,{menuButton:this,search:this.search})],r=0;r<t.cues.length;r++){var o=t.cues[r];n.push(new H(this.player_,{cue:o,label:o.text,selected:!1,multiSelectable:!1}))}var i=new D.C(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return i.hide(),n.push(i),n}this.bindTrackEvents(t)}}},{key:"search",value:function(e){var t;e=e.trim();var n=B.O.getCurrentTextTrack(this.player_);if(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length){var r=this.findMatches(e,n);this.toggleItemVisibility(e,r),this.toggleNoResults(e,r)}}},{key:"findMatches",value:function(e,t){var n={};if(!e)return n;for(var r=new RegExp(e,"gi"),o=0;o<t.cues.length;o++){for(var i=t.cues[o].text,a=[],u=void 0;u=r.exec(i);)a.push(u.index);a.length&&(n[o]=a)}return n}},{key:"toggleItemVisibility",value:function(e,t){this.menu.children_.slice(1,this.menu.children_.length-1).forEach(function(n,r){!e||t[r]?n.show():n.hide(),n.update(t[r],e.length)})}},{key:"toggleNoResults",value:function(e,t){var n=this.menu.children_[this.menu.children_.length-1];!e||Object.keys(t).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(K(t,"buildWrapperCSSClass",this,3)([]))}},{key:"update",value:function(){K(t,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){K(t,"pressButton",this,3)([]);var e=this.menu.children_[0];(null==e?void 0:e.focus)&&(null==e||e.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){$.prototype.handleClick.apply(this)}}])&&q(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}($);function te(e){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function ne(){return ne="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=le(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},ne.apply(null,arguments)}function re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ae(r.key),r)}}function ie(e,t,n){return t&&oe(e.prototype,t),n&&oe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ae(e){var t=function(e){if("object"!=te(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==te(t)?t:t+""}function ue(e,t,n){return t=le(t),function(e,t){if(t&&("object"==te(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ce()?Reflect.construct(t,n||[],le(e).constructor):t.apply(e,n))}function ce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ce=function(){return!!e})()}function le(e){return le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},le(e)}function se(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fe(e,t)}function fe(e,t){return fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fe(e,t)}r.Z.registerComponent("subtitleSearchButton",ee);var pe=r.Z.getComponent("MenuItem"),ye=r.Z.getComponent("MenuButton"),de=[{label:"Play / Pause",type:"play-pause"},{label:"Volume",type:"volume"},{label:"Mute",type:"mute"},{label:"Toggle fullscreen",type:"fullscreen"},{label:"Exit fullscreen",type:"exit-fullscreen"},{label:"Toggle theatre mode",type:"theatre-mode"}],ve=function(e){function t(e,n){return re(this,t),ue(this,t,[e,n])}return se(t,e),ie(t,[{key:"createEl",value:function(){return r.Z.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(e){switch(e){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">⇑</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">⇓</span>';case"mute":return'<span class="cv-keyboard-button cv-single-key">m</span>';case"fullscreen":return'<span class="cv-keyboard-button cv-single-key">f</span>';case"exit-fullscreen":return'<span class="cv-keyboard-button cv-single-key">esc</span>';case"theatre-mode":return'<span class="cv-keyboard-button cv-single-key">t</span>'}return""}}])}(pe),he=function(e){function t(){var e;return re(this,t),(e=ue(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return se(t,e),ie(t,[{key:"createItems",value:function(){var e=this,t=[];return t.push(new g.Z(this.player_,{label:"Keyboard shortcuts"})),de.forEach(function(n){t.push(new ve(e.player_,n))}),t}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat((e=t,n=this,"function"==typeof(r=ne(le(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"getCollabsibleName",value:function(){return"Keyboard shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!this.player_.options_.mobile}},{key:"showCollapsibleMenu",value:function(){ye.prototype.handleClick.apply(this)}}])}(ye);function be(e){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(e)}function me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ge(r.key),r)}}function ge(e){var t=function(e){if("object"!=be(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==be(t)?t:t+""}function we(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(we=function(){return!!e})()}function Oe(e,t,n,r){var o=Pe(Se(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function Pe(){return Pe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Se(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Pe.apply(null,arguments)}function Se(e){return Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Se(e)}function je(e,t){return je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},je(e,t)}r.Z.registerComponent("KeyboardShortcutsButton",he);var Ce="cv-collapsed",_e=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Se(t),function(e,t){if(t&&("object"==be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,we()?Reflect.construct(t,n||[],Se(e).constructor):t.apply(e,n))}(this,t,[e,n])).addChild("cogButton",{items:r.children_},r.children_.length-1),r.update=r.update.bind(r),r.player_.on("cv-updatecog",r.update),r.player_.on("playerresize",r.update),r.player_.one("play",r.update),r.player_.on("dispose",function(){r.player_.off("cv-updatecog",r.update),r.player_.off("playerresize",r.update),r.player_.off("play",r.update)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&je(e,t)}(t,e),n=t,(r=[{key:"toggleHidden",value:function(e){for(var t=0;t<this.children_.length;t++){var n=this.children_[t];n.isCollabsible&&(n.alwaysCollapsed||e?(n.isCollapsed=!0,n.addClass(Ce)):(n.isCollapsed=!1,n.removeClass(Ce)))}this.getChild("cogButton").update()}},{key:"update",value:function(){var e=this.player_.isFullscreen(),t=this.player_.whiteboardModePlugin().side,n=this.player_.el().getBoundingClientRect(),r=!e||"left"!==t&&"right"!==t?n.width:n.height;if(r){this.addClass("cv-collapsorator-ready");var o=r<(!e||"left"!==t&&"right"!==t&&"top"!==t?600:1200);this.player_.options_.deferMenus&&(o=!0),this.toggleHidden(o)}}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(Oe(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Oe(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])&&me(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));r.Z.registerComponent("collapserator",_e);var ke=["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"],Te=n(51614),Ee=n(8942),Re=n(70065),Ie=n(35490),Le=n(28716);function xe(e){return xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xe(e)}function Me(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return Ae(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,u=0,c=e,p.n=n,a}};function y(n,r){for(u=n,c=r,t=0;!f&&l&&!o&&t<s.length;t++){var o,i=s[t],y=p.p,d=i[2];n>3?(o=d===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=n<2&&y<i[1])?(u=0,p.v=r,p.n=i[1]):y<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,p.n=d,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,d),u=s,c=d;(t=u<2?e:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),y(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(t){i=e,u=1,c=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Ae(t={},r,function(){return this}),t),f=l.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,Ae(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,Ae(f,"constructor",l),Ae(l,"constructor",c),c.displayName="GeneratorFunction",Ae(l,o,"GeneratorFunction"),Ae(f),Ae(f,o,"Generator"),Ae(f,r,function(){return this}),Ae(f,"toString",function(){return"[object Generator]"}),(Me=function(){return{w:i,m:p}})()}function Ae(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ae=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){Ae(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},Ae(e,t,n,r)}function Be(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,De(r.key),r)}}function De(e){var t=function(e){if("object"!=xe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xe(t)?t:t+""}var Ne,ze=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()},(t=[{key:"logStream",value:function(){var e="v:".concat(this.options.videoId);Te.SG.cacheExists(e)||(this.collectionApiClient.log({type:Re.Vw.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:Re.eq.V3}),Te.SG&&Te.SG.cacheSet(e,null,300))}},{key:"logVideoProgress",value:function(e){var t=this,n=this.getAnalyticsData();this.collectionApiClient.log(e.map(function(e){return{type:Re.Vw.StreamProgress,actionContext:t.getActionContext(),data:Object.assign(Object.assign({},n),{progress:e}),eventVersion:Re.eq.V2}}))}},{key:"logUserAction",value:function(e,t){var n=Object.assign(Object.assign({},this.getAnalyticsData()),e),r=Object.assign(Object.assign({},this.getActionContext()),t);this.collectionApiClient.log({type:t.actionType,data:n,actionContext:r,eventVersion:t.eventVersion||Re.eq.V2})}},{key:"getAnalyticsData",value:function(){var e=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(e.video.shareId=this.options.shareId);var t=this.getEntityType();return t===Re.py.Interactive?e.interactive={id:+this.options.mediaId}:t===Re.py.Clip&&(e.clip={id:+this.options.mediaId}),e}},{key:"initialize",value:function(){this.setupCollectionApiClient(),Le.Y.lockWindowSession(),this.options.player.one("dispose",function(){return Le.Y.unlockWindowSession()})}},{key:"setupCollectionApiClient",value:function(){var e=this;this.collectionApiClient=new Ee.q({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return e.getCurrentUser()},shouldLog:Ie.k.shouldLog,formatData:Ie.k.formatData})}},{key:"getCurrentUser",value:function(){return e=this,t=void 0,n=void 0,r=Me().m(function e(){return Me().w(function(e){for(;;)if(0===e.n)return e.a(2,{id:this.options.userId,customerId:this.options.customerId,sessionId:this.options.authSessionId})},e,this)}),new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}c((r=r.apply(e,t||[])).next())});var e,t,n,r}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?Re.MC.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return Re.py.Video;case"MasterInteractive":return Re.py.Interactive;case"MasterClip":return Re.py.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return Re.LZ.Player;case"interactive-player":return Re.LZ.InteractivePlayer;case"create-clip-player":return Re.LZ.CreateClipPlayer}}}])&&Be(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),Ze=n(61380),Fe=n(19389),Ve=n.n(Fe);function Ge(e){return Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ge(e)}function He(e,t,n){return(t=function(e){var t=function(e){if("object"!=Ge(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ge(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ue(e){e.paused()?e.play():e.pause()}function qe(e,t){e.currentTime(e.currentTime()+t)}function We(e,t){e.volume(e.volume()+t)}var Ye,Ke=(He(He(He(He(He(He(He(He(He(He(Ne={},"f",function(e){document[e.fsApi_.fullscreenEnabled]&&(e.isFullscreen()?e.exitFullscreen():e.requestFullscreen())}),"m",function(e){var t=e.volume(),n=e.lastVolume_();if(0===t){var r=n<.1?.1:n;e.volume(r),e.muted(!1)}else e.muted(!e.muted())}),"k",Ue),"space",Ue),"t",function(e){var t=e.theatreModePlugin().getTheatreMode();e.theatreModePlugin().toggleTheatreMode(!t,{shouldLog:!0})}),"left",function(e){return qe(e,-5)}),"right",function(e){return qe(e,5)}),"j",function(e){return qe(e,-10)}),"l",function(e){return qe(e,10)}),"up",function(e){return We(e,.05)}),He(Ne,"down",function(e){return We(e,-.05)})),Je=n(61876);!function(e){e.PhysicallyChapteredVideo="physically-chaptered-video"}(Ye||(Ye={}));var Qe=n(29573);function Xe(e){return Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xe(e)}function $e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,et(r.key),r)}}function et(e){var t=function(e){if("object"!=Xe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xe(t)?t:t+""}function tt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tt=function(){return!!e})()}function nt(){return nt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=rt(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},nt.apply(null,arguments)}function rt(e){return rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rt(e)}function ot(e,t){return ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ot(e,t)}n(26259);var it=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=rt(t),function(e,t){if(t&&("object"==Xe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tt()?Reflect.construct(t,n||[],rt(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.configureMenuDimensions=r.configureMenuDimensions.bind(r),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ot(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.player.ready(this.configureMenuDimensions),this.player.one("play",this.configureMenuDimensions),this.player.on("resize",this.configureMenuDimensions),this.player.on("fullscreenchange",this.configureMenuDimensions),this.player.on("resizemenus",this.configureMenuDimensions),this.player.on("ready",this.configureMenuDimensions)}},{key:"dispose",value:function(){var e,n,r;this.player.off("resize",this.configureMenuDimensions),this.player.off("fullscreenchange",this.configureMenuDimensions),this.player.off("resizemenus",this.configureMenuDimensions),this.player.off("ready",this.configureMenuDimensions),(e=t,n=this,"function"==typeof(r=nt(rt(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"configureMenuDimensions",value:function(){var e=this,t=function(t){if(!e.options.mobile){var n=e.player.getChild("collapserator"),r=n.getChild("volumePanel"),o=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:t},o),e.player.trigger("volumechange")}},n=this.player.isFullscreen();if(n&&!this.options.mobile){var r=this.player.whiteboardModePlugin().side;if(t("top"!==r),"left"===r||"right"===r||"top"===r){var o=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach(function(e){e.style.paddingTop=null,e.style.marginBottom=null,e.style.width="calc(".concat(o,"px - 4em)")})}}n||t(!0);var i=this.player.currentWidth(),a=this.player.currentHeight()/i*100,u=this.player.el().querySelector(".cv-collapsorator"),c=this.player.el().querySelectorAll(".vjs-menu"),l=u&&u.offsetHeight;l?("CreateClipSeekBar"===this.options.seekBarName&&(l+=22),c&&c.length&&c.forEach(function(t){!n&&e.options.overflowControls?t.style.paddingTop="80%":t.style.paddingTop="calc(".concat(a,"% - ").concat(l,"px)"),t.style.marginBottom="".concat(l,"px"),t.style.width=null,t.querySelector(".vjs-menu-content")&&(i<=450?e.player.addClass("cv-player-small"):e.player.removeClass("cv-player-small"))})):this.player.one("play",this.configureMenuDimensions)}}],r&&$e(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));r.Z.registerPlugin("configureMenuDimensionsPlugin",it);var at=n(69140);function ut(e){return ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ut(e)}function ct(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lt(r.key),r)}}function lt(e){var t=function(e){if("object"!=ut(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ut(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ut(t)?t:t+""}function st(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(st=function(){return!!e})()}function ft(){return ft="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=pt(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},ft.apply(null,arguments)}function pt(e){return pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pt(e)}function yt(e,t){return yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yt(e,t)}var dt=r.Z.getPlugin("plugin"),vt="cvplayer-volume",ht="cvplayer-mute",bt=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=pt(t),function(e,t){if(t&&("object"==ut(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,st()?Reflect.construct(t,n||[],pt(e).constructor):t.apply(e,n))}(this,t,[e])).enabled=!0,n.player.ready(function(){return n.initialize()}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yt(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.player.options_.mobile?this.removeVolumeControl():at.S.hasLocalStorage()&&(this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var e=at.S.get(vt),t=at.S.get(ht);e&&this.player.volume(+e),t&&this.player.muted("true"===t)}},{key:"saveVolumeState",value:function(){this.enabled&&(at.S.set(vt,this.player.volume().toString()),at.S.set(ht,this.player.muted().toString()))}},{key:"removeVolumeControl",value:function(){this.player.volume(1);var e=this.player.getChild("collapserator"),t=e.getChild("volumePanel");e.removeChild(t)}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1}},{key:"dispose",value:function(){var e,n,r;this.player.off("volumechange",this.saveVolumeState),(e=t,n=this,"function"==typeof(r=ft(pt(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}],r&&ct(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dt);function mt(e){return mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mt(e)}function gt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wt(r.key),r)}}function wt(e){var t=function(e){if("object"!=mt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mt(t)?t:t+""}function Ot(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ot=function(){return!!e})()}function Pt(e){return Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pt(e)}function St(e,t){return St=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},St(e,t)}r.Z.registerPlugin("persistVolumePlugin",bt);var jt=r.Z.getPlugin("plugin"),Ct="cvplayer-playback-rate",_t=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Pt(t),function(e,t){if(t&&("object"==mt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ot()?Reflect.construct(t,n||[],Pt(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.player.dataLoaded(function(){return r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&St(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){var e,t=this;if(at.S.hasLocalStorage()){this.savePlaybackRate=this.savePlaybackRate.bind(this),this.player.on("ratechange",this.savePlaybackRate),this.one("dispose",function(){t.player.off("ratechange",t.savePlaybackRate)});var n=+at.S.get(Ct);(null===(e=this.player.playbackRates())||void 0===e?void 0:e.some(function(e){return e===n}))&&this.player.playbackRate(n)}}},{key:"savePlaybackRate",value:function(){var e,t=this.player.playbackRate().toString();this.setDefaultPlaybackRate(+t),at.S.set(Ct,t),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({rate:t},{actionType:Re.Vw.Select,workflowPhase:Re.eu.Complete,descriptor:Re.UX.ChangeSpeed,entity:Re.py.PlaybackSpeed,eventVersion:Re.eq.V3})}},{key:"setDefaultPlaybackRate",value:function(e){this.player.defaultPlaybackRate(e)}},{key:"setPlaybackRateWithoutPersisting",value:function(e){this.player.off("ratechange",this.savePlaybackRate),this.player.playbackRate(e),this.setDefaultPlaybackRate(e),this.player.on("ratechange",this.savePlaybackRate)}}])&>(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(jt);function kt(e){return kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kt(e)}function Tt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Et(r.key),r)}}function Et(e){var t=function(e){if("object"!=kt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kt(t)?t:t+""}function Rt(e,t){if(t&&("object"==kt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function It(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(It=function(){return!!e})()}function Lt(e){return Lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lt(e)}function xt(e,t){return xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xt(e,t)}r.Z.registerPlugin("persistPlaybackRatePlugin",_t);var Mt=function(e){function t(e){var n,r,o,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,i=[e],o=Lt(o=t),(n=Rt(r,It()?Reflect.construct(o,i||[],Lt(r).constructor):o.apply(r,i))).fullscreenBecauseOfRotate=!1,n.player.supportsFullScreen()?(n.onRotate=n.onRotate.bind(n),n.onFullscreenChange=n.onFullscreenChange.bind(n),n.player.ready(function(){return n.initialize()}),n):Rt(n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xt(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.player.on("fullscreenchange",this.onFullscreenChange),window.addEventListener("orientationchange",this.onRotate)}},{key:"dispose",value:function(){this.player.off("fullscreenchange",this.onFullscreenChange),window.removeEventListener("orientationchange",this.onRotate)}},{key:"onFullscreenChange",value:function(){this.player.isFullscreen()||(this.fullscreenBecauseOfRotate=!1)}},{key:"onRotate",value:function(){var e=this.getAngle();90===e||-90===e||270===e?(this.player.requestFullscreen(),this.fullscreenBecauseOfRotate=!0):this.fullscreenBecauseOfRotate&&this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"getAngle",value:function(){var e,t;return"number"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.angle)?window.screen.orientation.angle:0}}])&&Tt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));r.Z.registerPlugin("fullscreenOnRotatePlugin",Mt);var At="\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",Bt=n(90244);function Dt(e){return Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dt(e)}function Nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zt(r.key),r)}}function zt(e){var t=function(e){if("object"!=Dt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Dt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dt(t)?t:t+""}function Zt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zt=function(){return!!e})()}function Ft(e){return Ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ft(e)}function Vt(e,t){return Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vt(e,t)}var Gt=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Ft(t),function(e,t){if(t&&("object"==Dt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Zt()?Reflect.construct(t,n||[],Ft(e).constructor):t.apply(e,n))}(this,t,[e,n])).update=(0,Bt.P2)(r.update.bind(r),1e3),e.on("timeupdate",r.update),e.one("dispose",function(){e.off("timeupdate",r.update),r.el_.removeEventListener("click",r.pause)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vt(e,t)}(t,e),n=t,(o=[{key:"update",value:function(){var e=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(e)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var e={innerHTML:At,className:this.buildCSSClass()},t={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=r.Z.dom.createEl("a",e,t);return this.createControlTextEl(n),n.addEventListener("click",this.pause.bind(this)),n}},{key:"pause",value:function(){this.player_.pause()}}])&&Nt(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Button"));function Ht(e){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ht(e)}function Ut(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qt(r.key),r)}}function qt(e){var t=function(e){if("object"!=Ht(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ht(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ht(t)?t:t+""}function Wt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wt=function(){return!!e})()}function Yt(e){return Yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yt(e)}function Kt(e,t){return Kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Kt(e,t)}Gt.prototype.controlText_="Open in ClickView",r.Z.registerComponent("OpenExternallyButton",Gt);var Jt=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Yt(t),function(e,t){if(t&&("object"==Ht(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wt()?Reflect.construct(t,n||[],Yt(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,e.ready(function(){return r.onReady()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kt(e,t)}(t,e),n=t,(r=[{key:"onReady",value:function(){var e=this.player.getChild("collapserator"),t=e.getChild("customControlSpacer"),n=e.children_.indexOf(t);e.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&Ut(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function Qt(e){return Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qt(e)}function Xt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$t(r.key),r)}}function $t(e){var t=function(e){if("object"!=Qt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qt(t)?t:t+""}function en(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(en=function(){return!!e})()}function tn(e,t,n,r){var o=nn(rn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function nn(){return nn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=rn(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},nn.apply(null,arguments)}function rn(e){return rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rn(e)}function on(e,t){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},on(e,t)}r.Z.registerPlugin("openExternallyPlugin",Jt);var an=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=rn(t),function(e,t){if(t&&("object"==Qt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,en()?Reflect.construct(t,n||[],rn(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&on(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(tn(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return tn(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"setUi",value:function(e,t){var n=this,r=e>0,o=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(o,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*e,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(function(){n.removeText()},t)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&Xt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("component"));function un(e){return un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(e)}function cn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ln(r.key),r)}}function ln(e){var t=function(e){if("object"!=un(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=un(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==un(t)?t:t+""}function sn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sn=function(){return!!e})()}function fn(){return fn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=pn(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},fn.apply(null,arguments)}function pn(e){return pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pn(e)}function yn(e,t){return yn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yn(e,t)}r.Z.registerComponent("TouchControls",an);var dn=r.Z.getPlugin("plugin"),vn=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=pn(t),function(e,t){if(t&&("object"==un(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sn()?Reflect.construct(t,n||[],pn(e).constructor):t.apply(e,n))}(this,t,[e])).doubleTouchCount=0,n.seekStartTime=0,n.directionModifier=0,n.bindFunctions(),n.player.ready(function(){return n.initialize()}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yn(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this),this.unBindEventListeners=this.unBindEventListeners.bind(this)}},{key:"initialize",value:function(){var e=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",function(){e.player.off("ready",e.reBindEventListeners)}),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.tech.on("touchstart",this.onTouchStart),this.tech.on("touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&"Html5"===this.tech.name()&&(this.tech.off("touchstart",this.onTouchStart),this.tech.off("touchend",this.onTouchEnd))}},{key:"dispose",value:function(){var e,n,r;(e=t,n=this,"function"==typeof(r=fn(pn(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([]),this.unBindEventListeners()}},{key:"onTouchStart",value:function(e){this.touchStartTime=e.timeStamp,this.userActive=this.player.userActive()}},{key:"onTouchEnd",value:function(e){var t=this;if(e.changedTouches.length){if(e.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(e),void(this.lastTouchTime=e.timeStamp);this.resetProperties(),this.lastTouchTime=e.timeStamp,e.timeStamp-this.touchStartTime<300&&window.setTimeout(function(){t.doubleTouchCount||(t.player.paused()?t.player.play():t.userActive&&t.player.pause())},300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(e){var t=this.player.el().getBoundingClientRect(),n=t.left+t.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),e.changedTouches[0].pageX<n?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}],r&&cn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function hn(e){return hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hn(e)}function bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mn(r.key),r)}}function mn(e){var t=function(e){if("object"!=hn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hn(t)?t:t+""}r.Z.registerPlugin("touchControls",vn);var gn=function(){return e=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=n.id,this.plugin=t,this.source=n,this.enabled=this.enabled.bind(this)},(t=[{key:"enabled",value:function(e){return void 0===e?this.plugin.currentSource===this.source:(e&&this.plugin.setSource(this.source.id),e)}}])&&bn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function wn(e){return wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wn(e)}function On(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Pn(r.key),r)}}function Pn(e){var t=function(e){if("object"!=wn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wn(t)?t:t+""}function Sn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Sn=function(){return!!e})()}function jn(e){return jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jn(e)}function Cn(e,t){return Cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cn(e,t)}var _n=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=jn(t),function(e,t){if(t&&("object"==wn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Sn()?Reflect.construct(t,n||[],jn(e).constructor):t.apply(e,n))}(this,t,[e])).options_=n,r.player.ready(function(){return r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cn(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){var e=this;this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources),this.onQualityChange=this.onQualityChange.bind(this),this.qualityLevels.on("change",this.onQualityChange),this.player.one("dispose",function(){e.qualityLevels.off("change",e.onQualityChange)})}},{key:"currentSource",get:function(){return this._currentSource}},{key:"onQualityChange",value:function(){var e=this.qualityLevels[this.qualityLevels.selectedIndex];this.player.trigger("cv-quality-change",e.id)}},{key:"setSource",value:function(e){var t=this,n=this.getSourceById(e);if(null===n)return this.currentSource;var r=this.player.currentTime(),o=!this.player.paused();this._currentSource=n;var i=this.player.hasStarted();return this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",function(){t.player.currentTime()!==r&&t.player.currentTime(r),o&&t.player.play(),i&&t.player.hasStarted(!0)}),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(e){return this.sources.find(function(t){return t.id===e})}},{key:"repopulateSources",value:function(e){for(var t=null;this.qualityLevels.length;)this.qualityLevels[0].enabled&&(t=this.qualityLevels[0].id),this.qualityLevels.removeQualityLevel(this.qualityLevels[0]);this.sources=[],this.populateSources(e,t)}},{key:"sortSources",value:function(e){return e.sort(function(e,t){return e.id===t.id?0:+e.id>+t.id?-1:1})}},{key:"populateSources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=null;(e=this.sortSources(e)).forEach(function(e){t.qualityLevels.addQualityLevel(new gn(t,e)),t.sources.push(e),t.trigger({event:"addsource",source:e}),null===n?e.default&&(r=e):e.id===n&&(r=e)}),null===r&&(r=this.sources[0]),null!==r&&this.setSource(r.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(e){for(var t=this.qualityLevels,n=-1,r=0;r<t.length;r++)if(t[r].id===e.id){n=r;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})}}],r&&On(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function kn(e){return kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kn(e)}function Tn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,En(r.key),r)}}function En(e){var t=function(e){if("object"!=kn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kn(t)?t:t+""}r.Z.registerPlugin("progressiveFiles",_n);var Rn=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(e,t){var n=e.getQualityLevelById(t);if(n||(n=this.getNextBestQuality(e,t)),!n)return null;for(var r=0;r<e.length;r++){var o=e[r];o.enabled=n.id===o.id}return n}},{key:"getNextBestQuality",value:function(e,t){var n=this.getKnownProfiles(),r=n.indexOf(t);if(r>=0){for(var o=r+1;o<n.length;o++){var i=n[o],a=e.getQualityLevelById(i);if(a)return a}for(var u=r-1;u>0;u--){var c=n[u],l=e.getQualityLevelById(c);if(l)return l}}return null}}],null&&Tn(e.prototype,null),t&&Tn(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function In(e){return In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},In(e)}function Ln(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return xn(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,u=0,c=e,p.n=n,a}};function y(n,r){for(u=n,c=r,t=0;!f&&l&&!o&&t<s.length;t++){var o,i=s[t],y=p.p,d=i[2];n>3?(o=d===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=n<2&&y<i[1])?(u=0,p.v=r,p.n=i[1]):y<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,p.n=d,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,d),u=s,c=d;(t=u<2?e:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),y(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(t){i=e,u=1,c=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(xn(t={},r,function(){return this}),t),f=l.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,xn(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,xn(f,"constructor",l),xn(l,"constructor",c),c.displayName="GeneratorFunction",xn(l,o,"GeneratorFunction"),xn(f),xn(f,o,"Generator"),xn(f,r,function(){return this}),xn(f,"toString",function(){return"[object Generator]"}),(Ln=function(){return{w:i,m:p}})()}function xn(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}xn=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){xn(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},xn(e,t,n,r)}function Mn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,An(r.key),r)}}function An(e){var t=function(e){if("object"!=In(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=In(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==In(t)?t:t+""}var Bn=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.name,this.playbackProfile=t.playbackProfile,this.address=new URL(t.httpsAddress)},(t=[{key:"getUrl",value:function(e){return e?this.address+"cache?file="+encodeURIComponent(e):null}},{key:"ping",value:function(){return e=this,t=void 0,n=void 0,r=Ln().m(function e(){var t,n,r,o;return Ln().w(function(e){for(;;)switch(e.n){case 0:return t=new AbortController,n=setTimeout(function(){return t.abort()},1e3),e.p=1,e.n=2,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:t.signal});case 2:return r=e.v,e.n=3,r.text();case 3:return o=e.v,clearTimeout(n),e.a(2,"PONG"===o);case 4:return e.p=4,e.v,e.a(2,!1)}},e,this,[[1,4]])}),new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}c((r=r.apply(e,t||[])).next())});var e,t,n,r}}])&&Mn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Dn(e){return Dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dn(e)}function Nn(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return zn(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,u=0,c=e,p.n=n,a}};function y(n,r){for(u=n,c=r,t=0;!f&&l&&!o&&t<s.length;t++){var o,i=s[t],y=p.p,d=i[2];n>3?(o=d===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=n<2&&y<i[1])?(u=0,p.v=r,p.n=i[1]):y<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,p.n=d,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,d),u=s,c=d;(t=u<2?e:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),y(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(t){i=e,u=1,c=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(zn(t={},r,function(){return this}),t),f=l.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,zn(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,zn(f,"constructor",l),zn(l,"constructor",c),c.displayName="GeneratorFunction",zn(l,o,"GeneratorFunction"),zn(f),zn(f,o,"Generator"),zn(f,r,function(){return this}),zn(f,"toString",function(){return"[object Generator]"}),(Nn=function(){return{w:i,m:p}})()}function zn(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}zn=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){zn(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},zn(e,t,n,r)}function Zn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fn(r.key),r)}}function Fn(e){var t=function(e){if("object"!=Dn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Dn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dn(t)?t:t+""}var Vn=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.logger=r.Z.log.createLogger("localcache")},(t=[{key:"setSource",value:function(e,t){return n=this,r=void 0,o=void 0,i=Nn().m(function n(){var r;return Nn().w(function(n){for(;;)switch(n.n){case 0:if(!this.player.localCache||void 0===(null==e?void 0:e.src)){n.n=2;break}return n.n=1,this.player.localCache().getActiveLocalCache();case 1:null!==(r=n.v)&&(this.logger.debug("Using Local Cache",r),e.src=r.getUrl(e.src));case 2:t(null,e);case 3:return n.a(2)}},n,this)}),new(o||(o=Promise))(function(e,t){function a(e){try{c(i.next(e))}catch(e){t(e)}}function u(e){try{c(i.throw(e))}catch(e){t(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o(function(e){e(n)})).then(a,u)}c((i=i.apply(n,r||[])).next())});var n,r,o,i}}])&&Zn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Gn(e){return Gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gn(e)}function Hn(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return Un(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,u=0,c=e,p.n=n,a}};function y(n,r){for(u=n,c=r,t=0;!f&&l&&!o&&t<s.length;t++){var o,i=s[t],y=p.p,d=i[2];n>3?(o=d===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=n<2&&y<i[1])?(u=0,p.v=r,p.n=i[1]):y<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,p.n=d,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,d),u=s,c=d;(t=u<2?e:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),y(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(t){i=e,u=1,c=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Un(t={},r,function(){return this}),t),f=l.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,Un(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,Un(f,"constructor",l),Un(l,"constructor",c),c.displayName="GeneratorFunction",Un(l,o,"GeneratorFunction"),Un(f),Un(f,o,"Generator"),Un(f,r,function(){return this}),Un(f,"toString",function(){return"[object Generator]"}),(Hn=function(){return{w:i,m:p}})()}function Un(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Un=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){Un(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},Un(e,t,n,r)}function qn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wn(r.key),r)}}function Wn(e){var t=function(e){if("object"!=Gn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Gn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gn(t)?t:t+""}function Yn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yn=function(){return!!e})()}function Kn(){return Kn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Jn(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Kn.apply(null,arguments)}function Jn(e){return Jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jn(e)}function Qn(e,t){return Qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qn(e,t)}r.Z.use("*",function(e){return new Vn(e)});var Xn='<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.9"><g id="Local-Cache" transform="translate(2.000000, 2.000000)"><rect id="Rectangle" fill="#FFFFFF" x="0" y="2.4" width="18.8" height="15.2"></rect><ellipse id="Oval" fill="#FFFFFF" cx="9.4" cy="2.4" rx="9.4" ry="2.4"></ellipse><ellipse id="Oval-Copy" fill="#FFFFFF" cx="9.4" cy="17.6" rx="9.4" ry="2.4"></ellipse><g id="Logo/Circle" transform="translate(2.500000, 3.000000)"><circle id="Oval" fill="#FFFFFF" cx="7" cy="7" r="7"></circle><polygon id="Fill-1" fill="#F8981D" points="4.66666667 2.33333333 4.66666667 11.4245258 10.0383286 6.87866667"></polygon></g></g></g></svg>',$n=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Jn(t),function(e,t){if(t&&("object"==Gn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Yn()?Reflect.construct(t,n||[],Jn(e).constructor):t.apply(e,n))}(this,t,[e,n])).hide(),r.onLocalCacheChange=r.onLocalCacheChange.bind(r),e.ready(function(){r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qn(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return(e=t,n=this,"function"==typeof(r=Kn(Jn(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)(["div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(Xn,"</div>")},{title:"Streaming from ClickView Local Cache"}]);var e,n,r}},{key:"initialize",value:function(){var e=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",function(){e.localCachePlugin.off("localcachechanged",e.onLocalCacheChange)}),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return e=this,t=void 0,n=void 0,r=Hn().m(function e(){return Hn().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.localCachePlugin.getActiveLocalCache();case 1:e.v?this.show():this.hide();case 2:return e.a(2)}},e,this)}),new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}c((r=r.apply(e,t||[])).next())});var e,t,n,r}}],r&&qn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function er(e){return er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},er(e)}function tr(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return nr(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,u=0,c=e,p.n=n,a}};function y(n,r){for(u=n,c=r,t=0;!f&&l&&!o&&t<s.length;t++){var o,i=s[t],y=p.p,d=i[2];n>3?(o=d===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=n<2&&y<i[1])?(u=0,p.v=r,p.n=i[1]):y<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,p.n=d,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,d),u=s,c=d;(t=u<2?e:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),y(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(t){i=e,u=1,c=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(nr(t={},r,function(){return this}),t),f=l.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,nr(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,nr(f,"constructor",l),nr(l,"constructor",c),c.displayName="GeneratorFunction",nr(l,o,"GeneratorFunction"),nr(f),nr(f,o,"Generator"),nr(f,r,function(){return this}),nr(f,"toString",function(){return"[object Generator]"}),(tr=function(){return{w:i,m:p}})()}function nr(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}nr=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){nr(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},nr(e,t,n,r)}function rr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,or(r.key),r)}}function or(e){var t=function(e){if("object"!=er(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=er(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==er(t)?t:t+""}function ir(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ir=function(){return!!e})()}function ar(){return ar="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ur(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},ar.apply(null,arguments)}function ur(e){return ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ur(e)}function cr(e,t){return cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cr(e,t)}r.Z.registerComponent("localCacheIndicator",$n);var lr=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}c((r=r.apply(e,t||[])).next())})},sr=function(e){function t(e,n){var o;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(o=function(e,t,n){return t=ur(t),function(e,t){if(t&&("object"==er(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ir()?Reflect.construct(t,n||[],ur(e).constructor):t.apply(e,n))}(this,t,[e])).logger_=r.Z.log.createLogger("localcache"),void 0===n)throw Error("no options defined");return o.localCaches_=n.localCacheAddresses.map(function(e){return new Bn(e)}),o.player.ready(function(){o.initialize(),n.enabled&&o.enable()}),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cr(e,t)}(t,e),n=t,o=[{key:"isEnabled",get:function(){return this.enabled_}},{key:"enable",value:function(){this.enabled_=!0,this.resetActiveLocalCache()}},{key:"disable",value:function(){this.enabled_=!1}},{key:"getActiveLocalCache",value:function(){return this.enabled_?this.activeLocalCache_:null}},{key:"resetActiveLocalCache",value:function(){this.clearActiveLocalCache(),this.activeLocalCache_=this.getActiveLocalCacheInternal()}},{key:"clearActiveLocalCache",value:function(){this.activeLocalCache_&&(this.activeLocalCache_=null,this.onLocalCacheChange(null))}},{key:"removeLocalCache",value:function(e){this.localCaches_=this.localCaches_.filter(function(t){return t!==e})}},{key:"dispose",value:function(){var e,n,r;(e=t,n=this,"function"==typeof(r=ar(ur(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"initialize",value:function(){this.player.controlBar.addChild("localCacheIndicator")}},{key:"handleNetworkError",value:function(){return lr(this,void 0,void 0,tr().m(function e(){var t;return tr().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getActiveLocalCache();case 1:if(!(t=e.v)){e.n=3;break}return e.n=2,t.ping();case 2:e.v&&this.removeLocalCache(t);case 3:return this.resetActiveLocalCache(),e.n=4,this.getActiveLocalCache();case 4:return this.resetSource(),e.a(2,!0)}},e,this)}))}},{key:"resetSource",value:function(){for(var e=this.player.qualityLevels(),t=0;t<e.length;t++)e[t].enabled&&(e[t].enabled=!0)}},{key:"getActiveLocalCacheInternal",value:function(){return lr(this,void 0,void 0,tr().m(function e(){var t,n,r,o=this;return tr().w(function(e){for(;;)switch(e.n){case 0:return t=[],n=function(e){return lr(o,void 0,void 0,tr().m(function n(){return tr().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,e.ping();case 1:if(!n.v){n.n=2;break}t.push(e);case 2:return n.a(2)}},n)}))},e.n=1,Promise.all(this.localCaches_.map(function(e){return n(e)}));case 1:if(!(t.length>0)){e.n=2;break}return r=t[0],this.onLocalCacheChange(r),e.a(2,r);case 2:return e.a(2,null)}},e,this)}))}},{key:"onLocalCacheChange",value:function(e){this.logger_.debug("Local Cache changed",e),this.trigger("localcachechanged",{localCache:e});var t=!1;e&&e.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",e.playbackProfile),Rn.enableProfileOrNextBest(this.player.qualityLevels(),e.playbackProfile),t=!0),t||this.player.src(this.player.src())}}],o&&rr(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getPlugin("plugin"));function fr(e){return fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fr(e)}function pr(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return yr(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,u=0,c=e,p.n=n,a}};function y(n,r){for(u=n,c=r,t=0;!f&&l&&!o&&t<s.length;t++){var o,i=s[t],y=p.p,d=i[2];n>3?(o=d===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=n<2&&y<i[1])?(u=0,p.v=r,p.n=i[1]):y<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,p.n=d,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,d),u=s,c=d;(t=u<2?e:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),y(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(t){i=e,u=1,c=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(yr(t={},r,function(){return this}),t),f=l.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,yr(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,yr(f,"constructor",l),yr(l,"constructor",c),c.displayName="GeneratorFunction",yr(l,o,"GeneratorFunction"),yr(f),yr(f,o,"Generator"),yr(f,r,function(){return this}),yr(f,"toString",function(){return"[object Generator]"}),(pr=function(){return{w:i,m:p}})()}function yr(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}yr=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){yr(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},yr(e,t,n,r)}function dr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vr(r.key),r)}}function vr(e){var t=function(e){if("object"!=fr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fr(t)?t:t+""}function hr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hr=function(){return!!e})()}function br(){return br="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=mr(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},br.apply(null,arguments)}function mr(e){return mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mr(e)}function gr(e,t){return gr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gr(e,t)}r.Z.registerPlugin("localCache",sr);var wr=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}c((r=r.apply(e,t||[])).next())})},Or=function(e){function t(e,n){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(o=function(e,t,n){return t=mr(t),function(e,t){if(t&&("object"==fr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,hr()?Reflect.construct(t,n||[],mr(e).constructor):t.apply(e,n))}(this,t,[e])).playerApi=n.playerApi,o.fileToken=n.fileToken,o.logger=r.Z.log.createLogger("video-signature-expiry-plugin"),o.bindErrorHandlers(),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gr(e,t)}(t,e),n=t,o=[{key:"bindErrorHandlers",value:function(){this.onError=this.onError.bind(this),this.player.on("error",this.onError)}},{key:"dispose",value:function(){var e,n,r;this.player.off("error",this.onError),(e=t,n=this,"function"==typeof(r=br(mr(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"onError",value:function(){return wr(this,void 0,void 0,pr().m(function e(){var t,n=this;return pr().w(function(e){for(;;)switch(e.n){case 0:if((t=this.player.error().code)===MediaError.MEDIA_ERR_NETWORK||t===MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED){e.n=1;break}return e.a(2);case 1:return e.n=2,this.player.localCache().getActiveLocalCache();case 2:if(!e.v){e.n=3;break}return this.callErrorHandler(function(){return n.player.localCache().handleNetworkError()}),e.a(2);case 3:this.callErrorHandler(function(){return n.handleVideoSignatureExpiry()});case 4:return e.a(2)}},e,this)}))}},{key:"handleVideoSignatureExpiry",value:function(){return wr(this,void 0,void 0,pr().m(function e(){var t,n;return pr().w(function(e){for(;;)switch(e.n){case 0:if(this.playerApi&&this.fileToken){e.n=1;break}return e.a(2,!1);case 1:if(!(this.refetchedSourcesTimestamp+9e5>Date.now())){e.n=2;break}return e.a(2,!1);case 2:return this.refetchedSourcesTimestamp=Date.now(),t=null,e.p=3,this.logger.debug("Detected expired mp4 urls, attempting to refetch"),n="".concat(this.playerApi.origin,"/api/files?fileToken=").concat(this.fileToken),e.n=4,Ze.e.get(n);case 4:t=e.v,e.n=6;break;case 5:return e.p=5,e.v,this.logger.error("Failed to refetch expired mp4 urls"),e.a(2,!1);case 6:return this.logger.debug("Mp4 urls successfully refetched"),this.player.progressiveFiles().repopulateSources(t.progressive.map(function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}})),this.fileToken=t.fileToken,e.a(2,!0)}},e,this,[[3,5]])}))}},{key:"callErrorHandler",value:function(e){return wr(this,void 0,void 0,pr().m(function t(){var n,r,o,i=this;return pr().w(function(t){for(;;)switch(t.n){case 0:return n=this.player.currentTime(),r=!this.player.paused(),o=function(){i.player.currentTime(n),r&&i.player.play(),i.player.error(null)},this.player.one("loadedmetadata",o),t.n=1,e();case 1:if(!t.v){t.n=2;break}return t.a(2);case 2:this.player.off("loadedmetadata",o);case 3:return t.a(2)}},t,this)}))}}],o&&dr(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getPlugin("plugin"));function Pr(e){return Pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pr(e)}function Sr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,jr(r.key),r)}}function jr(e){var t=function(e){if("object"!=Pr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Pr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pr(t)?t:t+""}function Cr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Cr=function(){return!!e})()}function _r(e){return _r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_r(e)}function kr(e,t){return kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kr(e,t)}r.Z.registerPlugin("handleNetworkErrors",Or);var Tr=r.Z.getPlugin("plugin"),Er="cvplayer-show-subtitles",Rr="cvplayer-selected-language",Ir="cvplayer-subtitle-size",Lr=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=_r(t),function(e,t){if(t&&("object"==Pr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Cr()?Reflect.construct(t,n||[],_r(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kr(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.applyUserPreferences=this.applyUserPreferences.bind(this),this.player.textTracks().length&&(this.applyUserPreferences(),this.bindEventListeners())}},{key:"applyUserPreferences",value:function(){var e=!!this.options.showSubtitles,t=this.safeGet(Er);if("true"===t&&(e=!0),"false"===t&&(e=!1),e){var n=this.guessWhichTrack();n&&(n.mode="showing",this.player.trigger("cv:languageselected"))}else this.hideSubtitles();var r=this.safeGet(Ir);r||(r=this.options.subtitleSize),this.player.options_.mobile&&(r="medium"),r&&this.player.textTrackSettings.setSizeSetting(r)}},{key:"safeGet",value:function(e){if(at.S.hasLocalStorage())return at.S.get(e)}},{key:"onSelectedLanguageChange",value:function(){for(var e,t,n=this.player.textTracks(),r=0;r<n.length;r++){var o=n[r];if("subtitles"===o.kind&&"showing"===o.mode)return at.S.set(Er,"true"),at.S.set(Rr,o.language),void(null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({language:o.language},{actionType:Re.Vw.Select,entity:Re.py.Subtitle,workflowPhase:Re.eu.Complete,descriptor:Re.DL.On}))}at.S.set(Er,"false"),at.S.remove(Rr),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({language:""},{actionType:Re.Vw.Select,entity:Re.py.Subtitle,workflowPhase:Re.eu.Complete,descriptor:Re.DL.Off,eventVersion:Re.eq.V3})}},{key:"bindEventListeners",value:function(){var e=this;at.S.hasLocalStorage()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",function(){e.player.off("cv:languageselected",e.onSelectedLanguageChange),e.player.off("changesubtitlesize",e.onChangeSubtitleSize)}))}},{key:"onChangeSubtitleSize",value:function(){var e=this.player.textTrackSettings.getSizeSetting();at.S.set(Ir,e)}},{key:"guessWhichTrack",value:function(){for(var e,t,n=this.safeGet(Rr)||window.navigator.language,r=this.getLanguageParts(n),o=r.language,i=r.country,a=this.player.textTracks(),u=0;u<a.length;u++){var c=a[u];if("subtitles"===c.kind){var l=this.getLanguageParts(c.language),s=l.language,f=l.country;if(s===o&&(e=c,f||(t=c),f===i))return e}}return t||e||null}},{key:"getLanguageParts",value:function(e){var t=e.toLowerCase().split("-");return{language:t[0],country:t[1]}}},{key:"hideSubtitles",value:function(){for(var e=this.player.textTracks(),t=0;t<e.length;t++){var n=e[t];if("subtitles"!==n.kind)return;n.mode="disabled"}}},{key:"previewModeSubtitles",value:function(){var e=this.guessWhichTrack();e&&(e.mode="showing"),this.player.off("changesubtitlesize",this.onChangeSubtitleSize),this.player.textTrackSettings.setSizeSetting("large"),this.player.on("changesubtitlesize",this.onChangeSubtitleSize)}}])&&Sr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Tr);function xr(e){return xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xr(e)}function Mr(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return Ar(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,u=0,c=e,p.n=n,a}};function y(n,r){for(u=n,c=r,t=0;!f&&l&&!o&&t<s.length;t++){var o,i=s[t],y=p.p,d=i[2];n>3?(o=d===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=n<2&&y<i[1])?(u=0,p.v=r,p.n=i[1]):y<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,p.n=d,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,d),u=s,c=d;(t=u<2?e:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),y(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(t){i=e,u=1,c=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Ar(t={},r,function(){return this}),t),f=l.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,Ar(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,Ar(f,"constructor",l),Ar(l,"constructor",c),c.displayName="GeneratorFunction",Ar(l,o,"GeneratorFunction"),Ar(f),Ar(f,o,"Generator"),Ar(f,r,function(){return this}),Ar(f,"toString",function(){return"[object Generator]"}),(Mr=function(){return{w:i,m:p}})()}function Ar(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ar=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){Ar(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},Ar(e,t,n,r)}function Br(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Dr(r.key),r)}}function Dr(e){var t=function(e){if("object"!=xr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xr(t)?t:t+""}function Nr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Nr=function(){return!!e})()}function zr(e){return zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zr(e)}function Zr(e,t){return Zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zr(e,t)}r.Z.registerPlugin("persistSubtitleSettingsPlugin",Lr);var Fr=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}c((r=r.apply(e,t||[])).next())})},Vr=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=zr(t),function(e,t){if(t&&("object"==xr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Nr()?Reflect.construct(t,n||[],zr(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.player.ready(function(){return r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zr(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){return Fr(this,void 0,void 0,Mr().m(function e(){var t,n,r,o,i=this;return Mr().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getActiveLocalCache();case 1:if(t=e.v,(n=t?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(n="1080"),at.S.hasLocalStorage()&&(r=at.S.get(this.getStorageKey(!!t)))&&(n=r),o=this.player.qualityLevels(),(null==t?void 0:t.playbackProfile)||Rn.enableProfileOrNextBest(o,n),at.S.hasLocalStorage()){e.n=2;break}return e.a(2);case 2:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),o.on("change",this.onQualityLevelsChange),this.on("dispose",function(){o.off("change",i.onQualityLevelsChange)});case 3:return e.a(2)}},e,this)}))}},{key:"onQualityLevelsChange",value:function(){var e;return Fr(this,void 0,void 0,Mr().m(function t(){var n,r,o;return Mr().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.isLocalCacheActive();case 1:n=t.v,r=this.player.qualityLevels(),o=r[r.selectedIndex],at.S.set(this.getStorageKey(n),o.id),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({quality:o.id},{actionType:Re.Vw.Select,workflowPhase:Re.eu.Complete,descriptor:Re.UX.ChangeResolution,entity:Re.py.Resolution,eventVersion:Re.eq.V3});case 2:return t.a(2)}},t,this)}))}},{key:"isLocalCacheActive",value:function(){return Fr(this,void 0,void 0,Mr().m(function e(){return Mr().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.player.localCache().getActiveLocalCache();case 1:return e.a(2,!!e.v)}},e,this)}))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(e){return e?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&Br(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function Gr(e){return Gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gr(e)}function Hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ur(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Yr(r.key),r)}}function Wr(e,t,n){return t&&qr(e.prototype,t),n&&qr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yr(e){var t=function(e){if("object"!=Gr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Gr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gr(t)?t:t+""}function Kr(e,t,n){return t=Qr(t),function(e,t){if(t&&("object"==Gr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Jr()?Reflect.construct(t,n||[],Qr(e).constructor):t.apply(e,n))}function Jr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jr=function(){return!!e})()}function Qr(e){return Qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qr(e)}function Xr(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$r(e,t)}function $r(e,t){return $r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$r(e,t)}r.Z.registerPlugin("persistQualitySettingsPlugin",Vr);var eo=r.Z.getComponent("Component"),to=function(e){function t(e,n){return Ur(this,t),Kr(this,t,[e,n])}return Xr(t,e),Wr(t,[{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var e=this.options_.event,t=this.player_.duration(),n=(e.end.time-e.start.time)/t;this.el_.style.width=100*n+"%";var r=e.start.time/t;this.el_.style.left=100*r+"%"}}])}(eo),no=function(e){function t(){var e;return Ur(this,t),(e=Kr(this,t,arguments)).events_=[],e}return Xr(t,e),Wr(t,[{key:"update",value:function(){for(var e=this,t=this.children(),n=t.length;n>0;n--)this.removeChild(t[n]);this.events_.forEach(function(t){var n=new to(e.player(),{event:t});e.addChild(n),n.update()})}},{key:"addEvents",value:function(e){var t,n;(t=this.events_).push.apply(t,function(e){if(Array.isArray(e))return Hr(e)}(n=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Hr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hr(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),this.update()}},{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-progress-reporter-display"})}}])}(eo);function ro(e){return ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ro(e)}function oo(e,t,n){return(t=ao(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function io(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ao(r.key),r)}}function ao(e){var t=function(e){if("object"!=ro(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ro(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ro(t)?t:t+""}function uo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(uo=function(){return!!e})()}function co(e){return co=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},co(e)}function lo(e,t){return lo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lo(e,t)}var so=r.Z.getPlugin("plugin"),fo="play",po="playing",yo="pause",vo="seekstart",ho="ended",bo="pausedseek",mo=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=co(t),function(e,t){if(t&&("object"==ro(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,uo()?Reflect.construct(t,n||[],co(e).constructor):t.apply(e,n))}(this,t,[e,n])).eventBuffer=[],r.latestTime=0,r.lastPlayingTime=0,r.isPlaying=!1,r.isSeeking=!1,r.hasEnded=!1,r.shouldLogPlayOnTimeUpdate=!1,r.options=n,r.player.ready(function(){return r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lo(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval(),this.addEasterEgg()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var e=this,t=oo(oo(oo(oo(oo(oo({},fo,function(){return e.onPlay()}),yo,function(){return e.onPause()}),"timeupdate",function(){return e.onTimeUpdate()}),"seeking",function(){return e.onSeeking()}),ho,function(){return e.onEnded()}),po,function(){return e.onPlaying()}),n=Object.keys(t);n.forEach(function(n){return e.player.on(n,t[n])}),this.one("dispose",function(){n.forEach(function(n){return e.player.off(n,t[n])})})}},{key:"startInterval",value:function(){var e=this,t=this.options.interval||5e3;this.interval=window.setInterval(function(){return e.flushBuffer()},t),this.player.one("dispose",function(){return window.clearInterval(e.interval)})}},{key:"addEasterEgg",value:function(){var e,t,n=this,r="",o=function(t){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(r+=t.key)&&n.addDisplay(),window.clearTimeout(e),e=window.setTimeout(function(){r=""},500)},i=!1,a=function(){i=!0,t=window.setTimeout(function(){i&&n.addDisplay()},1e4)};function u(){i=!1,window.clearTimeout(t)}this.player.el().addEventListener("keyup",o);var c=this.player.getChild("Collapserator").getChild("PlayToggle");c.on("touchstart",a),c.on("touchend",u),this.player.one("dispose",function(){var e,t;null===(t=null===(e=n.player)||void 0===e?void 0:e.el())||void 0===t||t.removeEventListener("keyup",o),c.off("touchstart",a),c.off("touchend",u)})}},{key:"addDisplay",value:function(){var e=this;this.progressReporterDisplay||(this.progressReporterDisplay=new no(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",function(){e.progressReporterDisplay=void 0}))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent("seekend"),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(fo)}},{key:"onPause",value:function(){var e=this;this.isSeeking||(this.pauseTimeout=window.setTimeout(function(){e.isPlaying=!1,e.logEvent(yo),delete e.pauseTimeout},50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(fo)),this.isPlaying&&!this.isSeeking&&this.logEvent(po)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(bo),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(vo))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(ho)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(e){if(this.player){var t=this.player.currentTime();e===vo&&(t=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:t,type:e})}}},{key:"shouldUseCarriedOverTime",value:function(e){return this.lastPlayingTime&&(e===po||e===fo)}},{key:"shouldSaveCarriedOverTime",value:function(e){return e===po||e===yo}},{key:"shouldClearCarriedOverTime",value:function(e){return e===ho||e===bo}},{key:"flushBuffer",value:function(){for(var e,t,n=[],r={};this.eventBuffer.length;){var o=this.eventBuffer.shift();this.shouldClearCarriedOverTime(o.type)?delete this.lastPlayingTime:r.start?o.type===po&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(o.type)&&(this.lastPlayingTime=o.time),r.end=o,n.push(r),r={}):(this.shouldUseCarriedOverTime(o.type)&&(o.time=this.lastPlayingTime,delete this.lastPlayingTime),r.start=o)}this.eventBuffer=[],n.length&&this.validateEvents(n)&&(this.options.onFlush(n),null===(e=this.player)||void 0===e||e.trigger("progressflush"),null===(t=this.progressReporterDisplay)||void 0===t||t.addEvents(n))}},{key:"validateEvents",value:function(e){var t=0;e.forEach(function(e){t+=e.end.time-e.start.time});var n=this.options.interval||5e3;return n/=1e3,n+=.5,n*=this.player.playbackRate(),t<n}}],r&&io(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(so);function go(e){return go="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},go(e)}function wo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Oo(r.key),r)}}function Oo(e){var t=function(e){if("object"!=go(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=go(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==go(t)?t:t+""}function Po(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Po=function(){return!!e})()}function So(e){return So=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},So(e)}function jo(e,t){return jo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jo(e,t)}r.Z.registerPlugin("progressReporterPlugin",mo);var Co=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=So(t),function(e,t){if(t&&("object"==go(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Po()?Reflect.construct(t,n||[],So(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jo(e,t)}(t,e),n=t,(o=[{key:"createEl",value:function(){return r.Z.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&wo(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component")),_o=["top","left","right","bottom"],ko={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};function To(e){return To="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},To(e)}function Eo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ro(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Lo(r.key),r)}}function Io(e,t,n){return t&&Ro(e.prototype,t),n&&Ro(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lo(e){var t=function(e){if("object"!=To(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=To(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==To(t)?t:t+""}function xo(e,t,n){return t=Bo(t),function(e,t){if(t&&("object"==To(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Mo()?Reflect.construct(t,n||[],Bo(e).constructor):t.apply(e,n))}function Mo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Mo=function(){return!!e})()}function Ao(){return Ao="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Bo(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Ao.apply(null,arguments)}function Bo(e){return Bo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bo(e)}function Do(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&No(e,t)}function No(e,t){return No=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},No(e,t)}var zo=r.Z.getComponent("Component"),Zo=function(e){function t(e,n){var r;return Eo(this,t),(r=xo(this,t,[e,n])).bindEventListeners(),r}return Do(t,e),Io(t,[{key:"createEl",value:function(){return(e=t,n=this,"function"==typeof(r=Ao(Bo(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)(["div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)}]);var e,n,r}},{key:"bindEventListeners",value:function(){var e=this,t=this.el(),n=function(t){t.preventDefault(),t.dataTransfer.dropEffect="move",e.addClass("cv-drag-over")},r=function(t){t.preventDefault(),e.removeClass("cv-drag-over"),e.player_.whiteboardModePlugin().setWhiteboardMode(e.options_.side)},o=function(){e.removeClass("cv-drag-over")};t.addEventListener("dragover",n),t.addEventListener("drop",r),t.addEventListener("dragleave",o),this.on("dispose",function(){t.removeEventListener("dragover",n),t.removeEventListener("drop",r),t.removeEventListener("dragleave",o)})}}])}(zo),Fo=function(e){function t(e,n){var r;return Eo(this,t),(r=xo(this,t,[e,n])).addChildren(),r}return Do(t,e),Io(t,[{key:"addChildren",value:function(){var e=this;_o.forEach(function(t){e.addChild(new Zo(e.player_,{side:t}))})}}])}(zo);function Vo(e){return Vo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vo(e)}function Go(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ho(r.key),r)}}function Ho(e){var t=function(e){if("object"!=Vo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vo(t)?t:t+""}function Uo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Uo=function(){return!!e})()}function qo(e){return qo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qo(e)}function Wo(e,t){return Wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wo(e,t)}var Yo=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=qo(t),function(e,t){if(t&&("object"==Vo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Uo()?Reflect.construct(t,n||[],qo(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wo(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Go(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("MenuItem"));function Ko(e){return Ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ko(e)}function Jo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Qo(r.key),r)}}function Qo(e){var t=function(e){if("object"!=Ko(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ko(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ko(t)?t:t+""}function Xo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xo=function(){return!!e})()}function $o(){return $o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ei(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},$o.apply(null,arguments)}function ei(e){return ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ei(e)}function ti(e,t){return ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ti(e,t)}var ni=r.Z.getComponent("MenuButton"),ri=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=ei(t),function(e,t){if(t&&("object"==Ko(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Xo()?Reflect.construct(t,n||[],ei(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ti(e,t)}(t,e),n=t,r=[{key:"createItems",value:function(){var e=this,t=this.player_.whiteboardModePlugin().side,n=[new g.Z(this.player_,{label:"Video Controls"})];return _o.forEach(function(r){n.push(new Yo(e.player_,{side:r,label:ko[r],selectable:!0,multiSelectable:!1,selected:r===t}))}),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((e=t,n=this,"function"==typeof(r=$o(ei(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.whiteboardModePlugin().side;return ko[e]}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.whiteboardModePlugin().isEnabled()&&this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){ni.prototype.handleClick.apply(this)}}],r&&Jo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ni);function oi(e){return oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oi(e)}function ii(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ai(r.key),r)}}function ai(e){var t=function(e){if("object"!=oi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oi(t)?t:t+""}function ui(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ui=function(){return!!e})()}function ci(e){return ci=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ci(e)}function li(e,t){return li=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},li(e,t)}var si="cv-whiteboard-side",fi=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=ci(t),function(e,t){if(t&&("object"==oi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ui()?Reflect.construct(t,n||[],ci(e).constructor):t.apply(e,n))}(this,t,[e])).side="bottom",n.enabled=!0,n.player.ready(function(){n.initialize()}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&li(e,t)}(t,e),n=t,o=[{key:"initialize",value:function(){if(!this.player.options_.mobile){if(at.S.hasLocalStorage()){var e=at.S.get(si);e&&(this.side=e)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}}},{key:"initCollapserator",value:function(){var e,t,n=this;if(!(null===(t=(e=this.player).viewTranscriptPlugin)||void 0===t?void 0:t.call(e).isTranscriptOn())){var r=this.player.getChild("collapserator");this.dragHandle=new Co(this.player),this.button=new ri(this.player),r.addChild(this.dragHandle),r.addChild(this.button),this.player.trigger("cv-updatecog");var o=function(){n.player.isFullscreen()&&r.el().setAttribute("draggable","true")},i=function(){n.player.isFullscreen()&&r.el().setAttribute("draggable","false")},a=function(e){n.player.isFullscreen()&&(n.player.addClass("cv-dragging"),e.dataTransfer.setData("text/plain","handle"))},u=function(){n.player.isFullscreen()&&(n.player.removeClass("cv-dragging"),r.el().setAttribute("draggable","false"))};this.dragHandle.el().addEventListener("mousedown",o),this.dragHandle.el().addEventListener("mouseup",i),r.el().addEventListener("dragstart",a),r.el().addEventListener("dragend",u),this.on("dispose",function(){n.dragHandle.el().removeEventListener("mousedown",o),n.dragHandle.el().removeEventListener("mouseup",i),r.el().removeEventListener("dragstart",a),r.el().removeEventListener("dragend",u)})}}},{key:"initDragTargets",value:function(){this.player.addChild(new Fo(this.player))}},{key:"initFullscreenListener",value:function(){var e=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.player.on("cv-transcript-toggle",this.update),this.one("dispose",function(){e.player.off("fullscreenchange",e.update)})}},{key:"setWhiteboardMode",value:function(e){this.side=e,this.button.update(),at.S.hasLocalStorage()&&at.S.set(si,e),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"setEnabled",value:function(e){this.enabled=e,this.update()}},{key:"isEnabled",value:function(){return this.enabled}},{key:"getSide",value:function(){return this.isEnabled()?this.side:"bottom"}},{key:"update",value:function(){var e,t;if(this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),r.Z.dom.removeClass(window.document.documentElement,"cv-whiteboard-html-font-size"),this.player.trigger("resizemenus"),this.player.trigger("cv-updatecog"),this.isEnabled()){null===(t=this.dragHandle)||void 0===t||t.show();var n=this.getSide();this.player.isFullscreen()&&"bottom"!==n&&(this.player.addClass("cv-whiteboard-".concat(n)),r.Z.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}else null===(e=this.dragHandle)||void 0===e||e.hide()}}],o&&ii(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getPlugin("plugin"));function pi(e){return pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pi(e)}function yi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,di(r.key),r)}}function di(e){var t=function(e){if("object"!=pi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pi(t)?t:t+""}function vi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(vi=function(){return!!e})()}function hi(e){return hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hi(e)}function bi(e,t){return bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bi(e,t)}r.Z.registerPlugin("whiteboardModePlugin",fi);var mi=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=hi(t),function(e,t){if(t&&("object"==pi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,vi()?Reflect.construct(t,n||[],hi(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bi(e,t)}(t,e),n=t,(r=[{key:"deferMenu",value:function(){var e={subtitles:this.buildSubtitles(),qualities:this.buildQualities(),playbackSpeeds:this.buildPlaybackSpeeds()};this.player.trigger("cv-defer-menus",e)}},{key:"buildSubtitles",value:function(){for(var e=[],t=!1,n=this.player.textTracks(),r=0;r<n.length;r++){var o=n[r],i="showing"===o.mode;e.unshift({id:o.label,name:o.label,selected:i}),i&&(t=!0)}return e.push({id:null,name:"Off",selected:!t}),e}},{key:"buildQualities",value:function(){for(var e=[],t=this.player.qualityLevels(),n=0;n<t.length;n++){var r=t[n];e.push({id:r.id,name:r.id+"p",selected:r.enabled})}return e}},{key:"buildPlaybackSpeeds",value:function(){var e=this.player.playbackRate();return this.player.options_.playbackRates.map(function(t){return{id:t,name:t+"x"+(1===t?" (Normal)":""),selected:e===t}})}}])&&yi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function gi(e){return gi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gi(e)}function wi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Oi(r.key),r)}}function Oi(e){var t=function(e){if("object"!=gi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gi(t)?t:t+""}function Pi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pi=function(){return!!e})()}function Si(e){return Si=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Si(e)}function ji(e,t){return ji=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ji(e,t)}r.Z.registerPlugin("deferMenusPlugin",mi),n(56728);var Ci=r.Z.getComponent("Button"),_i="cv-muted",ki=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Si(t),function(e,t){if(t&&("object"==gi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pi()?Reflect.construct(t,n||[],Si(e).constructor):t.apply(e,n))}(this,t,[e])).update(),n.update=n.update.bind(n),e.on("volumechange",n.update),e.on("dispose",function(){return e.off("volumechange",n.update)}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ji(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(){this.player_.muted(!this.player_.muted()),this.update()}},{key:"update",value:function(){this.player_.muted()?this.addClass(_i):this.removeClass(_i)}},{key:"buildCSSClass",value:function(){return"cv-mute-button cv-muted"}}])&&wi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ci);function Ti(e){return Ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ti(e)}function Ei(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ri(r.key),r)}}function Ri(e){var t=function(e){if("object"!=Ti(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ti(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ti(t)?t:t+""}function Ii(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ii=function(){return!!e})()}function Li(){return Li="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=xi(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Li.apply(null,arguments)}function xi(e){return xi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xi(e)}function Mi(e,t){return Mi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mi(e,t)}r.Z.registerComponent("muteButton",ki),ki.prototype.controlText_="Mute";var Ai,Bi=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=xi(t),function(e,t){if(t&&("object"==Ti(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ii()?Reflect.construct(t,n||[],xi(e).constructor):t.apply(e,n))}(this,t,[e,n]))._onClickHandler=n.onClickHandler,r.bindEventListeners(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mi(e,t)}(t,e),n=t,o=[{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-player-overlay"})}},{key:"handleClick",value:function(e){"function"==typeof this._onClickHandler&&(e.stopImmediatePropagation(),this._onClickHandler())}},{key:"dispose",value:function(){var e,n,r;this.off("click",this.handleClick),(e=t,n=this,"function"==typeof(r=Li(xi(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"bindEventListeners",value:function(){this.on("click",this.handleClick)}}],o&&Ei(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function Di(e){return Di="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Di(e)}function Ni(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zi(r.key),r)}}function zi(e){var t=function(e){if("object"!=Di(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Di(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Di(t)?t:t+""}function Zi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zi=function(){return!!e})()}function Fi(e){return Fi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fi(e)}function Vi(e,t){return Vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vi(e,t)}r.Z.registerComponent("playerOverlay",Bi),function(e){e.Default="play",e.Hover="hover"}(Ai||(Ai={}));var Gi=r.Z.getPlugin("plugin"),Hi="cv-preview-mode",Ui=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Fi(t),function(e,t){if(t&&("object"==Di(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Zi()?Reflect.construct(t,n||[],Fi(e).constructor):t.apply(e,n))}(this,t,[e])).buttonAdded=!1,n.mode=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vi(e,t)}(t,e),n=t,(r=[{key:"getMode",value:function(){return this.mode}},{key:"setPlayerMode",value:function(e,t){var n=this.mode;if(this.mode=e,e===Ai.Hover)return this.buttonAdded||this.addButtons(t),this.player.addClass(Hi),this.enableSubtites(),this.mute(),this.removeActivityTimeout(),void this.player.trigger("resize");n===Ai.Hover&&(this.player.removeClass(Hi),this.disableSubtitles(),this.unmute(),this.restoreActivityTimeout(),this.player.trigger("resize"))}},{key:"addButtons",value:function(e){var t=new ki(this.player),n=new Bi(this.player,{onClickHandler:e});this.player.addChild(t),this.player.addChild(n),this.buttonAdded=!0}},{key:"enableSubtites",value:function(){var e=this;this.player.dataLoaded(function(){return e.player.persistSubtitleSettingsPlugin().previewModeSubtitles()})}},{key:"disableSubtitles",value:function(){var e=this;this.player.dataLoaded(function(){return e.player.persistSubtitleSettingsPlugin().applyUserPreferences()})}},{key:"mute",value:function(){var e=this;this.player.ready(function(){e.player.persistVolumePlugin().disable(),e.player.muted(!0)})}},{key:"unmute",value:function(){var e=this;this.player.ready(function(){e.player.persistVolumePlugin().applyUserPreferences(),e.player.persistVolumePlugin().enable()})}},{key:"removeActivityTimeout",value:function(){this.player.cache_.inactivityTimeout=this.player.options_.inactivityTimeout,this.player.options_.inactivityTimeout=0}},{key:"restoreActivityTimeout",value:function(){this.player.options_.inactivityTimeout=this.player.cache_.inactivityTimeout}}])&&Ni(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Gi);function qi(e){return qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qi(e)}function Wi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ji(r.key),r)}}function Ki(e,t,n){return t&&Yi(e.prototype,t),n&&Yi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ji(e){var t=function(e){if("object"!=qi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qi(t)?t:t+""}function Qi(e,t,n){return t=$i(t),function(e,t){if(t&&("object"==qi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Xi()?Reflect.construct(t,n||[],$i(e).constructor):t.apply(e,n))}function Xi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xi=function(){return!!e})()}function $i(e){return $i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$i(e)}function ea(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ta(e,t)}function ta(e,t){return ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ta(e,t)}r.Z.registerPlugin("playerModePlugin",Ui);var na=r.Z.getComponent("Component"),ra=r.Z.getComponent("ClickableComponent"),oa=function(e){function t(){return Wi(this,t),Qi(this,t,arguments)}return ea(t,e),Ki(t,[{key:"createEl",value:function(){return na.prototype.createEl.call(this,"span",{className:"cv-favourite-button-svg",innerHTML:"<span class='cv-favourite-heart'>".concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Heart-Filled" d="m18.833 5.9735c-0.78916-0.95022-1.8839-1.4735-3.0826-1.4735-1.6859 0-2.7532 1.0685-3.3517 1.9648-0.15528 0.2326-0.28738 0.46582-0.39828 0.68529-0.11091-0.21946-0.24297-0.45269-0.39828-0.68529-0.5985-0.89636-1.6658-1.9648-3.3517-1.9648-1.1987 0-2.2935 0.52333-3.0827 1.4735-0.75275 0.90644-1.1673 2.1204-1.1673 3.4183 0 1.4128 0.51978 2.7268 1.6358 4.1353 0.99741 1.2588 2.4323 2.5564 4.0939 4.0589 0.61916 0.5599 1.2594 1.1389 1.9411 1.7718l0.02047 0.01903c0.08837 0.08211 0.19856 0.12313 0.30875 0.12313s0.22038-0.04105 0.30875-0.12313l0.02047-0.01903c0.68166-0.63289 1.3219-1.2119 1.9412-1.7719 1.6615-1.5024 3.0964-2.8 4.0938-4.0588 1.116-1.4085 1.6358-2.7225 1.6358-4.1353 0-1.2979-0.41459-2.5119-1.1674-3.4183z"/>\n </svg>\n',"</span><span class='cv-favourite-outline'>").concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Shape" d="m18.959 5.9741c-0.76992-0.92705-1.9357-1.5351-3.1052-1.5351-1.6448 0-2.8808 0.74937-3.4647 1.6238-0.15149 0.22693-0.28074 0.55125-0.38894 0.76537-0.10821-0.21411-0.23718-0.53844-0.38871-0.76537-0.58391-0.87451-1.8205-1.6238-3.4653-1.6238-1.1695 0-2.2376 0.60808-3.0075 1.5351-0.7344 0.88434-1.1388 1.9712-1.1388 3.2374 0 1.3784 0.50711 3.0509 1.5959 4.4251 0.97309 1.2281 2.373 2.4941 3.9941 3.9599 0.60406 0.54625 1.2285 1.1104 1.8936 1.7278l0.01997 0.01934c0.08622 0.08011 0.38931 0.21727 0.49681 0.21727 0.1075 0 0.40992-0.13796 0.49614-0.21804l0.0201-0.0178c0.66504-0.61746 1.2897-1.1824 1.8939-1.7287 1.621-1.4658 3.0209-2.7317 3.994-3.9598 1.0888-1.3742 1.5955-3.0467 1.5955-4.4251 0-1.2663-0.30646-2.3531-1.0409-3.2374zm-5.337 10.688c-0.51948 0.47226-1.0567 0.95549-1.6218 1.4768-0.56507-0.52124-1.101-1.0059-1.6219-1.4769-3.1725-2.8689-5.2684-4.7641-5.2684-7.2556 0-1.0298 0.32333-1.9863 0.91044-2.6933 0.59385-0.71497 1.4183-1.1088 2.3213-1.1088 1.254 0 2.0645 0.81976 2.5237 1.5074 0.41187 0.61679 0.62678 1.2385 0.70006 1.4772 0.06131 0.19978 0.23683 0.33499 0.43482 0.33499s0.37351-0.1352 0.43482-0.33499c0.07329-0.23867 0.28821-0.86044 0.70006-1.4773 0.45914-0.68766 1.2698-1.5074 2.5237-1.5074 0.90309 0 1.7274 0.39377 2.3213 1.1088 0.58714 0.70695 0.91047 1.6634 0.91047 2.6933 0 2.4914-2.1035 4.3783-5.2685 7.2557z" stroke-width=".97562"/>\n </svg>\n',"</span>")})}}])}(na),ia=function(e){function t(e,n){var r;return Wi(this,t),(r=Qi(this,t,[e,n])).isFavourited=n.isFavourited,r.renderIcon(),r.update(),r}return ea(t,e),Ki(t,[{key:"renderIcon",value:function(){this.icon&&this.removeChild(this.icon),this.icon=new oa(this.player_),this.addChild(this.icon)}},{key:"update",value:function(){this.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"createEl",value:function(e,t,n){t=Object.assign({innerHTML:"",className:"cv-favourite-button"},t),n=Object.assign({type:"button"},n);var r=na.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(r),r}},{key:"handleClick",value:function(){this.isFavourited=!this.isFavourited,this.update(),this.options_.onClick&&this.options_.onClick(this.isFavourited)}}])}(ra);function aa(e){return aa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aa(e)}function ua(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ca(r.key),r)}}function ca(e){var t=function(e){if("object"!=aa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=aa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==aa(t)?t:t+""}function la(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(la=function(){return!!e})()}function sa(e){return sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sa(e)}function fa(e,t){return fa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fa(e,t)}ia.prototype.controlText_="Favourite";var pa=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=sa(t),function(e,t){if(t&&("object"==aa(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,la()?Reflect.construct(t,n||[],sa(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fa(e,t)}(t,e),n=t,(r=[{key:"setFavourite",value:function(e,t){if(!this.initialized){var n=new ia(this.player,{isFavourited:e,onClick:t});this.player.addChild(n),this.initialized=!0}}}])&&ua(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function ya(e){return ya="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ya(e)}function da(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,va(r.key),r)}}function va(e){var t=function(e){if("object"!=ya(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ya(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ya(t)?t:t+""}function ha(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ha=function(){return!!e})()}function ba(e){return ba=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ba(e)}function ma(e,t){return ma=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ma(e,t)}r.Z.registerPlugin("favouritePlugin",pa),n(95027),n(46620);var ga="cv-active-button",wa=r.Z.getComponent("Menu"),Oa=r.Z.getComponent("Component"),Pa=r.Z.getComponent("MenuButton"),Sa=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=ba(t),function(e,t){if(t&&("object"==ya(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ha()?Reflect.construct(t,n||[],ba(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ma(e,t)}(t,e),n=t,(o=[{key:"createMenu",value:function(){var e,t=new wa(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=r.Z.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(e=this.options_.title,"string"!=typeof e?e:e.replace(/./,function(e){return e.toUpperCase()})),tabIndex:-1});this.hideThreshold_+=1;var o=new Oa(this.player_,{el:n});t.addItem(o)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)t.addItem(this.items[i]);return t}}])&&da(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(Pa),ja=Pa.prototype.pressButton;Pa.prototype.pressButton=function(){ja.call(this),this.inactivityTimeout=this.player_.cache_.inactivityTimeout,this.player_.cache_.inactivityTimeout=0,this.player_.options_.inactivityTimeout=0};var Ca=Pa.prototype.unpressButton;function _a(e){return _a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_a(e)}function ka(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ta(r.key),r)}}function Ta(e){var t=function(e){if("object"!=_a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_a(t)?t:t+""}function Ea(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ea=function(){return!!e})()}function Ra(e,t,n,r){var o=Ia(La(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function Ia(){return Ia="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=La(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Ia.apply(null,arguments)}function La(e){return La=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},La(e)}function xa(e,t){return xa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xa(e,t)}Pa.prototype.unpressButton=function(){Ca.call(this),this.player_.cache_.inactivityTimeout=this.inactivityTimeout,this.player_.options_.inactivityTimeout=this.inactivityTimeout,this.player_.reportUserActivity()},Pa.prototype.setActive=function(e){e?this.addClass(ga):this.removeClass(ga)},r.Z.registerComponent("MenuButton",Sa);var Ma=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=La(t),function(e,t){if(t&&("object"==_a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ea()?Reflect.construct(t,n||[],La(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xa(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(Ra(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Ra(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])&&ka(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function Aa(e){return Aa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Aa(e)}function Ba(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Da(r.key),r)}}function Da(e){var t=function(e){if("object"!=Aa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Aa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Aa(t)?t:t+""}function Na(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Na=function(){return!!e})()}function za(e){return za=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},za(e)}function Za(e,t){return Za=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Za(e,t)}Ma.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},r.Z.registerComponent("TimeWrapper",Ma);var Fa=r.Z.getComponent("SeekBar"),Va=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=za(t),function(e,t){if(t&&("object"==Aa(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Na()?Reflect.construct(t,n||[],za(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Za(e,t)}(t,e),n=t,(r=[{key:"handleMouseDown",value:function(e){var t=this.player_.preventScrubbingPlugin();t.isEnabled&&this.getMouseTime(e)>t.furthestVisitedTime||(Fa.prototype.handleMouseDown.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"))}},{key:"handleMouseMove",value:function(e){Fa.prototype.handleMouseMove.call(this,e),this.update()}},{key:"getPercent",value:function(){var e=this.player_.currentTime()/this.player_.duration();return e>=1?1:e}},{key:"handleMouseUp",value:function(e){var t=this;Fa.prototype.handleMouseUp.call(this,e),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(function(){t.player_.removeClass("cv-disable-play-pause-feedback")},500)}},{key:"clamp",value:function(e,t,n){return Math.min(Math.max(e,t),n)}},{key:"getMouseTime",value:function(e){return this.clamp(Fa.prototype.calculateDistance.call(this,e).x,0,1)*this.player_.duration()}}])&&Ba(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Fa);function Ga(e){return Ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ga(e)}function Ha(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ua(r.key),r)}}function Ua(e){var t=function(e){if("object"!=Ga(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ga(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ga(t)?t:t+""}function qa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qa=function(){return!!e})()}function Wa(e,t,n,r){var o=Ya(Ka(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function Ya(){return Ya="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ka(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Ya.apply(null,arguments)}function Ka(e){return Ka=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ka(e)}function Ja(e,t){return Ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ja(e,t)}r.Z.registerComponent("SeekBar",Va);var Qa=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Ka(t),function(e,t){if(t&&("object"==Ga(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,qa()?Reflect.construct(t,n||[],Ka(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ja(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Wa(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Wa(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(e){this.el_.style.width=100*e+"%"}}])&&Ha(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function Xa(e){return Xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xa(e)}function $a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eu(r.key),r)}}function eu(e){var t=function(e){if("object"!=Xa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xa(t)?t:t+""}function tu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tu=function(){return!!e})()}function nu(e,t,n,r){var o=ru(ou(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function ru(){return ru="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ou(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},ru.apply(null,arguments)}function ou(e){return ou=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ou(e)}function iu(e,t){return iu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},iu(e,t)}var au=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=ou(t),function(e,t){if(t&&("object"==Xa(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tu()?Reflect.construct(t,n||[],ou(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&iu(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(nu(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return nu(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(e){e>0&&e<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*e+"%"}}])&&$a(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function uu(e){return uu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uu(e)}function cu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lu(r.key),r)}}function lu(e){var t=function(e){if("object"!=uu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=uu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==uu(t)?t:t+""}function su(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(su=function(){return!!e})()}function fu(e,t,n,r){var o=pu(yu(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function pu(){return pu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=yu(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},pu.apply(null,arguments)}function yu(e){return yu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yu(e)}function du(e,t){return du=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},du(e,t)}var vu=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=yu(t),function(e,t){if(t&&("object"==uu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,su()?Reflect.construct(t,n||[],yu(e).constructor):t.apply(e,n))}(this,t,[e,n])).playProgress=new au(r.player_),r.addChild(r.playProgress),r.loadProgress=new Qa(r.player_),r.addChild(r.loadProgress),r.update(),r.updateBuffered(0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&du(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(fu(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return fu(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var e=this.player_.duration()||3600,t=this.options_.endTime-this.options_.startTime;if(e!==this.duration_){var n=t/e;this.el_.style.width=100*n+"%";var r=this.options_.startTime/e;this.el_.style.left=100*r+"%",this.duration_=e}var o=this.getCurrentTime();o<this.options_.startTime?this.playProgress.update(0):o>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((o-this.options_.startTime)/t)}},{key:"updateBuffered",value:function(e){var t=this.options_.endTime-this.options_.startTime;e<this.options_.startTime?this.loadProgress.update(0):e>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((e-this.options_.startTime)/t)}}])&&cu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component")),hu=n(39232);function bu(e){return bu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bu(e)}function mu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gu(r.key),r)}}function gu(e){var t=function(e){if("object"!=bu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bu(t)?t:t+""}function wu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wu=function(){return!!e})()}function Ou(e,t,n,r){var o=Pu(Su(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function Pu(){return Pu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Su(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Pu.apply(null,arguments)}function Su(e){return Su=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Su(e)}function ju(e,t){return ju=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ju(e,t)}var Cu=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Su(t),function(e,t){if(t&&("object"==bu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,wu()?Reflect.construct(t,n||[],Su(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ju(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(Ou(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Ou(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(){this.children_.forEach(function(e){e.update()})}},{key:"updateBuffered",value:function(){var e=this;this.children_.forEach(function(t){t.updateBuffered((0,hu.b)(e.player_))})}}])&&mu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function _u(e){return _u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_u(e)}function ku(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Tu(r.key),r)}}function Tu(e){var t=function(e){if("object"!=_u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_u(t)?t:t+""}function Eu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Eu=function(){return!!e})()}function Ru(e,t,n,r){var o=Iu(Lu(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function Iu(){return Iu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Lu(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Iu.apply(null,arguments)}function Lu(e){return Lu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lu(e)}function xu(e,t){return xu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xu(e,t)}var Mu=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Lu(t),function(e,t){if(t&&("object"==_u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Eu()?Reflect.construct(t,n||[],Lu(e).constructor):t.apply(e,n))}(this,t,[e,n])).onDurationChange=r.onDurationChange.bind(r),r.createChapterItems=r.createChapterItems.bind(r),r.updateBuffered=r.updateBuffered.bind(r),B.O.useChapters(r.player_,r.createChapterItems),r.player_.on("durationchange",r.onDurationChange),r.player_.on("progress",r.updateBuffered),r.createChapterItems(),r.update(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xu(e,t)}(t,e),n=t,(o=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),Ru(t,"dispose",this,3)([])}},{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar"),role:"progressbar"})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var e=Ru(t,"update",this,3)([]);return this.chapterBarItems&&this.chapterBarItems.update(),e}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"bindUpdateListener",value:function(e){var t=this,n=function(){t.createChapterItems(),t.updateBuffered()};e.addEventListener("cv:cuechange",n),this.player_.one("dispose",function(){return e.removeEventListener("cv:cuechange",n)})}},{key:"createChapterItems",value:function(e){var t,n;e&&(this.track_||this.bindUpdateListener(e),this.track_=e);var r=new Cu(this.player_);if((null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length)&&!this.options_.ignoreChapters)for(var o=0;o<this.track_.cues.length;o++){var i=this.track_.cues[o],a=i.startTime,u=i.endTime,c=this.player_.duration();c&&(o===this.track_.cues.length-1&&i.endTime<this.player_.duration()&&(u=this.player_.duration()),u>c&&(u=c));var l=new vu(this.player_,{startTime:a,endTime:u});if(r.addChild(l),c&&u===c)break}else r.addChild(new vu(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&ku(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("SeekBar"));function Au(e){return Au="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Au(e)}function Bu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Du(r.key),r)}}function Du(e){var t=function(e){if("object"!=Au(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Au(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Au(t)?t:t+""}function Nu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Nu=function(){return!!e})()}function zu(){return zu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Zu(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},zu.apply(null,arguments)}function Zu(e){return Zu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zu(e)}function Fu(e,t){return Fu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fu(e,t)}Mu.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},r.Z.browser.IS_IOS||r.Z.browser.IS_ANDROID||Mu.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),r.Z.registerComponent("ChapterSeekBar",Mu);var Vu=r.Z.getComponent("ProgressControl"),Gu="seekBar",Hu=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=Zu(t),function(e,t){if(t&&("object"==Au(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Nu()?Reflect.construct(t,n||[],Zu(e).constructor):t.apply(e,n))}(this,t,arguments)).seekBarName_=Gu,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fu(e,t)}(t,e),n=t,r=[{key:"setSeekBarName",value:function(e){this.seekBarName_=e}},{key:"getChild",value:function(e){return(null==e?void 0:e.toLowerCase())===Gu.toLowerCase()&&(e=this.seekBarName_),(n=t,r=this,"function"==typeof(o=zu(Zu(1&3?n.prototype:n),"getChild",r))?function(e){return o.apply(r,e)}:o)([e]);var n,r,o}}],r&&Bu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Vu);Hu.prototype.options_={children:[]},r.Z.registerComponent("ProgressControl",Hu);var Uu=n(28788),qu=n(30708);function Wu(e){return Wu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wu(e)}function Yu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ku(r.key),r)}}function Ku(e){var t=function(e){if("object"!=Wu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Wu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wu(t)?t:t+""}function Ju(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ju=function(){return!!e})()}function Qu(){return Qu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Xu(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Qu.apply(null,arguments)}function Xu(e){return Xu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xu(e)}function $u(e,t){return $u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$u(e,t)}var ec=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Xu(t),function(e,t){if(t&&("object"==Wu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ju()?Reflect.construct(t,n||[],Xu(e).constructor):t.apply(e,n))}(this,t,[e,n])).hasCustomChapterText=!1,B.O.useChapters(r.player_,function(e){r.track_=e}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$u(e,t)}(t,e),n=t,o=[{key:"createEl",value:function(){var e,n,o,i=(e=t,n=this,"function"==typeof(o=Qu(Xu(1&3?e.prototype:e),"createEl",n))?function(e){return o.apply(n,e)}:o)([]);return this.chapter_=r.Z.dom.createEl("div"),i.appendChild(this.chapter_),this.time_=r.Z.dom.createEl("div"),i.appendChild(this.time_),i}},{key:"updateTime",value:function(e){var t=this.player_.duration();if(r.Z.dom.textContent(this.time_,(0,qu.m)(e,t)),this.track_&&!this.hasCustomChapterText){for(var n=0;n<this.track_.cues.length;n++){var o=this.track_.cues[n],i=o.endTime||t;if(o.startTime<=e&&i>=e)return void r.Z.dom.textContent(this.chapter_,o.text)}r.Z.dom.textContent(this.chapter_,"")}}},{key:"clearChapterContent",value:function(){r.Z.dom.textContent(this.chapter_,"")}},{key:"updateText",value:function(e){r.Z.dom.textContent(this.time_,e)}},{key:"setCustomChapterText",value:function(e){this.hasCustomChapterText=!!e,r.Z.dom.textContent(this.chapter_,null!=e?e:"")}}],o&&Yu(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("TimeTooltip"));function tc(e){return tc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tc(e)}function nc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rc(r.key),r)}}function rc(e){var t=function(e){if("object"!=tc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tc(t)?t:t+""}function oc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oc=function(){return!!e})()}function ic(){return ic="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ac(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},ic.apply(null,arguments)}function ac(e){return ac=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ac(e)}function uc(e,t){return uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uc(e,t)}r.Z.registerComponent("TimeTooltip",ec);var cc=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=ac(t),function(e,t){if(t&&("object"==tc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,oc()?Reflect.construct(t,n||[],ac(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uc(e,t)}(t,e),n=t,o=[{key:"setTrack",value:function(e){this.track_=e}},{key:"createEl",value:function(){var e,n,o,i=(e=t,n=this,"function"==typeof(o=ic(ac(1&3?e.prototype:e),"createEl",n))?function(e){return o.apply(n,e)}:o)(["div",{className:"cv-thumbnail-display"}]);return this.img_=r.Z.dom.createEl("img"),i.appendChild(this.img_),i}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(e){var t=e.indexOf("#");if(-1===t)return{src:e,w:0,h:0,x:0,y:0};var n=e.substr(0,t),r=e.substr(t+1);if("xywh="!==r.substr(0,5))return{src:e,w:0,h:0,x:0,y:0};var o=this.getScale(),i=r.substr(5).split(",");return{src:n,w:parseInt(i[2])*o,h:parseInt(i[3])*o,x:parseInt(i[0])*o,y:parseInt(i[1])*o}}},{key:"getScale",value:function(){var e=this.options_.scaleFactor,t=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==t&&(e*=2),e}},{key:"update",value:function(e){var t,n;if(null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length){for(var r,o=e,i=0;i<this.track_.cues.length;){var a=this.track_.cues[i];if(a.startTime<=o&&a.endTime>=o){r=this.parseImageLink(a.text);break}i++}if(null==r?void 0:r.src){this.enable();var u=r,c=u.src,l=u.w,s=u.h,f=u.x,p=u.y,y=this.getScale();this.img_.src=c,this.img_.style.left=-f+"px",this.img_.style.top=-p+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(y,")"),this.el_.style.width=l+"px",this.el_.style.height=s+"px"}else this.disable()}}}],o&&nc(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function lc(e){return lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lc(e)}function sc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fc(r.key),r)}}function fc(e){var t=function(e){if("object"!=lc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=lc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==lc(t)?t:t+""}function pc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pc=function(){return!!e})()}function yc(e){return yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yc(e)}function dc(e,t){return dc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dc(e,t)}cc.prototype.options_={scaleFactor:1},r.Z.registerComponent("ThumbnailDisplay",cc);var vc=r.Z.getComponent("MouseTimeDisplay"),hc="cv-mouse-time-display-force-show",bc=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=yc(t),function(e,t){if(t&&("object"==lc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pc()?Reflect.construct(t,n||[],yc(e).constructor):t.apply(e,n))}(this,t,[e,n]),B.O.useMetadataTrack(r.player_,"thumbnails",function(e){r.getChild("ThumbnailDisplay").setTrack(e)}),r.update=r.update.bind(r),r.player_.on("durationchange",r.update),r.player_.one("dispose",function(){r.player_.off("durationchange",r.update)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dc(e,t)}(t,e),n=t,(r=[{key:"update",value:function(e,t){var n=this;this.requestAnimationFrame(function(){var r=n.getChild("TimeTooltip"),o=n.getChild("ThumbnailDisplay"),i=t*n.player_.duration(),a=n.player_.preventScrubbingPlugin(),u=n.player_.controlBar.getChild("progressControl").getChild(Uu.Hx),c=!1;a.isEnabled&&(c=i>a.furthestVisitedTime),c?(n.hide(),u.show(),(0,Bt.Ds)(u.hide,Uu.D,!1,u)()):(n.show(),u&&u.hide(!0),o.update(i),r.updateTime(i));var l=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-l.width/2+"px";var s=e.width*t;s<l.width/2?n.el_.style.left=l.width/2+"px":s>e.width-l.width/2?n.el_.style.left=e.width-l.width/2+"px":n.el_.style.left=e.width*t+"px"})}},{key:"forceShow",value:function(){this.addClass(hc)}},{key:"removeForceShow",value:function(){this.removeClass(hc)}}])&&sc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vc);function mc(e){return mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mc(e)}function gc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wc(r.key),r)}}function wc(e){var t=function(e){if("object"!=mc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mc(t)?t:t+""}function Oc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oc=function(){return!!e})()}function Pc(){return Pc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Sc(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Pc.apply(null,arguments)}function Sc(e){return Sc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sc(e)}function jc(e,t){return jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jc(e,t)}bc.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},r.Z.registerComponent("MouseTimeDisplay",bc);var Cc=r.Z.getComponent("ChaptersTrackMenuItem"),_c=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Sc(t),function(e,t){if(t&&("object"==mc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Oc()?Reflect.construct(t,n||[],Sc(e).constructor):t.apply(e,n))}(this,t,[e,n])).nonIconControl=!1,r.thumbnailDisplay=new cc(r.player_,{scaleFactor:.5}),r.el().insertBefore(r.thumbnailDisplay.el(),r.el().firstChild),B.O.useMetadataTrack(r.player_,"thumbnails",function(e){r.addClass("cv-has-thumbnails"),r.thumbnailDisplay.setTrack(e),r.thumbnailDisplay.update(r.options_.cue.startTime)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jc(e,t)}(t,e),n=t,r=[{key:"update",value:function(){this.player_&&Cc.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(e,n,r){return this.nonIconControl=!0,(o=t,i=this,"function"==typeof(a=Pc(Sc(1&3?o.prototype:o),"createEl",i))?function(e){return a.apply(i,e)}:a)(["li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},n),r]);var o,i,a}},{key:"getInnerHTML",value:function(){var e=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat((0,qu.m)(this.options_.cue.startTime,e),")</p>")+"</span>"}}],r&&gc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Cc);function kc(e){return kc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kc(e)}function Tc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ec(r.key),r)}}function Ec(e){var t=function(e){if("object"!=kc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kc(t)?t:t+""}function Rc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Rc=function(){return!!e})()}function Ic(e,t,n,r){var o=Lc(xc(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function Lc(){return Lc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=xc(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Lc.apply(null,arguments)}function xc(e){return xc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xc(e)}function Mc(e,t){return Mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mc(e,t)}var Ac=function(e){function t(e,n,r){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(o=function(e,t,n){return t=xc(t),function(e,t){if(t&&("object"==kc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Rc()?Reflect.construct(t,n||[],xc(e).constructor):t.apply(e,n))}(this,t,[e,n,r])).alwaysCollapsed=!1,o.isCollapsed=!1,o.isCollabsible=!0,o.update=o.update.bind(o),o.player_.on("cv-whiteboard-change",o.update),o.player_.on("fullscreenchange",o.update),o.player_.on("dispose",function(){o.player_.off("cv-whiteboard-change",o.update),o.player_.off("fullscreenchange",o.update)}),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mc(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(Ic(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(Ic(t,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t||t.length<2)return e;for(var n=0,r=t.length;n<r;n++){var o=t[n],i=new _c(this.player_,{track:this.track_,cue:o});e.push(i)}return e}},{key:"setTrack",value:function(e){var n=this;if(Ic(t,"setTrack",this,3)([e]),this.track_&&"chapters"===this.track_.kind){e.one("loadeddata",this.update);var r=function(){n.update(),n.player_.trigger("resizemenus")};e.on("cv:cuechange",r),this.player_.one("dispose",function(){return e.off("cv:cueupdate",r)})}}},{key:"update",value:function(e){Ic(t,"update",this,3)([e])}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var e=this.track_.activeCues[0];return(null==e?void 0:e.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var e=this.track_.cues;return!(!e||!e.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&Tc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("ChaptersButton"));function Bc(e){return Bc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bc(e)}function Dc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nc(r.key),r)}}function Nc(e){var t=function(e){if("object"!=Bc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Bc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bc(t)?t:t+""}function zc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zc=function(){return!!e})()}function Zc(){return Zc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Fc(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Zc.apply(null,arguments)}function Fc(e){return Fc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fc(e)}function Vc(e,t){return Vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vc(e,t)}r.Z.registerComponent("ChaptersButton",Ac);var Gc=r.Z.getComponent("OffTextTrackMenuItem"),Hc=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Fc(t),function(e,t){if(t&&("object"==Bc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,zc()?Reflect.construct(t,n||[],Fc(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vc(e,t)}(t,e),n=t,r=[{key:"handleClick",value:function(e){Gc.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(e,n,r){return(o=t,i=this,"function"==typeof(a=Zc(Fc(1&3?o.prototype:o),"createEl",i))?function(e){return a.apply(i,e)}:a)(["li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},n),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),r]);var o,i,a}}],r&&Dc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Gc);function Uc(e){return Uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uc(e)}function qc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wc(r.key),r)}}function Wc(e){var t=function(e){if("object"!=Uc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Uc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Uc(t)?t:t+""}function Yc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yc=function(){return!!e})()}function Kc(e){return Kc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Kc(e)}function Jc(e,t){return Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jc(e,t)}r.Z.registerComponent("OffTextTrackMenuItem",Hc);var Qc=r.Z.getComponent("TextTrackButton"),Xc=r.Z.getComponent("TextTrackMenuItem"),$c=r.Z.getComponent("OffTextTrackMenuItem"),el=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Kc(t),function(e,t){if(t&&("object"==Uc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Yc()?Reflect.construct(t,n||[],Kc(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jc(e,t)}(t,e),n=t,r=[{key:"createItems",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xc;this.label_&&(e="".concat(this.label_," off")),t.push(new $c(this.player_,{kinds:this.kinds_,kind:this.kind_,label:e})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var o=0;o<r.length;o++){var i=r[o];if(this.kinds_.indexOf(i.kind)>-1){var a=new n(this.player_,{track:i,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(i.kind,"-menu-item")),t.push(a)}}return this.player().trigger("resizemenus"),t}}],r&&qc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Qc);function tl(e){return tl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tl(e)}function nl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rl(r.key),r)}}function rl(e){var t=function(e){if("object"!=tl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tl(t)?t:t+""}function ol(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ol=function(){return!!e})()}function il(e){return il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},il(e)}function al(e,t){return al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},al(e,t)}r.Z.registerComponent("TextTrackButton",el);var ul=r.Z.getComponent("SubsCapsMenuItem"),cl=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=il(t),function(e,t){if(t&&("object"==tl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ol()?Reflect.construct(t,n||[],il(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&al(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(e){ul.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}}])&&nl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ul);function ll(e){return ll="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ll(e)}function sl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fl(r.key),r)}}function fl(e){var t=function(e){if("object"!=ll(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ll(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ll(t)?t:t+""}function pl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pl=function(){return!!e})()}function yl(e){return yl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yl(e)}function dl(e,t){return dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dl(e,t)}var vl=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r={};r.track={player:e,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="SubtitleSearchMenuItem",(n=function(e,t,n){return t=yl(t),function(e,t){if(t&&("object"==ll(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pl()?Reflect.construct(t,n||[],yl(e).constructor):t.apply(e,n))}(this,t,[e,r])).addClass("vjs-texttrack-settings"),n.addClass("cv-subtitle-search-menu-item"),n.controlText(", opens subtitle search"),n.toggleEnabled=n.toggleEnabled.bind(n);var o=n.player_.textTracks();return o.addEventListener("selectedlanguagechange",n.toggleEnabled),n.player_.one("dispose",function(){o.removeEventListener("selectedlanguagechange",n.toggleEnabled)}),n.toggleEnabled(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dl(e,t)}(t,e),n=t,(r=[{key:"toggleEnabled",value:function(){var e;if(this.player_){var t=B.O.getCurrentTextTrack(this.player_);t?(null===(e=t.cues)||void 0===e?void 0:e.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(t),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.toggleEnabled),e.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",function(){e.removeEventListener("loadeddata",t.toggleEnabled)})}},{key:"handleClick",value:function(){var e,t=this,n=B.O.getCurrentTextTrack(this.player_);(null===(e=null==n?void 0:n.cues)||void 0===e?void 0:e.length)&&this.requestAnimationFrame(function(){t.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()})}}])&&sl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("TextTrackMenuItem"));function hl(e){return hl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hl(e)}function bl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ml(r.key),r)}}function ml(e){var t=function(e){if("object"!=hl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hl(t)?t:t+""}function gl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(gl=function(){return!!e})()}function wl(e){return wl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wl(e)}function Ol(e,t){return Ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ol(e,t)}var Pl=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r={};return r.track={player:e,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="SubtitleSizeMenuItem",(n=function(e,t,n){return t=wl(t),function(e,t){if(t&&("object"==hl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,gl()?Reflect.construct(t,n||[],wl(e).constructor):t.apply(e,n))}(this,t,[e,r])).addClass("vjs-texttrack-settings"),n.addClass("cv-divider-after-menu-item"),n.addClass("cv-subtitle-size-menu-item"),n.controlText(", opens subtitle size settings"),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ol(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(){var e=this;this.requestAnimationFrame(function(){e.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()})}}])&&bl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("TextTrackMenuItem")),Sl=n(94889);function jl(e){return jl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jl(e)}function Cl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_l(r.key),r)}}function _l(e){var t=function(e){if("object"!=jl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=jl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jl(t)?t:t+""}function kl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(kl=function(){return!!e})()}function Tl(e){return Tl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Tl(e)}function El(e,t){return El=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},El(e,t)}var Rl=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r={};return r.track={player:e,kind:"subtitle",label:"Video Transcript",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="TranscriptMenuItem",(n=function(e,t,n){return t=Tl(t),function(e,t){if(t&&("object"==jl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,kl()?Reflect.construct(t,n||[],Tl(e).constructor):t.apply(e,n))}(this,t,[e,r])).transcriptOn=n.player_.viewTranscriptPlugin&&n.player_.viewTranscriptPlugin().isTranscriptOn(),n.bindEventListeners(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&El(e,t)}(t,e),n=t,(o=[{key:"bindEventListeners",value:function(){var e=this,t=this.toggleListener.bind(this),n=this.onResize.bind(this);this.player_.on("cv-transcript-toggle",t),this.player_.on("playerresize",n),this.on("dispose",function(){e.player_.off("cv-transcript-toggle",t),e.player_.off("playerresize",n)})}},{key:"onResize",value:function(){var e=window.innerWidth<Sl.E;this.item&&(this.item.style.display=e?"none":"block")}},{key:"handleToggleListener",value:function(){this.transcriptOn?this.toggleOff():this.toggleOn()}},{key:"toggleListener",value:function(e,t){var n,o;t?(this.transcriptOn=!0,r.Z.dom.addClass(this.toggleEl,"on")):(this.transcriptOn=!1,null===(o=(n=r.Z.dom).removeClass)||void 0===o||o.call(n,this.toggleEl,"on"))}},{key:"toggleOn",value:function(){var e,t;this.transcriptOn=!0,r.Z.dom.addClass(this.toggleEl,"on"),this.player_.viewTranscriptPlugin&&(null===(t=null===(e=this.player_.viewTranscriptPlugin())||void 0===e?void 0:e.toggleTranscript)||void 0===t||t.call(e,!0,{shouldLog:!0})),this.player_.whiteboardModePlugin&&this.player_.whiteboardModePlugin().setEnabled(!1)}},{key:"toggleOff",value:function(){var e,t,n,o;this.transcriptOn=!1,null===(t=(e=r.Z.dom).removeClass)||void 0===t||t.call(e,this.toggleEl,"on"),this.player_.viewTranscriptPlugin&&(null===(o=null===(n=this.player_.viewTranscriptPlugin())||void 0===n?void 0:n.toggleTranscript)||void 0===o||o.call(n,!1,{shouldLog:!0}))}},{key:"createEl",value:function(e,t,n){return this.handlerBound||(this.handleToggleListener=this.handleToggleListener.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggleListener),this.toggleEl=r.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggleListener),this.item=r.Z.dom.createEl("li",{className:"vjs-menu-item cv-transcript-toggle",innerHTML:'\n <span class="vjs-menu-item-text">Video Transcript</span>\n <span class="cv-toggle-container"></span>\n <span class="vjs-control-text" aria-live="polite">, opens transcript</span>\n ',tabIndex:-1},n),this.item.children[1].appendChild(this.toggleEl),this.item}}])&&Cl(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("TextTrackMenuItem"));function Il(e){return Il="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Il(e)}function Ll(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xl(r.key),r)}}function xl(e){var t=function(e){if("object"!=Il(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Il(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Il(t)?t:t+""}function Ml(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ml=function(){return!!e})()}function Al(){return Al="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Bl(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Al.apply(null,arguments)}function Bl(e){return Bl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bl(e)}function Dl(e,t){return Dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dl(e,t)}r.Z.registerComponent("ToggleTranscriptMenuItem",Rl);var Nl=r.Z.getComponent("TextTrackButton"),zl=r.Z.getComponent("SubsCapsButton"),Zl=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Bl(t),function(e,t){if(t&&("object"==Il(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ml()?Reflect.construct(t,n||[],Bl(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.className="cv-subs-caps-menu-button",r.onSelectedLanguageChange=r.onSelectedLanguageChange.bind(r),r.player_.on("cv:languageselected",r.onSelectedLanguageChange),r.player_.one("dispose",function(){return r.player_.off("cv:languageselected",r.onSelectedLanguageChange)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dl(e,t)}(t,e),n=t,r=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((e=t,n=this,"function"==typeof(r=Al(Bl(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"createItems",value:function(){var e=[];if(!this.player_.options_.mobile){var t=this.player().textTracks(),n=Array.from(t||[]).some(function(e){return"subtitles"===e.kind});this.player_.options_.allowTranscript&&!!n&&this.player_.viewTranscriptPlugin&&e.push(new Rl(this.player_)),this.player_.options_.allowTranscript||e.push(new vl(this.player_)),e.push(new Pl(this.player_)),this.hideThreshold_=e.length}return this.player().trigger("resizemenus"),Nl.prototype.createItems.call(this,e,cl)}},{key:"onSelectedLanguageChange",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if("subtitles"===n.kind&&"showing"===n.mode)return void this.setActive(!0)}this.setActive(!1)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){zl.prototype.handleClick.apply(this)}}],r&&Ll(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(zl);function Fl(e){return Fl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fl(e)}function Vl(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return Gl(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,u=0,c=e,p.n=n,a}};function y(n,r){for(u=n,c=r,t=0;!f&&l&&!o&&t<s.length;t++){var o,i=s[t],y=p.p,d=i[2];n>3?(o=d===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=n<2&&y<i[1])?(u=0,p.v=r,p.n=i[1]):y<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,p.n=d,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,d),u=s,c=d;(t=u<2?e:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),y(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(t){i=e,u=1,c=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Gl(t={},r,function(){return this}),t),f=l.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,Gl(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,Gl(f,"constructor",l),Gl(l,"constructor",c),c.displayName="GeneratorFunction",Gl(l,o,"GeneratorFunction"),Gl(f),Gl(f,o,"Generator"),Gl(f,r,function(){return this}),Gl(f,"toString",function(){return"[object Generator]"}),(Vl=function(){return{w:i,m:p}})()}function Gl(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Gl=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){Gl(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},Gl(e,t,n,r)}function Hl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ul(r.key),r)}}function Ul(e){var t=function(e){if("object"!=Fl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fl(t)?t:t+""}function ql(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ql=function(){return!!e})()}function Wl(e){return Wl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wl(e)}function Yl(e,t){return Yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yl(e,t)}r.Z.registerComponent("SubsCapsButton",Zl);var Kl="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(Xn,"</span>"),Jl=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Wl(t),function(e,t){if(t&&("object"==Fl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ql()?Reflect.construct(t,n||[],Wl(e).constructor):t.apply(e,n))}(this,t,[e,n])).qualityId=n.qualityId;var o=e.qualityLevels(),i=r.handleQualityChange.bind(r);return o.on("change",i),e.one("dispose",function(){o.off("change",i)}),r.handleLocalCacheChange=r.handleLocalCacheChange.bind(r),r.player_.ready(function(){r.player_&&(r.player_.on("localcachechanged",r.handleLocalCacheChange),r.player_.one("dispose",function(){var e;null===(e=r.player_)||void 0===e||e.off("localcachechanged",r.handleLocalCacheChange)}),r.handleLocalCacheChange())}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yl(e,t)}(t,e),n=t,(r=[{key:"handleLocalCacheChange",value:function(){return e=this,t=void 0,n=void 0,r=Vl().m(function e(){var t,n;return Vl().w(function(e){for(;;)switch(e.n){case 0:return t=this.player_.localCache(),e.n=1,t.getActiveLocalCache();case 1:if(null==(n=e.v)?void 0:n.playbackProfile){e.n=2;break}return this.show(),this.enable(),this.setLabel(this.options_.label),e.a(2);case 2:n.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+Kl);case 3:return e.a(2)}},e,this)}),new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}c((r=r.apply(e,t||[])).next())});var e,t,n,r}},{key:"setLabel",value:function(e){var t=this.$(".vjs-menu-item-text");t&&(t.innerHTML=e)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var e=this.player_.qualityLevels(),t=0;t<e.length;t++){var n=e[t];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var e=this.player_.qualityLevels(),t=e[e.selectedIndex],n=t&&t.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&Hl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("MenuItem"));function Ql(e){return Ql="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ql(e)}function Xl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$l(r.key),r)}}function $l(e){var t=function(e){if("object"!=Ql(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ql(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ql(t)?t:t+""}function es(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(es=function(){return!!e})()}function ts(e,t,n,r){var o=ns(rs(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function ns(){return ns="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=rs(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},ns.apply(null,arguments)}function rs(e){return rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rs(e)}function os(e,t){return os=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},os(e,t)}var is={144:"144p (Preview)",240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},as=r.Z.getComponent("MenuButton"),us=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=rs(t),function(e,t){if(t&&("object"==Ql(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,es()?Reflect.construct(t,n||[],rs(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.className="cv-quality-menu-button";var o=r.player_.qualityLevels(),i=r.update.bind(r);return o.on("addqualitylevel",i),o.on("removequalitylevel",i),e.one("dispose",function(){o.removeEventListener("addqualitylevel",i),o.removeEventListener("removequalitylevel",i)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&os(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(ts(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(ts(t,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var e=[],t=this.player_.qualityLevels();e.push(new g.Z(this.player_,{label:"Quality"}));for(var n=0;n<t.length;n++){var r=t[n];if(r){var o=is[r.id];o&&e.push(new Jl(this.player_,{qualityId:r.id,label:o,selectable:!0,multiSelectable:!1}))}}return e}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.qualityLevels(),t=e[e.selectedIndex];return t?is[t.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){as.prototype.handleClick.apply(this)}}])&&Xl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(as);function cs(e){return cs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cs(e)}function ls(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ss(r.key),r)}}function ss(e){var t=function(e){if("object"!=cs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cs(t)?t:t+""}function fs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(fs=function(){return!!e})()}function ps(){return ps="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ys(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},ps.apply(null,arguments)}function ys(e){return ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ys(e)}function ds(e,t){return ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ds(e,t)}r.Z.registerComponent("QualityButton",us);var vs=r.Z.getComponent("Menu"),hs=r.Z.getComponent("MenuButton"),bs=r.Z.getComponent("PlaybackRateMenuItem"),ms=r.Z.getComponent("PlaybackRateMenuButton"),gs=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=ys(t),function(e,t){if(t&&("object"==cs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fs()?Reflect.construct(t,n||[],ys(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e.className="cv-playback-rate-menu-button",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ds(e,t)}(t,e),n=t,o=[{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=hs.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((e=t,n=this,"function"==typeof(r=ps(ys(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"createMenu",value:function(){var e=new vs(this.player(),{menuButton:this});e.addItem(new g.Z(this.player_,{label:"Playback speed"}));var t=this.playbackRates();if(t)for(var n=0;n<t.length;n++){var r=t[n]+"x";1===t[n]&&(r+=" (Normal)"),e.addItem(new bs(this.player(),{rate:r}))}return e}},{key:"handleClick",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=hs.prototype.handleClick).apply.apply(e,[this].concat(n))}},{key:"updateLabel",value:function(){var e;this.setupLabelEl();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=ms.prototype.updateLabel).apply.apply(e,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var e=this.$("button");e&&(this.labelEl_=r.Z.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}],o&&ls(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(ms);function ws(e){return ws="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ws(e)}function Os(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ps(r.key),r)}}function Ps(e){var t=function(e){if("object"!=ws(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ws(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ws(t)?t:t+""}function Ss(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ss=function(){return!!e})()}function js(e){return js=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},js(e)}function Cs(e,t){return Cs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cs(e,t)}r.Z.registerComponent("PlaybackRateMenuButton",gs);var _s=r.Z.getComponent("TextTrackSettings"),ks={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},Ts={small:ks,medium:Object.assign(Object.assign({},ks),{fontPercent:1.5}),large:Object.assign(Object.assign({},ks),{fontPercent:2})},Es=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=js(t),function(e,t){if(t&&("object"==ws(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ss()?Reflect.construct(t,n||[],js(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cs(e,t)}(t,e),n=t,(r=[{key:"setSizeSetting",value:function(e){var t=this;this.size_=e,this.player_.getChild("textTrackDisplay").updateDisplay();var n=this.player_.getChild("collapserator").getChild("subtitleSizeButton");this.player_.trigger("changesubtitlesize",this.size_),window.requestAnimationFrame(function(){n.update(),t.player_.trigger("resizemenus")})}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return Ts[this.size_]?Ts[this.size_]:ks}}])&&Os(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(_s);function Rs(e){return Rs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rs(e)}function Is(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ls(r.key),r)}}function Ls(e){var t=function(e){if("object"!=Rs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Rs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Rs(t)?t:t+""}function xs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xs=function(){return!!e})()}function Ms(e,t,n,r){var o=As(Bs(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function As(){return As="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Bs(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},As.apply(null,arguments)}function Bs(e){return Bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bs(e)}function Ds(e,t){return Ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ds(e,t)}r.Z.registerComponent("TextTrackSettings",Es);var Ns=window.navigator&&window.navigator.userAgent||"",zs=(/iPod/i.test(Ns),/Android/i.test(Ns),r.Z.getComponent("Player")),Zs=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Bs(t),function(e,t){if(t&&("object"==Rs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,xs()?Reflect.construct(t,n||[],Bs(e).constructor):t.apply(e,n))}(this,t,[e,n]))._dataLoaded=!1,n.mobile&&r.addClass("cv-mobile-player");var o=function(){return r._dataLoaded=!0};return r.on("cv-playback-data-loaded",o),r.on("dispose",function(){return r.off("cv-playback-data-loaded",o)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ds(e,t)}(t,e),n=t,o=[{key:"dataLoaded",value:function(e){var t=this;this._dataLoaded?e():(this.one("cv-playback-data-loaded",e),this.one("dispose",function(){t.off("cv-playback-data-loaded",e)}))}},{key:"lock",value:function(e){this.callback_=e}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(e,n){var r=this;if("number"!=typeof e||!this.callback_||n)return Ms(t,"currentTime",this,3)([e]);this.callback_(function(){r.unlock(),r.currentTime(e)})}},{key:"play",value:function(){var e=this;if(!this.callback_)return Ms(t,"play",this,3)([]);this.callback_(function(){e.unlock(),e.play()})}},{key:"createEl",value:function(){var e=this,n=Ms(t,"createEl",this,3)([]);return this.videoContainer||(this.videoContainer=r.Z.dom.createEl("div",{className:"cv-video-wrapper"}),n.appendChild(this.videoContainer)),Array.from(n.childNodes).forEach(function(t){return t!==e.videoContainer&&e.videoContainer.appendChild(t)}),n}},{key:"addChild",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,o=Ms(t,"addChild",this,3)([e,n,r]),i=o.el();return i&&this.videoContainer.appendChild(i),o}},{key:"updateStyleEl_",value:function(){if(zs.prototype.updateStyleEl_.call(this),this.options_.fluid){var e=this.el_.parentNode;if(e&&this.options_.setMaxHeight){var t=this.aspectRatio();if(void 0!==t&&"auto"!==t||(t=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9"),this.player_.playerModePlugin().getMode()===Ai.Hover)return e.style.removeProperty("maxWidth"),void e.style.removeProperty("margin");var n=t.split(":"),r=+n[1]/+n[0];e.style.maxWidth=85/r+"vh",e.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var e=this;zs.prototype.listenForUserActivity_.call(this);var t=this.getChild("collapserator");t.on("mouseenter",function(){e.player().cache_.inactivityTimeout=e.player().options_.inactivityTimeout,e.player().options_.inactivityTimeout=0}),t.on("mouseleave",function(){e.player().options_.inactivityTimeout=e.player().cache_.inactivityTimeout})}}],o&&Is(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(zs);function Fs(e){return Fs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fs(e)}function Vs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Gs(r.key),r)}}function Gs(e){var t=function(e){if("object"!=Fs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fs(t)?t:t+""}function Hs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hs=function(){return!!e})()}function Us(e){return Us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Us(e)}function qs(e,t){return qs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qs(e,t)}Zs.prototype.options_=Object.assign(Object.assign({},zs.prototype.options_),{setMaxHeight:!0}),r.Z.registerComponent("player",Zs);var Ws=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Us(t),function(e,t){if(t&&("object"==Fs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Hs()?Reflect.construct(t,n||[],Us(e).constructor):t.apply(e,n))}(this,t,[e,n])).player_.addClass("cv-disable-play-pause-feedback"),r.onFirstPlay=r.onFirstPlay.bind(r),r.player_.one("play",r.onFirstPlay),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qs(e,t)}(t,e),n=t,(o=[{key:"dispose",value:function(){this.player_.off("play",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var e=this;window.setTimeout(function(){e.player_.isDisposed()||e.player_.removeClass("cv-disable-play-pause-feedback")},500)}},{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&Vs(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function Ys(e){return Ys="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ys(e)}function Ks(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Js(r.key),r)}}function Js(e){var t=function(e){if("object"!=Ys(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ys(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ys(t)?t:t+""}function Qs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qs=function(){return!!e})()}function Xs(e){return Xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xs(e)}function $s(e,t){return $s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$s(e,t)}r.Z.registerComponent("PlayPauseFeedback",Ws);var ef=r.Z.getComponent("PlayToggle"),tf="Play (space)",nf=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Xs(t),function(e,t){if(t&&("object"==Ys(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Qs()?Reflect.construct(t,n||[],Xs(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$s(e,t)}(t,e),n=t,(r=[{key:"handlePlay",value:function(){ef.prototype.handlePlay.call(this),this.controlText("Pause (space)")}},{key:"handlePause",value:function(){ef.prototype.handlePause.call(this),this.controlText(tf)}},{key:"handleClick",value:function(e){var t=this;ef.prototype.handleClick.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(function(){t.player_.removeClass("cv-disable-play-pause-feedback")},500)}}])&&Ks(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ef);function rf(e){return rf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rf(e)}function of(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,af(r.key),r)}}function af(e){var t=function(e){if("object"!=rf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rf(t)?t:t+""}function uf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(uf=function(){return!!e})()}function cf(e){return cf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cf(e)}function lf(e,t){return lf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lf(e,t)}r.Z.registerComponent("PlayToggle",nf),nf.prototype.controlText_=tf;var sf=r.Z.getComponent("TextTrackDisplay"),ff=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=cf(t),function(e,t){if(t&&("object"==rf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,uf()?Reflect.construct(t,n||[],cf(e).constructor):t.apply(e,n))}(this,t,[e,n])).bindListeners(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lf(e,t)}(t,e),n=t,(r=[{key:"bindListeners",value:function(){this.onResize=this.onResize.bind(this),this.player_.on("resize",this.onResize)}},{key:"onResize",value:function(){this.updateDisplay()}},{key:"updateDisplayState",value:function(e){sf.prototype.updateDisplayState.call(this,e);for(var t=this.player_.textTrackSettings.getValues(),n=e.activeCues,r=n.length;r--;){var o=n[r];if(o){var i=o.displayState;if(t.fontPercent&&1!==t.fontPercent){var a=.025*this.el().getBoundingClientRect().width*100/100;i.style.fontSize=a*t.fontPercent+"px"}}}}}])&&of(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(sf);function pf(e){return pf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pf(e)}function yf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,df(r.key),r)}}function df(e){var t=function(e){if("object"!=pf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pf(t)?t:t+""}function vf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(vf=function(){return!!e})()}function hf(e){return hf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hf(e)}function bf(e,t){return bf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bf(e,t)}r.Z.registerComponent("TextTrackDisplay",ff);var mf=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=hf(t),function(e,t){if(t&&("object"==pf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,vf()?Reflect.construct(t,n||[],hf(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bf(e,t)}(t,e),n=t,(o=[{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-control-bar-gradient-container",innerHTML:'<div class="cv-control-bar-gradient"></div>'})}}])&&yf(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function gf(e){return gf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gf(e)}function wf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Of(r.key),r)}}function Of(e){var t=function(e){if("object"!=gf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gf(t)?t:t+""}function Pf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pf=function(){return!!e})()}function Sf(e,t,n,r){var o=jf(Cf(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function jf(){return jf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Cf(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},jf.apply(null,arguments)}function Cf(e){return Cf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Cf(e)}function _f(e,t){return _f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_f(e,t)}r.Z.registerComponent("ControlBarGradient",mf);var kf=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Cf(t),function(e,t){if(t&&("object"==gf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pf()?Reflect.construct(t,n||[],Cf(e).constructor):t.apply(e,n))}(this,t,[e,n])).options_=n,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_f(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e=this.options_.title;if(!this.options_.seriesName)return Sf(t,"createEl",this,3)(["h1",{innerHTML:e}]);var n=this.buildSeasonEpisodeString();return n?(e="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase()," ").concat(n,"</div>")+e,Sf(t,"createEl",this,3)(["h1",{innerHTML:e}])):(e="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+e,Sf(t,"createEl",this,3)(["h1",{innerHTML:e}]))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var e=this.padNumber(this.options_.seasonNumber,2),t=this.padNumber(this.options_.episodeNumber,2);return"S".concat(e," • E").concat(t)}},{key:"padNumber",value:function(e,t){var n=e.toString();if(n.length>=t)return n;for(t-=n.length;t>0;)n="0"+n,t--;return n}}])&&wf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function Tf(e){return Tf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tf(e)}function Ef(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Rf(r.key),r)}}function Rf(e){var t=function(e){if("object"!=Tf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Tf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Tf(t)?t:t+""}function If(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(If=function(){return!!e})()}function Lf(){return Lf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=xf(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Lf.apply(null,arguments)}function xf(e){return xf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xf(e)}function Mf(e,t){return Mf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mf(e,t)}var Af=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=xf(t),function(e,t){if(t&&("object"==Tf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,If()?Reflect.construct(t,n||[],xf(e).constructor):t.apply(e,n))}(this,t,[e,n])).options_=n,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mf(e,t)}(t,e),n=t,r=[{key:"buildCSSClass",value:function(){return"cv-splash-rating ".concat((e=this.options_.ratingValue)?function(e){switch(!0){case e<32:return"cv-rating-purple";case e<48:return"cv-rating-green";case e<80:return"cv-rating-blue";case e<96:return"cv-rating-red";case e<128:return"cv-rating-pink";case e>=128:return"cv-rating-yellow";default:return""}}(e):"");var e}},{key:"createEl",value:function(e,n,r){return this.options_.ratingCode?(o=t,i=this,"function"==typeof(a=Lf(xf(1&3?o.prototype:o),"createEl",i))?function(e){return a.apply(i,e)}:a)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass(),innerHTML:this.options_.ratingCode}),r]):null;var o,i,a}}],r&&Ef(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function Bf(e){return Bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bf(e)}function Df(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nf(r.key),r)}}function Nf(e){var t=function(e){if("object"!=Bf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Bf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bf(t)?t:t+""}function zf(e,t){if(t&&("object"==Bf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Zf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zf=function(){return!!e})()}function Ff(e){return Ff=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ff(e)}function Vf(e,t){return Vf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vf(e,t)}var Gf=function(e){function t(e,n){var r,o,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),o=this,a=[e,n],i=Ff(i=t),r=zf(o,Zf()?Reflect.construct(i,a||[],Ff(o).constructor):i.apply(o,a)),n.embed?(r.addChild(new kf(e,n)),r.addChild(new Af(e,n)),r):zf(r,r)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vf(e,t)}(t,e),n=t,(o=[{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-splash-metadata"})}}])&&Df(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function Hf(e){return Hf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hf(e)}function Uf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qf(r.key),r)}}function qf(e){var t=function(e){if("object"!=Hf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Hf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Hf(t)?t:t+""}function Wf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wf=function(){return!!e})()}function Yf(e){return Yf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yf(e)}function Kf(e,t){return Kf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Kf(e,t)}var Jf=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Yf(t),function(e,t){if(t&&("object"==Hf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wf()?Reflect.construct(t,n||[],Yf(e).constructor):t.apply(e,n))}(this,t,[e,n])).addChild(new Gf(e,n)),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kf(e,t)}(t,e),n=t,(o=[{key:"createEl",value:function(){var e="<div class='cv-splash-mask'></div>";return this.options_.embed&&(e+="<div class='cv-splash-logo'>".concat(At,"</div>")),r.Z.dom.createEl("div",{className:"vjs-poster cv-embed-splash cv-embed-splash-black",tabIndex:-1,innerHTML:e})}},{key:"setSrc",value:function(e){var t="";e&&(t='url("'.concat(e,'")')),this.el_.style.backgroundImage=t}}])&&Uf(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("posterImage"));function Qf(e){return Qf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qf(e)}function Xf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$f(r.key),r)}}function $f(e){var t=function(e){if("object"!=Qf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qf(t)?t:t+""}function ep(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ep=function(){return!!e})()}function tp(e){return tp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tp(e)}function np(e,t){return np=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},np(e,t)}r.Z.registerComponent("posterImage",Jf);var rp=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=tp(t),function(e,t){if(t&&("object"==Qf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ep()?Reflect.construct(t,n||[],tp(e).constructor):t.apply(e,n))}(this,t,[e,n])).el().prepend(r.getErrorImage()),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&np(e,t)}(t,e),n=t,(o=[{key:"getErrorImage",value:function(){return r.Z.dom.createEl("div",{className:"cv-error-image",innerHTML:'\n <svg viewBox="0 0 301 185" xmlns="http://www.w3.org/2000/svg">\n <path d="M267.393 36.6514V167.906C267.393 168.182 267.169 168.406 266.893 168.406H32C31.7239 168.406 31.5 168.182 31.5 167.906V36.6514C31.5 36.3752 31.7239 36.1514 32 36.1514H80.5C80.7761 36.1514 81 36.3752 81 36.6514V57.7196C81 58.7622 82.0375 59.4868 83.0164 59.1279L95.7377 54.4634C95.9961 54.3687 96.2825 54.5006 96.3785 54.7585L102.094 70.1194C102.677 71.6866 105 71.2685 105 69.5964V48.4925C105 47.7632 104.475 47.1396 103.757 47.0146L94.2479 45.3609C93.9436 45.308 93.7596 44.9946 93.8616 44.7031L96.7376 36.4862C96.8077 36.2856 96.997 36.1514 97.2095 36.1514H266.893C267.169 36.1514 267.393 36.3752 267.393 36.6514Z" stroke="white"/>\n <path d="M163.296 101.777L149.437 90.1217C148.275 89.1441 146.5 89.9705 146.5 91.4894V113.664C146.5 115.141 148.191 115.98 149.367 115.087L163.226 104.569C164.139 103.876 164.173 102.515 163.296 101.777Z" stroke="white" stroke-linecap="round"/>\n <path d="M295.53 23.0783L277.524 26.2801L283.252 32.7192L274.855 38.9079L292.861 35.7061L287.133 29.2671L295.53 23.0783Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M268.06 2.91764L254.192 14.8403L262.401 17.4661L258.324 27.0679L272.192 15.1453L263.983 12.5194L268.06 2.91764Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n '})}}])&&Xf(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("ErrorDisplay"));function op(e){return op="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},op(e)}function ip(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ap(r.key),r)}}function ap(e){var t=function(e){if("object"!=op(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=op(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==op(t)?t:t+""}function up(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(up=function(){return!!e})()}function cp(e){return cp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cp(e)}function lp(e,t){return lp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lp(e,t)}r.Z.registerComponent("ErrorDisplay",rp);var sp=r.Z.getComponent("FullscreenToggle"),fp="Fullscreen (f)",pp=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=cp(t),function(e,t){if(t&&("object"==op(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,up()?Reflect.construct(t,n||[],cp(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lp(e,t)}(t,e),n=t,(r=[{key:"handleFullscreenChange",value:function(){sp.prototype.handleFullscreenChange.call(this),this.controlText(fp)}}])&&ip(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(sp);function yp(e){return yp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yp(e)}function dp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vp(r.key),r)}}function vp(e){var t=function(e){if("object"!=yp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yp(t)?t:t+""}function hp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hp=function(){return!!e})()}function bp(e){return bp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bp(e)}function mp(e,t){return mp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mp(e,t)}r.Z.registerComponent("FullscreenToggle",pp),pp.prototype.controlText_=fp;var gp=r.Z.getComponent("MuteToggle"),wp="Mute (m)",Op=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=bp(t),function(e,t){if(t&&("object"==yp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,hp()?Reflect.construct(t,n||[],bp(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mp(e,t)}(t,e),n=t,(r=[{key:"updateControlText_",value:function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute (m)":wp;this.controlText_!==e&&this.controlText(e)}}])&&dp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(gp);r.Z.registerComponent("MuteToggle",Op),Op.prototype.controlText_=wp;var Pp=n(87013),Sp=n(88483);function jp(e){return jp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jp(e)}function Cp(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return _p(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,u=0,c=e,p.n=n,a}};function y(n,r){for(u=n,c=r,t=0;!f&&l&&!o&&t<s.length;t++){var o,i=s[t],y=p.p,d=i[2];n>3?(o=d===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=n<2&&y<i[1])?(u=0,p.v=r,p.n=i[1]):y<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,p.n=d,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,d),u=s,c=d;(t=u<2?e:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),y(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(t){i=e,u=1,c=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(_p(t={},r,function(){return this}),t),f=l.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,_p(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,_p(f,"constructor",l),_p(l,"constructor",c),c.displayName="GeneratorFunction",_p(l,o,"GeneratorFunction"),_p(f),_p(f,o,"Generator"),_p(f,r,function(){return this}),_p(f,"toString",function(){return"[object Generator]"}),(Cp=function(){return{w:i,m:p}})()}function _p(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}_p=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){_p(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},_p(e,t,n,r)}function kp(e){return function(e){if(Array.isArray(e))return Tp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Tp(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tp(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ep(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Rp(r.key),r)}}function Rp(e){var t=function(e){if("object"!=jp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=jp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jp(t)?t:t+""}var Ip,Lp=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}c((r=r.apply(e,t||[])).next())})},xp=r.Z.getComponent("Player"),Mp=function(){return e=function e(t,n){var o=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamLogged=!1,this.options=r.Z.obj.merge({},e.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(t),this.buildVideoJs(),this.options.splash&&this.setupSplash(this.options.splash),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready(function(){o._configurePlugins(),o.options.setup&&o.options.setup(o.options,o.player),o.fetch().catch(function(e){return o.handleFetchError(e)})})},(t=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.configureMenuDimensionsPlugin({mobile:this.options.mobile,overflowControls:this.options.overflowControls,seekBarName:this.getSeekBarName()}),this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),!this.options.mobile&&this.options.allowFullscreen&&this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(e){var t;null===(t=this.analyticsService)||void 0===t||t.logVideoProgress(e)}},{key:"buildVideoJs",value:function(){return this.player=(0,r.Z)(this.el,this.getPlayerOptions())}},{key:"getInactivityTimeout",value:function(){if("number"==typeof this.options.inactivityTimeout)return this.options.inactivityTimeout;var e=500;return(this.options.mobile||r.Z.browser.IS_IOS||r.Z.browser.IS_ANDROID)&&(e=3e3),e}},{key:"getFluid",value:function(){return!this.options.theatreMode&&!this.options.embed&&!this.options.mobile}},{key:"getFill",value:function(){return!!this.options.theatreMode||!(!this.options.embed&&!this.options.mobile)}},{key:"getPlayerOptions",value:function(){var e=this,t=xp.prototype.options_.children;return t=t.filter(function(e){return"bigPlayButton"!==e&&"posterImage"!==e}),{controls:this.options.controls,fluid:this.getFluid(),fill:this.getFill(),inactivityTimeout:this.getInactivityTimeout(),controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(kp(t),[{name:"collapserator",children:ke.filter(function(t){var n;return!("fullscreenToggle"===t&&!e.options.allowFullscreen||"playbackRateMenuButton"===t&&!(null===(n=e.options.playbackRates)||void 0===n?void 0:n.length))})},"playPauseFeedback","controlBarGradient"]),userActions:{hotkeys:function(t){return function(e,t,n){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)){var r=Ve()(e);if(("t"!==r||n.allowTheatreMode)&&("f"!==r||n.allowFullscreen)&&Ke[r]){Ke[r](t,e);var o=function(e){var t=e.target;return"video"===t.tagName.toLowerCase()||!!["video-js","vjs-tech"].find(function(e){return t.classList.contains(e)})}(e),i=["space"].includes(r);(o||i)&&(e.preventDefault(),e.stopPropagation())}}}(t,e.player,e.options)}},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio,mobile:this.options.mobile,allowTheatreMode:this.options.allowTheatreMode,deferMenus:this.options.deferMenus,muted:this.options.muted,devicesConfig:this.options.devicesConfig}}},{key:"getPlaybackObject",value:function(){return Lp(this,void 0,void 0,Cp().m(function e(){var t,n,r=this;return Cp().w(function(e){for(;;)switch(e.n){case 0:if(!this.options.offlinePlaybackObject){e.n=1;break}return e.a(2,this.options.offlinePlaybackObject);case 1:if(t=this.options.fetch,void 0===this.options.fetch&&(t=function(e){var t="".concat(r.options.playerApi.origin,"/api/playback?viewKey=").concat(e);return Ze.e.get(t)}),this.options.viewKey){e.n=2;break}throw new Error("Please specify a viewKey or a fetch function");case 2:return e.n=3,t(this.options.viewKey);case 3:if(n=e.v){e.n=4;break}throw new Error("Error fetching playback object");case 4:return e.a(2,n)}},e,this)}))}},{key:"setChaptersInternal",value:function(e,t){var n=B.O.getTrack(this.player,"chapters",null);n||(n=this.player.addTextTrack("chapters")),kp(n.cues.cues_).forEach(function(e){return n.removeCue(e)}),e.forEach(function(e){n.addCue({startTime:e.timestamp,endTime:e.endTimestamp,text:e.name})}),t&&n.trigger({type:"cv:cuechange",target:n}),n.trigger({type:"loadeddata",target:n})}},{key:"setChapters",value:function(e){this.setChaptersInternal(e,!0)}},{key:"setPlayerMode",value:function(e,t){this.player.playerModePlugin().setPlayerMode(e,t)}},{key:"setFavourite",value:function(e,t){this.player.favouritePlugin().setFavourite(e,t)}},{key:"fetch",value:function(){var e,t,n,r,o;return Lp(this,void 0,void 0,Cp().m(function i(){var a,u,c,l=this;return Cp().w(function(i){for(;;)switch(i.n){case 0:return i.n=1,this.getPlaybackObject();case 1:if(a=i.v,!this.isDisposed()){i.n=2;break}return i.a(2);case 2:u="MasterClip"===a.mediaType,c=null===(e=a.additionalData)||void 0===e?void 0:e.clipData,(null===(n=null===(t=a.chapters)||void 0===t?void 0:t.list)||void 0===n?void 0:n.length)>0&&!u&&!c&&this.setChaptersInternal(a.chapters.list,!1),this.player.localCache({localCacheAddresses:null!==(r=a.localCacheAddresses)&&void 0!==r?r:[],enabled:null===(o=this.options.enableLocalCache)||void 0===o||o}),this.player.progressiveFiles({sources:a.files.progressive.map(function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}})}),this.player.handleNetworkErrors({playerApi:this.options.playerApi,fileToken:a.files.fileToken}),a.subtitles.list.length>0&&a.subtitles.list.forEach(function(e){if("text/vtt"===e.mimeType){var t=l.player.addRemoteTextTrack({kind:"subtitles",src:e.url,language:e.language,label:e.label},!0);if(B.O.sanitizeTrack(t.track,l.player),l.options.allowTranscript){var n=l.player.addRemoteTextTrack({kind:"metadata",src:e.url+(e.url.includes("?")?"&":"?")+"fullSentences=true",language:e.language,label:"transcript"},!0);n.track.isClickViewProduced=e.isClickViewProduced,B.O.sanitizeTrack(n.track,l.player)}}}),a.posterUrl&&this.player.poster(Pp.j.createUrl(a.posterUrl,{size:Sp.h2.Large})),this.setupSplash({title:a.title,posterUrl:a.posterUrl,episodeNumber:a.episodeNumber,ratingCode:a.ratingCode,seasonNumber:a.seasonNumber,seriesName:a.seriesName}),this.additionalSetup(a),this.handleAutoplay(a),this.options.startTime&&(this.player.currentTime(this.options.startTime),this.player.one("canplay",function(){l.player.currentTime(l.options.startTime)})),this.player.trigger("cv-playback-data-loaded",a);case 3:return i.a(2)}},i,this)}))}},{key:"handleFetchError",value:function(e){var t,n=e.message;e instanceof Je.M&&(null===(t=e.response)||void 0===t?void 0:t.type)===Ye.PhysicallyChapteredVideo&&(n="Video cannot be played because it is either corrupt or damaged."),this.player.error(n),this.options.onError&&this.options.onError(e)}},{key:"fetchConfig",value:function(){return Lp(this,void 0,void 0,Cp().m(function e(){var t;return Cp().w(function(e){for(;;)switch(e.n){case 0:if(!(Ip||this.options.fetch||this.options.offlinePlaybackObject)){e.n=1;break}return e.a(2);case 1:return t="".concat(this.options.playerApi.origin,"/api/config"),e.n=2,Ze.e.get(t);case 2:if(Ip=e.v,!this.isDisposed()){e.n=3;break}return e.a(2);case 3:this.trigger("config:loaded");case 4:return e.a(2)}},e,this)}))}},{key:"additionalSetup",value:function(e){var t,n=this;this.player.whiteboardModePlugin(),this.player.deferMenusPlugin();var r=this.options.enableLocalCache&&!!(null===(t=e.localCacheAddresses)||void 0===t?void 0:t.length);Ip?this.setupAnalyticsService(e,r):this.one("config:loaded",function(){return n.setupAnalyticsService(e,r)}),this.analyticsService||!this.isAnalyticsEnabled()?this.setupAnalyticsDependentPlugins(e):this.one("analytics:loaded",function(){return n.setupAnalyticsDependentPlugins(e)})}},{key:"setupAnalyticsService",value:function(e,t){this.options.eventLogging&&(this.analyticsService=new ze({player:this.player,collectionApiUrls:Ip.collectionApi.urls,collectionApiClientId:Ip.collectionApi.clientId,productVersion:"1.40.0",authSessionId:e.viewerAuthSessionId,videoId:e.videoId,mediaId:e.mediaId,userId:e.viewerId,shareId:e.shareId,customerId:e.viewerCustomerId,mediaType:e.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:this.options.embed,isUsingLocalCache:t,additionalAnalyticsData:this.getAdditionalAnalyticsData(e),regionName:e.instanceRegion||this.options.sharerInstanceRegion||Qe.M.CvApSoutheast1}),this.on("timeupdate",this.logStream),this.trigger("analytics:loaded"))}},{key:"setupAnalyticsDependentPlugins",value:function(e){var t,n,r,o;this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(t=e.settings)||void 0===t?void 0:t.showSubtitles,subtitleSize:null===(n=e.settings)||void 0===n?void 0:n.playbackSubtitleSizeDefault,analyticsService:this.analyticsService}),this.player.persistQualitySettingsPlugin({playbackProfile:null===(r=e.settings)||void 0===r?void 0:r.playbackProfile,playbackProfileLocalCache:null===(o=e.settings)||void 0===o?void 0:o.playbackProfileLocalCache,analyticsService:this.analyticsService}),this.player.persistPlaybackRatePlugin({analyticsService:this.analyticsService})}},{key:"getAdditionalAnalyticsData",value:function(e){return{}}},{key:"isAnalyticsEnabled",value:function(){return!this.options.fetch&&!this.options.offlinePlaybackObject&&this.options.eventLogging}},{key:"handleAutoplay",value:function(e){var t=this;this.options.autoplay&&this.player.ready(function(){t.player.play().catch(function(){t.isDisposed()||t.showSplash()})})}},{key:"logStream",value:function(){this.analyticsService&&(this.player.currentTime()<3||this.streamLogged||(this.analyticsService.logStream(),this.streamLogged=!0,this.off("timeupdate",this.logStream)))}},{key:"getAnalyticsPlayerType",value:function(){return"player"}},{key:"createEl",value:function(e){var t;"string"==typeof e?(e=function(e){return 0===e.indexOf("#")?e.slice(1):e}(e),t=r.Z.dom.$("#"+e)):t=e;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=r.Z.dom.createEl("video",{},{class:n}),t.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(e,t){this.player.on(e,t)}},{key:"one",value:function(e,t){this.player.one(e,t)}},{key:"off",value:function(e,t){this.player.off(e,t)}},{key:"trigger",value:function(e,t){return this.player.trigger(e,t)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(e){this.player.ready(e)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"isPaused",value:function(){return this.player.paused()}},{key:"currentTime",value:function(e){return this.player.currentTime(e)}},{key:"muted",value:function(e){return this.player.muted(e)}},{key:"duration",value:function(){return this.player.duration()}},{key:"isFullscreen",value:function(){return this.player.isFullscreen()}},{key:"requestFullscreen",value:function(){this.player.requestFullscreen()}},{key:"exitFullscreen",value:function(){this.player.exitFullscreen()}},{key:"playbackRate",value:function(e){return this.player.playbackRate(e)}},{key:"quality",value:function(e){for(var t=this.player.qualityLevels(),n=0;n<t.length;n++){var r=t[n];if(e)r.enabled=r.id===e.toString();else if(r.enabled)return r.id}}},{key:"subtitles",value:function(e){for(var t=this.player.textTracks(),n=0;n<t.length;n++){var r=t[n];if("subtitles"===r.kind)if(void 0===e){if("showing"===r.mode)return r.label}else r.label===e?r.mode="showing":r.mode="disabled"}}},{key:"bindEventListeners",value:function(){var e=this,t=function(e){return e.preventDefault()};if(this.showSplash=this.showSplash.bind(this),this.hideSplash=this.hideSplash.bind(this),this.player.on("ended",this.showSplash),this.player.on("play",this.hideSplash),this.player.tech(!0).on("contextmenu",t),this.player.one("dispose",function(){e.off("ended",e.showSplash),e.off("play",e.hideSplash),e.player.tech(!0).off("contextmenu",t)}),this.options.hotkeyElQuerySelector){var n=r.Z.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.one("dispose",function(){e.player.off(n,"keydown",e.player.handleKeyDown)}))}}},{key:"setupSeekBar",value:function(){var e=this.getSeekBarName(),t=this.player.controlBar.getChild("progressControl");t.addChild(e,this.getSeekBarOptions()),t.setSeekBarName(e)}},{key:"setupSplash",value:function(e){this._splashAdded||(this._splashAdded=!0,this.player.addChild("posterImage",Object.assign({embed:this.options.embed},e)),this.player.addChild("bigPlayButton"),this.options.autoplay?this.hideSplash():this.showSplash())}},{key:"showSplash",value:function(){this.player.hasStarted(!1),this.player.getChild("posterImage").show(),this.player.getChild("bigPlayButton").show()}},{key:"hideSplash",value:function(){this.player.getChild("posterImage").hide(),this.player.getChild("bigPlayButton").hide()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}}])&&Ep(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();Mp.options_={viewKey:null,controls:!0,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0,eventLogging:!0,allowFullscreen:!0}},38465:function(e,t,n){"use strict";n.d(t,{J:function(){return pt}});var r=n(2740),o=(n(96263),n(76032));function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function u(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=s(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},l.apply(null,arguments)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var p=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=s(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,n||[],s(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(t,e),n=t,r=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){var e,n,r;(e=t,n=this,"function"==typeof(r=l(s(1&3?e.prototype:e),"handleClick",n))?function(e){return r.apply(n,e)}:r)([null])}}],r&&a(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("Button"));function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,v(r.key),r)}}function v(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}p.prototype.controlText_="Create clip",o.Z.registerComponent("CreateClipButton",p);var g=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=b(t),function(e,t){if(t&&("object"==y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,n||[],b(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,e.ready(function(){return r.onReady()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(t,e),n=t,(r=[{key:"onReady",value:function(){var e,t=this.player.getChild("collapserator"),n=null===(e=null==t?void 0:t.children())||void 0===e?void 0:e.findIndex(function(e){return"CustomControlSpacer"===e.name()});n&&-1!==n&&t.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getPlugin("plugin"));function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,P(r.key),r)}}function P(e){var t=function(e){if("object"!=w(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==w(t)?t:t+""}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(S=function(){return!!e})()}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}o.Z.registerPlugin("createClipButtonPlugin",g);var _=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=j(t),function(e,t){if(t&&("object"==w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(t,n||[],j(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(t,e),n=t,(r=[{key:"handlePictureInPictureEnabledChange",value:function(){this.enable()}}])&&O(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("PictureInPictureToggle"));function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function T(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return E(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,u=0,c=e,p.n=n,a}};function y(n,r){for(u=n,c=r,t=0;!f&&l&&!o&&t<s.length;t++){var o,i=s[t],y=p.p,d=i[2];n>3?(o=d===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=n<2&&y<i[1])?(u=0,p.v=r,p.n=i[1]):y<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,p.n=d,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,d),u=s,c=d;(t=u<2?e:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),y(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(t){i=e,u=1,c=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(E(t={},r,function(){return this}),t),f=l.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,E(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,E(f,"constructor",l),E(l,"constructor",c),c.displayName="GeneratorFunction",E(l,o,"GeneratorFunction"),E(f),E(f,o,"Generator"),E(f,r,function(){return this}),E(f,"toString",function(){return"[object Generator]"}),(T=function(){return{w:i,m:p}})()}function E(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}E=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){E(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},E(e,t,n,r)}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,I(r.key),r)}}function I(e){var t=function(e){if("object"!=k(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==k(t)?t:t+""}function L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(L=function(){return!!e})()}function x(){return x="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=M(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},x.apply(null,arguments)}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}o.Z.registerComponent("PictureInPictureToggle",_);var B=o.Z.getComponent("PlayToggle"),D=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=M(t),function(e,t){if(t&&("object"==k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,L()?Reflect.construct(t,n||[],M(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,r.bindFunctions(),e.ready(function(){return r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.onPlayerResize=this.onPlayerResize.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"initialize",value:function(){var e=this,t=this.player.getChild("collapserator"),n=t.children().findIndex(function(e){var t;return"fullscreentoggle"===(null===(t=e.name())||void 0===t?void 0:t.toLowerCase())});-1===n&&(n=t.children().length-1),this.toggle=t.addChild("pictureInPictureToggle",{},n),this.toggle.enable(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",function(){var t;null===(t=e.player)||void 0===t||t.off("playerresize",e.onPlayerResize)})}},{key:"togglePictureInPicture",value:function(e){if(e!==this.player.isInPictureInPicture()){var t=e?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(e),this.player.trigger(t),e?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){var e,t;if(!this.player.isInPictureInPicture()){var n=this.player.el().getBoundingClientRect();0!==n.width&&(n.width<800?null===(e=this.toggle)||void 0===e||e.hide():null===(t=this.toggle)||void 0===t||t.show())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new B(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){var e;this.togglePictureInPicture(!0),"function"==typeof(null===(e=this.options)||void 0===e?void 0:e.onRequestPictureInPicture)&&this.options.onRequestPictureInPicture(!0)}},{key:"exitPictureInPicture",value:function(){return e=this,t=void 0,n=void 0,r=T().m(function e(){return T().w(function(e){for(;;)switch(e.n){case 0:this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles();case 1:return e.a(2)}},e,this)}),new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}c((r=r.apply(e,t||[])).next())});var e,t,n,r}},{key:"dispose",value:function(){var e,n,r;this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,(e=t,n=this,"function"==typeof(r=x(M(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}],r&&R(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("pictureInPicture",D);var N=n(39232),z=n(69140);function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function F(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,V(r.key),r)}}function V(e){var t=function(e){if("object"!=Z(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Z(t)?t:t+""}var G=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}},t=[{key:"subscribe",value:function(e,t){this.registerListener(e,t)}},{key:"subscribeOnce",value:function(e,t){this.registerListener(e,t,1)}},{key:"unsubscribe",value:function(e,t){this.deregisterListener(e,t)}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.triggerCallbacks(e,n)}},{key:"registerListener",value:function(e,t,n){var r;if("string"!=typeof e)throw new Error("Event name must be a string");if("function"!=typeof t)throw new Error("Event callback must be a function");if(n&&"number"!=typeof n)throw new Error("Execution limit must be a number or undefined");this.listeners[e]=null!==(r=this.listeners[e])&&void 0!==r?r:[],this.listeners[e].push({callback:t,executionLimit:n})}},{key:"deregisterListener",value:function(e,t){var n;if("string"!=typeof e)throw new Error("Event name must be a string");if(t&&"function"!=typeof t)throw new Error("Event callback must be a function");if(t){var r=null===(n=this.listeners[e])||void 0===n?void 0:n.findIndex(function(e){return e.callback===t});"number"==typeof r&&-1!==r&&(this.listeners[e].splice(r,1),0===this.listeners[e].length&&delete this.listeners[e])}else this.listeners[e]=[]}},{key:"triggerCallbacks",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];if(this.listeners[e]){var i=[];this.listeners[e].forEach(function(e){var t,n;"number"==typeof e.executionLimit&&(e.executionCount=null!==(n=e.executionCount)&&void 0!==n?n:0,e.executionCount++,e.executionCount===e.executionLimit&&i.push(e.callback)),(t=e.callback).apply.apply(t,[null].concat(r))}),i.length&&i.forEach(function(n){return t.deregisterListener(e,n)})}}}],t&&F(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),H=new G;function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,W(r.key),r)}}function W(e){var t=function(e){if("object"!=U(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==U(t)?t:t+""}function Y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Y=function(){return!!e})()}function K(e,t,n,r){var o=J(Q(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function J(){return J="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Q(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},J.apply(null,arguments)}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},X(e,t)}var $=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Q(t),function(e,t){if(t&&("object"==U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Y()?Reflect.construct(t,n||[],Q(e).constructor):t.apply(e,n))}(this,t,[e,n])).hasBuffered=!1,r.hasPlayed=!1,r.eventsService=H,r.pointOfInterest=n.pointOfInterest,r.onMouseOver=r.onMouseOver.bind(r),r.onMouseLeave=r.onMouseLeave.bind(r),r.onGlancePointOfInterestMouseEnter=r.onGlancePointOfInterestMouseEnter.bind(r),r.onGlancePointOfInterestMouseLeave=r.onGlancePointOfInterestMouseLeave.bind(r),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(K(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return K(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"bindListeners",value:function(){this.on("mouseover",this.onMouseOver),this.on("mouseleave",this.onMouseLeave),this.eventsService.subscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.subscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"dispose",value:function(){this.eventsService.unsubscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.unsubscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"getPointOfInterestTime",value:function(){return this.pointOfInterest.startTime}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/e*100+"%"}},{key:"updateBuffered",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasBuffered){this.hasBuffered=t;var n="cv-point-of-interest-indicator-buffered";this.hasBuffered?this.addClass(n):this.removeClass(n)}}},{key:"updatePlaybackProgress",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasPlayed){this.hasPlayed=t;var n="cv-point-of-interest-indicator-played";t?this.addClass(n):this.removeClass(n)}}},{key:"toggleVisibility",value:function(e){var t="cv-point-of-interest-indicator-hidden";e?this.removeClass(t):this.addClass(t)}},{key:"onMouseOver",value:function(){this.setTimeTooltipText(),this.eventsService.trigger("player:poi:mouseover",this.pointOfInterest)}},{key:"onMouseLeave",value:function(){this.clearTimeTooltipText(),this.eventsService.trigger("player:poi:mouseleave")}},{key:"onGlancePointOfInterestMouseEnter",value:function(e){e.id===this.pointOfInterest.id&&(this.addClass("cv-point-of-interest-indicator-highlight"),this.setTimeTooltipTime(),this.setTimeTooltipText(),this.positionMouseTimeDisplay(),this.showMouseTimeDisplay())}},{key:"onGlancePointOfInterestMouseLeave",value:function(){this.removeClass("cv-point-of-interest-indicator-highlight"),this.hideMouseTimeDisplay()}},{key:"setTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var e=this.getTimeTooltip();null==e||e.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var e,t,n=null===(e=this.getSeekBar())||void 0===e?void 0:e.el();if(n){var r=o.Z.dom.findPosition(n),i=this.getPointOfInterestTime()/this.player().duration();null===(t=this.getMouseTimeDisplay())||void 0===t||t.update(r,i)}}},{key:"showMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.removeForceShow()}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player().controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var e;return null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var e;return null===(e=this.getMouseTimeDisplay())||void 0===e?void 0:e.getChild("TimeTooltip")}}])&&q(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("Component"));function ee(e){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(e)}function te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ne(r.key),r)}}function ne(e){var t=function(e){if("object"!=ee(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ee(t)?t:t+""}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(re=function(){return!!e})()}function oe(){return oe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ie(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},oe.apply(null,arguments)}function ie(e){return ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ie(e)}function ae(e,t){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ae(e,t)}var ue=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=ie(t),function(e,t){if(t&&("object"==ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,re()?Reflect.construct(t,n||[],ie(e).constructor):t.apply(e,n))}(this,t,[e,n])).pointsOfInterestVisible=n.pointsOfInterestVisible,r.toggle(r.pointsOfInterestVisible),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ae(e,t)}(t,e),n=t,r=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){o.Z.dom.addClass(this.toggleEl,"on"),o.Z.dom.setAttribute(this.toggleEl,"aria-checked","true"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){o.Z.dom.removeClass(this.toggleEl,"on"),o.Z.dom.setAttribute(this.toggleEl,"aria-checked","false"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,n,r){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=o.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),o.Z.dom.setAttribute(this.toggleEl,"id","poi-toggle"),o.Z.dom.setAttribute(this.toggleEl,"role","switch"),this.toggleEl.addEventListener("click",this.handleToggle);var i,a,u,c=(i=t,a=this,"function"==typeof(u=oe(ie(1&3?i.prototype:i),"createEl",a))?function(e){return u.apply(a,e)}:u)([e,{className:"vjs-menu-item cv-cog-menu-item cv-poi-toggle",innerHTML:'\n <span for="poi-toggle" class="vjs-menu-item-text">Points of Interest</span>\n <span class="cv-toggle-container"></span>'},r]);return c.children[1].appendChild(this.toggleEl),c}}],r&&te(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("MenuItem"));function ce(e){return ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ce(e)}function le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,se(r.key),r)}}function se(e){var t=function(e){if("object"!=ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ce(t)?t:t+""}function fe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(fe=function(){return!!e})()}function pe(e){return pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pe(e)}function ye(e,t){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ye(e,t)}o.Z.registerComponent("PointsOfInterestMenuItem",ue);var de=o.Z.getPlugin("plugin"),ve="cvplayer-points-of-interest",he=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=pe(t),function(e,t){if(t&&("object"==ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fe()?Reflect.construct(t,n||[],pe(e).constructor):t.apply(e,n))}(this,t,[e])).pointOfInterestIndicators=[],r.enabled=!0,r.pointsOfInterest=null==n?void 0:n.pointsOfInterest,r.initialize=r.initialize.bind(r),r.updateBuffered=r.updateBuffered.bind(r),r.updatePlaybackProgress=r.updatePlaybackProgress.bind(r),r.player.one("loadedmetadata",function(){return r.player.ready(r.initialize)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ye(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.pointsOfInterest&&(z.S.hasLocalStorage()&&"false"===z.S.get(ve)&&(this.enabled=!1),this.setupTrack(),this.createPointOfInterestIndicators(),this.addMenuItem(),this.bindListeners())}},{key:"bindListeners",value:function(){var e=this;this.player.on("progress",this.updateBuffered),this.player.on("timeupdate",this.updatePlaybackProgress),this.player.on("dispose",function(){var t,n;null===(t=e.player)||void 0===t||t.off("progress",e.updateBuffered),null===(n=e.player)||void 0===n||n.off("timeupdate",e.updatePlaybackProgress)})}},{key:"togglePointsOfInterest",value:function(e){z.S.set(ve,e.toString()),this.pointOfInterestIndicators.forEach(function(t){return t.toggleVisibility(e)})}},{key:"setupTrack",value:function(){var e=this.player.addTextTrack("metadata","pointsofinterest");this.pointsOfInterest.forEach(function(t){e.addCue({startTime:t.startTime,endTime:t.endTime,text:t.description})}),e.trigger({type:"loadeddata",target:e})}},{key:"createPointOfInterestIndicators",value:function(){var e,t=this,n=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");this.pointsOfInterest.forEach(function(e){var r=new $(t.player,{pointOfInterest:e});t.pointOfInterestIndicators.push(r),n.addChild(r)})}},{key:"addMenuItem",value:function(){var e;(null===(e=this.player.getChild("collapserator"))||void 0===e?void 0:e.getChild("cogButton")).addItem({ctor:ue,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach(function(t){return t.updateBuffered((0,N.b)(e.player))})}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach(function(t){return t.updatePlaybackProgress(e.player.currentTime())})}}])&&le(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(de);function be(e){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(e)}function me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ge(r.key),r)}}function ge(e){var t=function(e){if("object"!=be(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==be(t)?t:t+""}function we(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(we=function(){return!!e})()}function Oe(e,t,n,r){var o=Pe(Se(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function Pe(){return Pe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Se(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Pe.apply(null,arguments)}function Se(e){return Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Se(e)}function je(e,t){return je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},je(e,t)}o.Z.registerPlugin("pointsOfInterestPlugin",he),n(56775);var Ce=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Se(t),function(e,t){if(t&&("object"==be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,we()?Reflect.construct(t,n||[],Se(e).constructor):t.apply(e,n))}(this,t,[e,n])).initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&je(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.setPosition()}},{key:"buildCSSClass",value:function(){return"cv-range-indicator ".concat(Oe(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Oe(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.options_.time/e*100+"%"}}])&&me(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("Component"));function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Te(r.key),r)}}function Te(e){var t=function(e){if("object"!=_e(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_e(t)?t:t+""}function Ee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ee=function(){return!!e})()}function Re(e,t,n,r){var o=Ie(Le(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function Ie(){return Ie="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Le(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Ie.apply(null,arguments)}function Le(e){return Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Le(e)}function xe(e,t){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xe(e,t)}var Me=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Le(t),function(e,t){if(t&&("object"==_e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ee()?Reflect.construct(t,n||[],Le(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xe(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-replay-view-button ".concat(Re(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Re(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{innerHTML:'<span class="'.concat(this.options_.iconClassName,'"></span><span>').concat(this.options_.label,"</span>"),className:this.buildCSSClass()}),r])}},{key:"handleClick",value:function(){this.options_.onPress()}}])&&ke(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("ClickableComponent"));function Ae(e){return Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(e)}function Be(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,De(r.key),r)}}function De(e){var t=function(e){if("object"!=Ae(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ae(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ae(t)?t:t+""}function Ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ne=function(){return!!e})()}function ze(e,t,n,r){var o=Ze(Fe(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function Ze(){return Ze="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Fe(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Ze.apply(null,arguments)}function Fe(e){return Fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fe(e)}function Ve(e,t){return Ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ve(e,t)}var Ge=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Fe(t),function(e,t){if(t&&("object"==Ae(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ne()?Reflect.construct(t,n||[],Fe(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ve(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-replay-view ".concat(ze(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){var i=ze(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r]),a=o.Z.dom.createEl("h5",{innerHTML:this.localize("This clip has finished"),className:"cv-replay-heading"}),u=o.Z.dom.createEl("div",{className:"cv-button-container"}),c=new Me(this.player_,{label:this.localize("Replay clip"),iconClassName:"cv-replay-icon",onPress:this.options_.onReplayPress}),l=new Me(this.player_,{label:this.localize("Continue watching"),iconClassName:"cv-continue-icon",onPress:this.options_.onContinuePress});return i.appendChild(a),i.appendChild(u),u.appendChild(c.el()),u.appendChild(l.el()),i}}])&&Be(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("Component"));function He(e){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(e)}function Ue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qe(r.key),r)}}function qe(e){var t=function(e){if("object"!=He(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=He(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==He(t)?t:t+""}function We(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(We=function(){return!!e})()}function Ye(){return Ye="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ke(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Ye.apply(null,arguments)}function Ke(e){return Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ke(e)}function Je(e,t){return Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Je(e,t)}var Qe=function(e){function t(e,n){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Ke(t),function(e,t){if(t&&("object"==He(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,We()?Reflect.construct(t,n||[],Ke(e).constructor):t.apply(e,n))}(this,t,[e,n])).startTime=parseFloat(n.startTime.toPrecision(4)),r.endTime=parseFloat(n.endTime.toPrecision(4)),r.dismissed=!1,r.startTime>r.endTime)throw Error("Range start cannot be greater than range end");return r.bindFunctions(),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Je(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.onReady=this.onReady.bind(this),this.onTimeUpdateOrSeeked=this.onTimeUpdateOrSeeked.bind(this),this.onReplayPress=this.onReplayPress.bind(this),this.onContinuePress=this.onContinuePress.bind(this)}},{key:"initialize",value:function(){var e=this;this.player.one("loadedmetadata",function(){return e.player.ready(e.onReady)}),this.player.on("timeupdate",this.onTimeUpdateOrSeeked),this.player.on("seeked",this.onTimeUpdateOrSeeked)}},{key:"onReady",value:function(){this.addCssClasses(),this.showRangeIndicators(),this.addMaskToProgressBar()}},{key:"onTimeUpdateOrSeeked",value:function(){if(!this.dismissed){var e=this.player.currentTime();if(!(e<this.startTime))return e>this.endTime?(this.showReplayView(),this.disablePlayToggle(),this.player.pause(),void this.player.currentTime(this.endTime)):void 0;this.player.currentTime(this.startTime)}}},{key:"onReplayPress",value:function(){this.player.currentTime(this.startTime),this.player.play(),this.hideReplayView(),this.enablePlayToggle()}},{key:"onContinuePress",value:function(){this.dismissed=!0,this.player.play(),this.hideRangeIndicators(),this.removeMaskFromProgressBar(),this.hideReplayView(),this.enablePlayToggle(),this.removeCssClasses()}},{key:"showRangeIndicators",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");this.startTimeIndicator||(this.startTimeIndicator=new Ce(this.player,{time:this.startTime}),null==t||t.addChild(this.startTimeIndicator)),this.endTimeIndicator||(this.endTimeIndicator=new Ce(this.player,{time:this.endTime}),null==t||t.addChild(this.endTimeIndicator))}},{key:"hideRangeIndicators",value:function(){var e,t;null===(e=this.startTimeIndicator)||void 0===e||e.hide(),null===(t=this.endTimeIndicator)||void 0===t||t.hide()}},{key:"addMaskToProgressBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar"),n=null==t?void 0:t.el().getElementsByClassName("cv-chapter-bar-items");if(n&&n.length){var r=n[0],o=this.player.duration(),i=this.startTime/o*100,a=100-this.endTime/o*100;r.style.clipPath="inset(".concat(-5,"em ").concat(a,"% ").concat(-5,"em ").concat(i,"%)")}}},{key:"removeMaskFromProgressBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar"),n=null==t?void 0:t.el().getElementsByClassName("cv-chapter-bar-items");n&&n.length&&(n[0].style.clipPath="")}},{key:"showReplayView",value:function(){this.replayView||(this.replayView=new Ge(this.player,{onContinuePress:this.onContinuePress,onReplayPress:this.onReplayPress}),this.player.addChild(this.replayView)),this.replayView.show()}},{key:"hideReplayView",value:function(){var e;null===(e=this.replayView)||void 0===e||e.hide()}},{key:"getPlayToggle",value:function(){var e=this.player.getChild("collapserator");return null==e?void 0:e.getChild("PlayToggle")}},{key:"enablePlayToggle",value:function(){var e=this.getPlayToggle();e&&e.enable()}},{key:"disablePlayToggle",value:function(){var e=this.getPlayToggle();e&&e.disable()}},{key:"addCssClasses",value:function(){this.player.addClass("cv-range-indicator-plugin")}},{key:"removeCssClasses",value:function(){this.player.removeClass("cv-range-indicator-plugin")}},{key:"dispose",value:function(){var e,n,r,o,i,a;this.removeCssClasses(),this.player.off("timeupdate",this.onTimeUpdateOrSeeked),this.player.off("seeked",this.onTimeUpdateOrSeeked),null===(e=this.startTimeIndicator)||void 0===e||e.dispose(),null===(n=this.endTimeIndicator)||void 0===n||n.dispose(),null===(r=this.replayView)||void 0===r||r.dispose(),(o=t,i=this,"function"==typeof(a=Ye(Ke(1&3?o.prototype:o),"dispose",i))?function(e){return a.apply(i,e)}:a)([])}}],r&&Ue(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("rangeIndicatorPlugin",Qe),n(95027),n(57675);var Xe=n(27993),$e=n(94878);function et(e){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},et(e)}function tt(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return nt(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,u=0,c=e,p.n=n,a}};function y(n,r){for(u=n,c=r,t=0;!f&&l&&!o&&t<s.length;t++){var o,i=s[t],y=p.p,d=i[2];n>3?(o=d===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=n<2&&y<i[1])?(u=0,p.v=r,p.n=i[1]):y<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,p.n=d,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,d),u=s,c=d;(t=u<2?e:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),y(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(t){i=e,u=1,c=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(nt(t={},r,function(){return this}),t),f=l.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,nt(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,nt(f,"constructor",l),nt(l,"constructor",c),c.displayName="GeneratorFunction",nt(l,o,"GeneratorFunction"),nt(f),nt(f,o,"Generator"),nt(f,r,function(){return this}),nt(f,"toString",function(){return"[object Generator]"}),(tt=function(){return{w:i,m:p}})()}function nt(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}nt=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){nt(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},nt(e,t,n,r)}function rt(e){return function(e){if(Array.isArray(e))return ot(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ot(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ot(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ot(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function it(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,at(r.key),r)}}function at(e){var t=function(e){if("object"!=et(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==et(t)?t:t+""}function ut(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ut=function(){return!!e})()}function ct(e,t,n,r){var o=lt(st(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function lt(){return lt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=st(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},lt.apply(null,arguments)}function st(e){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},st(e)}function ft(e,t){return ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ft(e,t)}var pt=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=st(t),function(e,t){if(t&&("object"==et(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ut()?Reflect.construct(t,n||[],st(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ft(e,t)}(t,e),n=t,(r=[{key:"getPlayerOptions",value:function(){var e,n=ct(t,"getPlayerOptions",this,3)([]);return this.options.allowTranscript&&(n.allowTranscript=!0),(null===(e=n.devicesConfig)||void 0===e?void 0:e.canUserCastToDevices)?Object.assign(Object.assign({},n),{techOrder:["devices"].concat(rt(n.techOrder)),devices:{instanceId:Xe.x.generateRandomId()}}):n}},{key:"configurePlugins",value:function(){var e;try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),(null===(e=this.options.pointsOfInterest)||void 0===e?void 0:e.length)&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest}),this.player.loopVideoPlugin({allowLoop:this.options.allowLoop})}catch(e){console.log("failed to register plugins",e)}}},{key:"setNextVideo",value:function(e,t,n){this.player.nextVideoPlugin&&this.player.nextVideoPlugin().setNextVideo(e,t,n)}},{key:"togglePictureInPicture",value:function(e){var t=this.player.pictureInPicture();t&&t.togglePictureInPicture(e)}},{key:"toggleTheatreMode",value:function(e){var t=this.player.theatreModePlugin();t&&t.toggleTheatreMode(e,{shouldLog:!0})}},{key:"toggleTranscript",value:function(e){if(this.player.viewTranscriptPlugin){var t=this.player.viewTranscriptPlugin();t&&t.toggleTranscript(e)}}},{key:"hasStarted",value:function(){return this.player.hasStarted()}},{key:"additionalSetup",value:function(e){var n,r,o,i,a=this,u=Object.create(null,{additionalSetup:{get:function(){return ct(t,"additionalSetup",a,1)}}});return n=this,r=void 0,o=void 0,i=tt().m(function t(){var n;return tt().w(function(t){for(;;)switch(t.n){case 0:if(this.options.onRequestTheatreMode&&this.options.allowTheatreMode&&this.player.theatreModePlugin&&this.player.theatreModePlugin({onRequestTheatreMode:this.options.onRequestTheatreMode,theatreMode:this.options.theatreMode,playbackObject:e}),u.additionalSetup.call(this,e),this.options.showResources&&e.resources&&this.player.resourcesPlugin&&this.player.resourcesPlugin({resources:e.resources.list,imageCdnUrl:this.options.imageCdnUrl}),"MasterClip"!==e.mediaType){t.n=2;break}if(null!==(n=e.additionalData)){t.n=1;break}throw Error("Invalid clip data");case 1:this.player.clipPlugin({startTime:n.startTime,endTime:n.endTime});case 2:"MasterVideo"===e.mediaType&&this.options.startTime&&this.options.endTime&&this.player.rangeIndicatorPlugin({startTime:this.options.startTime,endTime:this.options.endTime});case 3:return t.a(2)}},t,this)}),new(o||(o=Promise))(function(e,t){function a(e){try{c(i.next(e))}catch(e){t(e)}}function u(e){try{c(i.throw(e))}catch(e){t(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o(function(e){e(n)})).then(a,u)}c((i=i.apply(n,r||[])).next())})}},{key:"setupAnalyticsDependentPlugins",value:function(e){var n;ct(t,"setupAnalyticsDependentPlugins",this,3)([e]),this.options.allowTranscript&&this.player.viewTranscriptPlugin().registerAnalytics(this.analyticsService,e),this.options.onRequestTheatreMode&&this.options.allowTheatreMode&&this.player.theatreModePlugin&&this.player.theatreModePlugin().registerAnalytics(this.analyticsService),(null===(n=this.options.devicesConfig)||void 0===n?void 0:n.canUserCastToDevices)&&this.player.devicesPlugin&&this.player.devicesPlugin(Object.assign(Object.assign({},this.options.devicesConfig),{userId:parseInt(e.viewerId),title:e.title,analyticsService:this.analyticsService}))}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}},{key:"useCurrentTranscript",value:function(e,t){$e.O.useMetadataTracks(this.player,"transcript",e,t)}},{key:"useChapters",value:function(e){$e.O.useChapters(this.player,e)}}])&&it(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.r)},56775:function(e,t,n){"use strict";var r,o=n(76032);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function u(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}!function(e){e.None="None",e.Complete="Complete",e.Incomplete="Incomplete"}(r||(r={}));var f=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=l(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,n||[],l(e).constructor):t.apply(e,n))}(this,t,[e,n])).update(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(t,e),n=t,o=[{key:"update",value:function(){this.options_.activityStatus===r.Complete?this.addClass("cv-activity-completed"):this.removeClass("cv-activity-completed")}},{key:"handleClick",value:function(){if(this.options_.activityStatus=this.getToggledActivityStatus(),this.update(),this.options_.clickHandler){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-activity-status-button"}},{key:"getToggledActivityStatus",value:function(){return this.options_.activityStatus===r.None||this.options_.activityStatus===r.Incomplete?r.Complete:this.options_.activityStatus===r.Complete?r.Incomplete:void 0}}],o&&a(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Z.getComponent("Button"));function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function d(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}f.prototype.controlText_="Complete";var m=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=h(t),function(e,t){if(t&&("object"==p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,v()?Reflect.construct(t,n||[],h(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(t,e),n=t,(r=[{key:"setActivityStatus",value:function(e,t){var n=this;e!==this.activityStatus&&(this.activityStatus=e,this.onToggleStatus=t,this.player.ready(function(){n.renderActivityStatusButton()}))}},{key:"renderActivityStatusButton",value:function(){this.button&&this.player.removeChild(this.button),this.button=new f(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button)}}])&&y(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("activityStatusPlugin",m)},96263:function(e,t,n){"use strict";var r=n(76032);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function a(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},c.apply(null,arguments)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var f=function(e){function t(e,n){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=l(t),function(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,n||[],l(e).constructor):t.apply(e,n))}(this,t,[e]),void 0===n.startTime)throw Error("Invalid clip start");if(void 0===n.endTime)throw Error("Invalid clip end");if(n.startTime>n.endTime)throw Error("Clip start cannot be greater than clip end");return r._clipStart=parseFloat(n.startTime.toPrecision(4)),r._clipEnd=parseFloat(n.endTime.toPrecision(4)),r.playerEndedFn=r.player.ended.bind(e),r.playerDurationFn=r.player.duration.bind(e),r.playerCurrentTimeFn=r.player.currentTime.bind(e),r.playerbufferedFn=r.player.buffered.bind(e),r.player.ended=r.ended.bind(r),r.player.duration=r.duration.bind(r),r.player.currentTime=r.currentTime.bind(r),r.player.buffered=r.buffered.bind(r),r.initialize(),r.player.ready(function(){r.player.trigger("durationchange")}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(t,e),n=t,a=[{key:"clipStart",get:function(){var e=this.playerDurationFn();return this._clipStart>e?e:this._clipStart}},{key:"clipEnd",get:function(){var e=this.playerDurationFn();return e<=0?this._clipEnd:this._clipEnd>e?e:this._clipEnd}},{key:"dispose",value:function(){var e,n,r;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"),(e=t,n=this,"function"==typeof(r=c(l(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"initialize",value:function(){this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay)}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var e=this.getCurrentTime(!1);e>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,e<this.clipStart-10&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(e){return e&&e>0&&(this.playerDurationFn()?console.info("The duration of the player has already been set. This is a no-op."):this.playerDurationFn(e)),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(e){if("number"!=typeof e)return this.getCurrentTime(!0);for(var t=e+this.clipStart,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.playerCurrentTimeFn(t,r)}},{key:"getCurrentTime",value:function(e){var t=this.playerCurrentTimeFn(),n=0;return t>=this.clipStart&&(n=t-this.clipStart),this.player.getCache().currentTime=n,e?n:t}},{key:"buffered",value:function(){for(var e=this.playerbufferedFn(),t=[],n=0;n<e.length;n++)t[n]=[Math.max(0,e.start(n)-this.clipStart),Math.min(Math.max(0,e.end(n)-this.clipStart),this.player.duration())];return r.Z.createTimeRanges(t)}}],a&&i(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a}(r.Z.getPlugin("plugin"));r.Z.registerPlugin("clipPlugin",f)},57675:function(e,t,n){"use strict";var r=n(76032);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function a(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}function c(e,t,n,r){var o=l(s(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=s(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},l.apply(null,arguments)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var p=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=s(t),function(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,n||[],s(e).constructor):t.apply(e,n))}(this,t,[e,n])).onLoopVideoChange=r.onLoopVideoChange.bind(r),r.player_.on("cv:loopvideo",r.onLoopVideoChange),r.onLoopVideoChange(null,r.player_.loopVideoPlugin().loop()),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(t,e),n=t,(a=[{key:"onLoopVideoChange",value:function(e,t){t?this.toggleOn():this.toggleOff()}},{key:"handleToggle",value:function(){var e=this.player_.loopVideoPlugin().loop();this.player_.loopVideoPlugin().loop(!e)}},{key:"toggleOn",value:function(){r.Z.dom.addClass(this.toggleEl,"on")}},{key:"toggleOff",value:function(){r.Z.dom.removeClass(this.toggleEl,"on")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,n,o){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=r.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var i=c(t,"createEl",this,3)([e,{className:"vjs-menu-item cv-cog-menu-item cv-loop-video-toggle",innerHTML:'\n <span class="vjs-menu-item-text">Loop video</span>\n <span class="cv-toggle-container"></span>'},o]);return i.children[1].appendChild(this.toggleEl),i}},{key:"dispose",value:function(){this.player_.off("cv:loopvideo",this.onLoopVideoChange),c(t,"dispose",this,3)([])}}])&&i(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a}(r.Z.getComponent("MenuItem"));function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,v(r.key),r)}}function v(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function b(){return b="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},b.apply(null,arguments)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}r.Z.registerComponent("LoopVideoMenuItem",p);var w=r.Z.getPlugin("plugin"),O=(r.Z.getComponent("MenuItem"),r.Z.getComponent("LoopVideoMenuItem")),P=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=m(t),function(e,t){if(t&&("object"==y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}(this,t,[e]),n.allowLoop&&r.player.ready(function(){return r.addButton()}),r.onEnded=r.onEnded.bind(r),r.player.on("ended",r.onEnded),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),n=t,r=[{key:"addButton",value:function(){var e;(null===(e=this.player.getChild("collapserator"))||void 0===e?void 0:e.getChild("cogButton")).addItem({ctor:O,name:"LoopVideoMenuItem"})}},{key:"onEnded",value:function(){this.player.loop()&&this.player.play()}},{key:"loop",value:function(e){var t,n,r;if("boolean"!=typeof e)return this.player.loop();e&&(null===(r=null===(n=(t=this.player).nextVideoPlugin)||void 0===n?void 0:n.call(t))||void 0===r||r.setShouldPlayNext(!1,!1)),this.player.trigger("cv:loopvideo",e),this.player.loop(e)}},{key:"dispose",value:function(){var e,n,r;this.player.off("ended",this.onEnded),(e=t,n=this,"function"==typeof(r=b(m(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}],r&&d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(w);r.Z.registerPlugin("loopVideoPlugin",P)},56728:function(e,t,n){"use strict";var r=n(76032),o=n(28788),i=n(90244);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function c(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function s(e,t,n,r){var o=f(p(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},f.apply(null,arguments)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}var d=r.Z.getComponent("Component"),v="cv-prevent-scrubbing-tooltip-show",h="cv-prevent-scrubbing-tooltip-remove-transition",b=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=p(t),function(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}(this,t,arguments)).isShowing=!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(t,e),n=t,r=[{key:"buildCSSClass",value:function(){return"cv-prevent-scrubbing-tooltip ".concat(s(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return s(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass(),innerText:o.vn}),r])}},{key:"show",value:function(){this.isShowing||(this.player_.userActive(!0),this.addClass(v),this.isShowing=!0)}},{key:"hide",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isShowing&&(t&&(this.addClass(h),window.requestAnimationFrame(function(){e.removeClass(h)})),this.player_.userActive(!1),this.removeClass(v),this.isShowing=!1)}}],r&&u(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(d);function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,w(r.key),r)}}function w(e){var t=function(e){if("object"!=m(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:t+""}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(O=function(){return!!e})()}function P(){return P="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=S(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},P.apply(null,arguments)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}r.Z.registerComponent(o.Hx,b);var C=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=S(t),function(e,t){if(t&&("object"==m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,O()?Reflect.construct(t,n||[],S(e).constructor):t.apply(e,n))}(this,t,[e])).originalPlaybackRates=[],r.isEnabled=!1,r.isPreviewing=!1;var o=null!=n?n:{},i=o.furthestVisitedTime,a=void 0===i?0:i,u=o.isEnabled,c=void 0!==u&&u;return r.playerCurrentTimeFn=r.player.currentTime.bind(e),r.player.currentTime=r.currentTime.bind(r),r.onTimeUpdate=r.onTimeUpdate.bind(r),r.furthestVisitedTime=a,r.isEnabled=c,c&&r.enable(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(t,e),n=t,r=[{key:"dispose",value:function(){var e,n,r;this.player.currentTime=this.playerCurrentTimeFn,this.isEnabled&&(this.disable(),(e=t,n=this,"function"==typeof(r=P(S(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([]))}},{key:"togglePreview",value:function(e){if(e){if(this.configurePreview(),this.isEnabled)return;this.enable(),this.isPreviewing=!0}else this.disable(),this.isPreviewing=!1}},{key:"configurePreview",value:function(){this.player.currentTime(0),this.furthestVisitedTime=0}},{key:"enable",value:function(){this.player.on("timeupdate",this.onTimeUpdate),this.getProgressControl().addChild(o.Hx),this.isEnabled=!0,this.setLimitedPlaybackRates()}},{key:"disable",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.getProgressControl().removeChild(this.getPreventScrubbingTooltip()),this.isEnabled=!1,this.restorePlaybackRates()}},{key:"setLimitedPlaybackRates",value:function(){var e,t;this.originalPlaybackRates=this.player.playbackRates();var n=this.originalPlaybackRates.filter(function(e){return e<=1.25});this.player.playbackRates(n),this.player.playbackRate()>1.25&&(null===(t=(e=this.player).persistPlaybackRatePlugin)||void 0===t||t.call(e).setPlaybackRateWithoutPersisting(1)),this.player.trigger("resizemenus")}},{key:"restorePlaybackRates",value:function(){this.player.playbackRates(this.originalPlaybackRates),this.player.trigger("resizemenus")}},{key:"getProgressControl",value:function(){return this.player.controlBar.getChild("progressControl")}},{key:"onTimeUpdate",value:function(){var e=this.playerCurrentTimeFn();e>this.furthestVisitedTime&&(this.furthestVisitedTime=e)}},{key:"currentTime",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];if("number"!=typeof e)return this.playerCurrentTimeFn.apply(this,[e].concat(r));if(this.isEnabled){var u=this.getPreventScrubbingTooltip(),c=null===(t=this.getSeekBar())||void 0===t?void 0:t.getChild("MouseTimeDisplay");if(e>this.furthestVisitedTime)return u.show(),(0,i.Ds)(u.hide,o.D,!1,u)(),null==c||c.hide(),void this.playerCurrentTimeFn(this.furthestVisitedTime,r);null==c||c.show(),u.hide(!0),this.playerCurrentTimeFn(e,r)}else this.playerCurrentTimeFn.apply(this,[e].concat(r))}},{key:"getPreventScrubbingTooltip",value:function(){return this.getProgressControl().getChild(o.Hx)}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}}],r&&g(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));r.Z.registerPlugin("preventScrubbingPlugin",C)},28788:function(e,t,n){"use strict";n.d(t,{D:function(){return i},Hx:function(){return o},vn:function(){return r}});var r="No skipping ahead!",o="PreventScrubbingTooltip",i=1e3},95027:function(e,t,n){"use strict";var r=n(76032),o=n(70065);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function u(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}function l(e,t,n,r){var o=s(f(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function s(){return s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},s.apply(null,arguments)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var y=r.Z.getComponent("MenuButton"),d="Theatre mode (t)",v="Default view (t)",h="cv-theatre-mode-button",b=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=f(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.updateControlText(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),n=t,(r=[{key:"getCollabsibleName",value:function(){return""}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!(window.innerWidth<992)}},{key:"showCollapsibleMenu",value:function(){l(t,"handleClick",this,3)([null])}},{key:"buildCSSClass",value:function(){return"cv-default-mode-button ".concat(l(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(l(t,"buildWrapperCSSClass",this,3)([]))}},{key:"handleClick",value:function(){this.player_.theatreModePlugin().toggleTheatreMode(void 0,{shouldLog:!0}),this.updateControlText()}},{key:"updateControlText",value:function(){this.player().theatreModePlugin().getTheatreMode()?this.controlText(v):this.controlText(d)}}])&&a(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(y);function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,w(r.key),r)}}function w(e){var t=function(e){if("object"!=m(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:t+""}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(O=function(){return!!e})()}function P(){return P="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=S(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},P.apply(null,arguments)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}r.Z.registerComponent("theatreModeButton",b);var C=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=S(t),function(e,t){if(t&&("object"==m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,O()?Reflect.construct(t,n||[],S(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,r.bindListeners(),e.ready(function(){return r.onReady()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(t,e),n=t,r=[{key:"bindListeners",value:function(){this.onResize=this.onResize.bind(this),this.onFullscreenChange=this.onFullscreenChange.bind(this),this.player.on("playerresize",this.onResize),this.player.on("fullscreenchange",this.onFullscreenChange)}},{key:"onReady",value:function(){if(this.options&&!(window.innerWidth<992)&&this.getCollapserator()){this.button=this.createButton();var e=this.options.theatreMode;e&&(this.toggleButton(!0),this.options.onRequestTheatreMode(e))}}},{key:"dispose",value:function(){var e,n,r;this.player.off("playerresize",this.onResize),this.player.off("fullscreenchange",this.onFullscreenChange),(e=t,n=this,"function"==typeof(r=P(S(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"toggleTheatreMode",value:function(e,t){var n,r=this;if(this.options){var i=this.options.theatreMode,a=void 0!==e?e:!i;if(this.options.onRequestTheatreMode(a),this.options.theatreMode=a,window.requestAnimationFrame(function(){return r.player.trigger("resize")}),this.button)return i!==a&&(null==t?void 0:t.shouldLog)&&(null===(n=this.analyticsService)||void 0===n||n.logUserAction({id:this.options.playbackObject.videoId,name:this.options.playbackObject.title},{actionType:o.Vw.Click,descriptor:a?o.UX.EnableTheatreMode:o.UX.DisableTheatreMode,entity:o.py.Video})),a?(i||this.player.fill(!0),this.toggleButton(!0),a):(i&&this.player.fluid(!0),this.toggleButton(!1),this.player.viewTranscriptPlugin&&this.player.viewTranscriptPlugin().toggleTranscript(!1,{shouldLog:!1}),a)}}},{key:"onResize",value:function(){var e,t;window.innerWidth<992?null===(e=this.button)||void 0===e||e.hide():this.player.isFullscreen()||(this.button||(this.button=this.createButton()),null===(t=this.button)||void 0===t||t.show())}},{key:"createButton",value:function(){var e=this.getCollapserator();return(null==e?void 0:e.getChild("theatreModeButton"))||e.addChild("theatreModeButton",{},e.children_.length-3),null==e?void 0:e.getChild("theatreModeButton")}},{key:"onFullscreenChange",value:function(){var e,t;this.player.isFullscreen()?null===(e=this.button)||void 0===e||e.hide():null===(t=this.button)||void 0===t||t.show()}},{key:"getCollapserator",value:function(){return this.player.getChild("collapserator")}},{key:"getTheatreMode",value:function(){return this.options.theatreMode}},{key:"registerAnalytics",value:function(e){this.analyticsService=e}},{key:"toggleButton",value:function(e){var t;this.button&&(e?(this.button.addClass(h),this.button.updateControlText(d),this.button.setActive(!0)):(null===(t=this.button)||void 0===t||t.removeClass(h),this.button.updateControlText(v),this.button.setActive(!1)))}}],r&&g(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));r.Z.registerPlugin("theatreModePlugin",C)},94889:function(e,t,n){"use strict";n.d(t,{E:function(){return we}});var r=n(76032),o=n(70065),i=n(32735),a=(n(51614),n(16951)),u=n(83983),c=n.n(u),l=n(31647);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,p(r.key),r)}}function p(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(y=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var h=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=d(t),function(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"FormatError"}}])&&f(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(l.Q._R),b=n(47416),m={ALLOWED_TAGS:["i","b","u","ruby","rt"]},g=new Map,w={getLanguagesOptions:function(e){return e?e.map(function(t){return{label:e.length>1?b.S.getFullEnglishName(t.language):b.S.getEnglishName(t.language),value:t.language,id:t.id,url:t.src}}).sort(function(e,t){var n=e.value.includes(P)?1:0;return(t.value.includes(P)?1:0)-n}):[]},transformVtt:function(e){if(!e)return[];var t=[],n=new(c().WebVTT.Parser)(window,c().WebVTT.StringDecoder()),r=[];if(n.oncue=function(e){r.push(e)},n.onparsingerror=function(e){t.push(e)},n.parse(e),n.flush(),t.length>0){var o=t.map(function(e){return e.message}).join(", ");l.Q.Ry.throw(new h("Failed to parse WebVTT format: ".concat(o)))}return r},createTextTrackList:function(e,t){var n=document.createElement("video"),r=n.addTextTrack("subtitles",t?b.S.getEnglishName(t):"English",t||"en-US");return e.forEach(function(e){r.addCue(e)}),n.textTracks},transformVttToTextTrackList:function(e,t,n){var r="".concat(n,"-").concat(t);if(g.has(r))return g.get(r);if(!e)return null;var o=w.transformVtt(e),i=w.createTextTrackList(o,t);return g.set(r,i),i},sanitizeCueText:function(e){return(0,a.sanitize)(e,m)}},O="transcript-selected-language",P="en";function S(e){var t,n;return(null===(t=e.find(function(e){return e.language.includes(P)}))||void 0===t?void 0:t.language)||(null===(n=e[0])||void 0===n?void 0:n.language)}var j=n(94878),C=n(42648),_=n(6620),k=n(19442),T=n(40221);function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var I=/\n/g;var L=n(57857),x=n(27866);n(40194);var M=n(52076),A=n(58424),B=n(39396),D=n(21326),N=n(85475);function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Z=L.T.encloseNamespace("shared.copyContentIconButton");function F(e){var t,n,r=(t=i.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,n)||function(e,t){if(e){if("string"==typeof e)return z(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}}(t,n)||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.")}()),o=r[0],a=r[1];return i.useEffect(function(){if(o){var e=window.setTimeout(function(){a(!1)},1e3);return function(){return window.clearTimeout(e)}}},[o]),i.createElement(D.u,{title:Z(o?"copied":"copy"),spanHack:!0,spanHackClassName:e.tooltipClassName||""},i.createElement(A.L,{"aria-label":"Copy to clipboard",className:e.visible?"QzREy":"_LaKg",onClick:function(t){t.stopPropagation(),navigator.clipboard.writeText(e.copyableContent).then(function(){var t;a(!0),null===(t=e.onClick)||void 0===t||t.call(e)})}},i.createElement(B.x,{svgName:N.vn.Copy,size:B.S.Small})))}var V=n(32557),G={timePoint:"VOCS4",wide:"ewc3a",item:"sbTZM",inPlayer:"ZSsXf"};function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function U(e){var t,n,r=e.currentTimePoint===e.timePoint,a=(t=(0,V.X)(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,n)||function(e,t){if(e){if("string"==typeof e)return H(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}(t,n)||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.")}()),u=a[0],c=a[1],l=x.T.ToDisplayDuration(1e3*e.timePoint);return i.createElement("section",Object.assign({},e.isAuthenticated&&{role:"button"},{className:"d-flex p-2 align-items-center cursor-pointer rounded text-dark ".concat(e.inPlayer?G.inPlayer:""," ").concat(e.isAuthenticated?"cursor-pointer":""," ").concat(G.item," ").concat(r?"bg-gray-100":""),id:e.timePoint.toString(),onClick:function(){e.onClick(),M.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{cueIndex:e.cueIndex}),Object.assign(Object.assign({},e.analyticsOptions),{descriptor:o.XX.TranscriptTimepoint,actionType:o.Vw.Click}))},ref:u}),i.createElement("p",{className:"mb-0 d-flex flex-column align-items-center"},i.createElement("time",{dateTime:"PT".concat(e.timePoint,"S"),"aria-label":"time-stamp-".concat(l),className:"bg-light-blue text-info rounded-pill d-inline py-1 text-center ".concat(G.timePoint," ").concat(e.wideTimeTag?G.wide:""," ").concat(r?"bg-white":"")},l)),i.createElement("p",{className:"ms-3 w-100 mb-0"},e.nodes.map(function(t,n){var r=w.sanitizeCueText(t.text);return null===t.searchResultIndex?i.createElement("span",{key:n,dangerouslySetInnerHTML:{__html:r}}):i.createElement("mark",{className:"".concat(G.mark," ").concat(t.searchResultIndex===e.currentSearchResultIndex?"bg-orange":"bg-yellow"),key:n,dangerouslySetInnerHTML:{__html:r}})})),i.createElement(F,{copyableContent:e.transcript,visible:c,onClick:function(){M.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{cueIndex:e.cueIndex}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:o.Vw.Copy}))}}))}function q(e){var t,n,r=e.cuesToDisplay.some(function(e){return e.startTime>=3600}),o=new Map;return e.chapters.forEach(function(t,n){var r=e.cuesToDisplay.findIndex(function(e){return e.startTime>t.startTime});o.set(r,n)}),i.createElement("article",{"aria-label":"transcript",className:"w-100 position-relative",style:{height:e.virtualizer.getTotalSize()}},i.createElement("div",{className:"w-100 position-absolute top-0 start-0",style:{transform:"translateY(".concat(null!==(n=null===(t=e.items[0])||void 0===t?void 0:t.start)&&void 0!==n?n:0,"px)")}},e.items.map(function(t){var n,a=t.index,u=e.cuesToDisplay[a],c=!1,l="";return o.has(a)&&(c=!0,l=e.chapters[o.get(a)].name),i.createElement("section",{className:e.inPlayer?"":"px-3",key:u.startTime,ref:e.virtualizer.measureElement,"data-index":a},c&&i.createElement("h3",{className:"".concat(0!==o.get(a)?"mt-2":""," my-2 h6 ").concat(e.inPlayer?"px-2":"")},i.createElement("span",null,l)),i.createElement(U,{timePoint:u.startTime,transcript:u.text,nodes:u.nodes,onClick:function(){return e.onClickTranscriptionItem(u)},currentTimePoint:null===(n=e.timepoint)||void 0===n?void 0:n.startTime,currentSearchResultIndex:e.currentSearchResultIndex,wideTimeTag:!!r,inPlayer:e.inPlayer,analyticsOptions:e.analyticsOptions,analyticsData:e.analyticsData,cueIndex:a,isAuthenticated:e.isAuthenticated}))})))}var W=n(53808),Y=n(95544);function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var J=L.T.encloseNamespace("playPage.transcriptSearchBar");function Q(e){var t,n,r=i.useRef(null),a=(t=i.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,n)||function(e,t){if(e){if("string"==typeof e)return K(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}(t,n)||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.")}()),u=a[0],c=a[1];function l(t){M.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{query:t}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:o.Vw.Search,descriptor:t?o.uG.SearchTranscript:o.uG.ResetResults}))}var s=i.useCallback(W.q.debounce(function(e){return l(e)},500),[]);function f(){M.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{query:e.query}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:o.Vw.Search,descriptor:o.uG.NextResult})),e.currentSearchResultIndex===e.totalSearchResults-1?e.jumpToSearchResult(0):e.jumpToSearchResult(e.currentSearchResultIndex+1)}function p(){M.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{query:e.query}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:o.Vw.Search,descriptor:o.uG.PreviousResult})),0===e.currentSearchResultIndex?e.jumpToSearchResult(e.totalSearchResults-1):e.jumpToSearchResult(e.currentSearchResultIndex-1)}function y(e){var t;e.keepFocus||null===(t=r.current)||void 0===t||t.focus(),f()}function d(e){var t;e.keepFocus||null===(t=r.current)||void 0===t||t.focus(),p()}function v(e){c("focus"===e)}return i.createElement("div",{className:(0,Y.A)("form-control py-0 px-1 d-flex align-items-center",u?"KFd6d":"QBjyt","XfIEh"),onClick:function(){var e;return null===(e=r.current)||void 0===e?void 0:e.focus()},role:"search"},i.createElement("div",{"aria-hidden":"true"},i.createElement(B.x,{svgName:N.vn.Search})),i.createElement("input",{className:"form-control border-0 px-1 ".concat("MAoRJ"),value:e.query,onChange:function(t){s(t.target.value),e.onSearch(t.target.value)},autoComplete:"off",placeholder:J("searchPlaceholder"),ref:r,onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),e.shiftKey?p():f())},onFocus:function(){return v("focus")},onBlur:function(){return v("blur")}}),!!e.query&&i.createElement("div",{className:"d-flex align-items-center"},i.createElement("div",null,e.totalSearchResults?"".concat(e.currentSearchResultIndex+1,"/").concat(e.totalSearchResults):"0/0"),i.createElement(A.L,{"aria-label":J("previousResult"),onClick:function(){return d({keepFocus:!1})},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||d({keepFocus:!0})}},i.createElement(B.x,{svgName:N.vn.ChevronUp})),i.createElement(A.L,{"aria-label":J("nextResult"),onClick:function(){return y({keepFocus:!1})},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||y({keepFocus:!0})}},i.createElement(B.x,{svgName:N.vn.ChevronDown})),i.createElement(A.L,{"aria-label":J("clearSearch"),onClick:function(){var t;l(""),null===(t=r.current)||void 0===t||t.focus(),e.onSearch("")}},i.createElement(B.x,{svgName:N.vn.Close}))))}n(66703);var X,$,ee=n(2491),te=(n(45344),n(87268));n(19650),($=X||(X={})).Resources="resources",$.Interactives="interactives",$.Video="video",$.Clips="clips",$.CurriculumLinks="curriculum-links",$.VideoDetails="video-details",$.RelatedVideos="related-videos",$.ClippedFrom="clipped-from",$.Transcript="transcript",L.T.encloseNamespace("shared.playPageTranscription");var ne=n(42539),re={languageSelect:"rHbhp",inputWithoutHighlight:"nJvbl"};function oe(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return ie(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,u=0,c=e,p.n=n,a}};function y(n,r){for(u=n,c=r,t=0;!f&&l&&!o&&t<s.length;t++){var o,i=s[t],y=p.p,d=i[2];n>3?(o=d===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=n<2&&y<i[1])?(u=0,p.v=r,p.n=i[1]):y<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,p.n=d,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,d),u=s,c=d;(t=u<2?e:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),y(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(t){i=e,u=1,c=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(ie(t={},r,function(){return this}),t),f=l.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,ie(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,ie(f,"constructor",l),ie(l,"constructor",c),c.displayName="GeneratorFunction",ie(l,o,"GeneratorFunction"),ie(f),ie(f,o,"Generator"),ie(f,r,function(){return this}),ie(f,"toString",function(){return"[object Generator]"}),(oe=function(){return{w:i,m:p}})()}function ie(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ie=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){ie(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},ie(e,t,n,r)}function ae(e){var t,n,r=null===(t=e.languageOptions[0])||void 0===t?void 0:t.label,a=e.track.src,u=(0,ee.Z)();return i.createElement("div",{className:"d-flex px-1 mb-3"},i.createElement(Q,{query:e.searchQuery,currentSearchResultIndex:e.currentSearchResultIndex,onSearch:e.onSearch,totalSearchResults:e.totalSearchResults,jumpToSearchResult:e.jumpToSearchResult,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions}),i.createElement(D.u,{spanHack:!0,title:e.languageOptions.length>1?"":"Only available in ".concat(r)},i.createElement(ne.Z,null,i.createElement(ne.Z.Toggle,{className:"text-dark ".concat(re.languageSelect),id:"language-select",disabled:(null===(n=e.languageOptions)||void 0===n?void 0:n.length)<=1,variant:"outline-dark"},i.createElement(B.x,{svgName:N.vn.Globe})),i.createElement(ne.Z.Menu,{className:re.menu,"aria-labelledby":"language-select"},e.languageOptions.map(function(t,n){return i.createElement(ne.Z.Item,{key:n,onClick:function(){var n;null===(n=e.onChangeLanguage)||void 0===n||n.call(e,t.value),M.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{language:t.value,previousLanguageName:e.selectedLanguage}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:o.Vw.Select}))},className:"cursor-pointer",active:t.value===e.selectedLanguage},t.label)})))),i.createElement(k.h,{svgName:N.vn.Download,onClick:function(){return t=this,n=void 0,r=void 0,i=oe().m(function t(){return oe().w(function(t){for(;;)switch(t.n){case 0:return M.k.logUserAction(e.analyticsData,Object.assign(Object.assign({},e.analyticsOptions),{actionType:o.Vw.Download})),t.p=1,t.n=2,te.T.downloadBlob(a,"Subtitles-".concat(e.selectedLanguage,".vtt"));case 2:t.n=4;break;case 3:t.p=3,t.v,u.error("Error downloading transcript");case 4:return t.a(2)}},t,null,[[1,3]])}),new(r||(r=Promise))(function(e,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function u(e){try{c(i.throw(e))}catch(e){o(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r(function(e){e(n)})).then(a,u)}c((i=i.apply(t,n||[])).next())});var t,n,r,i},className:"position-relative d-flex align-items-center text-dark"}))}var ue=n(89722),ce=n(69140);function le(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return se(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?se(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fe(e){var t=ce.S.get(O)||S(e.allTracks),n=i.useState(function(){return e.allTracks.find(function(e){return e.language===t})||e.allTracks.find(function(t){return t.language===S(e.allTracks)})}),r=le(n,2),a=r[0],u=r[1],c=le(i.useState(t),2),l=c[0],s=c[1],f=le(i.useState(-1),2),p=f[0],y=f[1],d=le(i.useState(!0),2),v=d[0],h=d[1],b=le(i.useState([]),2),m=b[0],g=b[1],w=i.useMemo(function(){return Array.from((null==a?void 0:a.cues)||[])},[l]),P={videoId:e.playbackObject.videoId,videoName:e.playbackObject.title,language:l},j={location:o.LZ.Player,entity:o.py.Transcript},R=e.player.hasStarted();!function(e){function t(t){var n=Array.from((null==t?void 0:t.activeCues)||[]);if(n.length){var r=e.cuesToDisplay.findIndex(function(e){return e.startTime===T.m.last(n).startTime});-1!==r?e.setCurrentCueIndex(r):e.setCurrentCueIndex(null)}}function n(){t(e.currentTranscriptTrack)}i.useEffect(function(){e.hasStarted&&t(e.currentTranscriptTrack)},[e.hasStarted]),i.useEffect(function(){return e.currentTranscriptTrack&&e.currentTranscriptTrack.addEventListener("cuechange",n),function(){var t;return null===(t=e.currentTranscriptTrack)||void 0===t?void 0:t.removeEventListener("cuechange",n)}},[e.currentTranscriptTrack])}({currentTranscriptTrack:a,cuesToDisplay:w,setCurrentCueIndex:y,hasStarted:R});var L=i.useRef(),x=(0,_.MG)({count:m.length,getScrollElement:function(){var e;return null===(e=L.current)||void 0===e?void 0:e.view},estimateSize:function(){return 40},enabled:m.length>0}),M=x.getVirtualItems(),A=function(e,t,n){function r(e){n&&n.scrollToIndex(e,{align:"start"})}return i.useEffect(function(){t&&"number"==typeof e&&r(e)},[e,t,n]),r}(p,v,x),B=function(e){var t=e.cuesToDisplay,n=e.resetHighlightedCues,r=e.setHighlightedCues,o=e.scrollToCue,a=E(i.useState(""),2),u=a[0],c=a[1],l=E(i.useState(null),2),s=l[0],f=l[1],p=E(i.useState(0),2),y=p[0],d=p[1],v=E(i.useTransition(),2)[1];return{isSearching:null!==s,searchQuery:u,onSearch:function(e){c(e),0!==y&&d(0),v(function(){!function(e){if(!e.length)return f(null),void n();var i=new RegExp(e.replace(I," "),"gi"),a=[],u=0,c=t.map(function(e,t){var n=e.text,r=n.replace(I," ").matchAll(i);if(0===r.length)return Object.assign(e,{nodes:[{text:n,searchResultIndex:null}]});var o=[],c=0;return r.forEach(function(e,r){var i=e[0],l=e.index;l>c&&o.push({text:n.substring(c,l),searchResultIndex:null}),o.push({text:i,searchResultIndex:u}),u++,a.push({cueIndex:t,cueMatchIndex:r}),c=l+i.length}),c<n.length&&o.push({text:n.substring(c),searchResultIndex:null}),Object.assign(e,{nodes:o})});f(a),r(c),a.length&&o(a[0].cueIndex)}(e)})},jumpToSearchResult:function(e){var t=s[e];t&&(d(e),o(t.cueIndex))},totalSearchResults:null==s?void 0:s.length,currentSearchResultIndex:y,resetSearchResults:function(){f(null),c(""),d(0),n()}}}({cuesToDisplay:w,resetHighlightedCues:Q,setHighlightedCues:g,scrollToCue:A}),D=B.isSearching,z=B.searchQuery,Z=B.totalSearchResults,F=B.jumpToSearchResult,G=B.onSearch,H=B.currentSearchResultIndex,U=B.resetSearchResults,W=e.player.paused(),Y=le((0,V.X)(),2),K=Y[0],J=Y[1];function Q(){g(w.map(function(e){return Object.assign(e,{nodes:[{text:e.text,searchResultIndex:null}]})}))}return i.useEffect(function(){h(!J&&!D&&R&&!W)},[J,D,R,W]),i.useEffect(function(){Q()},[w]),a&&w.length?i.createElement("div",{ref:K,className:"cv-transcript py-3 px-2 ".concat(e.showTranscript?"cv-open":"")},i.createElement("div",{className:"text-dark d-flex justify-content-between px-1"},i.createElement("h3",null,"Transcript"),i.createElement(k.h,{svgName:N.vn.Close,onClick:function(){e.toggleTranscript(!1)},ariaLabel:"Close transcript"})),i.createElement(ae,{selectedLanguage:l,languageOptions:e.languageOptions,onChangeLanguage:function(t){u(e.allTracks.find(function(e){return e.language===t})),s(t),ce.S.set(O,t),U()},track:a,onSearch:G,searchQuery:z,currentSearchResultIndex:H,totalSearchResults:Z,jumpToSearchResult:F,analyticsData:P,analyticsOptions:j}),i.createElement("div",{className:"cv-transcript-list-wrapper text-dark"},i.createElement(C.ZP,{ref:L},i.createElement(q,{timepoint:w[p],onClickTranscriptionItem:function(t){var n;null===(n=e.setStartTime)||void 0===n||n.call(e,t.startTime)},cuesToDisplay:m,chapters:e.chapters,currentSearchResultIndex:H,inPlayer:!0,virtualizer:x,items:M,analyticsOptions:j,analyticsData:P,isAuthenticated:!1})))):i.createElement(i.Fragment,null)}function pe(e){return pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pe(e)}function ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,de(r.key),r)}}function de(e){var t=function(e){if("object"!=pe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pe(t)?t:t+""}function ve(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ve=function(){return!!e})()}function he(){return he="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=be(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},he.apply(null,arguments)}function be(e){return be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},be(e)}function me(e,t){return me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},me(e,t)}r.Z.registerComponent("Transcript",(0,ue.Z)(function(e,t){return i.createElement(fe,Object.assign({player:e},t))}));var ge=r.Z.getPlugin("plugin"),we=992,Oe=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=be(t),function(e,t){if(t&&("object"==pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ve()?Reflect.construct(t,n||[],be(e).constructor):t.apply(e,n))}(this,t,[e])).allClickViewTracks=[],n.player=e,n.bindListeners(),e.ready(function(){return n.initialize()}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&me(e,t)}(t,e),n=t,r=[{key:"bindListeners",value:function(){var e=this;this.onResize=this.onResize.bind(this),j.O.useMetadataTracks(this.player,"transcript",function(){return e.player.trigger("resizemenus")}),this.player.on("playerresize",this.onResize)}},{key:"dispose",value:function(){var e,n,r;this.player.off("playerresize",this.onResize),(e=t,n=this,"function"==typeof(r=he(be(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"initialize",value:function(){j.O.useMetadataTracks(this.player,"transcript",this.onTranscriptLoaded.bind(this)),j.O.useChapters(this.player,this.onChaptersLoaded.bind(this))}},{key:"onChaptersLoaded",value:function(e){this.chapterTrack=e}},{key:"onTranscriptLoaded",value:function(e){var t=e.isClickViewProduced;!this.allClickViewTracks.find(function(t){return t.language===e.language})&&t&&this.allClickViewTracks.push(e),this.languageOptions=this.buildOptions(this.allClickViewTracks)}},{key:"buildOptions",value:function(e){return e.map(function(e){return{label:b.S.getFullEnglishName(e.language),value:e.language}}).sort(function(e,t){var n=e.value.includes(P)?1:0;return(t.value.includes(P)?1:0)-n})}},{key:"buildComponentProps",value:function(e,t,n){var r,o=Array.from((null===(r=this.chapterTrack)||void 0===r?void 0:r.cues)||[]).map(function(e){return{endTimestamp:e.endTime,startTime:e.startTime,name:e.text}});return{showTranscript:e,languageOptions:this.languageOptions,toggleTranscript:function(e){return t(e,{shouldLog:!0})},allTracks:this.allClickViewTracks,setStartTime:n,chapters:o,playbackObject:this.playbackObject}}},{key:"addChildren",value:function(e){if(this.component)return this.component.show(),this.component;var t=this.toggleTranscript.bind(this),n=this.setStartTime.bind(this),r=this.buildComponentProps(e,t,n);this.component=this.player.addChild("Transcript",r)}},{key:"toggleTranscript",value:function(e,t){var n,r,i,a=void 0!==e?e:!this.showTranscript;this.showTranscript=a,a?(null===(n=this.player.theatreModePlugin())||void 0===n||n.toggleTheatreMode(!0,{shouldLog:!1}),this.addChildren(!0),this.player.addClass("cv-transcript-plugin")):(null===(r=this.component)||void 0===r||r.hide(),this.player.removeClass("cv-transcript-plugin")),this.player.whiteboardModePlugin&&this.player.whiteboardModePlugin().setEnabled(!a),this.player.trigger("cv-transcript-toggle",a),this.player.trigger("resizemenus"),this.player.trigger("playerresize"),(null==t?void 0:t.shouldLog)&&(null===(i=this.analyticsService)||void 0===i||i.logUserAction({videoId:this.playbackObject.videoId,videoName:this.playbackObject.title},{actionType:o.Vw.Click,descriptor:a?o.UX.ShowTranscript:o.UX.HideTranscript,entity:o.py.Transcript}))}},{key:"setStartTime",value:function(e){this.player.currentTime(e)}},{key:"isTranscriptOn",value:function(){return!!this.showTranscript}},{key:"onResize",value:function(){window.innerWidth<we?this.player.addClass("hide-transcript"):this.showTranscript&&this.player.removeClass("hide-transcript")}},{key:"registerAnalytics",value:function(e,t){this.analyticsService=e,this.playbackObject=t}}],r&&ye(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ge);r.Z.registerPlugin("viewTranscriptPlugin",Oe)},89722:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(44645),o=n(76032);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function s(e,t,n){return t=y(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},p.apply(null,arguments)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var h=function(e){function t(e,n){return a(this,t),s(this,t,[e,n])}return d(t,e),c(t,[{key:"dispose",value:function(){var e,n,r,o=this;setImmediate(function(){var e;null===(e=o.root)||void 0===e||e.unmount()}),(e=t,n=this,"function"==typeof(r=p(y(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}])}(o.Z.getComponent("Component")),b={tagName:"div"};function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;if(!e)throw new Error("componentCtor is required");var n=function(n){function i(){return a(this,i),s(this,i,arguments)}return d(i,n),c(i,[{key:"createEl",value:function(){var n=o.Z.dom.createEl(t.tagName,t.properties,t.attributes),i=(0,r.s)(n);return i.render(e(this.player_,this.options_)),this.root=i,n}}])}(h);return n}},61380:function(e,t,n){"use strict";n.d(t,{e:function(){return f}});var r=n(61876);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function u(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return a(s,"_invoke",function(n,r,o){var i,a,u,l=0,s=o||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,a=0,u=e,p.n=n,c}};function y(n,r){for(a=n,u=r,t=0;!f&&l&&!o&&t<s.length;t++){var o,i=s[t],y=p.p,d=i[2];n>3?(o=d===r)&&(u=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=n<2&&y<i[1])?(a=0,p.v=r,p.n=i[1]):y<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,p.n=d,a=0))}if(o||n>1)return c;throw f=!0,r}return function(o,s,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,d),a=s,u=d;(t=a<2?e:u)||!f;){i||(a?a<3?(a>1&&(p.n=-1),y(a,u)):p.n=u:p.v=u);try{if(l=2,i){if(a||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((t=(f=p.n<0)?u:n.call(r,p))!==c)break}catch(t){i=e,a=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),s}var c={};function l(){}function s(){}function f(){}t=Object.getPrototypeOf;var p=[][r]?t(t([][r]())):(a(t={},r,function(){return this}),t),y=f.prototype=l.prototype=Object.create(p);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,a(e,o,"GeneratorFunction")),e.prototype=Object.create(y),e}return s.prototype=f,a(y,"constructor",f),a(f,"constructor",s),s.displayName="GeneratorFunction",a(f,o,"GeneratorFunction"),a(y),a(y,o,"Generator"),a(y,r,function(){return this}),a(y,"toString",function(){return"[object Generator]"}),(i=function(){return{w:u,m:d}})()}function a(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}a=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){a(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},a(e,t,n,r)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function c(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}var l=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}c((r=r.apply(e,t||[])).next())})},s=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tokens={gateway:null}},t=[{key:"get",value:function(e,t){return l(this,void 0,void 0,i().m(function n(){var r,o;return i().w(function(n){for(;;)switch(n.n){case 0:return r=this,n.n=1,fetch(e,{method:"GET",mode:"cors",headers:this.getHeaders(t)});case 1:return o=n.v,n.n=2,r.parseResponse.call(r,o);case 2:return n.a(2,n.v)}},n,this)}))}},{key:"delete",value:function(e,t){return l(this,void 0,void 0,i().m(function n(){return i().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,fetch(e,{method:"DELETE",headers:this.getHeaders(t)});case 1:return n.a(2)}},n,this)}))}},{key:"post",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return l(this,void 0,void 0,i().m(function o(){var a;return i().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,fetch(e,{method:"POST",headers:this.getHeaders(n),body:t,mode:"cors"});case 1:if(a=o.v,!r){o.n=3;break}return o.n=2,this.parseResponse(a);case 2:return o.a(2,o.v);case 3:return o.a(2)}},o,this)}))}},{key:"put",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return l(this,void 0,void 0,i().m(function o(){var a;return i().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,fetch(e,{method:"PUT",headers:this.getHeaders(n),body:t,mode:"cors"});case 1:if(a=o.v,!r){o.n=3;break}return o.n=2,this.parseResponse(a);case 2:return o.a(2,o.v);case 3:return o.a(2)}},o,this)}))}},{key:"setToken",value:function(e,t){this.tokens[e]=t}},{key:"getHeaders",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={"Content-Type":"application/json"};return this.tokens[e.tokenName]&&(t.authorization="Bearer ".concat(this.tokens[e.tokenName])),t}},{key:"parseResponse",value:function(e){return l(this,void 0,void 0,i().m(function t(){var n,o;return i().w(function(t){for(;;)switch(t.n){case 0:if(404!==e.status){t.n=1;break}return t.a(2,null);case 1:if(e.ok){t.n=6;break}return t.p=2,t.n=3,e.json();case 3:n=t.v,t.n=5;break;case 4:throw t.p=4,t.v,new r.M(e.url);case 5:throw t.p=5,new r.M(e.url,n);case 6:return t.n=7,e.json();case 7:return o=t.v,t.a(2,o)}},t,null,[[2,4,5,6]])}))}}],t&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),f=new s},90244:function(e,t,n){"use strict";n.d(t,{Ds:function(){return o},P2:function(){return r}});var r=function(e,t){var n=window.performance.now();return function(){var r=window.performance.now();r-n>=t&&(e.apply(void 0,arguments),n=r)}},o=function(e,t,n){var r,o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){for(var a=arguments.length,u=new Array(a),c=0;c<a;c++)u[c]=arguments[c];var l=!1,s=function(){r=null,s=null,e.apply(this,u)};return!r&&n&&(e.apply(o,u),l=!0),i.clearTimeout(r),r=i.setTimeout(s,t),l};return a.cancel=function(){i.clearTimeout(r),r=null},a}},30708:function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),o=Math.floor(e/3600),i=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(o=r=n="-"),(o=o>0||a>0?o+":":"")+(r=((o||i>=10)&&r<10?"0"+r:r)+":")+(n<10?"0"+n:n)}n.d(t,{m:function(){return r}})},39232:function(e,t,n){"use strict";function r(e){for(var t=e.buffered(),n=e.currentTime(),r=0,o=0;o<t.length;o++){var i=t.start(o),a=t.end(o);if(i<=n&&a>=n){r=a;break}}return r}n.d(t,{b:function(){return r}})},27993:function(e,t,n){"use strict";n.d(t,{x:function(){return r}});var r={generateRandomId:function(){var e,t,n;return null!==(n=null===(t=null===(e=window.crypto)||void 0===e?void 0:e.randomUUID)||void 0===t?void 0:t.call(e))&&void 0!==n?n:Math.random().toString()}}},69140:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});var r="cv-persisttest",o={hasLocalStorage:function(){try{return window.localStorage.setItem(r,"cv-player-storage-test"),window.localStorage.removeItem(r),!0}catch(e){return!1}},get:function(e){return window.localStorage.getItem(e)},set:function(e,t){window.localStorage.setItem(e,t)},remove:function(e){window.localStorage.removeItem(e)}}},94878:function(e,t,n){"use strict";n.d(t,{O:function(){return l}});var r=n(63151);function o(e,t,n,r){if(!e.length)return[];for(var o=[],i=e.length-1;i>=0;i--){var a=e[i];if(a.kind===t){if(n&&a.label!==n)continue;if(r&&a.language!==r)continue;o.push(a)}}return o}function i(e,t,n,r,o){e.kind===t&&(n&&e.label!==n||o&&e.language!==o||(e.loaded_?r(e):e.one("loadeddata",function(){r(e)})))}function a(e){if(null==e?void 0:e.cues.length)for(var t=0;t<e.cues.length;t++){var n=e.cues[t];(null==n?void 0:n.text)&&(n.text=r.m.sanitize(n.text))}}function u(e,t,n,r,a){var u=e.textTracks(),c=o(u,t,n,a)[0];if(c)i(c,t,n,r);else{var l=function(e){i(e.track,t,n,r),u.removeEventListener("addtrack",l)};u.addEventListener("addtrack",l),e.one("dispose",function(){u.removeEventListener("addtrack",l)})}}function c(e,t,n,r,a){var u=e.textTracks(),c=o(u,t,n,a);c.length&&c.forEach(function(e){return i(e,t,n,r,a)});var l=function(e){i(e.track,t,n,r,a)};u.addEventListener("addtrack",l),e.one("dispose",function(){u.removeEventListener("addtrack",l)})}var l={getTrack:function(e,t,n,r){return o(e.textTracks(),t,n,r)[0]},useChapters:function(e,t){u(e,"chapters",null,t)},useMetadataTrack:function(e,t,n){u(e,"metadata",t,n,null)},useMetadataTracks:function(e,t,n,r){c(e,"metadata",t,n,r)},useSubtitles:function(e,t,n){c(e,"subtitles",null,t,n)},getCurrentTextTrack:function(e){return this.findTrackByPredicate(e,function(e){return"showing"===e.mode})},findTrackByPredicate:function(e,t){if(!e)return null;for(var n=e.textTracks(),r=0;r<n.length;r++){var o=n[r];if(t(o))return o}return null},forEachTrack:function(e,t){if(e)for(var n=e.textTracks(),r=0;r<n.length;r++)t(n[r])},sanitizeTrack:function(e,t){if(e&&t)if(e.loaded)a(e);else{var n=function(){return a(e)};e.addEventListener("loadeddata",n),t.one("dispose",function(){e.removeEventListener("loadeddata",n)})}}}},61577:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,u=e.escapeExpression;return'<iframe class="'+u(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.webPlayer:i,t))+'" id="'+u(a(null!=(i=null!=t?t.options:t)?i.id:i,t))+'" allowfullscreen webkitallowfullscreen mozallowfullscreen allow="autoplay; fullscreen" frameborder="0" width="'+u(a(null!=(i=null!=t?t.options:t)?i.width:i,t))+'" height="'+u(a(null!=(i=null!=t?t.options:t)?i.height:i,t))+'" src="'+u(a(null!=(i=null!=t?t.options:t)?i.url:i,t))+'"></iframe>\n<div class="'+u(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.playSvg:i,t))?i:"")+"</div>"},useData:!0})},58421:function(){}}]);
|